Skip to content

The plugin creates three tables on activation. All table names use the WordPress table prefix (default wp_).

Stores the available emoji library.

Column Type Description
id int AUTO_INCREMENT Primary key
name varchar(500) Display label (editable on the Manage Emojis tab)
type enum('inbuilt','custom') Whether the emoji is built-in or user-created
format varchar(10) Rendering format, seeded as svg/json

On activation the plugin populates this table with 204 built-in emojis. SVG files live in the plugin’s emojis/svg/ directory and Lottie JSON in emojis/json/, referenced by ID.

Stores named reaction-set configurations.

Column Type Description
id bigint AUTO_INCREMENT Primary key
name varchar(255) Human-readable name (e.g. “Activity Reaction”)
post_type varchar(255) Associated content type (may be empty for BuddyPress activity sets)
front_render boolean (default true) 1 if this set renders on the front end
options text JSON blob of configuration options

The options JSON can contain: emojis (array of emoji IDs), shortcode_name (string), post_type (string), auto_append ("1"/"0"), and animation ("true"/"false").

On activation the plugin seeds these sets. IDs are assigned by insertion order and are not fixed API values - look them up on your install rather than hard-coding them:

Name post_type
{Posts label} Reaction post
Activity Reaction (empty)
Activity Comment Reaction (empty)
bbPress Topic Reactions topic
bbPress Reply Reactions reply

Records each individual reaction by a member.

Column Type Description
id bigint AUTO_INCREMENT Primary key
user_id bigint(20) WordPress user ID of the member who reacted
post_id bigint(20) ID of the content item reacted to
post_type varchar(50) Content type (activity, activity-comment, post, topic, reply)
reacted_to varchar(10) Reaction target marker recorded with each reaction
emoji_id int FK to bp_reactions_emojis.id
bprs_id bigint(20) FK to bp_reactions_shortcodes.id
reacted_date datetime Timestamp of the reaction (used by widget time-period filters)

Indexes (added in v2.4.0 for scale):

  • idx_user_post on (user_id, post_id, bprs_id)
  • idx_post_type on (post_id, post_type, bprs_id)
  • idx_emoji_stats on (emoji_id, bprs_id)
  • idx_reacted_date on (reacted_date)

One row per member per content item per reaction set. Changing a reaction overwrites emoji_id on the existing row; removing it deletes the row.

global $wpdb;
// Total reactions on one activity post for a given reaction set.
$count = $wpdb->get_var( $wpdb->prepare(
"SELECT COUNT(*) FROM {$wpdb->prefix}bp_reactions_reacted_emoji
WHERE post_id = %d AND post_type = %s AND bprs_id = %d",
$activity_id,
'activity',
$bprs_id
) );

If Delete all data on uninstall is enabled on the Settings tab, the uninstall routine drops all three tables and deletes plugin options. This is irreversible. When it is off, all data is preserved after uninstall.

  • Hooks and Filters - bp_reactions_after_react fires after each row is inserted or updated
  • Reactions Log - admin UI for browsing bp_reactions_reacted_emoji