Advertisements

submit_button

Definition:
function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) {}

Echos a submit button, with provided text and appropriate class

Parameters

  • string $text: The text of the button (defaults to ‘Save Changes’)
  • string $type: The type of button. One of: primary, secondary, delete
  • string $name: The HTML name of the submit button. Defaults to “submit”. If no id attribute is given in $other_attributes below, $name will be used as the button’s id.
  • bool $wrap: True if the output button should be wrapped in a paragraph tag, false otherwise. Defaults to true
  • array|string $other_attributes: Other attributes that should be output with the button, mapping attributes to their values, such as array( ‘tabindex’ => ‘1’ ). These attributes will be output as attribute=”value”, such as tabindex=”1″. Defaults to no other attributes. Other attributes can also be provided as a string such as ‘tabindex=”1″‘, though the array format is typically cleaner.

Source code

function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) {

	echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );

}

10318

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: