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 ); |