bp_get_group_member_promote_admin_link( array|string $args = '' )

Generate a URL for promoting a user to admin.


Parameters Parameters

$args

(array|string) (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: ''


Top ↑

Return Return

(string)


Source 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 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' ) );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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