Make WordPress Core


Ignore:
Timestamp:
05/14/2025 01:15:28 PM (9 months ago)
Author:
johnbillion
Message:

Docs: Declare the object shapes for some return values.

Props swissspidy

See #63166

File:
1 edited

Legend:

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

    r59940 r60236  
    31773177 * @global array $wp_registered_settings
    31783178 *
    3179  * @return array List of registered settings, keyed by option name.
     3179 * @return array {
     3180 *     List of registered settings, keyed by option name.
     3181 *
     3182 *     @type array ...$0 {
     3183 *         Data used to describe the setting when registered.
     3184 *
     3185 *         @type string     $type              The type of data associated with this setting.
     3186 *                                             Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'.
     3187 *         @type string     $label             A label of the data attached to this setting.
     3188 *         @type string     $description       A description of the data attached to this setting.
     3189 *         @type callable   $sanitize_callback A callback function that sanitizes the option's value.
     3190 *         @type bool|array $show_in_rest      Whether data associated with this setting should be included in the REST API.
     3191 *                                             When registering complex settings, this argument may optionally be an
     3192 *                                             array with a 'schema' key.
     3193 *         @type mixed      $default           Default value when calling `get_option()`.
     3194 *     }
     3195 * }
    31803196 */
    31813197function get_registered_settings() {
Note: See TracChangeset for help on using the changeset viewer.