BP_Members_List_Table::column_username( object|null $signup_object = null )
The row actions (delete/activate/email).
Description
Parameters
- $signup_object
-
(Optional) The signup data object.
Default value: null
Source
File: bp-members/classes/class-bp-members-list-table.php
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | public function column_username( $signup_object = null ) { $avatar = get_avatar( $signup_object ->user_email, 32 ); // Activation email link. $email_link = add_query_arg( array ( 'page' => 'bp-signups' , 'signup_id' => $signup_object ->id, 'action' => 'resend' , ), bp_get_admin_url( 'users.php' ) ); // Activate link. $activate_link = add_query_arg( array ( 'page' => 'bp-signups' , 'signup_id' => $signup_object ->id, 'action' => 'activate' , ), bp_get_admin_url( 'users.php' ) ); // Delete link. $delete_link = add_query_arg( array ( 'page' => 'bp-signups' , 'signup_id' => $signup_object ->id, 'action' => 'delete' , ), bp_get_admin_url( 'users.php' ) ); echo $avatar . sprintf( '<strong><a href="%1$s" class="edit">%2$s</a></strong><br/>' , esc_url( $activate_link ), $signup_object ->user_login ); $actions = array (); $actions [ 'activate' ] = sprintf( '<a href="%1$s">%2$s</a>' , esc_url( $activate_link ), __( 'Activate' , 'buddyboss' ) ); $actions [ 'resend' ] = sprintf( '<a href="%1$s">%2$s</a>' , esc_url( $email_link ), __( 'Email' , 'buddyboss' ) ); if ( current_user_can( 'delete_users' ) ) { $actions [ 'delete' ] = sprintf( '<a href="%1$s" class="delete">%2$s</a>' , esc_url( $delete_link ), __( 'Delete' , 'buddyboss' ) ); } /** * Filters the multisite row actions for each user in list. * * @since BuddyPress 2.0.0 * * @param array $actions Array of actions and corresponding links. * @param object $signup_object The signup data object. */ $actions = apply_filters( 'bp_members_ms_signup_row_actions' , $actions , $signup_object ); echo $this ->row_actions( $actions ); } |
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.