deprecated_function_run хук-событиеWP 2.5.0

Fires when a deprecated function is called.

Использование

add_action( 'deprecated_function_run', 'wp_kama_deprecated_function_run_action', 10, 3 );

/**
 * Function for `deprecated_function_run` action-hook.
 * 
 * @param string $function_name The function that was called.
 * @param string $replacement   The function that should have been called.
 * @param string $version       The version of WordPress that deprecated the function.
 *
 * @return void
 */
function wp_kama_deprecated_function_run_action( $function_name, $replacement, $version ){

	// action...
}
$function_name(строка)
The function that was called.
$replacement(строка)
The function that should have been called.
$version(строка)
The version of WordPress that deprecated the function.

Список изменений

С версии 2.5.0 Введена.

Где вызывается хук

_deprecated_function()
deprecated_function_run
wp-includes/functions.php 5510
do_action( 'deprecated_function_run', $function_name, $replacement, $version );

Где используется хук в WordPress

wp-includes/rest-api.php 214
add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 );