BP_Members_Admin::signups_admin_index()
This is the list of the Pending accounts (signups).
Description
Source
File: bp-members/classes/class-bp-members-admin.php
public function signups_admin_index() {
global $plugin_page, $bp_members_signup_list_table;
$usersearch = ! empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';
// Prepare the group items for display.
$bp_members_signup_list_table->prepare_items();
if ( is_network_admin() ) {
$form_url = network_admin_url( 'users.php' );
} else {
$form_url = bp_get_admin_url( 'users.php' );
}
$form_url = add_query_arg(
array(
'page' => 'bp-signups',
),
$form_url
);
$search_form_url = remove_query_arg(
array(
'action',
'deleted',
'notdeleted',
'error',
'updated',
'delete',
'activate',
'activated',
'notactivated',
'resend',
'resent',
'notresent',
'do_delete',
'do_activate',
'do_resend',
'action2',
'_wpnonce',
'signup_ids'
), $_SERVER['REQUEST_URI']
);
?>
<div class="wrap">
<?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?>
<h1 class="wp-heading-inline"><?php _e( 'Users', 'buddyboss' ); ?></h1>
<?php if ( current_user_can( 'create_users' ) ) : ?>
<a href="user-new.php" class="page-title-action"><?php echo esc_html__( 'Add New', 'buddyboss' ); ?></a>
<?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
<a href="user-new.php" class="page-title-action"><?php echo esc_html__( 'Add Existing', 'buddyboss' ); ?></a>
<?php endif;
if ( $usersearch ) {
printf( '<span class="subtitle">' . __( 'Search results for "%s"', 'buddyboss' ) . '</span>', esc_html( $usersearch ) );
}
?>
<hr class="wp-header-end">
<?php else : ?>
<h1><?php _e( 'Users', 'buddyboss' ); ?>
<?php if ( current_user_can( 'create_users' ) ) : ?>
<a href="user-new.php" class="add-new-h2"><?php echo esc_html__( 'Add New', 'buddyboss' ); ?></a>
<?php elseif ( is_multisite() && current_user_can( 'promote_users' ) ) : ?>
<a href="user-new.php" class="add-new-h2"><?php echo esc_html__( 'Add Existing', 'buddyboss' ); ?></a>
<?php endif;
if ( $usersearch ) {
printf( '<span class="subtitle">' . __( 'Search results for "%s"', 'buddyboss' ) . '</span>', esc_html( $usersearch ) );
}
?>
</h1>
<?php endif; ?>
<?php // Display each signups on its own row. ?>
<?php $bp_members_signup_list_table->views(); ?>
<form id="bp-signups-search-form" action="<?php echo esc_url( $search_form_url ) ;?>">
<input type="hidden" name="page" value="<?php echo esc_attr( $plugin_page ); ?>" />
<?php $bp_members_signup_list_table->search_box( __( 'Search Pending Users', 'buddyboss' ), 'bp-signups' ); ?>
</form>
<form id="bp-signups-form" action="<?php echo esc_url( $form_url );?>" method="post">
<?php $bp_members_signup_list_table->display(); ?>
</form>
</div>
<?php
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.0.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.