Skip to content

Commit

Permalink
- Updated check to see if filter has already been used or not.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbahl committed Jan 22, 2021
1 parent bea0302 commit 8cde816
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Model/Model.php
Expand Up @@ -236,7 +236,9 @@ public function get_visibility() {
*/
$is_private = apply_filters( 'graphql_pre_model_is_private', null, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );

if ( null !== $is_private ) {
// If 3rd party code has not filtered this, use the Models default logic to determine
// whether the model should be considered private
if ( null === $is_private ) {
$is_private = $this->is_private();
}

Expand Down

0 comments on commit 8cde816

Please sign in to comment.