From 5e11891a0551c3245c4cb2e3151525e9a81e3d83 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 1 Feb 2020 21:59:14 +0000 Subject: [PATCH] Docs: Correct DocBlock formatting for `register_setting()`. Document the full list of whitelisted option key names. See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@47157 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/deprecated.php | 3 ++- src/wp-admin/options.php | 4 ++-- src/wp-includes/nav-menu.php | 9 +++++---- src/wp-includes/option.php | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php index a16f0e98c7..9d30abcf80 100644 --- a/src/wp-admin/includes/deprecated.php +++ b/src/wp-admin/includes/deprecated.php @@ -160,7 +160,8 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le * @see register_setting() * * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. - * Default whitelisted option key names include "general," "discussion," and "reading," among others. + * Default whitelisted option key names include 'general', 'discussion', 'media', + * 'reading', 'writing', 'misc', 'options', and 'privacy'. * @param string $option_name The name of an option to sanitize and save. * @param callable $sanitize_callback A callback function that sanitizes the option's value. */ diff --git a/src/wp-admin/options.php b/src/wp-admin/options.php index f04667f178..012164326c 100644 --- a/src/wp-admin/options.php +++ b/src/wp-admin/options.php @@ -196,11 +196,11 @@ if ( ! is_multisite() ) { } /** - * Filters the options white list. + * Filters the options whitelist. * * @since 2.7.0 * - * @param array $whitelist_options White list options. + * @param array $whitelist_options Whitelist options. */ $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); diff --git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php index 1e7db64566..e871578213 100644 --- a/src/wp-includes/nav-menu.php +++ b/src/wp-includes/nav-menu.php @@ -787,13 +787,13 @@ function wp_get_nav_menu_items( $menu, $args = array() ) { * - db_id: The DB ID of this item as a nav_menu_item object, if it exists (0 if it doesn't exist). * - description: The description of this menu item. * - menu_item_parent: The DB ID of the nav_menu_item that is this item's menu parent, if any. 0 otherwise. - * - object: The type of object originally represented, such as "category," "post", or "attachment." + * - object: The type of object originally represented, such as 'category', 'post', or 'attachment'. * - object_id: The DB ID of the original object this menu item represents, e.g. ID for posts and term_id for categories. * - post_parent: The DB ID of the original object's parent object, if any (0 otherwise). * - post_title: A "no title" label if menu item represents a post that lacks a title. * - target: The target attribute of the link element for this menu item. * - title: The title of this menu item. - * - type: The family of objects originally represented, such as "post_type" or "taxonomy." + * - type: The family of objects originally represented, such as 'post_type' or 'taxonomy'. * - type_label: The singular label used to describe this type of menu item. * - url: The URL to which this menu item points. * - xfn: The XFN relationship expressed in the link of this menu item. @@ -982,8 +982,9 @@ function wp_setup_nav_menu_item( $menu_item ) { * @since 3.0.0 * * @param int $object_id The ID of the original object. - * @param string $object_type The type of object, such as "taxonomy" or "post_type." - * @param string $taxonomy If $object_type is "taxonomy", $taxonomy is the name of the tax that $object_id belongs to + * @param string $object_type The type of object, such as 'taxonomy' or 'post_type'. + * @param string $taxonomy If $object_type is 'taxonomy', $taxonomy is the name of the tax + * that $object_id belongs to. * @return int[] The array of menu item IDs; empty array if none; */ function wp_get_associated_nav_menu_items( $object_id = 0, $object_type = 'post_type', $taxonomy = '' ) { diff --git a/src/wp-includes/option.php b/src/wp-includes/option.php index 93f375f374..087d1517a9 100644 --- a/src/wp-includes/option.php +++ b/src/wp-includes/option.php @@ -2098,7 +2098,8 @@ function register_initial_settings() { * @global array $wp_registered_settings * * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. - * Default whitelisted option key names include "general," "discussion," and "reading," among others. + * Default whitelisted option key names include 'general', 'discussion', 'media', + * 'reading', 'writing', 'misc', 'options', and 'privacy'. * @param string $option_name The name of an option to sanitize and save. * @param array $args { * Data used to describe the setting when registered.