Skip to content

Commit

Permalink
Add Force Login bypass (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ville authored Jun 1, 2023
1 parent 0e7d467 commit 0047b48
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/NetworkSiteListPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ public function hooks() {
'rest_api_init',
[ $this, 'register_rest_routes' ]
);

// Remove the force login filter from the REST API.
add_action( 'init', function() {
remove_filter(
'rest_authentication_errors',
'v_forcelogin_rest_access',
99
);
} );
}

/**
Expand Down

0 comments on commit 0047b48

Please sign in to comment.