get_theme_root [ WordPress Function ]
get_theme_root ( $stylesheet_or_template = false )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_theme_roots, get_raw_theme_root, get_theme_root_uri, get_theme_mod, get_theme_mods
Retrieve path to themes directory.
Does not have trailing slash.
Source
<?php
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 );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/get theme root « WordPress Codex
Description. Retrieve path to themes directory. Does not have trailing slash. Usage. <?php get_theme_root() ?> Parameters. None. Return Values ...
codex.wordpress.org - get_stylesheet_directory and get_theme_root - need ... - WordPress
I attempted using: get_stylesheet_directory and get_theme_root but neither of them are printing their path for some reason once prepend them to my image path.
wordpress.org - get_theme_root (WordPress Function) - WPSeek.com
WordPress lookup for get_theme_root, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
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