bp_get_button

Create and return a button.

Description

(string) bp_get_button( (string) $args = '' ); 

Returns (string)

HTML markup for the button.

Parameters (1)

0. $args — Optional. (string) => ''
The args.

Usage

  1. if ( !function_exists( 'bp_get_button' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template.php'; 
  3.  
  4. // The args. 
  5. $args = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_get_button($args); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-template.php  
  1. function bp_get_button( $args = '' ) { 
  2. $button = new BP_Button( $args ); 
  3.  
  4. /** 
  5. * Filters the requested button output. 
  6. * @since 1.2.6 
  7. * @param string $contents Button context to be used. 
  8. * @param array $args Array of args for the button. 
  9. * @param BP_Button $button BP_Button object. 
  10. */ 
  11. return apply_filters( 'bp_get_button', $button->contents, $args, $button );