Edit Terms: Show error messages actually as error messages.
props rahulbhangale, SergeyBiryukov. fixes #31241. Built from https://develop.svn.wordpress.org/trunk@31823 git-svn-id: http://core.svn.wordpress.org/trunk@31805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8d9fc7e51b
commit
11a205d489
|
@ -65,7 +65,7 @@ case 'add-tag':
|
||||||
if ( $ret && !is_wp_error( $ret ) )
|
if ( $ret && !is_wp_error( $ret ) )
|
||||||
$location = add_query_arg( 'message', 1, $location );
|
$location = add_query_arg( 'message', 1, $location );
|
||||||
else
|
else
|
||||||
$location = add_query_arg( 'message', 4, $location );
|
$location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ case 'editedtag':
|
||||||
if ( $ret && !is_wp_error( $ret ) )
|
if ( $ret && !is_wp_error( $ret ) )
|
||||||
$location = add_query_arg( 'message', 3, $location );
|
$location = add_query_arg( 'message', 3, $location );
|
||||||
else
|
else
|
||||||
$location = add_query_arg( 'message', 5, $location );
|
$location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,6 +297,7 @@ if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) {
|
||||||
$message = $messages['_item'][ $msg ];
|
$message = $messages['_item'][ $msg ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="wrap nosubsub">
|
<div class="wrap nosubsub">
|
||||||
|
@ -306,8 +307,8 @@ if ( !empty($_REQUEST['s']) )
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<?php if ( $message ) : ?>
|
<?php if ( $message ) : ?>
|
||||||
<div id="message" class="updated"><p><?php echo $message; ?></p></div>
|
<div id="message" class="<?php echo $class; ?>"><p><?php echo $message; ?></p></div>
|
||||||
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
|
<?php $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
|
||||||
endif; ?>
|
endif; ?>
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-beta1-31822';
|
$wp_version = '4.2-beta1-31823';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue