Changeset 28746
- Timestamp:
- 06/11/2014 07:59:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/misc.php
r28658 r28746 275 275 */ 276 276 function wp_reset_vars( $vars ) { 277 for ( $i=0; $i<count( $vars ); $i += 1 ) { 278 $var = $vars[$i]; 279 global $$var; 280 281 if ( empty( $_POST[$var] ) ) { 282 if ( empty( $_GET[$var] ) ) 283 $$var = ''; 284 else 285 $$var = $_GET[$var]; 277 foreach ( $vars as $var ) { 278 if ( empty( $_POST[ $var ] ) ) { 279 if ( empty( $_GET[ $var ] ) ) { 280 $GLOBALS[ $var ] = ''; 281 } else { 282 $GLOBALS[ $var ] = $_GET[ $var ]; 283 } 286 284 } else { 287 $ $var = $_POST[$var];285 $GLOBALS[ $var ] = $_POST[ $var ]; 288 286 } 289 287 }
Note: See TracChangeset
for help on using the changeset viewer.