BP_Activity_List_Table::column_action( array $item )

Action column markup.

Description

See also

Parameters

$item

(array) (Required) A singular item (one full row).

Source

File: bp-activity/classes/class-bp-activity-list-table.php

	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

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.