Make WordPress Core

Changeset 27136


Ignore:
Timestamp:
02/08/2014 10:13:18 PM (11 years ago)
Author:
DrewAPicture
Message:

Improve inline documentation for submit_button().

See #27070.

File:
1 edited

Legend:

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

    r27135 r27136  
    16141614
    16151615/**
    1616  * Echos a submit button, with provided text and appropriate class
     1616 * Echoes a submit button, with provided text and appropriate class(es).
    16171617 *
    16181618 * @since 3.1.0
    16191619 *
    1620  * @param string $text The text of the button (defaults to 'Save Changes')
     1620 * @see get_submit_button()
     1621 *
     1622 * @param string       $text             The text of the button (defaults to 'Save Changes')
    16211623 * @param string $type Optional. The type and CSS class(es) of the button. Core values
    16221624 *                     include 'primary', 'secondary', 'delete'. Default 'primary'
    1623  * @param string $name The HTML name of the submit button. Defaults to "submit". If no id attribute
    1624  *               is given in $other_attributes below, $name will be used as the button's id.
    1625  * @param bool $wrap True if the output button should be wrapped in a paragraph tag,
    1626  *             false otherwise. Defaults to true
    1627  * @param array|string $other_attributes Other attributes that should be output with the button,
    1628  *                     mapping attributes to their values, such as array( 'tabindex' => '1' ).
    1629  *                     These attributes will be output as attribute="value", such as tabindex="1".
    1630  *                     Defaults to no other attributes. Other attributes can also be provided as a
    1631  *                     string such as 'tabindex="1"', though the array format is typically cleaner.
     1625 * @param string       $name             The HTML name of the submit button. Defaults to "submit". If no
     1626 *                                       id attribute is given in $other_attributes below, $name will be
     1627 *                                       used as the button's id.
     1628 * @param bool         $wrap             True if the output button should be wrapped in a paragraph tag,
     1629 *                                       false otherwise. Defaults to true
     1630 * @param array|string $other_attributes Other attributes that should be output with the button, mapping
     1631 *                                       attributes to their values, such as setting tabindex to 1, etc.
     1632 *                                       These key/value attribute pairs will be output as attribute="value",
     1633 *                                       where attribute is the key. Other attributes can also be provided
     1634 *                                       as a string such as 'tabindex="1"', though the array format is
     1635 *                                       preferred. Default null.
    16321636 */
    16331637function submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) {
Note: See TracChangeset for help on using the changeset viewer.