Make WordPress Core


Ignore:
Timestamp:
11/05/2019 09:21:46 PM (7 years ago)
Author:
johnbillion
Message:

Docs: Improve documentation of known return types, plus other docs fixes.

See #48303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r46586 r46660  
    781781         * @since 4.4.0
    782782         *
    783          * @return array List of registered namespaces.
     783         * @return string[] List of registered namespaces.
    784784         */
    785785        public function get_namespaces() {
     
    10181018         *     @type string $context Context.
    10191019         * }
    1020          * @return array Index entity
     1020         * @return WP_REST_Response The API root index data.
    10211021         */
    10221022        public function get_index( $request ) {
     
    11011101         * @param array  $routes  Routes to get data for.
    11021102         * @param string $context Optional. Context for data. Accepts 'view' or 'help'. Default 'view'.
    1103          * @return array Route data to expose in indexes.
     1103         * @return array[] Route data to expose in indexes, keyed by route.
    11041104         */
    11051105        public function get_data_for_routes( $routes, $context = 'view' ) {
     
    11321132                 * @since 4.4.0
    11331133                 *
    1134                  * @param array $available Map of route to route data.
    1135                  * @param array $routes    Internal route data as an associative array.
     1134                 * @param array[] $available Route data to expose in indexes, keyed by route.
     1135                 * @param array   $routes    Internal route data as an associative array.
    11361136                 */
    11371137                return apply_filters( 'rest_route_data', $available, $routes );
Note: See TracChangeset for help on using the changeset viewer.