Filter
rpress_api_info
On this page
Filters the site information returned by the info API endpoint.
Runs at the end of RPRESS_API::get_info(). The array has an 'info' key containing the active integrations, the permissions of the requesting user and site settings such as currency, currency position and separators. Add keys to publish further site details.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$data | array | Info response data keyed by 'info'. |
$this | RPRESS_API | The API instance handling the request. |
Return value#
array. The info response.
Example#
function my_api_info( $data, $api ) {
$data['info']['site']['name'] = get_bloginfo( 'name' );
return $data;
}
add_filter( 'rpress_api_info', 'my_api_info', 10, 2 );
Source#
Applied in:
includes/api/class-rpress-api.php(line 1420), inRPRESS_API::get_info()
See also#
Was this page helpful?
