@@ 17-23 (lines=7) @@ | ||
14 | * @since 6.9 |
|
15 | */ |
|
16 | class WPCOM_REST_API_V2_Endpoint_Gutenberg_Available_Extensions extends WP_REST_Controller { |
|
17 | function __construct() { |
|
18 | $this->namespace = 'wpcom/v2'; |
|
19 | $this->rest_base = 'gutenberg'; |
|
20 | $this->wpcom_is_site_specific_endpoint = true; |
|
21 | ||
22 | add_action( 'rest_api_init', array( $this, 'register_routes' ) ); |
|
23 | } |
|
24 | ||
25 | public function register_routes() { |
|
26 | register_rest_route( $this->namespace, $this->rest_base . '/available-extensions', array( |
@@ 9-15 (lines=7) @@ | ||
6 | * @since 6.9 |
|
7 | */ |
|
8 | class WPCOM_REST_API_V2_Endpoint_Subscribers extends WP_REST_Controller { |
|
9 | function __construct() { |
|
10 | $this->namespace = 'wpcom/v2'; |
|
11 | $this->rest_base = 'subscribers'; |
|
12 | // This endpoint *does not* need to connect directly to Jetpack sites. |
|
13 | $this->wpcom_is_wpcom_only_endpoint = true; |
|
14 | add_action( 'rest_api_init', array( $this, 'register_routes' ) ); |
|
15 | } |
|
16 | ||
17 | public function register_routes() { |
|
18 | // GET /sites/<blog_id>/subscribers/count - Return number of subscribers for this site. |