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
This commit is contained in:
Drew Jaynes 2015-03-01 07:53:25 +00:00
parent 33d9dd8066
commit 82fd5e33dd
2 changed files with 20 additions and 7 deletions

View File

@ -1208,15 +1208,28 @@ function add_settings_section($id, $title, $callback, $page) {
* values to show. * values to show.
* *
* @since 2.7.0 * @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 * @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 $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 $title Formatted title of the field. Shown as the label for the field
* @param string $callback Function that fills the field with the desired form inputs. The function should echo its output. * during output.
* @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...). * @param string $callback Function that fills the field with the desired form inputs. The
* @param string $section The slug-name of the section of the settings page in which to show the box (default, ...). * function should echo its output.
* @param array $args Additional arguments * @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 `<label>` element, its `for` attribute populated
* with this value.
* @type string $class CSS Class to be added to the `<tr>` element when the
* field is output.
* }
*/ */
function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) { function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
global $wp_settings_fields; global $wp_settings_fields;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31591'; $wp_version = '4.2-alpha-31592';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.