Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #122 from bigbitecreative/jonmcp-patch-2
Browse files Browse the repository at this point in the history
Fix class instance check
  • Loading branch information
jaymcp authored Feb 13, 2019
2 parents c6be6d6 + d8f1dbe commit 629a613
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/disable-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function benenson_disable_rest_api( $result ) {
*/
$display_json_error = apply_filters( 'benenson_disable_rest_api_json_error', true );

// Dont display errors before we get chance to check if logged in.
if ( ( ! empty( $result ) && ! is_a( $result, \WP_Error ) ) || ! $is_disabled || ( $is_disabled && is_user_logged_in() ) ) {
// Don't display errors before we get chance to check if logged in.
if ( ( ! empty( $result ) && ! is_a( $result, 'WP_Error' ) ) || ! $is_disabled || ( $is_disabled && is_user_logged_in() ) ) {
return $result;
}

Expand Down

0 comments on commit 629a613

Please sign in to comment.