[wp-trac] [WordPress Trac] #22772: Introduce HOMEPATH
WordPress Trac
noreply at wordpress.org
Sun Mar 3 20:23:48 UTC 2013
#22772: Introduce HOMEPATH
-------------------------+------------------------------
Reporter: WraithKenny | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Filesystem | Version: 3.5
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by Otto42):
Additional note: I was playing around with my Synology Diskstation today,
and noticed that they had not upgraded their WordPress package past 3.4.2
yet. So I downloaded it and opened up a copy. They have a change to core
to deal with this for their specific case.
Essentially, they modified get_home_path() to have this:
{{{
if (defined('SYNOWORDPRESS')){
return csSYNOWordPressMisc::get_home_path($home, $siteurl);
}
}}}
and then they have an extra file loaded in the wp-config which does this:
{{{
class csSYNOWordPressMisc {
static function get_home_path($home, $siteurl) {
$root_dir = '/var/services/web';
if ( $home != '' && $home != $siteurl ) {
$siteDomain = substr($siteurl, 0, -9);
$home_path = $root_dir . "/" . substr($home,
strlen($siteDomain)) . "/";
} else {
$home_path = ABSPATH;
}
return $home_path;
}
}
}}}
This is because of their system design where the location of the WordPress
install doesn't necessarily correspond to the URL as such. It comes with a
couple extra plugins to allow them to change the URL of the site without
moving around the files through some device-specific stuff.
A constant or something along these lines would probably allow them to use
the WordPress package without the core change, meaning they could more
easily stay up-to-date.
I didn't spot any other core changes, but I haven't done a full compare
yet.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22772#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list