@@ -184,6 +184,9 @@ |
||
184 | 184 | ), array_keys( $links ) ); |
185 | 185 | } |
186 | 186 | |
187 | + /** |
|
188 | + * @param WP_REST_Response $response |
|
189 | + */ |
|
187 | 190 | protected function check_post_status_object_response( $response ) { |
188 | 191 | $this->assertEquals( 200, $response->get_status() ); |
189 | 192 | $data = $response->get_data(); |
@@ -188,6 +188,10 @@ |
||
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
191 | + /** |
|
192 | + * @param string $context |
|
193 | + * @param WP_REST_Response $response |
|
194 | + */ |
|
191 | 195 | protected function check_post_type_object_response( $context, $response, $post_type = 'post' ) { |
192 | 196 | $this->assertEquals( 200, $response->get_status() ); |
193 | 197 | $data = $response->get_data(); |
@@ -81,6 +81,9 @@ |
||
81 | 81 | return $orderby; |
82 | 82 | } |
83 | 83 | |
84 | + /** |
|
85 | + * @param string $clause |
|
86 | + */ |
|
84 | 87 | public function assertPostsClause( $clause, $pattern ) { |
85 | 88 | global $wpdb; |
86 | 89 | $expected_clause = str_replace( '{posts}', $wpdb->posts, $pattern ); |
@@ -1010,6 +1010,9 @@ discard block |
||
1010 | 1010 | parent::tearDown(); |
1011 | 1011 | } |
1012 | 1012 | |
1013 | + /** |
|
1014 | + * @param WP_REST_Response $response |
|
1015 | + */ |
|
1013 | 1016 | protected function check_get_taxonomy_terms_response( $response ) { |
1014 | 1017 | $this->assertEquals( 200, $response->get_status() ); |
1015 | 1018 | $data = $response->get_data(); |
@@ -1053,6 +1056,9 @@ discard block |
||
1053 | 1056 | $this->assertEquals( add_query_arg( 'tags', $term->term_id, rest_url( 'wp/v2/posts' ) ), $links['https://api.w.org/post_type'][0]['href'] ); |
1054 | 1057 | } |
1055 | 1058 | |
1059 | + /** |
|
1060 | + * @param WP_REST_Response $response |
|
1061 | + */ |
|
1056 | 1062 | protected function check_get_taxonomy_term_response( $response, $id ) { |
1057 | 1063 | |
1058 | 1064 | $this->assertEquals( 200, $response->get_status() ); |
@@ -184,6 +184,10 @@ discard block |
||
184 | 184 | } |
185 | 185 | } |
186 | 186 | |
187 | + /** |
|
188 | + * @param string $context |
|
189 | + * @param WP_REST_Response $response |
|
190 | + */ |
|
187 | 191 | protected function check_taxonomy_object_response( $context, $response ) { |
188 | 192 | $this->assertEquals( 200, $response->get_status() ); |
189 | 193 | $data = $response->get_data(); |
@@ -191,6 +195,10 @@ discard block |
||
191 | 195 | $this->check_taxonomy_object( $context, $category, $data, $response->get_links() ); |
192 | 196 | } |
193 | 197 | |
198 | + /** |
|
199 | + * @param string $type |
|
200 | + * @param WP_REST_Response $response |
|
201 | + */ |
|
194 | 202 | protected function check_taxonomies_for_type_response( $type, $response ) { |
195 | 203 | $this->assertEquals( 200, $response->get_status() ); |
196 | 204 | $data = $response->get_data(); |
@@ -2344,6 +2344,9 @@ discard block |
||
2344 | 2344 | parent::tearDown(); |
2345 | 2345 | } |
2346 | 2346 | |
2347 | + /** |
|
2348 | + * @param string $context |
|
2349 | + */ |
|
2347 | 2350 | protected function check_user_data( $user, $data, $context, $links ) { |
2348 | 2351 | $this->assertEquals( $user->ID, $data['id'] ); |
2349 | 2352 | $this->assertEquals( $user->display_name, $data['name'] ); |
@@ -2395,6 +2398,9 @@ discard block |
||
2395 | 2398 | $this->check_user_data( $userdata, $data, $context, $response->get_links() ); |
2396 | 2399 | } |
2397 | 2400 | |
2401 | + /** |
|
2402 | + * @param WP_REST_Response $response |
|
2403 | + */ |
|
2398 | 2404 | protected function check_add_edit_user_response( $response, $update = false ) { |
2399 | 2405 | if ( $update ) { |
2400 | 2406 | $this->assertEquals( 200, $response->get_status() ); |
@@ -154,7 +154,7 @@ |
||
154 | 154 | * @param string $url The complete home URL including scheme and path. |
155 | 155 | * @param string $path Path relative to the home URL. Blank string if no path is specified. |
156 | 156 | * @param string|null $orig_scheme Scheme to give the home URL context. |
157 | - * @param int|null $blog_id Site ID, or null for the current site. |
|
157 | + * @param int|null $_blog_id Site ID, or null for the current site. |
|
158 | 158 | * @return string The complete home URL including scheme and path. |
159 | 159 | */ |
160 | 160 | function _filter_http_home_url( $url, $path, $orig_scheme, $_blog_id ) { |
@@ -339,6 +339,9 @@ |
||
339 | 339 | ) ); |
340 | 340 | } |
341 | 341 | |
342 | + /** |
|
343 | + * @param boolean $value |
|
344 | + */ |
|
342 | 345 | function _set_customize_previewing( $value ) { |
343 | 346 | $class = new ReflectionClass( 'WP_Customize_Manager' ); |
344 | 347 | $property = $class->getProperty( 'previewing' ); |