Languages: English • Italiano • 日本語 (Add your language)
Checks whether the passed variable is a WordPress Error.
Looks at the variable and determines if it is both a PHP object and one populated by the WP_Error class.
<?php is_wp_error( $thing ); ?>
if ( is_wp_error( $result ) ) { $error_string = $result->get_error_message(); echo '<div id="message" class="error"><p>' . $error_string . '</p></div>'; }
Since: 2.1.0
is_wp_error()
is located in wp-includes/load.php
.