Changeset 51350
- Timestamp:
- 07/06/2021 03:55:02 PM (3 years ago)
- Location:
- branches/5.8
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
-
branches/5.8/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php
r51317 r51350 110 110 * @since 5.8.0 111 111 * 112 * @param WP_REST_Request $request Full details about the request. 112 113 * @return true|WP_Error True if the request has read access, WP_Error object otherwise. 113 114 */ 114 protected function permissions_check( ) {115 protected function permissions_check( $request ) { 115 116 // Verify if the current user has edit_theme_options capability. 116 117 // This capability is required to edit/view/delete templates. -
branches/5.8/src/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php
r51317 r51350 98 98 */ 99 99 public function get_items_permissions_check( $request ) { 100 return $this->permissions_check( );100 return $this->permissions_check( $request ); 101 101 } 102 102 … … 140 140 */ 141 141 public function get_item_permissions_check( $request ) { 142 return $this->permissions_check( );142 return $this->permissions_check( $request ); 143 143 } 144 144 … … 177 177 */ 178 178 public function create_item_permissions_check( $request ) { 179 return $this->permissions_check( );179 return $this->permissions_check( $request ); 180 180 } 181 181 … … 221 221 */ 222 222 public function update_item_permissions_check( $request ) { 223 return $this->permissions_check( );223 return $this->permissions_check( $request ); 224 224 } 225 225 … … 284 284 */ 285 285 public function delete_item_permissions_check( $request ) { 286 return $this->permissions_check( );286 return $this->permissions_check( $request ); 287 287 } 288 288 … … 399 399 * @since 5.8.0 400 400 * 401 * @param WP_REST_Request $request Full details about the request. 401 402 * @return true|WP_Error 402 403 */ 403 protected function permissions_check( ) {404 protected function permissions_check( $request ) { 404 405 if ( ! current_user_can( 'edit_theme_options' ) ) { 405 406 return new WP_Error(
Note: See TracChangeset
for help on using the changeset viewer.