get_theme_root [ WordPress-Funktionen ]
get_theme_root ( $stylesheet_or_template = false )
| Parameter: |
|
| Nutzt: | |
| Gibt zurück: |
|
| Definiert in: |
|
| Codex |
Ähnliche Funktionen: get_theme_roots, get_theme_root_uri, get_raw_theme_root, get_theme_mod, get_theme_mods
Retrieve path to themes directory.
Does not have trailing slash.
Quellcode
function get_theme_root( $stylesheet_or_template = false ) {
global $wp_theme_directories;
if ( $stylesheet_or_template && $theme_root = get_raw_theme_root( $stylesheet_or_template ) ) {
// Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory.
// This gives relative theme roots the benefit of the doubt when things go haywire.
if ( ! in_array( $theme_root, (array) $wp_theme_directories ) )
$theme_root = WP_CONTENT_DIR . $theme_root;
} else {
$theme_root = WP_CONTENT_DIR . '/themes';
}
return apply_filters( 'theme_root', $theme_root );
}Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- Function Reference/get theme root « WordPress Codex
... 8 Source File; 9 Related. Description. Retrieves the absolute path to the themes directory, without the trailing slash. Usage. <?php get_theme_root(); ?> ...
codex.wordpress.org - get_theme_root (WordPress Function) - WPSeek.com
May 10, 2013 ... Retrieve path to themes directory. WordPress lookup for get_theme_root, a WordPress Function.
wpseek.com - Paths For Building WordPress Themes or Plugins | computeraxe
Jun 23, 2011 ... No trailing slash. get_theme_roots(): Usage: get_theme_roots(); Returns: Themes directory with a leading slash, like “/themes”. site_url() ...
computeraxe.com - The Geek Professor » Get File Path to Wordpress Theme
Nov 7, 2009... $active_theme_name = $temp[1]; // The second value will be the theme name $theme_path =get_theme_root()."/".$active_theme_name; ...
www.thegeekprofessor.com
