Uses
| Uses | Description |
|---|---|
| wp-includes/theme.php: wp_get_themes() | Returns an array of WP_Theme objects based on the arguments. |
| wp-includes/functions.php: _deprecated_function() | Mark a function as deprecated and inform when it has been used. |
This function has been deprecated. Use wp_get_themes() instead.
Get the allowed themes for the current site.
File: wp-admin/includes/deprecated.php
function get_allowed_themes() {
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
$themes = wp_get_themes( array( 'allowed' => true ) );
$wp_themes = array();
foreach ( $themes as $theme ) {
$wp_themes[ $theme->get('Name') ] = $theme;
}
return $wp_themes;
} | Version | Description |
|---|---|
| 3.4.0 | Use wp_get_themes() |
| 3.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_allowed_themes