Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: disable_categories_dropdown

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
426
427           /**
428            * Filters whether to remove the 'Categories' drop-down from the post list table.
429            *
430            * @since 4.6.0
431            *
432            * @param bool   $disable   Whether to disable the categories drop-down. Default false.
433            * @param string $post_type Post type slug.
434            */
435           if ( false !== apply_filters( 'disable_categories_dropdown', false, $post_type ) ) {
436                return;
437           }
438
439           if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
440                $dropdown_options = array(
441                     'show_option_all' => get_taxonomy( 'category' )->labels->all_items,
442                     'hide_empty' => 0,
443                     'hierarchical' => 1,
444                     'show_count' => 0,