Skip to content

Commit a578534

Browse files
NickGreenGaryJones
andcommitted
Invert conditional
Co-authored-by: Gary Jones <[email protected]>
1 parent 815c4c3 commit a578534

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: php/class-coauthors-endpoint.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ public function get_coauthors_search_results( $request ): WP_REST_Response {
150150
* @return WP_REST_Response
151151
*/
152152
public function get_coauthors( $request ): WP_REST_Response {
153-
if ( $this->request_is_for_wp_block_post_type( $request ) || $this->is_pattern_sync_operation() ) {
154-
return rest_ensure_response( array() );
153+
$response = array();
154+
155+
if ( ! $this->request_is_for_wp_block_post_type( $request ) && ! $this->is_pattern_sync_operation() ) {
156+
$this->_build_authors_response( $response, $request );
155157
}
156158

157-
$response = array();
158-
$this->_build_authors_response( $response, $request );
159159
return rest_ensure_response( $response );
160160
}
161161

0 commit comments

Comments
 (0)