Make WordPress Core


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

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

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 ) {
Note: See TracChangeset for help on using the changeset viewer.