WordPress.org

Make WordPress Core

Changeset 31823


Ignore:
Timestamp:
03/18/2015 09:58:52 PM (5 years ago)
Author:
ocean90
Message:

Edit Terms: Show error messages actually as error messages.

props rahulbhangale, SergeyBiryukov.
fixes #31241.

File:
1 edited

Legend:

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

    r31696 r31823  
    6666        $location = add_query_arg( 'message', 1, $location );
    6767    else
    68         $location = add_query_arg( 'message', 4, $location );
     68        $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location );
    6969
    7070    break;
     
    157157        $location = add_query_arg( 'message', 3, $location );
    158158    else
    159         $location = add_query_arg( 'message', 5, $location );
     159        $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location );
    160160    break;
    161161}
     
    298298}
    299299
     300$class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated';
    300301?>
    301302
     
    307308
    308309<?php if ( $message ) : ?>
    309 <div id="message" class="updated"><p><?php echo $message; ?></p></div>
    310 <?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
     310<div id="message" class="<?php echo $class; ?>"><p><?php echo $message; ?></p></div>
     311<?php $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
    311312endif; ?>
    312313<div id="ajax-response"></div>
Note: See TracChangeset for help on using the changeset viewer.