Support » Plugins » Again: get_categories filter does not apply automatically

  • hello all!

    here again the question which i posted some days ago and still remains unanswered. if i post this question on a wrong channel, please inform me as well! thanx a lot…

    now the question:

    i use get_categories() sometimes in my plugin code, and have a filter registered on this function:

    function foo($categories){
    echo “TEST!”;
    return $categories;
    add_filter(‘get_category’, ‘foo’, 0);

    but TEST! is never echoed when i call get_categories somewhere else in my code…

    when i add the line apply_filter(‘get_categories’, $categories);

    to the function &get_categories($args = ”) in wpincludes/category.php everything works fine. is this a known bug or am i doing something wrong?

    thanks for replying,

Viewing 1 replies (of 1 total)
  • I am having the same problem. I put a die statement in my filter and it’s never even called.

    function hide_noaff_category($cats) {
Viewing 1 replies (of 1 total)
  • The topic ‘Again: get_categories filter does not apply automatically’ is closed to new replies.