Retrieves theme installer pages from the WordPress.org Themes API.
It is possible for a theme to override the Themes API result with three filters. Assume this is for themes, which can extend on the Theme Info to offer more choices. This is very powerful and must be used with care, when overriding the filters.
The first filter, themes_api_args, is for the args and gives the action as the second parameter. The hook for themes_api_args must ensure that an object is returned.
The second filter, themes_api, allows a plugin to override the WordPress.org Theme API entirely. If $action is 'query_themes', 'theme_information', or 'feature_list', an object MUST be passed. If $action is 'hot_tags', an array should be passed.
Finally, the third filter, themes_api_result, makes it possible to filter the response object or array, depending on the $action type.
Object|Array|WP_Error. Response object or array on success, WP_Error on failure. See the function reference article for more information on the make-up of possible return objects depending on the value of $action.
Usage
themes_api( $action, $args );
$action(string) (required)
API action to perform: Accepts 'query_themes', 'theme_information', 'hot_tags' or 'feature_list'.
$args(array|object)
Array or object of arguments to serialize for the Themes API.
Default: empty array
slug(string)
The theme slug. Default: ''
per_page(int)
Number of themes per page. Default: 24
page(int)
Number of current page. Default: 1
number(int)
Number of tags to be queried.
search(string)
A search term. Default: ''
tag(string)
Tag to filter themes. Default: ''
author(string)
Username of an author to filter themes. Default: ''
user(string)
Username to query for their favorites. Default: ''
locale(string)
Locale to provide context-sensitive results. Default: value of get_locale()
fields(array)
Array of fields which should or should not be returned.
description(true|false)
Whether to return the theme full description. Default: false
sections(true|false)
Whether to return the theme readme sections: description, installation, FAQ, screenshots, other notes, and changelog. Default: false
rating(true|false)
Whether to return the rating in percent and total number of ratings. Default: false
ratings(true|false)
Whether to return the number of rating for each star (1-5). Default: false
downloaded(true|false)
Whether to return the download count. Default: false
downloadlink(true|false)
Whether to return the download link for the package. Default: false
last_updated(true|false)
Whether to return the date of the last update. Default: false
tags(true|false)
Whether to return the assigned tags. Default: false
homepage(true|false)
Whether to return the theme homepage link. Default: false
screenshots(true|false)
Whether to return the screenshots. Default: false
screenshot_count(int)
Number of screenshots to return. Default: 1
screenshot_url(true|false)
Whether to return the URL of the first screenshot. Default: false
photon_screenshots(true|false)
Whether to return the screenshots via Photon. Default: false
template(true|false)
Whether to return the slug of the parent theme. Default: false
parent(true|false)
Whether to return the slug, name and homepage of the parent theme. Default: false
versions(true|false)
Whether to return the list of all available versions. Default: false
theme_url(true|false)
Whether to return theme's URL. Default: false
extended_author(true|false)
Whether to return nicename or nicename and display name. Default: false