Make WordPress Core

Changeset 46696 for trunk


Ignore:
Timestamp:
11/11/2019 02:41:15 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of WP_Error.

See #48303.

Location:
trunk
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-plugin-upgrader.php

    r45932 r46696  
    451451         * @param string        $remote_destination
    452452         * @param array         $plugin
    453          * @return WP_Error|bool
     453         * @return bool|WP_Error
    454454         */
    455455        public function delete_old_plugin( $removed, $local_destination, $remote_destination, $plugin ) {
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r46644 r46696  
    7777         * @since 2.8.0
    7878         *
    79          * @var WP_Error|array $result {
     79         * @var array|WP_Error $result {
    8080         *      @type string $source             The full path to the source the files were installed from.
    8181         *      @type string $source_files       List of all the files in the source directory.
  • trunk/src/wp-admin/includes/file.php

    r46597 r46696  
    20872087         * @param array         $credentials Credentials to connect with.
    20882088         * @param string        $type        Chosen filesystem method.
    2089          * @param WP_Error|bool $error       Error object or status.
     2089         * @param bool|WP_Error $error       Error object or status.
    20902090         * @param string        $context     Full path to the directory that is tested for being writable.
    20912091         */
  • trunk/src/wp-admin/includes/plugin.php

    r46695 r46696  
    614614 *                             or just the current site. Multisite only. Default false.
    615615 * @param bool   $silent       Optional. Whether to prevent calling activation hooks. Default false.
    616  * @return WP_Error|null WP_Error on invalid file or null on success.
     616 * @return null|WP_Error WP_Error on invalid file or null on success.
    617617 */
    618618function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) {
     
    10721072 *
    10731073 * @param string $plugin Path to the plugin file relative to the plugins directory.
    1074  * @return WP_Error|int 0 on success, WP_Error on failure.
     1074 * @return int|WP_Error 0 on success, WP_Error on failure.
    10751075 */
    10761076function validate_plugin( $plugin ) {
  • trunk/src/wp-admin/includes/update-core.php

    r46596 r46696  
    881881 * @param string $from New release unzipped path.
    882882 * @param string $to   Path to old WordPress installation.
    883  * @return WP_Error|null WP_Error on failure, null on success.
     883 * @return null|WP_Error WP_Error on failure, null on success.
    884884 */
    885885function update_core( $from, $to ) {
     
    13151315 * @param string   $to        Destination directory.
    13161316 * @param string[] $skip_list Array of files/folders to skip copying.
    1317  * @return WP_Error|true WP_Error on failure, true on success.
     1317 * @return true|WP_Error WP_Error on failure, true on success.
    13181318 */
    13191319function _copy_dir( $from, $to, $skip_list = array() ) {
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r46330 r46696  
    136136         * @param string $object Optional. Accepts any registered taxonomy or post type name. Default is 'page'.
    137137         * @param int    $page   Optional. The page number used to generate the query offset. Default is '0'.
    138          * @return WP_Error|array Returns either a WP_Error object or an array of menu items.
     138         * @return array|WP_Error An array of menu items on success, a WP_Error object on failure.
    139139         */
    140140        public function load_available_items_query( $type = 'post_type', $object = 'page', $page = 0 ) {
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r46644 r46696  
    622622         *
    623623         * @param string $setting_id Widget setting ID.
    624          * @return WP_Error|array Array containing a widget's id_base and number components,
     624         * @return array|WP_Error Array containing a widget's id_base and number components,
    625625         *                        or a WP_Error object.
    626626         */
     
    13931393         *
    13941394         * @param  string $widget_id Widget ID.
    1395          * @return WP_Error|array Array containing the updated widget information.
     1395         * @return array|WP_Error Array containing the updated widget information.
    13961396         *                        A WP_Error object, otherwise.
    13971397         */
  • trunk/src/wp-includes/class-wp-image-editor-gd.php

    r46594 r46696  
    253253         *     @type bool $crop   Whether to crop the image to exact dimensions.
    254254         * }
    255          * @return WP_Error|array WP_Error on error, or the image data array for inclusion in the `sizes` array in the image meta.
     255         * @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta,
     256         *                        WP_Error object on error.
    256257         */
    257258        public function make_subsize( $size_data ) {
     
    418419         * @param string|null $filename
    419420         * @param string|null $mime_type
    420          * @return WP_Error|array
     421         * @return array|WP_Error
    421422         */
    422423        protected function _save( $image, $filename = null, $mime_type = null ) {
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r46594 r46696  
    461461         *     @type bool $crop   Whether to crop the image to exact dimensions.
    462462         * }
    463          * @return WP_Error|array WP_Error on error, or the image data array for inclusion in the `sizes` array in the image meta.
     463         * @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta,
     464         *                        WP_Error object on error.
    464465         */
    465466        public function make_subsize( $size_data ) {
  • trunk/src/wp-includes/class-wp-oembed-controller.php

    r46586 r46696  
    111111         *
    112112         * @param WP_REST_Request $request Full data about the request.
    113          * @return WP_Error|array oEmbed response data or WP_Error on failure.
     113         * @return array|WP_Error oEmbed response data or WP_Error on failure.
    114114         */
    115115        public function get_item( $request ) {
  • trunk/src/wp-includes/class-wp-theme.php

    r46661 r46696  
    180180         * @param string $theme_dir Directory of the theme within the theme_root.
    181181         * @param string $theme_root Theme root.
    182          * @param WP_Error|void $_child If this theme is a parent theme, the child may be passed for validation purposes.
     182         * @param WP_Theme|null $_child If this theme is a parent theme, the child may be passed for validation purposes.
    183183         */
    184184        public function __construct( $theme_dir, $theme_root, $_child = null ) {
  • trunk/src/wp-includes/feed.php

    r45932 r46696  
    739739 * See also {@link http://simplepie.org/wiki/faq/typical_multifeed_gotchas}
    740740 *
    741  * @return WP_Error|SimplePie WP_Error object on failure or SimplePie object on success
     741 * @return SimplePie|WP_Error SimplePie object on success or WP_Error object on failure.
    742742 */
    743743function fetch_feed( $url ) {
  • trunk/src/wp-includes/http.php

    r46475 r46696  
    4242 * @param string $url  URL to retrieve.
    4343 * @param array  $args Optional. Request arguments. Default empty array.
    44  * @return WP_Error|array The response or WP_Error on failure.
     44 * @return array|WP_Error The response or WP_Error on failure.
    4545 */
    4646function wp_safe_remote_request( $url, $args = array() ) {
     
    6363 * @param string $url  URL to retrieve.
    6464 * @param array  $args Optional. Request arguments. Default empty array.
    65  * @return WP_Error|array The response or WP_Error on failure.
     65 * @return array|WP_Error The response or WP_Error on failure.
    6666 */
    6767function wp_safe_remote_get( $url, $args = array() ) {
     
    8484 * @param string $url  URL to retrieve.
    8585 * @param array  $args Optional. Request arguments. Default empty array.
    86  * @return WP_Error|array The response or WP_Error on failure.
     86 * @return array|WP_Error The response or WP_Error on failure.
    8787 */
    8888function wp_safe_remote_post( $url, $args = array() ) {
     
    105105 * @param string $url  URL to retrieve.
    106106 * @param array  $args Optional. Request arguments. Default empty array.
    107  * @return WP_Error|array The response or WP_Error on failure.
     107 * @return array|WP_Error The response or WP_Error on failure.
    108108 */
    109109function wp_safe_remote_head( $url, $args = array() ) {
     
    128128 * @param string $url  URL to retrieve.
    129129 * @param array  $args Optional. Request arguments. Default empty array.
    130  * @return WP_Error|array {
     130 * @return array|WP_Error {
    131131 *     The response array or a WP_Error on failure.
    132132 *
     
    158158 * @param string $url  URL to retrieve.
    159159 * @param array  $args Optional. Request arguments. Default empty array.
    160  * @return WP_Error|array The response or WP_Error on failure.
     160 * @return array|WP_Error The response or WP_Error on failure.
    161161 */
    162162function wp_remote_get( $url, $args = array() ) {
     
    175175 * @param string $url  URL to retrieve.
    176176 * @param array  $args Optional. Request arguments. Default empty array.
    177  * @return WP_Error|array The response or WP_Error on failure.
     177 * @return array|WP_Error The response or WP_Error on failure.
    178178 */
    179179function wp_remote_post( $url, $args = array() ) {
     
    192192 * @param string $url  URL to retrieve.
    193193 * @param array  $args Optional. Request arguments. Default empty array.
    194  * @return WP_Error|array The response or WP_Error on failure.
     194 * @return array|WP_Error The response or WP_Error on failure.
    195195 */
    196196function wp_remote_head( $url, $args = array() ) {
  • trunk/src/wp-includes/post.php

    r46685 r46696  
    14061406 *                                              this post type. Default 'post.php?post=%d'.
    14071407 * }
    1408  * @return WP_Post_Type|WP_Error The registered post type object, or an error object.
     1408 * @return WP_Post_Type|WP_Error The registered post type object on success,
     1409 *                               WP_Error object on failure.
    14091410 */
    14101411function register_post_type( $post_type, $args = array() ) {
  • trunk/src/wp-includes/rest-api.php

    r46660 r46696  
    505505 * @since 4.4.0
    506506 *
    507  * @param WP_Error|WP_HTTP_Response|mixed $response Response to check.
     507 * @param WP_HTTP_Response|WP_Error|mixed $response Response to check.
    508508 * @return WP_REST_Response|mixed If response generated an error, WP_Error, if response
    509509 *                                is already an instance, WP_HTTP_Response, otherwise
     
    873873 *
    874874 * @param WP_Error|mixed $result Error from another authentication handler,
    875  *                               null if we should handle it, or another value
    876  *                               if not.
     875 *                               null if we should handle it, or another value if not.
    877876 * @return WP_Error|mixed|bool WP_Error if the cookie is invalid, the $result, otherwise true.
    878877 */
     
    10261025 * @param  WP_REST_Request  $request
    10271026 * @param  string           $param
    1028  * @return WP_Error|boolean
     1027 * @return true|WP_Error
    10291028 */
    10301029function rest_validate_request_arg( $value, $request, $param ) {
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r46685 r46696  
    130130                 * @since 4.4.0
    131131                 *
    132                  * @param WP_Error|null|bool WP_Error if authentication error, null if authentication
     132                 * @param WP_Error|null|true WP_Error if authentication error, null if authentication
    133133                 *                              method wasn't used, true if authentication succeeded.
    134134                 */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php

    r46626 r46696  
    8585         *
    8686         * @param WP_REST_Request $request Full details about the request.
    87          * @return WP_Error|true Boolean true if the attachment may be created, or a WP_Error if not.
     87         * @return true|WP_Error Boolean true if the attachment may be created, or a WP_Error if not.
    8888         */
    8989        public function create_item_permissions_check( $request ) {
     
    117117         *
    118118         * @param WP_REST_Request $request Full details about the request.
    119          * @return WP_Error|WP_REST_Response Response object on success, WP_Error object on failure.
     119         * @return WP_REST_Response|WP_Error Response object on success, WP_Error object on failure.
    120120         */
    121121        public function create_item( $request ) {
     
    275275         *
    276276         * @param WP_REST_Request $request Full details about the request.
    277          * @return WP_Error|WP_REST_Response Response object on success, WP_Error object on failure.
     277         * @return WP_REST_Response|WP_Error Response object on success, WP_Error object on failure.
    278278         */
    279279        public function update_item( $request ) {
     
    353353         *
    354354         * @param WP_REST_Request $request Request object.
    355          * @return WP_Error|stdClass $prepared_attachment Post object.
     355         * @return stdClass|WP_Error Post object.
    356356         */
    357357        protected function prepare_item_for_database( $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php

    r46586 r46696  
    119119         *
    120120         * @param WP_REST_Request $request Full details about the request.
    121          * @return WP_Error|bool True if the request has read access, error object otherwise.
     121         * @return true|WP_Error True if the request has read access, error object otherwise.
    122122         */
    123123        public function get_items_permissions_check( $request ) {
     
    176176         *
    177177         * @param WP_REST_Request $request Full details about the request.
    178          * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     178         * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    179179         */
    180180        public function get_items( $request ) {
     
    350350         *
    351351         * @param WP_REST_Request $request Full details about the request.
    352          * @return WP_Error|bool True if the request has read access for the item, error object otherwise.
     352         * @return true|WP_Error True if the request has read access for the item, error object otherwise.
    353353         */
    354354        public function get_item_permissions_check( $request ) {
     
    381381         *
    382382         * @param WP_REST_Request $request Full details about the request.
    383          * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     383         * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    384384         */
    385385        public function get_item( $request ) {
     
    401401         *
    402402         * @param WP_REST_Request $request Full details about the request.
    403          * @return WP_Error|bool True if the request has access to create items, error object otherwise.
     403         * @return true|WP_Error True if the request has access to create items, error object otherwise.
    404404         */
    405405        public function create_item_permissions_check( $request ) {
     
    491491         *
    492492         * @param WP_REST_Request $request Full details about the request.
    493          * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     493         * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    494494         */
    495495        public function create_item( $request ) {
     
    668668         *
    669669         * @param WP_REST_Request $request Full details about the request.
    670          * @return WP_Error|bool True if the request has access to update the item, error object otherwise.
     670         * @return true|WP_Error True if the request has access to update the item, error object otherwise.
    671671         */
    672672        public function update_item_permissions_check( $request ) {
     
    689689         *
    690690         * @param WP_REST_Request $request Full details about the request.
    691          * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     691         * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    692692         */
    693693        public function update_item( $request ) {
     
    788788         *
    789789         * @param WP_REST_Request $request Full details about the request.
    790          * @return WP_Error|bool True if the request has access to delete the item, error object otherwise.
     790         * @return true|WP_Error True if the request has access to delete the item, error object otherwise.
    791791         */
    792792        public function delete_item_permissions_check( $request ) {
     
    808808         *
    809809         * @param WP_REST_Request $request Full details about the request.
    810          * @return WP_Error|WP_REST_Response Response object on success, or error object on failure.
     810         * @return WP_REST_Response|WP_Error Response object on success, or error object on failure.
    811811         */
    812812        public function delete_item( $request ) {
     
    16921692         * @param WP_REST_Request $request Full details about the request.
    16931693         * @param string          $param   The parameter name.
    1694          * @return WP_Error|string The sanitized email address, if valid,
     1694         * @return string|WP_Error The sanitized email address, if valid,
    16951695         *                         otherwise an error.
    16961696         */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-controller.php

    r46586 r46696  
    5555         *
    5656         * @param WP_REST_Request $request Full data about the request.
    57          * @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
     57         * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
    5858         */
    5959        public function get_items_permissions_check( $request ) {
     
    6868         *
    6969         * @param WP_REST_Request $request Full data about the request.
    70          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     70         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    7171         */
    7272        public function get_items( $request ) {
     
    8181         *
    8282         * @param WP_REST_Request $request Full data about the request.
    83          * @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
     83         * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
    8484         */
    8585        public function get_item_permissions_check( $request ) {
     
    9494         *
    9595         * @param WP_REST_Request $request Full data about the request.
    96          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     96         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    9797         */
    9898        public function get_item( $request ) {
     
    107107         *
    108108         * @param WP_REST_Request $request Full data about the request.
    109          * @return WP_Error|bool True if the request has access to create items, WP_Error object otherwise.
     109         * @return true|WP_Error True if the request has access to create items, WP_Error object otherwise.
    110110         */
    111111        public function create_item_permissions_check( $request ) {
     
    120120         *
    121121         * @param WP_REST_Request $request Full data about the request.
    122          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     122         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    123123         */
    124124        public function create_item( $request ) {
     
    133133         *
    134134         * @param WP_REST_Request $request Full data about the request.
    135          * @return WP_Error|bool True if the request has access to update the item, WP_Error object otherwise.
     135         * @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise.
    136136         */
    137137        public function update_item_permissions_check( $request ) {
     
    146146         *
    147147         * @param WP_REST_Request $request Full data about the request.
    148          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     148         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    149149         */
    150150        public function update_item( $request ) {
     
    159159         *
    160160         * @param WP_REST_Request $request Full data about the request.
    161          * @return WP_Error|bool True if the request has access to delete the item, WP_Error object otherwise.
     161         * @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
    162162         */
    163163        public function delete_item_permissions_check( $request ) {
     
    172172         *
    173173         * @param WP_REST_Request $request Full data about the request.
    174          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     174         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    175175         */
    176176        public function delete_item( $request ) {
     
    185185         *
    186186         * @param WP_REST_Request $request Request object.
    187          * @return WP_Error|object The prepared item, or WP_Error object on failure.
     187         * @return object|WP_Error The prepared item, or WP_Error object on failure.
    188188         */
    189189        protected function prepare_item_for_database( $request ) {
     
    199199         * @param mixed           $item    WordPress representation of the item.
    200200         * @param WP_REST_Request $request Request object.
    201          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     201         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    202202         */
    203203        public function prepare_item_for_response( $item, $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php

    r46586 r46696  
    7979         *
    8080         * @param WP_REST_Request $request Full details about the request.
    81          * @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
     81         * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
    8282         */
    8383        public function get_items_permissions_check( $request ) {
     
    102102         *
    103103         * @param WP_REST_Request $request Full details about the request.
    104          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     104         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    105105         */
    106106        public function get_items( $request ) {
     
    129129         *
    130130         * @param WP_REST_Request $request Full details about the request.
    131          * @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
     131         * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
    132132         */
    133133        public function get_item_permissions_check( $request ) {
     
    179179         *
    180180         * @param WP_REST_Request $request Full details about the request.
    181          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     181         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    182182         */
    183183        public function get_item( $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php

    r46586 r46696  
    7878         *
    7979         * @param WP_REST_Request $request Full details about the request.
    80          * @return WP_Error|true True if the request has read access, WP_Error object otherwise.
     80         * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
    8181         */
    8282        public function get_items_permissions_check( $request ) {
     
    100100         *
    101101         * @param WP_REST_Request $request Full details about the request.
    102          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     102         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    103103         */
    104104        public function get_items( $request ) {
     
    123123         *
    124124         * @param WP_REST_Request $request Full details about the request.
    125          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     125         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    126126         */
    127127        public function get_item( $request ) {
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r46586 r46696  
    11261126         * @param WP_REST_Request $request Full details about the request.
    11271127         * @param string          $param   The parameter name.
    1128          * @return WP_Error|string The sanitized username, if valid, otherwise an error.
     1128         * @return string|WP_Error The sanitized username, if valid, otherwise an error.
    11291129         */
    11301130        public function check_username( $value, $request, $param ) {
     
    11551155         * @param WP_REST_Request $request Full details about the request.
    11561156         * @param string          $param   The parameter name.
    1157          * @return WP_Error|string The sanitized password, if valid, otherwise an error.
     1157         * @return string|WP_Error The sanitized password, if valid, otherwise an error.
    11581158         */
    11591159        public function check_user_password( $value, $request, $param ) {
  • trunk/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php

    r46586 r46696  
    7171         * @param int             $object_id Object ID to fetch meta for.
    7272         * @param WP_REST_Request $request   Full details about the request.
    73          * @return WP_Error|object Object containing the meta values by name, otherwise WP_Error object.
     73         * @return object|WP_Error Object containing the meta values by name, otherwise WP_Error object.
    7474         */
    7575        public function get_value( $object_id, $request ) {
     
    129129         * @param array           $meta      Array of meta parsed from the request.
    130130         * @param int             $object_id Object ID to fetch meta for.
    131          * @return WP_Error|null WP_Error if one occurs, null on success.
     131         * @return null|WP_Error Null on success, WP_Error object on failure.
    132132         */
    133133        public function update_value( $meta, $object_id ) {
     
    521521         * @param WP_REST_Request $request Full details about the request.
    522522         * @param string          $param   The parameter name.
    523          * @return WP_Error|string The meta array, if valid, otherwise an error.
     523         * @return array|false The meta array, if valid, false otherwise.
    524524         */
    525525        public function check_meta_is_array( $value, $request, $param ) {
  • trunk/src/wp-includes/taxonomy.php

    r46685 r46696  
    409409 *                                                Default false.
    410410 * }
    411  * @return WP_Error|void WP_Error, if errors.
     411 * @return void|WP_Error Void on success, WP_Error object on failure.
    412412 */
    413413function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
  • trunk/src/wp-includes/theme.php

    r46660 r46696  
    8080                        $themes[ $theme ] = $_themes[ $theme_root['theme_root'] . '/' . $theme ];
    8181                } else {
    82                         $themes[ $theme ]                                    = new WP_Theme( $theme, $theme_root['theme_root'] );
     82                        $themes[ $theme ] = new WP_Theme( $theme, $theme_root['theme_root'] );
     83
    8384                        $_themes[ $theme_root['theme_root'] . '/' . $theme ] = $themes[ $theme ];
    8485                }
  • trunk/src/wp-includes/wp-db.php

    r46660 r46696  
    35003500         * @global string $required_mysql_version
    35013501         *
    3502          * @return WP_Error|void
     3502         * @return void|WP_Error
    35033503         */
    35043504        public function check_database_version() {
  • trunk/src/wp-signup.php

    r46684 r46696  
    9696 * @param string          $blogname   The new site name.
    9797 * @param string          $blog_title The new site title.
    98  * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
     98 * @param string|WP_Error $errors     A WP_Error object containing existing errors. Defaults to empty string.
    9999 */
    100100function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
     
    247247 * @param string          $user_name  The entered username.
    248248 * @param string          $user_email The entered email address.
    249  * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
     249 * @param string|WP_Error $errors     A WP_Error object containing existing errors. Defaults to empty string.
    250250 */
    251251function show_user_form( $user_name = '', $user_email = '', $errors = '' ) {
     
    305305 * @param string          $blogname   The new site name
    306306 * @param string          $blog_title The new site title.
    307  * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
     307 * @param string|WP_Error $errors     A WP_Error object containing existing errors. Defaults to empty string.
    308308 */
    309309function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) {
     
    554554 * @param string          $user_name  The username.
    555555 * @param string          $user_email The user's email.
    556  * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
     556 * @param string|WP_Error $errors     A WP_Error object containing existing errors. Defaults to empty string.
    557557 */
    558558function signup_user( $user_name = '', $user_email = '', $errors = '' ) {
     
    692692 * @param string          $blogname   The site name.
    693693 * @param string          $blog_title The site title.
    694  * @param WP_Error|string $errors     A WP_Error object containing existing errors. Defaults to empty string.
     694 * @param string|WP_Error $errors     A WP_Error object containing existing errors. Defaults to empty string.
    695695 */
    696696function signup_blog( $user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '' ) {
  • trunk/tests/phpunit/tests/rest-api/rest-test-controller.php

    r46586 r46696  
    1616         * @param mixed           $item    WordPress representation of the item.
    1717         * @param WP_REST_Request $request Request object.
    18          * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
     18         * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
    1919         */
    2020        public function prepare_item_for_response( $item, $request ) {
Note: See TracChangeset for help on using the changeset viewer.