WP_REST_Templates_Controller::get_wp_templates_author_text_field()wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php | Returns a human readable text for the author of the template.
|
wp_get_theme_preview_path()wp-includes/theme-previews.php | Filters the blog option to return the path for the previewed theme.
|
_register_theme_block_patterns()wp-includes/block-patterns.php | Register any patterns that the active theme may provide under its ./patterns/ directory.
|
wp_is_block_theme()wp-includes/theme.php | Returns whether the active theme is a block-based theme or not.
|
WP_REST_Themes_Controller::get_item_permissions_check()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Checks if a given request has access to read the theme.
|
WP_REST_Themes_Controller::get_item()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Retrieves a single theme.
|
WP_REST_Themes_Controller::prepare_links()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Prepares links for the request.
|
validate_theme_requirements()wp-includes/theme.php | Validates the theme requirements for WordPress version and PHP version.
|
populate_network_meta()wp-admin/includes/schema.php | Creates WordPress network meta and sets the default values.
|
WP_REST_Themes_Controller::get_items()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Retrieves a collection of themes.
|
WP_REST_Themes_Controller::prepare_item_for_response()wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php | Prepares a single theme output for response.
|
WP_REST_Posts_Controller::check_template()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Checks whether the template is valid for the given post.
|
WP_REST_Posts_Controller::handle_template()wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Sets the template for a post.
|
Theme_Upgrader::theme_info()wp-admin/includes/class-theme-upgrader.php | Gets the WP_Theme object for a theme.
|
Language_Pack_Upgrader::get_name_for_update()wp-admin/includes/class-language-pack-upgrader.php | Gets the name of an item being updated.
|
wp_prepare_themes_for_js()wp-admin/includes/theme.php | Prepares themes for JavaScript.
|
delete_theme()wp-admin/includes/theme.php | Removes a theme.
|
get_page_templates()wp-admin/includes/theme.php | Gets the page templates available in this theme.
|
WP_Theme_Install_List_Table::_get_theme_status()wp-admin/includes/class-wp-theme-install-list-table.php | Checks to see if the theme is already installed.
|
populate_options()wp-admin/includes/schema.php | Create WordPress options and set the default values.
|
update_right_now_message()wp-admin/includes/update.php | Displays WordPress version and active theme in the ‘At a Glance’ dashboard widget.
|
get_theme_updates()wp-admin/includes/update.php | Retrieves themes with updates available.
|
check_theme_switched()wp-includes/theme.php | Checks if a theme has been changed and runs ‘after_switch_theme’ hook on the next WP load.
|
remove_theme_mods()wp-includes/theme.php | Removes theme modifications option for the active theme.
|
switch_theme()wp-includes/theme.php | Switches the theme.
|
validate_current_theme()wp-includes/theme.php | Checks that the active theme has the required files.
|
get_theme_mods()wp-includes/theme.php | Retrieves all theme modifications.
|
Echo the name of an installed theme
Result:
Get other data: Text domain & theme URI
Switch a specific theme on all sites in a multisite installation
Get the directory name of the current theme regardless of the child theme.
Code to Display current or any installed theme version:
Display current theme version:
Display any of installed theme version using directory name:
As of WP 6.7, make sure not to call this function any earlier than the “init” hook, or it will trigger the following error:
PHP Notice: Function _load_textdomain_just_in_time was called incorrectly
Display the current theme author URI
Display the current theme’s version
Echo the name of the current active theme