• Hi,

    In file class-relevanssi-taxonomy-walker.php at line 64 and 71, there is a call to ‘the_category’ filter.

    esc_html( apply_filters( 'the_category', $category->name ) ) . '</div>';
    

    This filter as documented in wp-includes/category-template.php expects 3 arguments:

    
    /**
    * Filters the category or list of categories.
    *
     * @since 1.2.0
     *
     * @param string $thelist   List of categories for the current post.
     * @param string $separator Separator used between the categories.
     * @param string $parents   How to display the category parents. Accepts 'multiple',
     *                          'single', or empty.
     */

    Would you mind updating the call to this plugin to give the correct amount of arguments ?

    Thanks,

Viewing 1 replies (of 1 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Looks like WordPress uses this filter in two different ways; one filters the output of the_category() and uses all three parameters, and one only filters the name of the category and only uses the first parameter. Relevanssi uses this hook in the second context.

    But sure, I’ll change the filter calls to apply_filters( 'the_category', $category->name, '', '' ).

Viewing 1 replies (of 1 total)
  • The topic ‘Incorrect call of the_plugin filter’ is closed to new replies.