@@ -52,12 +52,6 @@ public function register_routes() {
52
52
'validate_callback ' => 'Experimental_WP_Widget_Blocks_Manager::is_valid_sidabar_id ' ,
53
53
);
54
54
55
- $ content_argument = array (
56
- 'description ' => __ ( 'Sidebar content. ' , 'gutenberg ' ),
57
- 'type ' => 'string ' ,
58
- 'required ' => true ,
59
- );
60
-
61
55
register_rest_route (
62
56
$ this ->namespace ,
63
57
'/ ' . $ this ->rest_base . '/(?P<id>.+) ' ,
@@ -141,6 +135,9 @@ public function get_item_schema() {
141
135
*
142
136
* @param WP_REST_Request $request Full details about the request.
143
137
* @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
138
+ *
139
+ * This function is overloading a function defined in WP_REST_Controller so it should have the same parameters.
140
+ * phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
144
141
*/
145
142
public function get_items_permissions_check ( $ request ) {
146
143
if ( ! current_user_can ( 'edit_theme_options ' ) ) {
@@ -152,6 +149,7 @@ public function get_items_permissions_check( $request ) {
152
149
153
150
return true ;
154
151
}
152
+ /* phpcs:enable */
155
153
156
154
/**
157
155
* Retrieves all widget areas.
@@ -192,6 +190,9 @@ public function get_item( $request ) {
192
190
*
193
191
* @param WP_REST_Request $request Full details about the request.
194
192
* @return WP_Error|bool True if the request has access to update the item, error object otherwise.
193
+ *
194
+ * This function is overloading a function defined in WP_REST_Controller so it should have the same parameters.
195
+ * phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
195
196
*/
196
197
public function update_item_permissions_check ( $ request ) {
197
198
if ( ! current_user_can ( 'edit_theme_options ' ) ) {
@@ -203,6 +204,7 @@ public function update_item_permissions_check( $request ) {
203
204
204
205
return true ;
205
206
}
207
+ /* phpcs:enable */
206
208
207
209
/**
208
210
* Updates a single widget area.
0 commit comments