Changeset 18130
- Timestamp:
- 06/03/2011 06:23:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r18091 r18130 1955 1955 * important to use nonce field in forms. 1956 1956 * 1957 * If you set $echo to true and set $referer to true, then you will need to1958 * retrieve the {@link wp_referer_field() wp referer field}. If you have the1959 * $referer set to true and are echoing the nonce field, it will also echo the1960 * referer field.1961 *1962 1957 * The $action and $name are optional, but if you want to have better security, 1963 1958 * it is strongly suggested to set those two parameters. It is easier to just … … 1983 1978 $name = esc_attr( $name ); 1984 1979 $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />'; 1980 1981 if ( $referer ) 1982 $nonce_field .= wp_referer_field( false ); 1983 1985 1984 if ( $echo ) 1986 1985 echo $nonce_field; 1987 1988 if ( $referer )1989 wp_referer_field( $echo );1990 1986 1991 1987 return $nonce_field;
Note: See TracChangeset
for help on using the changeset viewer.