Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Filters whether to remove the 'Months' drop-down from the post list table.
- *
- * @since 4.2.0
- *
- * @param bool $disable Whether to disable the drop-down. Default false.
- * @param string $post_type The post type.
- */
- if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) {
- return;
- }
- add_filter( 'disable_months_dropdown', function( $disable, $post_type )
- {
- return 'event' === $post_type ? true :$disable;
- }, 999, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement