Changeset 56193 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
- Timestamp:
- 07/10/2023 10:58:33 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
r56105 r56193 62 62 '/%s/themes/(?P<stylesheet>%s)', 63 63 $this->rest_base, 64 // Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`. 65 // Excludes invalid directory name characters: `/:<>*?"|`. 64 /* 65 * Matches theme's directory: `/themes/<subdirectory>/<theme>/` or `/themes/<theme>/`. 66 * Excludes invalid directory name characters: `/:<>*?"|`. 67 */ 66 68 '[^\/:<>\*\?"\|]+(?:\/[^\/:<>\*\?"\|]+)?' 67 69 ), … … 566 568 */ 567 569 public function get_theme_item_permissions_check( $request ) { 568 // Verify if the current user has edit_theme_options capability. 569 // This capability is required to edit/view/delete templates. 570 /* 571 * Verify if the current user has edit_theme_options capability. 572 * This capability is required to edit/view/delete templates. 573 */ 570 574 if ( ! current_user_can( 'edit_theme_options' ) ) { 571 575 return new WP_Error( … … 639 643 */ 640 644 public function get_theme_items_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable 641 // Verify if the current user has edit_theme_options capability. 642 // This capability is required to edit/view/delete templates. 645 /* 646 * Verify if the current user has edit_theme_options capability. 647 * This capability is required to edit/view/delete templates. 648 */ 643 649 if ( ! current_user_can( 'edit_theme_options' ) ) { 644 650 return new WP_Error(
Note: See TracChangeset
for help on using the changeset viewer.