Skip to content

rest_api_init

github-actions[bot] edited this page Oct 6, 2025 · 1 revision

Auto-generated Example

/**
 * Callback function for the 'rest_api_init' action.
 *
 * @param $wp_rest_server $ 
 */
function my_rest_api_init_callback( $wp_rest_server = null ) {
    // Your code here.
}
add_action( 'rest_api_init', 'my_rest_api_init_callback' );

Parameters

  • $wp_rest_server

Files

do_action( 'rest_api_init' )
do_action( 'rest_api_init', $wp_rest_server )
do_action( 'rest_api_init' )

← All Hooks

Users

Developers

Clone this wiki locally