wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
get_stylesheet_directory › WordPress Function
Da1.5.0
Deprecaton/a
› get_stylesheet_directory ( Nessun parametro )
Ritorna: |
|
Definito a: |
|
Codex: | |
ChangeLog: |
|
Retrieves stylesheet directory path for the active theme.
Funzioni correlate: get_stylesheet_directory_uri, get_stylesheet_uri, get_stylesheet, get_template_directory, register_theme_directory
Sorgenti
function get_stylesheet_directory() { global $wp_stylesheet_path; if ( null === $wp_stylesheet_path ) { $stylesheet = get_stylesheet(); $theme_root = get_theme_root( $stylesheet ); $stylesheet_dir = "$theme_root/$stylesheet"; /** * Filters the stylesheet directory path for the active theme. * * @since 1.5.0 * * @param string $stylesheet_dir Absolute path to the active theme. * @param string $stylesheet Directory name of the active theme. * @param string $theme_root Absolute path to themes directory. */ $stylesheet_dir = apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root ); // If there are filter callbacks, force the logic to execute on every call. if ( has_filter( 'stylesheet' ) || has_filter( 'theme_root' ) || has_filter( 'stylesheet_directory' ) ) { return $stylesheet_dir; } $wp_stylesheet_path = $stylesheet_dir; } return $wp_stylesheet_path; }