Make WordPress Core

Changeset 31592


Ignore:
Timestamp:
03/01/2015 07:52:46 AM (10 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

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

    r31560 r31592  
    12091209 *
    12101210 * @since 2.7.0
     1211 * @since 4.2.0 The `$class` argument was added.
    12111212 *
    12121213 * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections
    12131214 *
    1214  * @param string $id Slug-name to identify the field. Used in the 'id' attribute of tags.
    1215  * @param string $title Formatted title of the field. Shown as the label for the field during output.
    1216  * @param string $callback Function that fills the field with the desired form inputs. The function should echo its output.
    1217  * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...).
    1218  * @param string $section The slug-name of the section of the settings page in which to show the box (default, ...).
    1219  * @param array $args Additional arguments
     1215 * @param string $id       Slug-name to identify the field. Used in the 'id' attribute of tags.
     1216 * @param string $title    Formatted title of the field. Shown as the label for the field
     1217 *                         during output.
     1218 * @param string $callback Function that fills the field with the desired form inputs. The
     1219 *                         function should echo its output.
     1220 * @param string $page     The slug-name of the settings page on which to show the section
     1221 *                         (general, reading, writing, ...).
     1222 * @param string $section  Optional. The slug-name of the section of the settings page
     1223 *                         in which to show the box. Default 'default'.
     1224 * @param array  $args {
     1225 *     Optional. Extra arguments passed used when outputting the field.
     1226 *
     1227 *     @type string $label_for When supplied, the setting title will be wrapped
     1228 *                             in a `<label>` element, its `for` attribute populated
     1229 *                             with this value.
     1230 *     @type string $class     CSS Class to be added to the `<tr>` element when the
     1231 *                             field is output.
     1232 * }
    12201233 */
    12211234function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) {
Note: See TracChangeset for help on using the changeset viewer.