Changeset 11187
- Timestamp:
- 05/05/2009 02:45:40 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r11180 r11187 68 68 function get_home_path() { 69 69 $home = get_option( 'home' ); 70 if ( $home != '' && $home != get_option( 'siteurl' ) ) { 71 $home_path = parse_url( $home ); 72 $home_path = $home_path['path']; 73 $root = str_replace( $_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"] ); 74 $home_path = trailingslashit( $root.$home_path ); 70 $siteurl = get_option( 'siteurl' ); 71 if ( $home != '' && $home != $siteurl ) { 72 $wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */ 73 $pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); 74 $home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos); 75 $home_path = trailingslashit( $home_path ); 75 76 } else { 76 77 $home_path = ABSPATH;
Note: See TracChangeset
for help on using the changeset viewer.