Skip to content

Commit

Permalink
Merge pull request #52 from moon0326/fix/fix-php-warning-with-rest-ap…
Browse files Browse the repository at this point in the history
…i-callback

Fix php warning with rest api callback
  • Loading branch information
moon0326 authored Oct 11, 2024
2 parents f0ebbfa + a68a67e commit 043a41f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wp-openapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public function registerRestAPIEndpoint() {
array(
'methods' => 'GET',
'callback' => array( $this, 'sendOpenAPISchema' ),
'permission_callback' => apply_filters( Filters::PREFIX . 'filter-schema-endpoint-permission', '__return_true' ),
'permission_callback' => function() {
return apply_filters( Filters::PREFIX . 'filter-schema-endpoint-permission', true );
},
'args' => array(
'namespace' => array(
'type' => 'string',
Expand Down

0 comments on commit 043a41f

Please sign in to comment.