friends_browser_extension_action - akirk/friends GitHub Wiki
Handles a browser extension inline action.
Return a \WP_REST_Response, \WP_Error, array, or scalar value. Returning null means the action was not handled.
Auto-generated Example
add_filter(
'friends_browser_extension_action',
function(
mixed $response,
string $action,
WP_REST_Request $request,
WP_User $current_user,
array $context
) {
// Your code here.
return $response;
},
10,
5
);
Parameters
mixed$responseThe action response.string$actionThe browser extension action name.WP_REST_Request$requestThe REST request.WP_User$current_userThe user authenticated by the browser extension key.array$contextBrowser extension request context.
Files
apply_filters( 'friends_browser_extension_action', null, $action, $request, $current_user, $context )