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:
parent
0160d81eee
commit
7b5f9a896c
@ -68,8 +68,12 @@ endforeach;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show_message($message) {
|
function show_message($message) {
|
||||||
if ( is_wp_error($message) )
|
if( is_wp_error($message) ){
|
||||||
$message = $message->get_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>";
|
echo "<p>$message</p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user