WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
475 | /** |
476 | * Filters whether to remove the 'Formats' drop-down from the post list table. |
477 | * |
478 | * @since 5.2.0 |
479 | * @since 5.5.0 The `$post_type` parameter was added. |
480 | * |
481 | * @param bool $disable Whether to disable the drop-down. Default false. |
482 | * @param string $post_type Post type slug. |
483 | */ |
484 | if ( apply_filters( 'disable_formats_dropdown', false, $post_type ) ) { |
485 | return; |
486 | } |
487 |
|
488 | // Return if the post type doesn't have post formats or if we're in the Trash. |
489 | if ( ! is_object_in_taxonomy( $post_type, 'post_format' ) || $this->is_trash ) { |
490 | return; |
491 | } |
492 |
|
493 | // Make sure the dropdown shows only formats with a post count greater than 0. |