/** * Display the users screen views * * @since 2.5.0 * * @global string $role The name of role the users screens is filtered by */ public function views() { global $role; // Used to reset the role $reset_role = $role; // Temporarly set the role to registered $role = 'registered'; // Used to reset the screen id once views are displayed $reset_screen_id = $this->screen->id; // Temporarly set the screen id to the users one $this->screen->id = 'users-network'; // Use the parent function so that other plugins can safely add views parent::views(); // Reset the role $role = $reset_role; // Reset the screen id $this->screen->id = $reset_screen_id; }
/** * Get the views : the links above the WP List Table. * * @since BuddyPress (2.0.0) * * @uses WP_MS_Users_List_Table::get_views() to get the users views */ public function get_views() { $views = parent::get_views(); // Remove the 'current' class from the 'All' link $views['all'] = str_replace( 'class="current"', '', $views['all'] ); $views['registered'] = sprintf( '<a href="%1$s" class="current">%2$s</a>', add_query_arg( 'page', 'bp-signups', bp_get_admin_url( 'users.php' ) ), sprintf( _x( 'Pending %s', 'signup users', 'buddypress' ), '<span class="count">(' . number_format_i18n( $this->signup_counts ) . ')</span>' ) ); return $views; }
/** * Get the views : the links above the WP List Table. * * @since BuddyPress (2.0.0) * * @uses WP_MS_Users_List_Table::get_views() to get the users views */ function get_views() { $views = parent::get_views(); $views['all'] = str_replace('class="current"', '', $views['all']); $class = ' class="current"'; $views['registered'] = '<a href="' . add_query_arg('page', 'bp-signups', bp_get_admin_url('users.php')) . '" class="current">' . sprintf(_x('Pending <span class="count">(%s)</span>', 'signup users', 'buddypress'), number_format_i18n($this->signup_counts)) . '</a>'; return $views; }