Changeset 6131 for trunk/wp-includes/pluggable.php
- Timestamp:
- 09/18/2007 10:23:16 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r6094 r6131 397 397 header("Location: $location"); 398 398 } 399 } 400 endif; 401 402 if ( !function_exists('wp_safe_redirect') ) : 403 /** 404 * performs a safe (local) redirect, using wp_redirect() 405 * @return void 406 **/ 407 function wp_safe_redirect($location, $status = 302) { 408 if ( $location{0} == '/' ) { 409 if ( $location{1} == '/' ) 410 $location = get_option('home') . '/'; 411 } else { 412 if ( substr($location, 0, strlen(get_option('home'))) != get_option('home') ) 413 $location = get_option('home') . '/'; 414 } 415 416 wp_redirect($location, $status); 399 417 } 400 418 endif;
Note: See TracChangeset
for help on using the changeset viewer.