← All changes
|
_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-related-posts.php
+5
-1
13.3.3
→
16.3-a.7
View file →
| @@ -5,8 +5,12 @@ | ||
| 5 | 5 | * @package automattic/jetpack |
| 6 | 6 | * @since 12.6 |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 10 | + exit( 0 ); | |
| 11 | +} | |
| 12 | + | |
| 9 | 13 | /** |
| 10 | 14 | * Class WPCOM_REST_API_V2_Endpoint_Related_Posts |
| 11 | 15 | */ |
| 12 | 16 | class WPCOM_REST_API_V2_Endpoint_Related_Posts extends WP_REST_Controller { |
| @@ -33,9 +37,9 @@ | ||
| 33 | 37 | 'show_in_index' => true, |
| 34 | 38 | 'methods' => WP_REST_Server::READABLE, |
| 35 | 39 | 'callback' => array( $this, 'get_options' ), |
| 36 | 40 | 'permission_callback' => function () { |
| 37 | - return current_user_can( 'manage_options' ); | |
| 41 | + return current_user_can( 'edit_posts' ); | |
| 38 | 42 | }, |
| 39 | 43 | ) |
| 40 | 44 | ); |
| 41 | 45 | |