Definition:
function get_theme_root( $stylesheet_or_template = false ) {}
Retrieve path to themes directory.
Does not have trailing slash.
Parameters
- string $stylesheet_or_template: The stylesheet or template name of the theme
Return values
returns:Theme path.
Defined filters
- theme_root
apply_filters( 'theme_root', $theme_root )
Source code
function get_theme_root( $stylesheet_or_template = false ) { if ( $stylesheet_or_template ) { if ( $theme_root = get_raw_theme_root($stylesheet_or_template) ) $theme_root = WP_CONTENT_DIR . $theme_root; else $theme_root = WP_CONTENT_DIR . '/themes'; } else { $theme_root = WP_CONTENT_DIR . '/themes'; } return apply_filters( 'theme_root', $theme_root ); }
1773
No comments yet... Be the first to leave a reply!