doing_it_wrong_run action-hookWP 3.1.0

Fires when the given function is being used incorrectly.

Usage

add_action( 'doing_it_wrong_run', 'wp_kama_doing_it_wrong_run_action', 10, 3 );

/**
 * Function for `doing_it_wrong_run` action-hook.
 * 
 * @param string $function_name The function that was called.
 * @param string $message       A message explaining what has been done incorrectly.
 * @param string $version       The version of WordPress where the message was added.
 *
 * @return void
 */
function wp_kama_doing_it_wrong_run_action( $function_name, $message, $version ){

	// action...
}
$function_name(string)
The function that was called.
$message(string)
A message explaining what has been done incorrectly.
$version(string)
The version of WordPress where the message was added.

Changelog

Since 3.1.0 Introduced.

Where the hook is called

_doing_it_wrong()
doing_it_wrong_run
wp-includes/functions.php 5978
do_action( 'doing_it_wrong_run', $function_name, $message, $version );

Where the hook is used in WordPress

wp-includes/rest-api.php 218
add_action( 'doing_it_wrong_run', 'rest_handle_doing_it_wrong', 10, 3 );