get_raw_theme_root [ WordPress Function ]
get_raw_theme_root ( $stylesheet_or_template, $skip_cache = false )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_theme_root, get_theme_roots, get_theme_root_uri, get_theme_mod, get_theme_support
Get the raw theme root relative to the content directory with no filters applied.
Source
<?php
function get_raw_theme_root( $stylesheet_or_template, $skip_cache = false ) {
global $wp_theme_directories;
if ( count($wp_theme_directories) <= 1 )
return '/themes';
$theme_root = false;
// If requesting the root for the current theme, consult options to avoid calling get_theme_roots()
if ( ! $skip_cache ) {
if ( get_option('stylesheet') == $stylesheet_or_template )
$theme_root = get_option('stylesheet_root');
elseif ( get_option('template') == $stylesheet_or_template )
$theme_root = get_option('template_root');
}
if ( empty($theme_root) ) {
$theme_roots = get_theme_roots();
if ( !empty($theme_roots[$stylesheet_or_template]) )
$theme_root = $theme_roots[$stylesheet_or_template];
}
return $theme_root;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- get_raw_theme_root | A HitchHackers guide through WordPress
Feb 24, 2011 ... Source code. function get_raw_theme_root( $stylesheet_or_template, $ no_cache = false ) { global $wp_theme_directories; ...
hitchhackerguide.com - #14911 (Don't fetch theme_roots on every page load.) – WordPress ...
Then I wonder why get_theme_root() calls get_raw_theme_root a.k.a. get_theme_root_unfiltered() because both functions look to be for the same thing (get ...
core.trac.wordpress.org - PHPXRef 0.7 : WordPress : Detail view of theme.php
param: string $theme_root Absolute path of the theme root to look in. Optional. If not specified, get_raw_theme_root() return: WP_Theme Theme object. Be sure ...
phpxref.ftwr.co.uk - widgets - WP 3.3 RC1 new switch_theme() method foobars sidebars ...
Dec 6, 2011... 1 ) { update_option('template_root', get_raw_theme_root($template, true)); update_option('stylesheet_root', get_raw_theme_root($stylesheet ...
wordpress.stackexchange.com