← All changes
|
json-endpoints/class.wpcom-json-api-get-post-endpoint.php
+6
-0
13.9.2
→
16.3-a.1
View file →
| @@ -4,8 +4,12 @@ | ||
| 4 | 4 | * /sites/%s/posts/name:%s -> $blog_id, $post_id // not documented |
| 5 | 5 | * /sites/%s/posts/slug:%s -> $blog_id, $post_id |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 9 | + exit( 0 ); | |
| 10 | +} | |
| 11 | + | |
| 8 | 12 | new WPCOM_JSON_API_Get_Post_Endpoint( |
| 9 | 13 | array( |
| 10 | 14 | 'description' => 'Get a single post (by ID).', |
| 11 | 15 | 'group' => 'posts', |
| @@ -62,8 +66,10 @@ | ||
| 62 | 66 | ); |
| 63 | 67 | |
| 64 | 68 | /** |
| 65 | 69 | * Get post endpoint class. |
| 70 | + * | |
| 71 | + * @phan-constructor-used-for-side-effects | |
| 66 | 72 | */ |
| 67 | 73 | class WPCOM_JSON_API_Get_Post_Endpoint extends WPCOM_JSON_API_Post_Endpoint { |
| 68 | 74 | /** |
| 69 | 75 | * |