This is the correct fix

This commit is contained in:
Jonathan Liuti
2011-05-15 02:53:30 -07:00
parent 66cb21dda9
commit 7de67904e1

View File

@@ -1,8 +1,8 @@
<?php <?php
function roots_get_home_path() { function roots_get_home_path() {
$home = get_option( 'home' ); $home = trailingslashit(get_option( 'home' ));
$siteurl = get_option( 'siteurl' ); $siteurl = trailingslashit(get_option( 'siteurl' ));
if ( $home != '' && $home != $siteurl ) { if ( $home != '' && $home != $siteurl ) {
$wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */ $wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */
$pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home); $pos = strpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home);