Changeset 56195
- Timestamp:
- 07/10/2023 11:17:05 PM (14 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php
r55200 r56195 262 262 */ 263 263 protected function do_permissions_check() { 264 // Verify if the current user has edit_theme_options capability. 265 // This capability is required to access the widgets screen. 264 /* 265 * Verify if the current user has edit_theme_options capability. 266 * This capability is required to access the widgets screen. 267 */ 266 268 if ( ! current_user_can( 'edit_theme_options' ) ) { 267 269 return new WP_Error( -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
r56051 r56195 102 102 '/%s/(?P<id>%s%s)', 103 103 $this->rest_base, 104 // Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`. 105 // Excludes invalid directory name characters: `/:<>*?"|`. 104 /* 105 * Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`. 106 * Excludes invalid directory name characters: `/:<>*?"|`. 107 */ 106 108 '([^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?)', 107 109 // Matches the template name. … … 178 180 */ 179 181 protected function permissions_check( $request ) { 180 // Verify if the current user has edit_theme_options capability. 181 // This capability is required to edit/view/delete templates. 182 /* 183 * Verify if the current user has edit_theme_options capability. 184 * This capability is required to edit/view/delete templates. 185 */ 182 186 if ( ! current_user_can( 'edit_theme_options' ) ) { 183 187 return new WP_Error( … … 503 507 } 504 508 505 // (Note that internally this falls through to `wp_delete_post()` 506 // if the Trash is disabled.) 509 /* 510 * (Note that internally this falls through to `wp_delete_post()` 511 * if the Trash is disabled.) 512 */ 507 513 $result = wp_trash_post( $id ); 508 514 $template->status = 'trash'; -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r55988 r56195 684 684 $request_params = array_keys( $request->get_params() ); 685 685 sort( $request_params ); 686 // If only 'id' and 'roles' are specified (we are only trying to 687 // edit roles), then only the 'promote_user' cap is required. 686 /* 687 * If only 'id' and 'roles' are specified (we are only trying to 688 * edit roles), then only the 'promote_user' cap is required. 689 */ 688 690 if ( array( 'id', 'roles' ) === $request_params ) { 689 691 return true; -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
r54971 r56195 465 465 } 466 466 467 // Set the widget's number so that the id attributes in the HTML that we 468 // return are predictable. 467 /* 468 * Set the widget's number so that the id attributes in the HTML that we 469 * return are predictable. 470 */ 469 471 if ( isset( $request['number'] ) && is_numeric( $request['number'] ) ) { 470 472 $widget_object->_set( (int) $request['number'] ); -
trunk/src/wp-includes/sitemaps/class-wp-sitemaps-provider.php
r54896 r56195 70 70 $object_subtypes = $this->get_object_subtypes(); 71 71 72 // If there are no object subtypes, include a single sitemap for the 73 // entire object type. 72 /* 73 * If there are no object subtypes, include a single sitemap for the 74 * entire object type. 75 */ 74 76 if ( empty( $object_subtypes ) ) { 75 77 $sitemap_data[] = array(
Note: See TracChangeset
for help on using the changeset viewer.