Description
Returns an array of WP_Theme objects based on the argument.
Usage
<?php $themes = wp_get_themes( $args ); ?>
Parameters
- $args
- (array) (Optional) This array can have the key/value pairs below.
- Default: array( 'errors' => false , 'allowed' => null, 'blog_id' => 0 )
- 'errors': mixed. Defaults to false.
- true to return themes with errors.
- false to return themes without errors.
- null to return all themes.
- 'allowed': mixed. (Multisite) Defaults to null.
- true to return only allowed themes for a site.
- false to return only disallowed themes for a site.
- 'site' to return only site-allowed themes.
- 'network' to return only network-allowed themes.
- null to return all themes.
- 'blog_id': int. (Multisite) The blog ID used to calculate which themes are allowed. Defaults to 0, synonymous with the current blog.
Return Values
This function returns an array of WP_Theme objects (see wp_get_theme()).
Change Log
Since: 3.4.0
Source File
wp_get_themes() is located in wp-includes/theme.php
.
Related