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
2788      } else {
2789           $screen_id = 'front';
2790      }
2791
2792      if ( ! empty( $_POST['data'] ) ) {
2793           $data = wp_unslash( (array) $_POST['data'] );
2794      }
2795
2796      if ( 1 !== $nonce_state ) {
2797           $response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );
2798
2799           if ( false === $nonce_state ) {
2800                // User is logged in but nonces have expired.
2801                $response['nonces_expired'] = true;
2802                wp_send_json( $response );
2803           }
2804      }
2805
2806      if ( ! empty( $data ) ) {