Clean up spaces, tabs, indentation, and bracket formatting
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -7,14 +7,14 @@ if ( class_exists( 'WP_REST_Posts_Controller' ) ) {
|
||||
$this->namespace = 'sportspress/v2';
|
||||
}
|
||||
|
||||
public function check_read_permission( $post ) {
|
||||
if ( 'sp_event' === $post->post_type ) {
|
||||
if ( in_array( $post->post_status, array( 'publish', 'future' ) ) || current_user_can( 'read_post', $post->ID ) ) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return WP_REST_Posts_Controller::check_read_permission( $post );
|
||||
}
|
||||
}
|
||||
}
|
||||
public function check_read_permission( $post ) {
|
||||
if ( 'sp_event' === $post->post_type ) {
|
||||
if ( in_array( $post->post_status, array( 'publish', 'future' ) ) || current_user_can( 'read_post', $post->ID ) ) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return WP_REST_Posts_Controller::check_read_permission( $post );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user