um_api_output_{$format}

Hook type

Action

Description

Action before API output

Parameters

$data

(array) API data

$rest_api

(object) REST API class

Usage

add_action( 'um_api_output_{$format}', 'function_name', 10, 2 );

Examples

<?php
add_action( 'um_api_output_{$format}', 'my_api_output', 10, 2 );
function my_api_output( $data, $rest_api ) {
    // your code here
}
?>

Change Log

Since: 2.0

Source

um_api_output_{$format} is located in includes/core/class-rest-api.php::line 848