get_post_meta( $page_id, 'passster_password', true ) ); $valid = PS_Conditional::is_valid( $atts ); } if ( $protection_enabled && ! $valid && ! is_user_logged_in() ) { return new \WP_Error( 'rest_not_logged_in', __( 'You are not allowed to access this content. Please authenticate with a password first.' ), array( 'status' => 401 ) ); } return $result; } }