- Timestamp:
- 06/23/2023 06:27:45 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
r55294 r55992 615 615 * @since 5.8.0 616 616 * @since 5.9.0 Renamed `$template` to `$item` to match parent class for PHP 8 named parameter support. 617 * @since 6.3.0 Added `modified` property to the response. 617 618 * 618 619 * @param WP_Block_Template $item Template instance. … … 707 708 if ( rest_is_field_included( 'area', $fields ) && 'wp_template_part' === $template->type ) { 708 709 $data['area'] = $template->area; 710 } 711 712 if ( rest_is_field_included( 'modified', $fields ) ) { 713 $data['modified'] = mysql_to_rfc3339( $template->modified ); 709 714 } 710 715 … … 927 932 'context' => array( 'view', 'edit', 'embed' ), 928 933 ), 934 'modified' => array( 935 'description' => __( "The date the template was last modified, in the site's timezone." ), 936 'type' => 'string', 937 'format' => 'date-time', 938 'context' => array( 'view', 'edit' ), 939 'readonly' => true, 940 ), 929 941 ), 930 942 );
Note: See TracChangeset
for help on using the changeset viewer.