_inc/lib/core-api/wpcom-endpoints/gutenberg-available-extensions.php 1 location
|
@@ 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( |
_inc/lib/core-api/wpcom-endpoints/subscribers.php 1 location
|
@@ 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. |
_inc/lib/core-api/wpcom-endpoints/memberships.php 1 location
|
@@ 18-24 (lines=7) @@
|
15 |
|
/** |
16 |
|
* WPCOM_REST_API_V2_Endpoint_Memberships constructor. |
17 |
|
*/ |
18 |
|
public function __construct() { |
19 |
|
$this->namespace = 'wpcom/v2'; |
20 |
|
$this->rest_base = 'memberships'; |
21 |
|
$this->wpcom_is_wpcom_only_endpoint = true; |
22 |
|
$this->wpcom_is_site_specific_endpoint = true; |
23 |
|
add_action( 'rest_api_init', array( $this, 'register_routes' ) ); |
24 |
|
} |
25 |
|
|
26 |
|
/** |
27 |
|
* Called automatically on `rest_api_init()`. |