BP_Nouveau_Customizer_Group_Nav::__construct( int $object_id )
Constructor
Description
Parameters
- $object_id
-
(Optional) The random group ID used to generate the nav.
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();
}
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.