BP_Nouveau_Customizer_Group_Nav::__construct( int $object_id )

Constructor


Description Description


Parameters Parameters

$object_id

(Optional) The random group ID used to generate the nav.


Top ↑

Source Source

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

	public function __construct( $object_id = 0 ) {
		$error = new WP_Error( 'missing_parameter' );

		if ( empty( $object_id ) || ! bp_current_user_can( 'bp_moderate' ) || ! did_action( 'admin_init' ) ) {
			return $error;
		}

		$group = groups_get_group( array( 'group_id' => $object_id ) );
		if ( empty( $group->id ) ) {
			return $error;
		}

		$this->group = $group;

		parent::__construct( $group->id );
		$this->setup_nav();
	}

Top ↑

User Contributed Notes User Contributed Notes

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