PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
← All changes | json-endpoints/class.wpcom-json-api-bulk-update-comments-endpoint.php +8 -1 12.2.3 → 16.3-a.1 View file →
@@ -2,8 +2,13 @@
2 2 /**
3 3 * Endpoints: /sites/%s/comments/status
4 4 * /sites/%s/comments/delete
5 5 */
6 +
7 +if ( ! defined( 'ABSPATH' ) ) {
8 + exit( 0 );
9 +}
10 +
6 11 new WPCOM_JSON_API_Bulk_Update_Comments_Endpoint(
7 12 array(
8 13 'description' => 'Update multiple comment\'s status.',
9 14 'group' => 'comments',
@@ -67,8 +72,10 @@
67 72 );
68 73
69 74 /**
70 75 * Bulk update comments endpoint class.
76 + *
77 + * @phan-constructor-used-for-side-effects
71 78 */
72 79 class WPCOM_JSON_API_Bulk_Update_Comments_Endpoint extends WPCOM_JSON_API_Endpoint {
73 80 /**
74 81 * API callback.
@@ -104,9 +111,9 @@
104 111 } else {
105 112 $result['results'] = $this->bulk_delete_comments( $comment_ids );
106 113 }
107 114 } else {
108 - $status = isset( $input['status'] ) ? $input['status'] : '';
115 + $status = $input['status'] ?? '';
109 116 $result['results'] = $this->bulk_update_comments_status( $comment_ids, $status );
110 117 }
111 118
112 119 wp_defer_comment_counting( false );