Changeset 59605 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php
- Timestamp:
- 01/15/2025 12:44:43 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-template-revisions-controller.php
r58156 r59605 171 171 'rest_post_invalid_parent', 172 172 __( 'Invalid template parent ID.' ), 173 array( 'status' => 404 ) 173 array( 'status' => WP_Http::NOT_FOUND ) 174 ); 175 } 176 177 $parent_post_id = isset( $template->wp_id ) ? (int) $template->wp_id : 0; 178 179 if ( $parent_post_id <= 0 ) { 180 return new WP_Error( 181 'rest_invalid_template', 182 __( 'Templates based on theme files can\'t have revisions.' ), 183 array( 'status' => WP_Http::BAD_REQUEST ) 174 184 ); 175 185 }
Note: See TracChangeset
for help on using the changeset viewer.