Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#27070 closed defect (bug) (fixed)

Additional argument or filter for submit_button function

Reported by: wpidiots's profile wpidiots Owned by:
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.8.1
Component: General Keywords: has-patch
Focuses: docs Cc:

Description

submit_button function should have an additional argument $class so we can add additional classes to the button or filter on $classes array in get_submit_button() function

I know that we can use $wrap as workaround but if I want to add, for instance, "right" class to the submit button I am not able to.

Attachments (1)

27070.diff (871 bytes) - added by DrewAPicture 11 years ago.
docs

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
11 years ago

  • Focuses administration added
  • Keywords close added

Additional classes can be added using the $type argument:

submit_button( 'Submit', 'primary right' );

No need for a new argument here: #20492.

@DrewAPicture
11 years ago

docs

#2 @DrewAPicture
11 years ago

  • Focuses docs added; administration removed
  • Keywords has-patch added; close removed
  • Milestone changed from Awaiting Review to 3.9
  • Type changed from enhancement to defect (bug)

I think we can at least update the phpdoc for submit_button() to mention that the $type parameter doubles as the value of the class attribute.

27070.diff does this.

#3 @DrewAPicture
11 years ago

In 27135:

Clarify submit_button() $type parameter docs to mention that the value doubles as the CSS class attribute.

See #27070

#4 @DrewAPicture
11 years ago

In 27136:

Improve inline documentation for submit_button().

See #27070.

#5 @DrewAPicture
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

The docs fixes in [27135] and [27136] should cover it. Feel free to reopen if more clarification is required.

#6 @DrewAPicture
11 years ago

In 27137:

Fix docs spacing missed in [27136].

See #27070.

Note: See TracTickets for help on using tickets.