wp_using_themes() WordPress Function

The wp_using_themes() function can be used to check if a WordPress site is using themes. This function will return true if a theme is active and false if not. This function can be useful for plugin and theme developers who need to know if a site is using themes or not.

wp_using_themes() #

Determines whether the current request should use themes.


Return

(bool) True if themes should be used, false otherwise.


Top ↑

Source

File: wp-includes/load.php

function wp_using_themes() {
	/**
	 * Filters whether the current request should use themes.
	 *
	 * @since 5.1.0
	 *
	 * @param bool $wp_using_themes Whether the current request should use themes.
	 */
	return apply_filters( 'wp_using_themes', defined( 'WP_USE_THEMES' ) && WP_USE_THEMES );
}


Top ↑

Changelog

Changelog
VersionDescription
5.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.