Merge pull request #55 from johnraz/patch-2

Get wordpress 'home' dir. Correct fix.
This commit is contained in:
Ben Word
2011-05-17 21:52:16 -07:00

View File

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