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
2694      } else {
2695           $screen_id = 'front';
2696      }
2697
2698      if ( ! empty( $_POST['data'] ) ) {
2699           $data = wp_unslash( (array) $_POST['data'] );
2700      }
2701
2702      if ( 1 !== $nonce_state ) {
2703           $response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );
2704
2705           if ( false === $nonce_state ) {
2706                // User is logged in but nonces have expired.
2707                $response['nonces_expired'] = true;
2708                wp_send_json( $response );
2709           }
2710      }
2711
2712      if ( ! empty( $data ) ) {