WP_REST_Posts_Controller::check_template

Advertisement

Summery Summery

Check whether the template is valid for the given post.

Syntax Syntax

WP_REST_Posts_Controller::check_template( string $template, WP_REST_Request $request )

Parameters Parameters

$template

(string) (Required) Page template filename.

$request

(WP_REST_Request) (Required) Request.

Return Return

(bool|WP_Error) True if template is still valid or if the same as existing value, or false if template not supported.

Source Source

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


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.9.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.