Skip to content

Commit

Permalink
Make remove endpoint function static
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepdeJong committed Nov 7, 2023
1 parent 7116aef commit 1dd8d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static function register_hooks()
}

// Disable some endpoints for unauthenticated users
// add_filter('rest_endpoints', [__CLASS__, 'disable_default_endpoints']);
add_filter('rest_endpoints', [__CLASS__, 'disable_default_endpoints']);
}

/**
Expand Down Expand Up @@ -126,7 +126,7 @@ static function remove_version_query_arg_amp($src)
* @param $endpoints
* @return mixed
*/
function disable_default_endpoints( $endpoints ) {
static function disable_default_endpoints( $endpoints ) {
$endpoints_to_remove = array(
'/oembed/1.0',
'/wp/v2',
Expand Down

0 comments on commit 1dd8d78

Please sign in to comment.