Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_refresh_nonces

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
3370           /**
3371            * Filters the nonces to send to the New/Edit Post screen.
3372            *
3373            * @since 4.3.0
3374            *
3375            * @param array  $response  The Heartbeat response.
3376            * @param array  $data      The $_POST data sent.
3377            * @param string $screen_id The screen ID.
3378            */
3379           $response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );
3380
3381           if ( false === $nonce_state ) {
3382                // User is logged in but nonces have expired.
3383                $response['nonces_expired'] = true;
3384                wp_send_json( $response );
3385           }
3386      }
3387
3388      if ( ! empty( $data ) ) {