WordPress.org

Make WordPress Core

Changeset 34651


Ignore:
Timestamp:
09/27/2015 11:00:08 PM (4 years ago)
Author:
DrewAPicture
Message:

Docs: Improve the hook documentation for the themes_api filter.

Standardizes the hook doc summary and expands on expected behavior when short-circuiting the request, which is dependent on the $action type.

Also updates the expected types on the $override parameter.

See #34036. See #32246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/theme.php

    r34650 r34651  
    407407     * Filter whether to override the WordPress.org Themes API.
    408408     *
    409      * Returning a value of true to this filter allows a theme to completely
    410      * override the built-in WordPress.org API.
     409     * Passing a non-false value will effectively short-circuit the WordPress.org API request.
     410     *
     411     * If `$action` is 'query_themes', 'theme_information', or 'feature_list', an object MUST
     412     * be passed. If `$action` is 'hot_tags`, an array should be passed.
    411413     *
    412414     * @since 2.8.0
    413415     *
    414      * @param bool   $bool  Whether to override the WordPress.org Themes API. Default false.
    415      * @param string $action Requested action. Likely values are 'theme_information',
    416      *                       'feature_list', or 'query_themes'.
    417      * @param object $args   Arguments used to query for installer pages from the Themes API.
     416     * @param false|object|array $override Whether to override the WordPress.org Themes API. Default false.
     417     * @param string             $action  Requested action. Likely values are 'theme_information',
     418     *                                    'feature_list', or 'query_themes'.
     419     * @param object             $args     Arguments used to query for installer pages from the Themes API.
    418420     */
    419421    $res = apply_filters( 'themes_api', false, $action, $args );
Note: See TracChangeset for help on using the changeset viewer.