plugin development – The $term_id is usable in one function but not the other function and nothing helps

Question

I am having a problem with getting the term_id number to echo in the first function. I have tried many different types of code and most everything echos nothing. Some things echo Array and I know why, and others echo the slug name. For example I have tried to include $term_id between the () and this does not work. And I have tried many different tests that I found on the internet and nothing works. I have also tried to get tag_ID with no results. I have tried making a new query and more. Why does below function #2 save the database correctly with the term_id numbers included correctly but I can’t get function #1 to echo any term_id number?

Function 1

function QuickEdit($column_name, $screen, $name) {
 if ($column_name == 'thumb') 
  echo '<some_html><span class="test-' . $term_id . '"></span></some_html>';
}

Function 2

function SaveThis($term_id) {
 if(isset($_POST['test_taxonomy'])) {
  update_option('the_taxonomy'.$term_id, $_POST['test_taxonomy'], false);
 }
}

0
Angel Hess 2 months 2023-03-22T19:41:20-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse