Terms: Show error colours when a term fails to update.

Props birgire, afercia, jaymanpandya.
Fixes #43703.


Built from https://develop.svn.wordpress.org/trunk@44663


git-svn-id: http://core.svn.wordpress.org/trunk@44494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-01-21 04:50:50 +00:00
parent 54d43d88ea
commit 2b4f8ff69e
2 changed files with 11 additions and 7 deletions

View File

@ -70,18 +70,22 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
<div class="wrap">
<h1><?php echo $tax->labels->edit_item; ?></h1>
<?php if ( $message ) : ?>
<div id="message" class="updated">
<?php
$class = ( isset( $msg ) && 5 === $msg ) ? 'error' : 'success';
if ( $message ) {
?>
<div id="message" class="notice notice-<?php echo $class; ?>">
<p><strong><?php echo $message; ?></strong></p>
<?php if ( $wp_http_referer ) { ?>
<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>">
<?php
echo esc_html( $tax->labels->back_to_items );
?>
<?php echo esc_html( $tax->labels->back_to_items ); ?>
</a></p>
<?php } ?>
</div>
<?php endif; ?>
<?php
}
?>
<div id="ajax-response"></div>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-beta1-44662';
$wp_version = '5.1-beta1-44663';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.