Show error data in message. Props DD32. see #5586

git-svn-id: https://develop.svn.wordpress.org/trunk@7206 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-03-10 07:45:46 +00:00
parent 0160d81eee
commit 7b5f9a896c

View File

@ -68,8 +68,12 @@ endforeach;
}
function show_message($message) {
if ( is_wp_error($message) )
$message = $message->get_error_message();
if( is_wp_error($message) ){
if( $message->get_error_data() )
$message = $message->get_error_message() . ': ' . $message->get_error_data();
else
$message = $message->get_error_message();
}
echo "<p>$message</p>";
}