WP_REST_Posts_Controller::check_is_post_type_allowed

SummerySummery

Checks if a given post type can be viewed or managed.

Syntax

WP_REST_Posts_Controller::check_is_post_type_allowed( WP_Post_Type|string $post_type )

ParametersParameters

$post_type

(WP_Post_Type|string) (Required) Post type name or object.

ReturnReturn

(bool) Whether the post type is allowed in REST.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top