WordPress.org

Make WordPress Core

Ticket #25732: theme_doc.diff

File theme_doc.diff, 1.5 KB (added by l10n, 6 years ago)
  • src/wp-admin/includes/theme.php

     
    277277
    278278        if ( !isset($args->per_page) )
    279279                $args->per_page = 24;
    280 
     280        /**
     281         * Ensure that an object is returned via this filter.
     282         *
     283         * themes_api_args, is for the args in themes api and gives the action as
     284         * the second parameter. The hook for 'themes_api_args' must ensure that an
     285         * object is returned.
     286         *
     287         * @since 2.8.0
     288         *
     289         * @param string $action
     290         * @param array|object $args Optional. Arguments to serialize for the Theme Info API.
     291         * @return object
     292        */
    281293        $args = apply_filters('themes_api_args', $args, $action); //NOTE: Ensure that an object is returned via this filter.
     294       
     295        /**
     296         * Is the result that would be returned.
     297         *
     298         * Allows a theme to completely override the builtin WordPress.org API.
     299         *
     300         * @since 2.8.0
     301         *
     302         * @param boolean
     303         * @param string $action
     304         * @param object $args
     305         *
     306         */
    282307        $res = apply_filters('themes_api', false, $action, $args); //NOTE: Allows a theme to completely override the builtin WordPress.org API.
    283308
    284309        if ( ! $res ) {
     
    302327                }
    303328        }
    304329
     330        /**
     331         * Return themes Features/params such as Colors, Columns, Features , Width,
     332         * Subject...
     333         *
     334         * @since 2.8.0
     335         *
     336         * @param mixed $res
     337         * @param mixed $res
     338         * @param object $args
     339         */
    305340        return apply_filters('themes_api_result', $res, $action, $args);
    306341}