Make WordPress Core

Changeset 44663


Ignore:
Timestamp:
01/21/2019 04:49:06 AM (6 years ago)
Author:
pento
Message:

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

Props birgire, afercia, jaymanpandya.
Fixes #43703.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tag-form.php

    r43571 r44663  
    7171<h1><?php echo $tax->labels->edit_item; ?></h1>
    7272
    73 <?php if ( $message ) : ?>
    74 <div id="message" class="updated">
     73<?php
     74$class = ( isset( $msg ) && 5 === $msg ) ? 'error' : 'success';
     75
     76if ( $message ) {
     77    ?>
     78<div id="message" class="notice notice-<?php echo $class; ?>">
    7579    <p><strong><?php echo $message; ?></strong></p>
    7680    <?php if ( $wp_http_referer ) { ?>
    7781    <p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>">
    78                             <?php
    79                             echo esc_html( $tax->labels->back_to_items );
    80                             ?>
     82        <?php echo esc_html( $tax->labels->back_to_items ); ?>
    8183    </a></p>
    8284    <?php } ?>
    8385</div>
    84 <?php endif; ?>
     86    <?php
     87}
     88?>
    8589
    8690<div id="ajax-response"></div>
Note: See TracChangeset for help on using the changeset viewer.