diff --git a/src/alley/wp/alleyvate/features/class-disable-comments.php b/src/alley/wp/alleyvate/features/class-disable-comments.php index 8bcd48ed..cee40515 100644 --- a/src/alley/wp/alleyvate/features/class-disable-comments.php +++ b/src/alley/wp/alleyvate/features/class-disable-comments.php @@ -128,7 +128,7 @@ public static function filter__rest_endpoints( array $endpoints ): array { public static function filter__rest_prepare( \WP_REST_Response $response ): \WP_REST_Response { $response->remove_link( 'replies' ); - if ( is_array( $response->data ) && isset( $response->data['comment_status'] ) ) { + if ( \is_array( $response->data ) && isset( $response->data['comment_status'] ) ) { $response->data['comment_status'] = 'closed'; } diff --git a/src/alley/wp/alleyvate/features/class-disable-trackbacks.php b/src/alley/wp/alleyvate/features/class-disable-trackbacks.php index be3405b4..6a2356cb 100644 --- a/src/alley/wp/alleyvate/features/class-disable-trackbacks.php +++ b/src/alley/wp/alleyvate/features/class-disable-trackbacks.php @@ -49,7 +49,7 @@ public static function action__init(): void { * @return \WP_REST_Response Filtered response. */ public static function filter__rest_prepare( \WP_REST_Response $response ): \WP_REST_Response { - if ( is_array( $response->data ) && isset( $response->data['ping_status'] ) ) { + if ( \is_array( $response->data ) && isset( $response->data['ping_status'] ) ) { $response->data['ping_status'] = 'closed'; }