Changeset 1975
- Timestamp:
- 03/01/2009 02:56:53 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bb-includes/functions.bb-core.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-includes/functions.bb-core.php
r1971 r1975 1081 1081 1082 1082 function bb_nonce_url($actionurl, $action = -1) { 1083 return add_query_arg( '_wpnonce', bb_create_nonce( $action ), $actionurl ); 1084 } 1085 1086 function bb_nonce_field($action = -1, $name = "_wpnonce", $referer = true) { 1087 $name = attribute_escape($name); 1088 echo '<input type="hidden" name="' . $name . '" value="' . bb_create_nonce($action) . '" />'; 1083 $actionurl = str_replace( '&', '&', $actionurl ); 1084 return wp_specialchars( add_query_arg( '_wpnonce', bb_create_nonce( $action ), $actionurl ) ); 1085 } 1086 1087 function bb_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) { 1088 $name = attribute_escape( $name ); 1089 $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . bb_create_nonce( $action ) . '" />'; 1090 if ( $echo ) 1091 echo $nonce_field; 1092 1089 1093 if ( $referer ) 1090 wp_referer_field(); 1094 wp_referer_field( $echo, 'previous' ); 1095 1096 return $nonce_field; 1091 1097 } 1092 1098
Note: See TracChangeset
for help on using the changeset viewer.