get_stylesheet() - WordPress 函数参考中文文档

返回介绍

get_stylesheet()

发布于 2017-09-11 字数3066 浏览 936 评论 0

get_stylesheet()

Retrieve name of the current stylesheet.


描述

The theme name that the administrator has currently set the front end theme as.

For all intents and purposes, the template name and the stylesheet name are going to be the same for most cases.


返回值

(string) Stylesheet name.


源代码

File: wp-includes/theme.php

function get_stylesheet() {
	/**
	 * Filters the name of current stylesheet.
	 *
	 * @since 1.5.0
	 *
	 * @param string $stylesheet Name of the current stylesheet.
	 */
	return apply_filters( 'stylesheet', get_option( 'stylesheet' ) );
}

更新日志

Version 描述
1.5.0 Introduced.

相关函数

Uses

  • wp-includes/theme.php:
    stylesheet
  • wp-includes/plugin.php:
    apply_filters()
  • wp-includes/option.php:
    get_option()

Used By

  • wp-includes/theme.php:
    wp_update_custom_css_post()
  • wp-includes/theme.php:
    wp_get_custom_css_post()
  • wp-includes/theme.php:
    wp_get_custom_css()
  • wp-admin/custom-background.php:
    Custom_Background::ajax_background_add()
  • wp-admin/includes/class-theme-upgrader.php:
    Theme_Upgrader::current_before()
  • wp-admin/includes/class-theme-upgrader.php:
    Theme_Upgrader::current_after()
  • wp-admin/includes/class-theme-upgrader.php:
    Theme_Upgrader::bulk_upgrade()
  • wp-admin/includes/theme.php:
    wp_prepare_themes_for_js()
  • wp-admin/includes/class-theme-upgrader-skin.php:
    Theme_Upgrader_Skin::after()
  • wp-admin/custom-header.php:
    Custom_Image_Header::ajax_header_add()
  • wp-admin/custom-header.php:
    Custom_Image_Header::ajax_header_remove()
  • wp-admin/custom-header.php:
    Custom_Image_Header::customize_set_last_used()
  • wp-admin/custom-header.php:
    Custom_Image_Header::get_uploaded_header_images()
  • wp-admin/custom-header.php:
    Custom_Image_Header::set_header_image()
  • wp-includes/class-wp-customize-manager.php:
    WP_Customize_Manager::register_controls()
  • wp-includes/class-wp-customize-manager.php:
    WP_Customize_Manager::__construct()
  • wp-includes/theme.php:
    validate_current_theme()
  • wp-includes/theme.php:
    get_stylesheet_directory()
  • wp-includes/theme.php:
    get_stylesheet_directory_uri()
  • wp-includes/theme.php:
    wp_get_themes()
  • wp-includes/theme.php:
    wp_get_theme()
  • Show 16 more used by
    Hide more used by


User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!