Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: admin_email_remind_interval

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
111 require_once ABSPATH . 'wp-admin/admin-header.php';
112 ?>
113
114 <div class="wrap">
115      <h1><?php echo esc_html( $title ); ?></h1>
116
117      <?php
118      if ( ! empty( $_GET['admin_email_remind_later'] ) ) :
119           /** This filter is documented in wp-login.php */
120           $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );
121           $postponed_time  = get_option( 'admin_email_lifespan' );
122
123           /*
124            * Calculate how many seconds it's been since the reminder was postponed.
125            * This allows us to not show it if the query arg is set, but visited due to caches, bookmarks or similar.
126            */
127           $time_passed = time() - ( $postponed_time - $remind_interval );
128
129           // Only show the dashboard notice if it's been less than a minute since the message was postponed.