get_stylesheet()
Retrieve name of the current stylesheet.
Description #Description
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.
Return #Return
(string) Stylesheet name.
Source #Source
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' ) ); }
Expand full source code Collapse full source code View on Trac
Changelog #Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |
Related #Related
Uses #Uses
Uses | Description |
---|---|
wp-includes/theme.php: stylesheet |
Filters the name of current stylesheet. |
wp-includes/plugin.php: apply_filters() |
Calls the callback functions that have been added to a filter hook. |
wp-includes/option.php: get_option() |
Retrieves an option value based on an option name. |
Used By #Used By
Used By | Description |
---|---|
wp-admin/includes/theme.php: is_theme_paused() |
Determines whether a theme is technically active but was paused while loading. |
wp-admin/includes/file.php: wp_edit_theme_plugin_file() |
Attempt to edit a file for a theme or plugin. |
wp-includes/theme.php: wp_update_custom_css_post() |
Update the |
wp-includes/theme.php: wp_get_custom_css_post() |
Fetch the |
wp-includes/theme.php: wp_get_custom_css() |
Fetch the saved Custom CSS content for rendering. |
wp-admin/includes/class-custom-background.php: Custom_Background::ajax_background_add() |
Ajax handler for adding custom background context to an attachment. |
wp-admin/includes/class-theme-upgrader.php: Theme_Upgrader::current_before() |
Turn on maintenance mode before attempting to upgrade the current theme. |
wp-admin/includes/class-theme-upgrader.php: Theme_Upgrader::current_after() |
Turn off maintenance mode after upgrading the current theme. |
wp-admin/includes/class-theme-upgrader.php: Theme_Upgrader::bulk_upgrade() |
Upgrade several themes at once. |
wp-admin/includes/theme.php: wp_prepare_themes_for_js() |
Prepare themes for JavaScript. |
wp-admin/includes/class-theme-upgrader-skin.php: Theme_Upgrader_Skin::after() | |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::ajax_header_add() |
Given an attachment ID for a header image, updates its “last used” timestamp to now. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::ajax_header_remove() |
Given an attachment ID for a header image, unsets it as a user-uploaded header image for the current theme. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::customize_set_last_used() |
Updates the last-used postmeta on a header image attachment after saving a new header image via the Customizer. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::get_uploaded_header_images() |
Gets the previously uploaded header images. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::set_header_image() |
Choose a header image, selected from existing uploaded and default headers, or provide an array of uploaded header data (either new, or from media library). |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::register_controls() |
Register some default controls. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::__construct() |
Constructor. |
wp-includes/theme.php: validate_current_theme() |
Checks that current theme files ‘index.php’ and ‘style.css’ exists. |
wp-includes/theme.php: get_stylesheet_directory() |
Retrieve stylesheet directory path for current theme. |
wp-includes/theme.php: get_stylesheet_directory_uri() |
Retrieve stylesheet directory URI. |
wp-includes/theme.php: wp_get_themes() |
Returns an array of WP_Theme objects based on the arguments. |
wp-includes/theme.php: wp_get_theme() |
Gets a WP_Theme object for a theme. |