diff --git a/inc/class-wp-object.php b/inc/class-wp-object.php index 4840491..b1762e1 100644 --- a/inc/class-wp-object.php +++ b/inc/class-wp-object.php @@ -58,6 +58,10 @@ public function render_meta_table( string $title = '', bool $hide_empty = false $meta = (array) groups_get_groupmeta( $this->object_id, '', false ); break; + case 'bp-activity': + $meta = (array) bp_activity_get_meta( $this->object_id, '', false ); + break; + case 'fm-term-meta': if ( function_exists( 'fm_get_term_meta' ) ) { $term = get_term( $this->object_id ); diff --git a/inc/objects/class-bp-activity.php b/inc/objects/class-bp-activity.php new file mode 100644 index 0000000..c6b855b --- /dev/null +++ b/inc/objects/class-bp-activity.php @@ -0,0 +1,61 @@ +object_id = (int) sanitize_text_field( wp_unslash( $_GET['aid'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended + + // Get screen id. + $screen_id = get_current_screen()->id; + + // Activity meta. + add_meta_box( + 'meta-inspector-bp-activity-meta', + __( 'Meta', 'meta-inspector' ), + fn () => $this->render_meta_table(), + $screen_id, + 'normal' + ); + } +} diff --git a/inc/objects/class-bp-group.php b/inc/objects/class-bp-group.php index 2505a0b..71b5605 100644 --- a/inc/objects/class-bp-group.php +++ b/inc/objects/class-bp-group.php @@ -1,6 +1,6 @@