BP_Buttons_Group::get( bool $sort = true )

Get the BuddyPress buttons for the group


Parameters Parameters

$sort

(bool) (Optional) whether to sort the buttons or not.

Default value: true


Top ↑

Return Return

(array) An array of HTML links.


Source Source

File: bp-templates/bp-nouveau/includes/classes.php

	public function get( $sort = true ) {
		$buttons = array();

		if ( empty( $this->group ) ) {
			return $buttons;
		}

		if ( true === $sort ) {
			$this->group = $this->sort( $this->group );
		}

		foreach ( $this->group as $key_button => $button ) {
			// Reindex with ids.
			if ( true === $sort ) {
				$this->group[ $button['id'] ] = $button;
				unset( $this->group[ $key_button ] );
			}

			$buttons[ $button['id'] ] = bp_get_button( $button );
		}

		return $buttons;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.