--- a/wp/wp-admin/index.php Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-admin/index.php Tue Dec 15 13:49:49 2020 +0100
@@ -7,10 +7,10 @@
*/
/** Load WordPress Bootstrap */
-require_once( dirname( __FILE__ ) . '/admin.php' );
+require_once __DIR__ . '/admin.php';
/** Load WordPress dashboard API */
-require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
+require_once ABSPATH . 'wp-admin/includes/dashboard.php';
wp_dashboard_setup();
@@ -44,7 +44,7 @@
)
);
-// Help tabs
+// Help tabs.
$help = '<p>' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '</p>';
$help .= '<p>' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '</p>';
@@ -83,7 +83,7 @@
}
$help .= '<p>' . sprintf(
- /* translators: %s: WordPress Planet URL */
+ /* translators: %s: WordPress Planet URL. */
__( '<strong>WordPress Events and News</strong> — Upcoming events near you as well as the latest news from the official WordPress project and the <a href="%s">WordPress Planet</a>.' ),
__( 'https://planet.wordpress.org/' )
) . '</p>';
@@ -104,23 +104,52 @@
$screen->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
- '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_Screen">Documentation on Dashboard</a>' ) . '</p>' .
+ '<p>' . __( '<a href="https://wordpress.org/support/article/dashboard-screen/">Documentation on Dashboard</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
);
-include( ABSPATH . 'wp-admin/admin-header.php' );
+require_once ABSPATH . 'wp-admin/admin-header.php';
?>
<div class="wrap">
<h1><?php echo esc_html( $title ); ?></h1>
+ <?php
+ if ( ! empty( $_GET['admin_email_remind_later'] ) ) :
+ /** This filter is documented in wp-login.php */
+ $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );
+ $postponed_time = get_option( 'admin_email_lifespan' );
+
+ /*
+ * Calculate how many seconds it's been since the reminder was postponed.
+ * This allows us to not show it if the query arg is set, but visited due to caches, bookmarks or similar.
+ */
+ $time_passed = time() - ( $postponed_time - $remind_interval );
+
+ // Only show the dashboard notice if it's been less than a minute since the message was postponed.
+ if ( $time_passed < MINUTE_IN_SECONDS ) :
+ ?>
+ <div class="notice notice-success is-dismissible">
+ <p>
+ <?php
+ printf(
+ /* translators: %s: Human-readable time interval. */
+ __( 'The admin email verification page will reappear after %s.' ),
+ human_time_diff( time() + $remind_interval )
+ );
+ ?>
+ </p>
+ </div>
+ <?php endif; ?>
+ <?php endif; ?>
+
<?php
if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :
$classes = 'welcome-panel';
- $option = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
- // 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner
- $hide = 0 == $option || ( 2 == $option && wp_get_current_user()->user_email != get_option( 'admin_email' ) );
+ $option = (int) get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
+ // 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner.
+ $hide = ( 0 === $option || ( 2 === $option && wp_get_current_user()->user_email !== get_option( 'admin_email' ) ) );
if ( $hide ) {
$classes .= ' hidden';
}
@@ -153,4 +182,4 @@
<?php
wp_print_community_events_templates();
-require( ABSPATH . 'wp-admin/admin-footer.php' );
+require_once ABSPATH . 'wp-admin/admin-footer.php';