Action hook 'is_wp_error_instance'

in WP Core File wp-includes/load.php at line 1809

View Source

is_wp_error_instance

Action Hook
Description
Fires when `is_wp_error()` is called and its parameter is an instance of `WP_Error`.

Hook Information

File Location wp-includes/load.php View on GitHub
Hook Type Action
Line Number 1809

Hook Parameters

Type Name Description
WP_Error $thing The error object passed to `is_wp_error()`.

Usage Examples

Basic Usage
<?php
// Hook into is_wp_error_instance
add_action('is_wp_error_instance', 'my_custom_function', 10, 1);

function my_custom_function($thing) {
    // Your custom code here
}

Source Code Context

wp-includes/load.php:1809 - How this hook is used in WordPress core
<?php
1804  		 *
1805  		 * @since 5.6.0
1806  		 *
1807  		 * @param WP_Error $thing The error object passed to `is_wp_error()`.
1808  		 */
1809  		do_action( 'is_wp_error_instance', $thing );
1810  	}
1811  
1812  	return $is_wp_error;
1813  }
1814  

PHP Documentation

<?php
/**
		 * Fires when `is_wp_error()` is called and its parameter is an instance of `WP_Error`.
		 *
		 * @since 5.6.0
		 *
		 * @param WP_Error $thing The error object passed to `is_wp_error()`.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-includes/load.php
Related Hooks

Related hooks will be displayed here in future updates.