Docs: Correct DocBlock formatting for `register_setting()`.

Document the full list of whitelisted option key names.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47157


git-svn-id: http://core.svn.wordpress.org/trunk@46957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-01 22:01:07 +00:00
parent deb1886078
commit 8e37999368
5 changed files with 12 additions and 9 deletions

View File

@ -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.
*/

View File

@ -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 );

View File

@ -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 = '' ) {

View File

@ -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.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-47156';
$wp_version = '5.4-alpha-47157';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.