disable_categories_dropdown WordPress Filter Hook

The disable_categories_dropdown hook is used to prevent the categories dropdown from being displayed on the front end of a WordPress site. This can be useful if you want to prevent users from changing the category of a post, or if you want to hide the categories dropdown on a specific page.

apply_filters( 'disable_categories_dropdown', bool $disable, string $post_type ) #

Filters whether to remove the ‘Categories’ drop-down from the post list table.


Parameters

$disable

(bool)Whether to disable the categories drop-down. Default false.

$post_type

(string)Post type slug.


Top ↑

Source

File: wp-admin/includes/class-wp-posts-list-table.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.