get_home_path [ WordPress Function ]
get_home_path ( No parameters )
| Uses: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_home_template, get_theme_data, get_theme_updates, get_home_url, get_comment_author
Get the absolute filesystem path to the root of the WordPress installation
Source
<?php
function get_home_path() {
$home = get_option( 'home' );
$siteurl = get_option( 'siteurl' );
if ( $home != '' && $home != $siteurl ) {
$wp_path_rel_to_home = str_replace($home, '', $siteurl); /* $siteurl - $home */
$pos = strrpos($_SERVER["SCRIPT_FILENAME"], $wp_path_rel_to_home);
$home_path = substr($_SERVER["SCRIPT_FILENAME"], 0, $pos);
$home_path = trailingslashit( $home_path );
} else {
$home_path = ABSPATH;
}
return $home_path;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- get_home_path (WordPress Function) - WPSeek.com
WordPress lookup for get_home_path, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - #10447 (get_home_path() fails when home url and site url differ in ...
Description. If you set your blog's url and site url to the same thing, albeit with differing caps, get_home_path() returns / instead of ABSPATH. We should probably ...
core.trac.wordpress.org - WordPress › Support » Dreamhose and get_home_path()
Dreamhose and get_home_path() (10 posts). cynics ... It seems get_home_path() returns "/dh/cgi-system/php.cgi/" instead of "/home/myusername/mydomain" ...
wordpress.org - get_home_path() WordPress function reference, arguments and ...
Get the absolute filesystem path to the root of the WordPress installation.
queryposts.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- jimisaacs on "2.8.1 (BUG) - Options Permalinks"
- jimisaacs on "2.8.1 (BUG) - Options Permalinks"
- hrekum on "Dreamhose and get_home_path()"
- cynics on "Dreamhose and get_home_path()"
- James on "Dreamhose and get_home_path()"
- cynics on "Dreamhose and get_home_path()"
- James on "Dreamhose and get_home_path()"
- jalenack on "Dreamhose and get_home_path()"
- cynics on "Dreamhose and get_home_path()"
- jalenack on "Dreamhose and get_home_path()"