Merge pull request #55 from johnraz/patch-2
Get wordpress 'home' dir. Correct fix.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user