doing_it_wrong_run

Fires when the given function is being used incorrectly.

Description

do_action( 'doing_it_wrong_run', (string) $function, (string) $message, (string) $version ); 

Parameters (3)

0. $function (string)
The function that was called.
1. $message (string)
A message explaining what has been done incorrectly.
2. $version (string)
The version of WordPress where the message was added.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'doing_it_wrong_run', $function, $message, $version ); 
The following example is for adding a hook callback.
  1. // define the doing_it_wrong_run callback 
  2. function action_doing_it_wrong_run( $function, $message, $version ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'doing_it_wrong_run', 'action_doing_it_wrong_run', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'doing_it_wrong_run', 'action_doing_it_wrong_run', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/functions.php  
  1. do_action( 'doing_it_wrong_run', $function, $message, $version );