BP_Groups_Member::promote( string $status = 'mod' )
Promote a member to a new status.
Description Description
Parameters Parameters
- $status
-
(Optional) The new status. 'mod' or 'admin'.
Default value: 'mod'
Return Return
(bool) True on success, false on failure.
Source Source
File: bp-groups/classes/class-bp-groups-member.php
public function promote( $status = 'mod' ) { if ( 'mod' == $status ) { $this->is_admin = 0; $this->is_mod = 1; $this->user_title = __( 'Group Mod', 'buddypress' ); } if ( 'admin' == $status ) { $this->is_admin = 1; $this->is_mod = 0; $this->user_title = __( 'Group Admin', 'buddypress' ); } return $this->save(); }
Changelog Changelog
Version | Description |
---|---|
1.6.0 | Introduced. |