bp_get_button( array|string $args = '' )

Create and return a button.

Description

See also

  • BP_Button: for a description of arguments and return value.

Parameters

$args

(Optional) See BP_Button.

Default value: ''

Return

(string) HTML markup for the button.

Source

File: bp-core/bp-core-template.php

	function bp_get_button( $args = '' ) {
		$button = new BP_Button( $args );

		/**
		 * Filters the requested button output.
		 *
		 * @since BuddyPress 1.2.6
		 *
		 * @param string    $contents  Button context to be used.
		 * @param array     $args      Array of args for the button.
		 * @param BP_Button $button    BP_Button object.
		 */
		return apply_filters( 'bp_get_button', $button->contents, $args, $button );
	}

Changelog

Changelog
Version Description
BuddyPress 1.2.6 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.