From 82fd5e33dd7eb4bbb76c533f4b71c91b56d6110d Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 1 Mar 2015 07:53:25 +0000 Subject: [PATCH] Add a hash notation for the optional `$args` parameter in `add_settings_field()`, which includes a description for the new `$class` argument added in [31560]. Also adds a changelog entry to `add_settings_field()` DocBlock for the new `$class` argument. See [31560]. Fixes #28975. Built from https://develop.svn.wordpress.org/trunk@31592 git-svn-id: http://core.svn.wordpress.org/trunk@31573 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 25 +++++++++++++++++++------ wp-includes/version.php | 2 +- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index be58e75866..098ede2a1a 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1208,15 +1208,28 @@ function add_settings_section($id, $title, $callback, $page) { * values to show. * * @since 2.7.0 + * @since 4.2.0 The `$class` argument was added. * * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections * - * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags. - * @param string $title Formatted title of the field. Shown as the label for the field during output. - * @param string $callback Function that fills the field with the desired form inputs. The function should echo its output. - * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...). - * @param string $section The slug-name of the section of the settings page in which to show the box (default, ...). - * @param array $args Additional arguments + * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags. + * @param string $title Formatted title of the field. Shown as the label for the field + * during output. + * @param string $callback Function that fills the field with the desired form inputs. The + * function should echo its output. + * @param string $page The slug-name of the settings page on which to show the section + * (general, reading, writing, ...). + * @param string $section Optional. The slug-name of the section of the settings page + * in which to show the box. Default 'default'. + * @param array $args { + * Optional. Extra arguments passed used when outputting the field. + * + * @type string $label_for When supplied, the setting title will be wrapped + * in a `