WordPress.org

Make WordPress Core

Changeset 40603


Ignore:
Timestamp:
05/10/2017 06:09:36 AM (2 years ago)
Author:
rmccue
Message:

Options/Meta: Document valid types for registration.

In 4.7, the REST API introduced types for options and meta passed into the registration functions. This adds the documentation for those types.

Props iandunn, priyankabehera155.
Fixes #40318.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r39066 r40603  
    975975 *
    976976 *     @type string $type              The type of data associated with this meta key.
     977 *                                     Valid values are 'string', 'boolean', 'integer', and 'number'.
    977978 *     @type string $description       A description of the data attached to this meta key.
    978979 *     @type bool   $single            Whether the meta key has one value per object, or an array of values per object.
  • trunk/src/wp-includes/option.php

    r40432 r40603  
    18721872 *
    18731873 *     @type string   $type              The type of data associated with this setting.
     1874 *                                       Valid values are 'string', 'boolean', 'integer', and 'number'.
    18741875 *     @type string   $description       A description of the data attached to this setting.
    18751876 *     @type callable $sanitize_callback A callback function that sanitizes the option's value.
Note: See TracChangeset for help on using the changeset viewer.