doing_it_wrong_run
Action HookDescription
Fires when the given function is being used incorrectly.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Action |
Line Number | 6010 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$function_name
|
The function that was called. |
string
|
$message
|
A message explaining what has been done incorrectly. |
string
|
$version
|
The version of WordPress where the message was added. |
Usage Examples
Basic Usage
<?php
// Hook into doing_it_wrong_run
add_action('doing_it_wrong_run', 'my_custom_function', 10, 3);
function my_custom_function($function_name, $message, $version) {
// Your custom code here
}
Source Code Context
wp-includes/functions.php:6010
- How this hook is used in WordPress core
<?php
6005 *
6006 * @param string $function_name The function that was called.
6007 * @param string $message A message explaining what has been done incorrectly.
6008 * @param string $version The version of WordPress where the message was added.
6009 */
6010 do_action( 'doing_it_wrong_run', $function_name, $message, $version );
6011
6012 /**
6013 * Filters whether to trigger an error for _doing_it_wrong() calls.
6014 *
6015 * @since 3.1.0
PHP Documentation
<?php
/**
* Fires when the given function is being used incorrectly.
*
* @since 3.1.0
*
* @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.
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-includes/functions.php
Related Hooks
Related hooks will be displayed here in future updates.