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:
@@ -157,12 +157,12 @@ foreach ( $tabs as $tab_id => $tab ) {
|
||||
|
||||
if ( isset( $_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'] ) ) {
|
||||
$_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'] ) {
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user