BP_Members_Admin::signup_filter_view( array $views = array() )
Filter the WP Users List Table views to include ‘bp-signups’.
Description
Parameters
- $views
-
(Optional) WP List Table views.
Default value: array()
Return
(array) The views with the signup view added.
Source
File: bp-members/classes/class-bp-members-admin.php
1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 | public function signup_filter_view( $views = array () ) { global $role ; // Remove the 'current' class from All if we're on the signups view. if ( 'registered' === $role ) { $views [ 'all' ] = str_replace ( 'class="current"' , '' , $views [ 'all' ] ); $class = 'current' ; } else { $class = '' ; } $signups = BP_Signup::count_signups(); if ( is_network_admin() ) { $base_url = network_admin_url( 'users.php' ); } else { $base_url = bp_get_admin_url( 'users.php' ); } $url = add_query_arg( 'page' , 'bp-signups' , $base_url ); $text = sprintf( __( 'Pending %s' , 'buddyboss' ), '<span class="count">(' . number_format_i18n( $signups ) . ')</span>' ); $views [ 'registered' ] = sprintf( '<a href="%1$s" class="%2$s">%3$s</a>' , esc_url( $url ), $class , $text ); return $views ; } |
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.