disable_formats_dropdown WordPress Filter Hook

The disable_formats_dropdown hook allows you to disable the formats dropdown on the post editor. This can be useful if you want to force a specific format on your users, or if you don't want them to be able to change the format of their posts.

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

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


Parameters

$disable

(bool)Whether to disable the 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
5.5.0The $post_type parameter was added.
5.2.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.