Admin notices: Make (most) core notices dismissible.
These no longer return upon refreshing the page when JS is on and working, so users should be able to dismiss them. This is particularly important on the post edit screen when DFW is triggered, but pretty much all notices can be dismissed if needed. A post on Make/Core will follow with information on how this can be leveraged in plugins. props valendesigns, afercia, paulwilde, adamsilverstein, helen. fixes #31233. see #23367. Built from https://develop.svn.wordpress.org/trunk@31973 git-svn-id: http://core.svn.wordpress.org/trunk@31952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c545c63606
commit
d85f8fe326
|
@ -738,7 +738,8 @@ img.emoji {
|
||||||
/* @todo can we combine these into a class or use an existing dashicon one? */
|
/* @todo can we combine these into a class or use an existing dashicon one? */
|
||||||
#welcome-panel.welcome-panel .welcome-panel-close:before,
|
#welcome-panel.welcome-panel .welcome-panel-close:before,
|
||||||
.tagchecklist span a:before,
|
.tagchecklist span a:before,
|
||||||
#bulk-titles div a:before {
|
#bulk-titles div a:before,
|
||||||
|
.notice-dismiss:before {
|
||||||
background: none;
|
background: none;
|
||||||
color: #bbb;
|
color: #bbb;
|
||||||
content: '\f153';
|
content: '\f153';
|
||||||
|
@ -1288,22 +1289,59 @@ div.error p,
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notice.is-dismissible {
|
||||||
|
padding-left: 38px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss {
|
||||||
|
height: 38px;
|
||||||
|
width: 38px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 11px;
|
||||||
|
background: none;
|
||||||
|
color: #bbb;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss:hover:before,
|
||||||
|
.notice-dismiss:active:before,
|
||||||
|
.notice-dismiss:focus:before {
|
||||||
|
color: #c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss:active,
|
||||||
|
.notice-dismiss:focus {
|
||||||
|
outline: none;
|
||||||
|
-webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
color: #c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ie8 .notice-dismiss:focus {
|
||||||
|
outline: 1px solid #5b9dd9;
|
||||||
|
}
|
||||||
|
|
||||||
.notice-success,
|
.notice-success,
|
||||||
div.updated {
|
div.updated {
|
||||||
border-color: #7ad03a;
|
border-color: #7ad03a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-warning {
|
.notice-warning {
|
||||||
border-color: #ffba00;
|
border-color: #ffba00;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-error,
|
.notice-error,
|
||||||
div.error {
|
div.error {
|
||||||
border-color: #dd3d36;
|
border-color: #dd3d36;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-info {
|
.notice-info {
|
||||||
border-color: #00a0d2;
|
border-color: #00a0d2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap .notice,
|
.wrap .notice,
|
||||||
|
@ -3122,13 +3160,26 @@ img {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Feedback Messages */
|
/* Feedback Messages */
|
||||||
.wrap div.updated, .wrap div.error, .media-upload-form div.error {
|
.notice,
|
||||||
|
.wrap div.updated,
|
||||||
|
.wrap div.error,
|
||||||
|
.media-upload-form div.error {
|
||||||
margin: 20px 0 10px 0;
|
margin: 20px 0 10px 0;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 175%;
|
line-height: 175%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notice.is-dismissible {
|
||||||
|
padding-left: 46px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss {
|
||||||
|
height: 46px;
|
||||||
|
width: 46px;
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.wrap .icon32 + h2 {
|
.wrap .icon32 + h2 {
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -738,7 +738,8 @@ img.emoji {
|
||||||
/* @todo can we combine these into a class or use an existing dashicon one? */
|
/* @todo can we combine these into a class or use an existing dashicon one? */
|
||||||
#welcome-panel.welcome-panel .welcome-panel-close:before,
|
#welcome-panel.welcome-panel .welcome-panel-close:before,
|
||||||
.tagchecklist span a:before,
|
.tagchecklist span a:before,
|
||||||
#bulk-titles div a:before {
|
#bulk-titles div a:before,
|
||||||
|
.notice-dismiss:before {
|
||||||
background: none;
|
background: none;
|
||||||
color: #bbb;
|
color: #bbb;
|
||||||
content: '\f153';
|
content: '\f153';
|
||||||
|
@ -1288,22 +1289,59 @@ div.error p,
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notice.is-dismissible {
|
||||||
|
padding-right: 38px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss {
|
||||||
|
height: 38px;
|
||||||
|
width: 38px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 11px;
|
||||||
|
background: none;
|
||||||
|
color: #bbb;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss:hover:before,
|
||||||
|
.notice-dismiss:active:before,
|
||||||
|
.notice-dismiss:focus:before {
|
||||||
|
color: #c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss:active,
|
||||||
|
.notice-dismiss:focus {
|
||||||
|
outline: none;
|
||||||
|
-webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, .8);
|
||||||
|
color: #c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ie8 .notice-dismiss:focus {
|
||||||
|
outline: 1px solid #5b9dd9;
|
||||||
|
}
|
||||||
|
|
||||||
.notice-success,
|
.notice-success,
|
||||||
div.updated {
|
div.updated {
|
||||||
border-color: #7ad03a;
|
border-color: #7ad03a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-warning {
|
.notice-warning {
|
||||||
border-color: #ffba00;
|
border-color: #ffba00;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-error,
|
.notice-error,
|
||||||
div.error {
|
div.error {
|
||||||
border-color: #dd3d36;
|
border-color: #dd3d36;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-info {
|
.notice-info {
|
||||||
border-color: #00a0d2;
|
border-color: #00a0d2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap .notice,
|
.wrap .notice,
|
||||||
|
@ -3122,13 +3160,26 @@ img {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Feedback Messages */
|
/* Feedback Messages */
|
||||||
.wrap div.updated, .wrap div.error, .media-upload-form div.error {
|
.notice,
|
||||||
|
.wrap div.updated,
|
||||||
|
.wrap div.error,
|
||||||
|
.media-upload-form div.error {
|
||||||
margin: 20px 0 10px 0;
|
margin: 20px 0 10px 0;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 175%;
|
line-height: 175%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notice.is-dismissible {
|
||||||
|
padding-right: 46px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-dismiss {
|
||||||
|
height: 46px;
|
||||||
|
width: 46px;
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.wrap .icon32 + h2 {
|
.wrap .icon32 + h2 {
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -217,7 +217,7 @@ if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQU
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<div id="moderated" class="updated"><p>' . implode( "<br/>\n", $messages ) . '</p></div>';
|
echo '<div id="moderated" class="updated notice is-dismissible"><p>' . implode( "<br/>\n", $messages ) . '</p></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -410,7 +410,7 @@ if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create
|
||||||
<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
|
<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ( $message ) : ?>
|
<?php if ( $message ) : ?>
|
||||||
<div id="message" class="updated"><p><?php echo $message; ?></p></div>
|
<div id="message" class="updated notice notice-success is-dismissible"><p><?php echo $message; ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div id="lost-connection-notice" class="error hidden">
|
<div id="lost-connection-notice" class="error hidden">
|
||||||
<p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you’re reconnected.' ); ?>
|
<p><span class="spinner"></span> <?php _e( '<strong>Connection lost.</strong> Saving has been disabled until you’re reconnected.' ); ?>
|
||||||
|
|
|
@ -73,7 +73,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
<h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h2>
|
<h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h2>
|
||||||
|
|
||||||
<?php if ( isset( $_GET['added'] ) ) : ?>
|
<?php if ( isset( $_GET['added'] ) ) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('Link added.'); ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('Link added.'); ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php">
|
<form name="<?php echo esc_attr( $form_name ); ?>" id="<?php echo esc_attr( $form_name ); ?>" method="post" action="link.php">
|
||||||
|
|
|
@ -11,7 +11,7 @@ if ( !defined('ABSPATH') )
|
||||||
die('-1');
|
die('-1');
|
||||||
|
|
||||||
if ( empty($tag_ID) ) { ?>
|
if ( empty($tag_ID) ) { ?>
|
||||||
<div id="message" class="updated"><p><strong><?php _e( 'You did not select an item for editing.' ); ?></strong></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'You did not select an item for editing.' ); ?></strong></p></div>
|
||||||
<?php
|
<?php
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,7 @@ if ( !empty($_REQUEST['s']) )
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<?php if ( $message ) : ?>
|
<?php if ( $message ) : ?>
|
||||||
<div id="message" class="<?php echo $class; ?>"><p><?php echo $message; ?></p></div>
|
<div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
|
||||||
<?php $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_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>
|
||||||
|
|
|
@ -303,7 +303,7 @@ foreach ( $bulk_counts as $message => $count ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $messages )
|
if ( $messages )
|
||||||
echo '<div id="message" class="updated"><p>' . join( ' ', $messages ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . join( ' ', $messages ) . '</p></div>';
|
||||||
unset( $messages );
|
unset( $messages );
|
||||||
|
|
||||||
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] );
|
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed' ), $_SERVER['REQUEST_URI'] );
|
||||||
|
|
|
@ -854,10 +854,11 @@ add_action( 'post_edit_form_tag', 'post_form_autocomplete_off' );
|
||||||
function wp_admin_canonical_url() {
|
function wp_admin_canonical_url() {
|
||||||
$removable_query_args = array(
|
$removable_query_args = array(
|
||||||
'message', 'settings-updated', 'saved',
|
'message', 'settings-updated', 'saved',
|
||||||
'update', 'updated','activated',
|
'update', 'updated', 'activated',
|
||||||
'activate', 'deactivate', 'locked',
|
'activate', 'deactivate', 'locked',
|
||||||
'deleted', 'trashed', 'untrashed',
|
'deleted', 'trashed', 'untrashed',
|
||||||
'enabled', 'disabled', 'skipped',
|
'enabled', 'disabled', 'skipped',
|
||||||
|
'spammed', 'unspammed',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1317,7 +1317,7 @@ function wp_nav_menu_update_menu_items ( $nav_menu_selected_id, $nav_menu_select
|
||||||
/** This action is documented in wp-includes/nav-menu.php */
|
/** This action is documented in wp-includes/nav-menu.php */
|
||||||
do_action( 'wp_update_nav_menu', $nav_menu_selected_id );
|
do_action( 'wp_update_nav_menu', $nav_menu_selected_id );
|
||||||
|
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . sprintf( __( '<strong>%1$s</strong> has been updated.' ), $nav_menu_selected_title ) . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( __( '<strong>%1$s</strong> has been updated.' ), $nav_menu_selected_title ) . '</p></div>';
|
||||||
unset( $menu_items, $unsorted_menu_items );
|
unset( $menu_items, $unsorted_menu_items );
|
||||||
|
|
||||||
return $messages;
|
return $messages;
|
||||||
|
|
|
@ -1483,7 +1483,7 @@ function settings_errors( $setting = '', $sanitize = false, $hide_on_update = fa
|
||||||
$output = '';
|
$output = '';
|
||||||
foreach ( $settings_errors as $key => $details ) {
|
foreach ( $settings_errors as $key => $details ) {
|
||||||
$css_id = 'setting-error-' . $details['code'];
|
$css_id = 'setting-error-' . $details['code'];
|
||||||
$css_class = $details['type'] . ' settings-error';
|
$css_class = $details['type'] . ' settings-error notice is-dismissible';
|
||||||
$output .= "<div id='$css_id' class='$css_class'> \n";
|
$output .= "<div id='$css_id' class='$css_class'> \n";
|
||||||
$output .= "<p><strong>{$details['message']}</strong></p>";
|
$output .= "<p><strong>{$details['message']}</strong></p>";
|
||||||
$output .= "</div> \n";
|
$output .= "</div> \n";
|
||||||
|
|
|
@ -373,6 +373,27 @@ $(document).ready( function() {
|
||||||
$firstHeading.nextAll( 'div.updated, div.error, div.notice' ).addClass( 'below-h2' );
|
$firstHeading.nextAll( 'div.updated, div.error, div.notice' ).addClass( 'below-h2' );
|
||||||
$( 'div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $firstHeading );
|
$( 'div.updated, div.error, div.notice' ).not( '.below-h2, .inline' ).insertAfter( $firstHeading );
|
||||||
|
|
||||||
|
// Make notices dismissible
|
||||||
|
$( '.notice.is-dismissible' ).each( function() {
|
||||||
|
var $this = $( this ),
|
||||||
|
$button = $( '<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>' ),
|
||||||
|
btnText = commonL10n.dismiss || '';
|
||||||
|
|
||||||
|
// Ensure plain text
|
||||||
|
$button.find( '.screen-reader-text' ).text( btnText );
|
||||||
|
|
||||||
|
$this.append( $button );
|
||||||
|
|
||||||
|
$button.on( 'click.wp-dismiss-notice', function( event ) {
|
||||||
|
event.preventDefault();
|
||||||
|
$this.fadeTo( 100 , 0, function() {
|
||||||
|
$(this).slideUp( 100, function() {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Init screen meta
|
// Init screen meta
|
||||||
screenMeta.init();
|
screenMeta.init();
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -76,7 +76,7 @@ if ( !empty($_REQUEST['s']) )
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ( isset($_REQUEST['deleted']) ) {
|
if ( isset($_REQUEST['deleted']) ) {
|
||||||
echo '<div id="message" class="updated"><p>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>';
|
||||||
$deleted = (int) $_REQUEST['deleted'];
|
$deleted = (int) $_REQUEST['deleted'];
|
||||||
printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted);
|
printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted);
|
||||||
echo '</p></div>';
|
echo '</p></div>';
|
||||||
|
|
|
@ -52,7 +52,7 @@ get_current_screen()->set_help_sidebar(
|
||||||
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
|
|
||||||
if ( $updated ) { ?>
|
if ( $updated ) { ?>
|
||||||
<div id="message" class="updated"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
|
|
@ -231,7 +231,7 @@ switch ( $action ) {
|
||||||
check_admin_referer( 'delete-menu_item_' . $menu_item_id );
|
check_admin_referer( 'delete-menu_item_' . $menu_item_id );
|
||||||
|
|
||||||
if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) )
|
if ( is_nav_menu_item( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) )
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __('The menu item has been successfully deleted.') . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('The menu item has been successfully deleted.') . '</p></div>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
@ -248,9 +248,9 @@ switch ( $action ) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ( is_wp_error( $deletion ) )
|
if ( is_wp_error( $deletion ) )
|
||||||
$messages[] = '<div id="message" class="error"><p>' . $deletion->get_error_message() . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $deletion->get_error_message() . '</p></div>';
|
||||||
else
|
else
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __( 'The menu has been successfully deleted.' ) . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'The menu has been successfully deleted.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete_menus':
|
case 'delete_menus':
|
||||||
|
@ -261,13 +261,13 @@ switch ( $action ) {
|
||||||
|
|
||||||
$deletion = wp_delete_nav_menu( $menu_id_to_delete );
|
$deletion = wp_delete_nav_menu( $menu_id_to_delete );
|
||||||
if ( is_wp_error( $deletion ) ) {
|
if ( is_wp_error( $deletion ) ) {
|
||||||
$messages[] = '<div id="message" class="error"><p>' . $deletion->get_error_message() . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $deletion->get_error_message() . '</p></div>';
|
||||||
$deletion_error = true;
|
$deletion_error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( empty( $deletion_error ) )
|
if ( empty( $deletion_error ) )
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __( 'Selected menus have been successfully deleted.' ) . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Selected menus have been successfully deleted.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'update':
|
case 'update':
|
||||||
|
@ -296,7 +296,7 @@ switch ( $action ) {
|
||||||
$_nav_menu_selected_id = wp_update_nav_menu_object( 0, array('menu-name' => $new_menu_title) );
|
$_nav_menu_selected_id = wp_update_nav_menu_object( 0, array('menu-name' => $new_menu_title) );
|
||||||
|
|
||||||
if ( is_wp_error( $_nav_menu_selected_id ) ) {
|
if ( is_wp_error( $_nav_menu_selected_id ) ) {
|
||||||
$messages[] = '<div id="message" class="error"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
|
||||||
} else {
|
} else {
|
||||||
$_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id );
|
$_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id );
|
||||||
$nav_menu_selected_id = $_nav_menu_selected_id;
|
$nav_menu_selected_id = $_nav_menu_selected_id;
|
||||||
|
@ -327,7 +327,7 @@ switch ( $action ) {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$messages[] = '<div id="message" class="error"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update existing menu.
|
// Update existing menu.
|
||||||
|
@ -337,7 +337,7 @@ switch ( $action ) {
|
||||||
|
|
||||||
$menu_title = trim( esc_html( $_POST['menu-name'] ) );
|
$menu_title = trim( esc_html( $_POST['menu-name'] ) );
|
||||||
if ( ! $menu_title ) {
|
if ( ! $menu_title ) {
|
||||||
$messages[] = '<div id="message" class="error"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __( 'Please enter a valid menu name.' ) . '</p></div>';
|
||||||
$menu_title = $_menu_object->name;
|
$menu_title = $_menu_object->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ switch ( $action ) {
|
||||||
$_nav_menu_selected_id = wp_update_nav_menu_object( $nav_menu_selected_id, array( 'menu-name' => $menu_title ) );
|
$_nav_menu_selected_id = wp_update_nav_menu_object( $nav_menu_selected_id, array( 'menu-name' => $menu_title ) );
|
||||||
if ( is_wp_error( $_nav_menu_selected_id ) ) {
|
if ( is_wp_error( $_nav_menu_selected_id ) ) {
|
||||||
$_menu_object = $_nav_menu_selected_id;
|
$_menu_object = $_nav_menu_selected_id;
|
||||||
$messages[] = '<div id="message" class="error"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
|
||||||
} else {
|
} else {
|
||||||
$_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id );
|
$_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id );
|
||||||
$nav_menu_selected_title = $_menu_object->name;
|
$nav_menu_selected_title = $_menu_object->name;
|
||||||
|
@ -374,7 +374,7 @@ switch ( $action ) {
|
||||||
// Set menu locations
|
// Set menu locations
|
||||||
set_theme_mod( 'nav_menu_locations', $menu_locations );
|
set_theme_mod( 'nav_menu_locations', $menu_locations );
|
||||||
|
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __( 'Menu locations updated.' ) . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Menu locations updated.' ) . '</p></div>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ if ( $_POST ) {
|
||||||
include( ABSPATH . 'wp-admin/admin-header.php' );
|
include( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
|
|
||||||
if ( isset( $_GET['updated'] ) ) {
|
if ( isset( $_GET['updated'] ) ) {
|
||||||
?><div id="message" class="updated"><p><?php _e( 'Options saved.' ) ?></p></div><?php
|
?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Options saved.' ) ?></p></div><?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ foreach ( $tabs as $tab_id => $tab ) {
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $messages ) ) {
|
if ( ! empty( $messages ) ) {
|
||||||
foreach ( $messages as $msg )
|
foreach ( $messages as $msg )
|
||||||
echo '<div id="message" class="updated"><p>' . $msg . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
|
||||||
} ?>
|
} ?>
|
||||||
<form method="post" action="site-info.php?action=update-site">
|
<form method="post" action="site-info.php?action=update-site">
|
||||||
<?php wp_nonce_field( 'edit-site' ); ?>
|
<?php wp_nonce_field( 'edit-site' ); ?>
|
||||||
|
|
|
@ -134,7 +134,7 @@ require( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $messages ) ) {
|
if ( ! empty( $messages ) ) {
|
||||||
foreach ( $messages as $msg )
|
foreach ( $messages as $msg )
|
||||||
echo '<div id="message" class="updated"><p>' . $msg . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
|
||||||
} ?>
|
} ?>
|
||||||
<form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
|
<form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
|
||||||
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
|
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
|
||||||
|
|
|
@ -105,7 +105,7 @@ foreach ( $tabs as $tab_id => $tab ) {
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $messages ) ) {
|
if ( ! empty( $messages ) ) {
|
||||||
foreach ( $messages as $msg )
|
foreach ( $messages as $msg )
|
||||||
echo '<div id="message" class="updated"><p>' . $msg . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
|
||||||
} ?>
|
} ?>
|
||||||
<form method="post" action="site-settings.php?action=update-site">
|
<form method="post" action="site-settings.php?action=update-site">
|
||||||
<?php wp_nonce_field( 'edit-site' ); ?>
|
<?php wp_nonce_field( 'edit-site' ); ?>
|
||||||
|
|
|
@ -157,12 +157,12 @@ foreach ( $tabs as $tab_id => $tab ) {
|
||||||
|
|
||||||
if ( isset( $_GET['enabled'] ) ) {
|
if ( isset( $_GET['enabled'] ) ) {
|
||||||
$_GET['enabled'] = absint( $_GET['enabled'] );
|
$_GET['enabled'] = absint( $_GET['enabled'] );
|
||||||
echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme enabled.', '%s themes enabled.', $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( _n( 'Theme enabled.', '%s themes enabled.', $_GET['enabled'] ), number_format_i18n( $_GET['enabled'] ) ) . '</p></div>';
|
||||||
} elseif ( isset( $_GET['disabled'] ) ) {
|
} elseif ( isset( $_GET['disabled'] ) ) {
|
||||||
$_GET['disabled'] = absint( $_GET['disabled'] );
|
$_GET['disabled'] = absint( $_GET['disabled'] );
|
||||||
echo '<div id="message" class="updated"><p>' . sprintf( _n( 'Theme disabled.', '%s themes disabled.', $_GET['disabled'] ), number_format_i18n( $_GET['disabled'] ) ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( _n( 'Theme disabled.', '%s themes disabled.', $_GET['disabled'] ), number_format_i18n( $_GET['disabled'] ) ) . '</p></div>';
|
||||||
} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
|
} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
|
||||||
echo '<div id="message" class="error"><p>' . __( 'No theme selected.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<p><?php _e( 'Network enabled themes are not shown on this screen.' ) ?></p>
|
<p><?php _e( 'Network enabled themes are not shown on this screen.' ) ?></p>
|
||||||
|
|
|
@ -201,34 +201,34 @@ foreach ( $tabs as $tab_id => $tab ) {
|
||||||
if ( isset($_GET['update']) ) :
|
if ( isset($_GET['update']) ) :
|
||||||
switch($_GET['update']) {
|
switch($_GET['update']) {
|
||||||
case 'adduser':
|
case 'adduser':
|
||||||
echo '<div id="message" class="updated"><p>' . __( 'User added.' ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User added.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_add_member':
|
case 'err_add_member':
|
||||||
echo '<div id="message" class="error"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'User is already a member of this site.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_add_notfound':
|
case 'err_add_notfound':
|
||||||
echo '<div id="message" class="error"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username of an existing user.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'promote':
|
case 'promote':
|
||||||
echo '<div id="message" class="updated"><p>' . __( 'Changed roles.' ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_promote':
|
case 'err_promote':
|
||||||
echo '<div id="message" class="error"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to change role.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'remove':
|
case 'remove':
|
||||||
echo '<div id="message" class="updated"><p>' . __( 'User removed from this site.' ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User removed from this site.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_remove':
|
case 'err_remove':
|
||||||
echo '<div id="message" class="error"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Select a user to remove.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'newuser':
|
case 'newuser':
|
||||||
echo '<div id="message" class="updated"><p>' . __( 'User created.' ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'User created.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_new':
|
case 'err_new':
|
||||||
echo '<div id="message" class="error"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Enter the username and email.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_new_dup':
|
case 'err_new_dup':
|
||||||
echo '<div id="message" class="error"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'Duplicated username or email address.' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
endif; ?>
|
endif; ?>
|
||||||
|
|
|
@ -239,7 +239,7 @@ if ( isset( $_GET['updated'] ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty( $msg ) )
|
if ( ! empty( $msg ) )
|
||||||
$msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>';
|
$msg = '<div class="updated" id="message notice is-dismissible"><p>' . $msg . '</p></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$wp_list_table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
|
@ -274,7 +274,7 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||||
} else {
|
} else {
|
||||||
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
|
$message = _n( '%s theme enabled.', '%s themes enabled.', $enabled );
|
||||||
}
|
}
|
||||||
echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $enabled ) ) . '</p></div>';
|
||||||
} elseif ( isset( $_GET['disabled'] ) ) {
|
} elseif ( isset( $_GET['disabled'] ) ) {
|
||||||
$disabled = absint( $_GET['disabled'] );
|
$disabled = absint( $_GET['disabled'] );
|
||||||
if ( 1 == $disabled ) {
|
if ( 1 == $disabled ) {
|
||||||
|
@ -282,7 +282,7 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||||
} else {
|
} else {
|
||||||
$message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
|
$message = _n( '%s theme disabled.', '%s themes disabled.', $disabled );
|
||||||
}
|
}
|
||||||
echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $disabled ) ) . '</p></div>';
|
||||||
} elseif ( isset( $_GET['deleted'] ) ) {
|
} elseif ( isset( $_GET['deleted'] ) ) {
|
||||||
$deleted = absint( $_GET['deleted'] );
|
$deleted = absint( $_GET['deleted'] );
|
||||||
if ( 1 == $deleted ) {
|
if ( 1 == $deleted ) {
|
||||||
|
@ -290,11 +290,11 @@ if ( isset( $_GET['enabled'] ) ) {
|
||||||
} else {
|
} else {
|
||||||
$message = _n( '%s theme deleted.', '%s themes deleted.', $deleted );
|
$message = _n( '%s theme deleted.', '%s themes deleted.', $deleted );
|
||||||
}
|
}
|
||||||
echo '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $deleted ) ) . '</p></div>';
|
||||||
} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
|
} elseif ( isset( $_GET['error'] ) && 'none' == $_GET['error'] ) {
|
||||||
echo '<div id="message" class="error"><p>' . __( 'No theme selected.' ) . '</p></div>';
|
echo '<div id="message" class="error notice is-dismissible"><p>' . __( 'No theme selected.' ) . '</p></div>';
|
||||||
} elseif ( isset( $_GET['error'] ) && 'main' == $_GET['error'] ) {
|
} elseif ( isset( $_GET['error'] ) && 'main' == $_GET['error'] ) {
|
||||||
echo '<div class="error"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
|
echo '<div class="error notice is-dismissible"><p>' . __( 'You cannot delete a theme while it is active on the main site.' ) . '</p></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -73,7 +73,7 @@ require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
|
||||||
<?php
|
<?php
|
||||||
if ( ! empty( $messages ) ) {
|
if ( ! empty( $messages ) ) {
|
||||||
foreach ( $messages as $msg )
|
foreach ( $messages as $msg )
|
||||||
echo '<div id="message" class="updated"><p>' . $msg . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?>
|
if ( isset( $add_user_errors ) && is_wp_error( $add_user_errors ) ) { ?>
|
||||||
|
|
|
@ -280,7 +280,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
|
|
||||||
if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
|
if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
|
||||||
?>
|
?>
|
||||||
<div id="message" class="updated"><p>
|
<div id="message" class="updated notice is-dismissible"><p>
|
||||||
<?php
|
<?php
|
||||||
switch ( $_REQUEST['action'] ) {
|
switch ( $_REQUEST['action'] ) {
|
||||||
case 'delete':
|
case 'delete':
|
||||||
|
|
|
@ -148,7 +148,7 @@ flush_rewrite_rules();
|
||||||
require( ABSPATH . 'wp-admin/admin-header.php' );
|
require( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
|
|
||||||
if ( ! empty( $_GET['settings-updated'] ) ) : ?>
|
if ( ! empty( $_GET['settings-updated'] ) ) : ?>
|
||||||
<div id="message" class="updated"><p><?php
|
<div id="message" class="updated notice is-dismissible"><p><?php
|
||||||
if ( ! is_multisite() ) {
|
if ( ! is_multisite() ) {
|
||||||
if ( $iis7_permalinks ) {
|
if ( $iis7_permalinks ) {
|
||||||
if ( $permalink_structure && ! $usingpi && ! $writable ) {
|
if ( $permalink_structure && ! $usingpi && ! $writable ) {
|
||||||
|
|
|
@ -164,7 +164,7 @@ default:
|
||||||
$content = esc_textarea( $content );
|
$content = esc_textarea( $content );
|
||||||
?>
|
?>
|
||||||
<?php if (isset($_GET['a'])) : ?>
|
<?php if (isset($_GET['a'])) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('File edited successfully.') ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('File edited successfully.') ?></p></div>
|
||||||
<?php elseif (isset($_GET['phperror'])) : ?>
|
<?php elseif (isset($_GET['phperror'])) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p>
|
<div id="message" class="updated"><p><?php _e('This plugin has been deactivated because your changes resulted in a <strong>fatal error</strong>.') ?></p>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -426,20 +426,20 @@ if ( !empty($invalid) )
|
||||||
delete_transient( 'plugins_delete_result_' . $user_ID );
|
delete_transient( 'plugins_delete_result_' . $user_ID );
|
||||||
|
|
||||||
if ( is_wp_error($delete_result) ) : ?>
|
if ( is_wp_error($delete_result) ) : ?>
|
||||||
<div id="message" class="error"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div>
|
<div id="message" class="error notice is-dismissible"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('The selected plugins have been <strong>deleted</strong>.'); ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('The selected plugins have been <strong>deleted</strong>.'); ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php elseif ( isset($_GET['activate']) ) : ?>
|
<?php elseif ( isset($_GET['activate']) ) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div>
|
||||||
<?php elseif (isset($_GET['activate-multi'])) : ?>
|
<?php elseif (isset($_GET['activate-multi'])) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('Selected plugins <strong>activated</strong>.'); ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('Selected plugins <strong>activated</strong>.'); ?></p></div>
|
||||||
<?php elseif ( isset($_GET['deactivate']) ) : ?>
|
<?php elseif ( isset($_GET['deactivate']) ) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div>
|
||||||
<?php elseif (isset($_GET['deactivate-multi'])) : ?>
|
<?php elseif (isset($_GET['deactivate-multi'])) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('Selected plugins <strong>deactivated</strong>.'); ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('Selected plugins <strong>deactivated</strong>.'); ?></p></div>
|
||||||
<?php elseif ( 'update-selected' == $action ) : ?>
|
<?php elseif ( 'update-selected' == $action ) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e('No out of date plugins were selected.'); ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e('No out of date plugins were selected.'); ?></p></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
|
|
|
@ -122,7 +122,7 @@ default:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isset( $_GET['updated'] ) ) : ?>
|
if ( isset( $_GET['updated'] ) ) : ?>
|
||||||
<div id="message" class="updated"><p><?php _e( 'File edited successfully.' ) ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php _e( 'File edited successfully.' ) ?></p></div>
|
||||||
<?php endif;
|
<?php endif;
|
||||||
|
|
||||||
$description = get_file_description( $file );
|
$description = get_file_description( $file );
|
||||||
|
|
|
@ -129,15 +129,15 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||||
</h2>
|
</h2>
|
||||||
<?php
|
<?php
|
||||||
if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>
|
if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>
|
||||||
<div id="message1" class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
|
<div id="message1" class="updated notice is-dismissible"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
|
||||||
<?php elseif ( isset($_GET['activated']) ) :
|
<?php elseif ( isset($_GET['activated']) ) :
|
||||||
if ( isset( $_GET['previewed'] ) ) { ?>
|
if ( isset( $_GET['previewed'] ) ) { ?>
|
||||||
<div id="message2" class="updated"><p><?php printf( __( 'Settings saved and theme activated. <a href="%s">Visit site</a>' ), home_url( '/' ) ); ?></p></div>
|
<div id="message2" class="updated notice is-dismissible"><p><?php printf( __( 'Settings saved and theme activated. <a href="%s">Visit site</a>' ), home_url( '/' ) ); ?></p></div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div id="message2" class="updated"><p><?php printf( __( 'New theme activated. <a href="%s">Visit site</a>' ), home_url( '/' ) ); ?></p></div><?php
|
<div id="message2" class="updated notice is-dismissible"><p><?php printf( __( 'New theme activated. <a href="%s">Visit site</a>' ), home_url( '/' ) ); ?></p></div><?php
|
||||||
}
|
}
|
||||||
elseif ( isset($_GET['deleted']) ) : ?>
|
elseif ( isset($_GET['deleted']) ) : ?>
|
||||||
<div id="message3" class="updated"><p><?php _e('Theme deleted.') ?></p></div>
|
<div id="message3" class="updated notice is-dismissible"><p><?php _e('Theme deleted.') ?></p></div>
|
||||||
<?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?>
|
<?php elseif ( isset( $_GET['delete-active-child'] ) ) : ?>
|
||||||
<div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div>
|
<div id="message4" class="error"><p><?php _e( 'You cannot delete a theme while it has an active child theme.' ); ?></p></div>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -276,7 +276,7 @@ if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !empty($message) ) { ?>
|
if ( !empty($message) ) { ?>
|
||||||
<div id="message" class="updated"><p><?php echo $message; ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php echo $message; ?></p></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<form id="posts-filter" method="get">
|
<form id="posts-filter" method="get">
|
||||||
|
|
|
@ -186,7 +186,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
|
||||||
<div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div>
|
<div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( isset($_GET['updated']) ) : ?>
|
<?php if ( isset($_GET['updated']) ) : ?>
|
||||||
<div id="message" class="updated">
|
<div id="message" class="updated notice is-dismissible">
|
||||||
<?php if ( IS_PROFILE_PAGE ) : ?>
|
<?php if ( IS_PROFILE_PAGE ) : ?>
|
||||||
<p><strong><?php _e('Profile updated.') ?></strong></p>
|
<p><strong><?php _e('Profile updated.') ?></strong></p>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|
|
@ -253,7 +253,7 @@ if ( current_user_can( 'create_users' ) ) {
|
||||||
|
|
||||||
if ( ! empty( $messages ) ) {
|
if ( ! empty( $messages ) ) {
|
||||||
foreach ( $messages as $msg )
|
foreach ( $messages as $msg )
|
||||||
echo '<div id="message" class="updated"><p>' . $msg . '</p></div>';
|
echo '<div id="message" class="updated notice is-dismissible"><p>' . $msg . '</p></div>';
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<?php if ( isset($add_user_errors) && is_wp_error( $add_user_errors ) ) : ?>
|
<?php if ( isset($add_user_errors) && is_wp_error( $add_user_errors ) ) : ?>
|
||||||
|
|
|
@ -394,34 +394,34 @@ default:
|
||||||
} else {
|
} else {
|
||||||
$message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
|
$message = _n( '%s user deleted.', '%s users deleted.', $delete_count );
|
||||||
}
|
}
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $delete_count ) ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'add':
|
case 'add':
|
||||||
if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) {
|
if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) {
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . sprintf( __( 'New user created. <a href="%s">Edit user</a>' ),
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( __( 'New user created. <a href="%s">Edit user</a>' ),
|
||||||
esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
|
esc_url( add_query_arg( 'wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ),
|
||||||
self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '</p></div>';
|
self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '</p></div>';
|
||||||
} else {
|
} else {
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __( 'New user created.' ) . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'New user created.' ) . '</p></div>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'promote':
|
case 'promote':
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __('Changed roles.') . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('Changed roles.') . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_admin_role':
|
case 'err_admin_role':
|
||||||
$messages[] = '<div id="message" class="error"><p>' . __('The current user’s role must have user editing capabilities.') . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __('The current user’s role must have user editing capabilities.') . '</p></div>';
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __('Other user roles have been changed.') . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('Other user roles have been changed.') . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_admin_del':
|
case 'err_admin_del':
|
||||||
$messages[] = '<div id="message" class="error"><p>' . __('You can’t delete the current user.') . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __('You can’t delete the current user.') . '</p></div>';
|
||||||
$messages[] = '<div id="message" class="updated"><p>' . __('Other users have been deleted.') . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __('Other users have been deleted.') . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'remove':
|
case 'remove':
|
||||||
$messages[] = '<div id="message" class="updated fade"><p>' . __('User removed from this site.') . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __('User removed from this site.') . '</p></div>';
|
||||||
break;
|
break;
|
||||||
case 'err_admin_remove':
|
case 'err_admin_remove':
|
||||||
$messages[] = '<div id="message" class="error"><p>' . __("You can't remove the current user.") . '</p></div>';
|
$messages[] = '<div id="message" class="error notice is-dismissible"><p>' . __("You can't remove the current user.") . '</p></div>';
|
||||||
$messages[] = '<div id="message" class="updated fade"><p>' . __('Other users have been removed.') . '</p></div>';
|
$messages[] = '<div id="message" class="updated notice is-dismissible fade"><p>' . __('Other users have been removed.') . '</p></div>';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
endif; ?>
|
endif; ?>
|
||||||
|
|
|
@ -330,7 +330,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
|
<?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
|
||||||
<div id="message" class="updated"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
<div id="message" class="updated notice is-dismissible"><p><?php echo $messages[$_GET['message']]; ?></p></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ( isset($_GET['error']) && isset($errors[$_GET['error']]) ) { ?>
|
<?php if ( isset($_GET['error']) && isset($errors[$_GET['error']]) ) { ?>
|
||||||
<div id="message" class="error"><p><?php echo $errors[$_GET['error']]; ?></p></div>
|
<div id="message" class="error"><p><?php echo $errors[$_GET['error']]; ?></p></div>
|
||||||
|
|
|
@ -79,7 +79,8 @@ function wp_default_scripts( &$scripts ) {
|
||||||
|
|
||||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
|
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
|
||||||
did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
|
did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
|
||||||
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
|
'warnDelete' => __( "You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete." ),
|
||||||
|
'dismiss' => __( 'Dismiss this notice.' ),
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );
|
$scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-beta3-31972';
|
$wp_version = '4.2-beta3-31973';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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