WordPress.org

Make WordPress Core

Ticket #11953: 11953.diff

File 11953.diff, 653 bytes (added by scribu, 3 years ago)
  • wp-includes/functions.php

     
    19721972function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) { 
    19731973        $name = esc_attr( $name ); 
    19741974        $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />'; 
     1975 
     1976        if ( $referer ) 
     1977                $nonce_field .= wp_referer_field( false ); 
     1978 
    19751979        if ( $echo ) 
    19761980                echo $nonce_field; 
    19771981 
    1978         if ( $referer ) 
    1979                 wp_referer_field( $echo ); 
    1980  
    19811982        return $nonce_field; 
    19821983} 
    19831984