Understanding Filters?
-
I’m trying to understand what the call to apply filters is doing in this piece of code from the WP_Widget_Categories class in wp-includes/default-widgets.php.
$cat_args['title_li'] = ''; wp_list_categories(apply_filters('widget_categories_args', $cat_args));
My understanding is that the value of $cat_args is being passed to all the functions associated with the widget_categories_args tag and that this association is made using add_filter(‘widget_categories_args’, filter_function).
However, I don’t think my understanding can be correct as I can’t find any reference to add_filter(‘widget_categories_args’, filter_function) anywhere within the WP code.
It seems I’ve searched everywhere but I’m just not getting it. Could someone shed a little light on how filters work in general.
Many, many thanks in advance. Steve.
- The topic ‘Understanding Filters?’ is closed to new replies.