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, {@see 'themes_api_args'}, is for the args and gives the action as the second parameter. The hook for {@see 'themes_api_args'} must ensure that an object is returned. The second filter, {@see '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, {@see 'themes_api_result'}, makes it possible to filter the response object or array, depending on the `$action` type. Supported arguments per action: | Argument Name | 'query_themes' | 'theme_information' | 'hot_tags' | 'feature_list' | | -------------------| :------------: | :-----------------: | :--------: | :--------------: | | `$slug` | No | Yes | No | No | | `$per_page` | Yes | No | No | No | | `$page` | Yes | No | No | No | | `$number` | No | No | Yes | No | | `$search` | Yes | No | No | No | | `$tag` | Yes | No | No | No | | `$author` | Yes | No | No | No | | `$user` | Yes | No | No | No | | `$browse` | Yes | No | No | No | | `$locale` | Yes | Yes | No | No | | `$fields` | Yes | Yes | No | No |
$action, $args = array(
Sortie :
@param string $action API action to perform: Accepts 'query_themes', 'theme_information',
@param array|object $args {
@return object|array|WP_Error Response object or array on success, WP_Error on failure. See the
// Utilisation de la fonction themes_api
$result = themes_api($action, $args = array();
if ($result) {
// Votre logique ici
}
Chargement des actualités...