Show error data in message. Props DD32. see #5586
git-svn-id: http://svn.automattic.com/wordpress/trunk@7206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dad505b57e
commit
331efc3e25
|
@ -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>";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue