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

Props birgire, afercia, jaymanpandya.
Fixes #43703.



git-svn-id: https://develop.svn.wordpress.org/trunk@44663 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2019-01-21 04:49:06 +00:00
parent 7d8ce1e287
commit 5d7089f5bf

View File

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