Changeset 31381
- Timestamp:
- 02/09/2015 04:56:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pluggable.php
r31188 r31381 1065 1065 * @since 1.2.0 1066 1066 * 1067 * @param int|string $action Action nonce 1068 * @param string $query_arg Where to look for nonce in $_REQUEST (since 2.5) 1069 */ 1070 function check_admin_referer($action = -1, $query_arg = '_wpnonce') { 1067 * @param int|string $action Action nonce. 1068 * @param string $query_arg Optional. Key to check for nonce in `$_REQUEST` (since 2.5). 1069 * Default '_wpnonce'. 1070 * @return false|int False if the nonce is invalid, 1 if the nonce is valid and generated between 1071 * 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago. 1072 */ 1073 function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) { 1071 1074 if ( -1 == $action ) 1072 1075 _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' ); … … 1085 1088 * @since 1.5.1 1086 1089 * 1087 * @param string $action The nonce action. 1088 * @param bool $result Whether the admin request nonce was validated. 1090 * @param string $action The nonce action. 1091 * @param false|int $result False if the nonce is invalid, 1 if the nonce is valid and generated between 1092 * 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago. 1089 1093 */ 1090 1094 do_action( 'check_admin_referer', $action, $result ); … … 1099 1103 * @since 2.0.3 1100 1104 * 1101 * @param int|string $action Action nonce 1102 * @param string $query_arg Where to look for nonce in $_REQUEST (since 2.5) 1105 * @param int|string $action Action nonce. 1106 * @param false|string $query_arg Optional. Key to check for the nonce in `$_REQUEST` (since 2.5). If false, 1107 * `$_REQUEST` values will be evaluated for '_ajax_nonce', and '_wpnonce' 1108 * (in that order). Default false. 1109 * @param bool $die Optional. Whether to die early when the nonce cannot be verified. 1110 * Default true. 1111 * @return false|int False if the nonce is invalid, 1 if the nonce is valid and generated between 1112 * 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago. 1103 1113 */ 1104 1114 function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) { … … 1126 1136 * @since 2.1.0 1127 1137 * 1128 * @param string $action The AJAX nonce action. 1129 * @param bool $result Whether the AJAX request nonce was validated. 1138 * @param string $action The AJAX nonce action. 1139 * @param false|int $result False if the nonce is invalid, 1 if the nonce is valid and generated between 1140 * 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago. 1130 1141 */ 1131 1142 do_action( 'check_ajax_referer', $action, $result ); … … 1694 1705 * @param string $nonce Nonce that was used in the form to verify 1695 1706 * @param string|int $action Should give context to what is taking place and be the same when nonce was created. 1696 * @return bool Whether the nonce check passed or failed. 1707 * @return false|int False if the nonce is invalid, 1 if the nonce is valid and generated between 1708 * 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago. 1697 1709 */ 1698 1710 function wp_verify_nonce( $nonce, $action = -1 ) {
Note: See TracChangeset
for help on using the changeset viewer.