get_allowed_themes()
Deprecated since 3.4.0. It is no longer supported and may be removed in future releases. Use wp_get_themes() instead.
Get the allowed themes for the current site.
No Hooks.
Returns
WP_Theme[]. Array of WP_Theme objects keyed by their name.
Usage
get_allowed_themes();
Notes
- See: wp_get_themes()
Changelog
| Since 3.0.0 | Introduced. |
| Deprecated since 3.4.0 | Use wp_get_themes() |
get_allowed_themes() get allowed themes code WP 7.0
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;
}