@@ -13,6 +13,7 @@ |
||
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Wrapper around `WP_REST_Request` constructor. Injects a `sites/$blog_id` into endpoint string for WPCOM environment |
16 | + * @param string $path |
|
16 | 17 | */ |
17 | 18 | function wp_rest_request( $method, $path ) { |
18 | 19 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * @param array $post_types - other post types. |
194 | 194 | * |
195 | 195 | * @see hook 'rest_api_allowed_post_types' |
196 | - * @return array |
|
196 | + * @return string[] |
|
197 | 197 | */ |
198 | 198 | public function allow_rest_api_types( $post_types ) { |
199 | 199 | $post_types[] = self::$post_type_plan; |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | * (because it requires a plan upgrade or Stripe connection), and the |
255 | 255 | * button is a child of a Premium Content block. |
256 | 256 | * |
257 | - * @param WP_Block $block Recurring Payments block instance. |
|
257 | + * @param WP_Block|null $block Recurring Payments block instance. |
|
258 | 258 | * |
259 | 259 | * @return boolean |
260 | 260 | */ |
@@ -250,6 +250,9 @@ |
||
250 | 250 | } |
251 | 251 | } |
252 | 252 | |
253 | + /** |
|
254 | + * @param string $capability |
|
255 | + */ |
|
253 | 256 | protected function current_user_can( $capability, $plugin = null ) { |
254 | 257 | // If this endpoint accepts site based authentication and a blog token is used, skip capabilities check. |
255 | 258 | if ( $this->accepts_site_based_authentication() ) { |