There are two default action buttons: "save" and "clear". Both are tied to built-in AJAX functions to either save the data entered or clear out all the data and reset it. The button takes multiple variables:

  • button-type: (string) can be either 'link' or 'input'
  • button-label: (string) the text portion of the button
  • button-class: (string) CSS classes applied to the item
  • image-class: (string) for optional image (usually a spinner icon) to appear next to the button
  • button-link: (string) if using the 'link' type, this is the URL that will be entered.
  • button-blank: (bool) if using the 'link' type, whether to open the link in a new tab or not.

Add, remove, or modify the action buttons.

function my_new_button( $buttons ) {
	// include a new button
	$buttons['buy']	= array(
		'button-type'		=> 'link',
		'button-label'		=> __( 'A Link' ),
		'button-class'		=> 'button button-primary',
		'button-link'		=> '',
		'button-blank'		=> true

	return $buttons;
add_filter ( 'gppro_buttons', 'my_new_button' );