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
137 require_once ABSPATH . 'wp-admin/admin-header.php';
138 ?>
139
140 <div class="wrap">
141      <h1><?php echo esc_html( $title ); ?></h1>
142
143      <?php
144      if ( ! empty( $_GET['admin_email_remind_later'] ) ) :
145           /** This filter is documented in wp-login.php */
146           $remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );
147           $postponed_time  = get_option( 'admin_email_lifespan' );
148
149           /*
150            * Calculate how many seconds it's been since the reminder was postponed.
151            * This allows us to not show it if the query arg is set, but visited due to caches, bookmarks or similar.
152            */
153           $time_passed = time() - ( $postponed_time - $remind_interval );
154
155           // Only show the dashboard notice if it's been less than a minute since the message was postponed.