wphooks.info - disable_categories_dropdown

disable_categories_dropdown

The hook occurs in the following file:

wp-admin/includes/class-wp-posts-list-table.php:
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
		global $cat;

		/**
		 * Filters whether to remove the 'Categories' drop-down from the post list table.
		 *
		 * @since 4.6.0
		 *
		 * @param bool   $disable   Whether to disable the categories drop-down. Default false.
		 * @param string $post_type Post type slug.
		 */
		if ( false !== apply_filters( 'disable_categories_dropdown', false, $post_type ) ) {
			return;
		}

		if ( is_object_in_taxonomy( $post_type, 'category' ) ) {
			$dropdown_options = array(
				'show_option_all' => get_taxonomy( 'category' )->labels->all_items,
				'hide_empty' => 0,
				'hierarchical' => 1,
				'show_count' => 0,