view_mode_post_types WordPress Filter Hook

The view_mode_post_types Wordpress hook allows you to add custom post types to the view mode options in the post editor. This can be useful if you want to create a custom post type that can be viewed in different ways, such as a portfolio post type that can be viewed as a grid or a list.

apply_filters( 'view_mode_post_types', string[] $view_mode_post_types ) #

Filters the post types that have different view mode options.


Parameters

$view_mode_post_types

(string[])Array of post types that can change view modes. Default post types with show_ui on.


Top ↑

Source

File: wp-admin/includes/class-wp-screen.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.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.