Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter query api permission_callback #203

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add example usage of font_awesome_query_api_permission_callback in al…
…pha theme functions.php
  • Loading branch information
mlwilkerson committed Jul 11, 2023
commit c4791ddd6007c1e3654acdfc754a750af76e43ee
8 changes: 8 additions & 0 deletions integrations/themes/theme-alpha/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,11 @@ function theme_alpha_fa_classes(){

return implode(' ', $class_list);
}

add_filter('font_awesome_query_api_permission_callback', function($val, $request) {
// This is how we might filter the permisssions for the plugin's WP REST API
// endpoint, to determine whether we'll issue a search request on behalf
// of a user.
error_log('DEBUG: filtering font_awesome_query_api_permission_callback');
return $val;
}, 10, 2);
Loading