bp_get_group_member_promote_admin_link( array|string $args = '' )
Generate a URL for promoting a user to admin.
Description
Parameters
- $args
-
(Optional)
- 'user_id'
(int) ID of the member to promote. Default: current member in a group member loop. - 'group'
(object) Group object. Default: current group.
Default value: ''
- 'user_id'
Return
(string)
Source
File: bp-groups/bp-groups-template.php
function bp_get_group_member_promote_admin_link( $args = '' ) { global $members_template, $groups_template; $r = bp_parse_args( $args, array( 'user_id' => !empty( $members_template->member->user_id ) ? $members_template->member->user_id : false, 'group' => &$groups_template->group ), 'group_member_promote_admin_link' ); extract( $r, EXTR_SKIP ); /** * Filters a URL for promoting a user to admin. * * @since BuddyPress 1.1.0 * * @param string $value URL to use for promoting a user to admin. */ return apply_filters( 'bp_get_group_member_promote_admin_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/admin/' . $user_id ), 'groups_promote_member' ) ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.1.0 | 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.