disable_months_dropdown filter-hookWP 4.2.0

Filters whether to remove the 'Months' drop-down from the post list table.

Usage

add_filter( 'disable_months_dropdown', 'wp_kama_disable_months_dropdown_filter', 10, 2 );

/**
 * Function for `disable_months_dropdown` filter-hook.
 * 
 * @param bool   $disable   Whether to disable the drop-down.
 * @param string $post_type The post type.
 *
 * @return bool
 */
function wp_kama_disable_months_dropdown_filter( $disable, $post_type ){

	// filter...
	return $disable;
}
$disable(true|false)
Whether to disable the drop-down.
Default: false
$post_type(string)
The post type.

Changelog

Since 4.2.0 Introduced.

Where the hook is called

WP_List_Table::months_dropdown()
disable_months_dropdown
wp-admin/includes/class-wp-list-table.php 710
if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) {

Where the hook is used in WordPress

Usage not found.