The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Again: get_categories filter does not apply automatically (2 posts)

  1. maxe
    Posted 8 years ago #

    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,

  2. gmorehoudh
    Posted 7 years ago #

    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) {

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.