Skip to content

Gamification — myCRED, GamiPress, AutomatorWP, WP Fusion, BadgeOS

Reward members for pinning meaningful content. The plugin fires action hooks every time a pin or unpin happens, and the most popular WordPress gamification frameworks can listen on them with no extra configuration.

Verified compatible (v2.3.1+):

  • myCRED — registered via mycred_load_hooks using the proper myCRED API; awards points per pin event.
  • GamiPress — 9 triggers auto-registered via gamipress_register_trigger(); choose them from the GamiPress trigger picker without writing code.
  • AutomatorWP — trigger registered as bpsp_pin_activity in AutomatorWP’s recipe builder.
  • WP Fusion — pushes bpsp_total_pins, bpsp_current_pins, and bpsp_last_pin_date to your CRM on every pin.
  • BadgeOS — pin events registered as BadgeOS activity triggers; use them in achievement conditions.

All integrations use function_exists or class_exists checks so missing a gamification plugin causes no errors.

All hooks fire from bpsp-gamification-hooks.php after the pin or unpin row is committed.

// Generic — fires on every pin
do_action( 'bpsp_user_pinned_activity', $user_id, $post_id, $component, $type, $group_id );
// Scope-specific
do_action( 'bpsp_user_pinned_activity_stream', $user_id, $post_id, $type );
do_action( 'bpsp_user_pinned_own_activity', $user_id, $post_id ); // Personal pin
do_action( 'bpsp_admin_pinned_activity', $user_id, $post_id ); // Admin sitewide pin
do_action( 'bpsp_user_pinned_group_activity', $user_id, $post_id, $group_id, $type );
do_action( 'bpsp_group_admin_pinned_activity', $user_id, $post_id, $group_id );
do_action( 'bpsp_group_mod_pinned_activity', $user_id, $post_id, $group_id );
do_action( 'bpsp_group_member_pinned_activity', $user_id, $post_id, $group_id );
// Milestones — fires when user's cumulative pin count hits 1, 5, 10, 25, 50, or 100
do_action( 'bpsp_user_first_pin', $user_id, $post_id, $component ); // First ever pin
do_action( 'bpsp_user_pin_milestone', $user_id, $pin_count, $component ); // 5, 10, 25, 50, 100
do_action( "bpsp_user_pin_milestone_{$count}", $user_id, $component ); // e.g. bpsp_user_pin_milestone_10
// Activity-type specific (where $activity_type is the bp_activity->type string)
do_action( "bpsp_user_pinned_{$activity_type}", $user_id, $post_id, $activity_obj );
// Unpin counterparts — same parameter shapes as the pin hooks above
do_action( 'bpsp_user_unpinned_activity', $user_id, $post_id, $component, $type, $group_id );

See Hooks & Filters for the complete list including all unpin events.

If GamiPress is active, these triggers appear in the trigger picker without any code:

Trigger label Hook
Pin any activity bpsp_user_pinned_activity
Pin own activity bpsp_user_pinned_own_activity
Pin activity as admin bpsp_admin_pinned_activity
Pin activity in a group bpsp_user_pinned_group_activity
Pin first activity bpsp_user_first_pin
Pin 5 activities bpsp_user_pin_milestone_5
Pin 10 activities bpsp_user_pin_milestone_10
Pin 25 activities bpsp_user_pin_milestone_25
Unpin any activity bpsp_user_unpinned_activity
add_action( 'bpsp_user_pinned_activity', function ( $user_id, $post_id, $component, $type, $group_id ) {
if ( ! function_exists( 'mycred_add' ) ) {
return;
}
mycred_add(
'sticky_post_pin', // Reference key shown in the myCRED log
$user_id,
10, // Points to award
'Pinned an activity'
);
}, 10, 5 );
add_action( 'bpsp_user_pin_milestone', function ( $user_id, $pin_count, $component ) {
if ( ! function_exists( 'gamipress_trigger_event' ) ) {
return;
}
gamipress_trigger_event( array(
'event' => 'bpsp_user_pin_milestone_' . $pin_count,
'user_id' => $user_id,
) );
}, 10, 3 );

In AutomatorWP, create a recipe with trigger “User pins an activity” (the trigger slug is bpsp_pin_activity). Available tags for the recipe: {{activity_id}}, plus standard user and date tags. Pair with any AutomatorWP action — send an email, award a badge, or apply a tag.

When WP Fusion is active, the plugin automatically pushes these fields to your CRM on every pin:

CRM field Value
bpsp_total_pins Lifetime pin count from the activity log
bpsp_current_pins Current active personal pins
bpsp_last_pin_date MySQL datetime of the most recent pin

Use these fields in WP Fusion tag rules to segment members by pinning behavior — for example, apply a “power-pinner” tag when bpsp_total_pins reaches 10.

  • Hooks & Filters — complete event reference.
  • REST API — pin / unpin programmatically; the same hooks fire on REST writes.