BP_Activity_List_Table::column_action( array $item )
Action column markup.
Description
See also
Parameters
- $item
-
(Required) A singular item (one full row).
Source
File: bp-activity/classes/class-bp-activity-list-table.php
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | function column_action( $item ) { $actions = bp_activity_admin_get_activity_actions(); if ( isset( $actions [ $item [ 'type' ] ] ) ) { echo $actions [ $item [ 'type' ] ]; } else { if ( strpos ( $item [ 'type' ], 'new_blog_' ) !== false ) { $get_action = bp_activity_get_meta( $item [ 'id' ], 'admin_filters' ); if ( '' !== $get_action ) { echo __( $get_action , 'buddyboss' ); } else { $split_cpt = explode ( 'new_blog_' , $item [ 'type' ] ); $args = array ( 'name' => $split_cpt [1] ); $output = 'objects' ; // names or objects $cu_post_types = get_post_types( $args , $output ); foreach ( $cu_post_types as $cu ) { $singular_label_name = strtolower ( $cu ->labels->singular_name ); } printf( __( 'New %s published' , 'buddyboss' ), $singular_label_name ); } } else { printf( __( 'Unregistered action - %s' , 'buddyboss' ), $item [ 'type' ] ); } } } |
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.