Skip to content
Docs
Get RestroPress

Filter

rpress_api_info

Updated
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#

ParameterTypeDescription
$dataarrayInfo response data keyed by 'info'.
$thisRPRESS_APIThe 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), in RPRESS_API::get_info()

See also#

Was this page helpful?