- Timestamp:
- 11/09/2016 07:12:01 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r39162 r39182 1095 1095 1096 1096 /** 1097 * Sets the template for a p age.1097 * Sets the template for a post. 1098 1098 * 1099 1099 * @since 4.7.0 … … 1923 1923 } 1924 1924 1925 if ( 'page' === $this->post_type ) { 1926 $schema['properties']['template'] = array( 1927 'description' => __( 'The theme file to use to display the object.' ), 1928 'type' => 'string', 1929 'enum' => array_keys( wp_get_theme()->get_page_templates() ), 1930 'context' => array( 'view', 'edit' ), 1931 ); 1932 } 1925 $schema['properties']['template'] = array( 1926 'description' => __( 'The theme file to use to display the object.' ), 1927 'type' => 'string', 1928 'enum' => array_keys( wp_get_theme()->get_page_templates( null, $this->post_type ) ), 1929 'context' => array( 'view', 'edit' ), 1930 ); 1933 1931 1934 1932 $taxonomies = wp_list_filter( get_object_taxonomies( $this->post_type, 'objects' ), array( 'show_in_rest' => true ) );
Note: See TracChangeset
for help on using the changeset viewer.