wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_stylesheet_directory › WordPress Function

Since1.5.0
已弃用n/a
get_stylesheet_directory ( 没有参数 )
返回:
  • (string) Path to active theme's stylesheet directory.
定义在:
文档:
Change Log:
  • 6.4.0
  • 6.4.2

Retrieves stylesheet directory path for the active theme.



源码

function get_stylesheet_directory() {
	$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.
	 */
	return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
}