
How to get admin user ID
Share This Post How to get admin User ID? It’s been really difficult for many to get back the admin user ID but it’s so
Do you want to award GamiPress on liking BuddyBoss Newsfeed? If yes then you are at the right platform. BuddyBoss Newsfeed has different activity by users and admin but to award GamiPress on liking BuddyBoss Newsfeed might engage users at your site.
Note: GamiPress Plugin and BuddyBoss theme must be configured in order to use these snippets.
Let’s check how it is working…
This snippet can be used to add trigger to award Gamipress on liking BuddyBoss news feed posts.
/**
* Add trigger to award Gamipress on liking BuddyBoss news feed posts
*/
function ldninjas_add_buddyboss_news_feed_trigger( $triggers ) {
$triggers['buddy_boss_news_feed_like'] = array(
'liked_buddyboss_news_feed_post' => __( 'Liked BuddyBoss News Feed Posts', 'ldninjas' ),
);
return $triggers;
}
add_filter( 'gamipress_activity_triggers', 'ldninjas_add_buddyboss_news_feed_trigger' );
The snippet will help to Award points/badges/ranks on liking a news feed.
/**
* Award points/badges/ranks on liking a news feed
*/
function ldninjas_award_gamipress( $activity_id, $user_id ) {
if( ! $user_id ) {
return;
}
gamipress_trigger_event( array(
'event' => 'liked_buddyboss_news_feed_post',
'user_id' => $user_id
) );
}
add_action( 'bp_activity_add_user_favorite', 'ldninjas_award_gamipress', 10, 2 );
So, All you need to add this code snippet to your theme functions.php file to add a trigger or to award points/badges/ranks on liking a news feed. Enjoy!
Share This Post How to get admin User ID? It’s been really difficult for many to get back the admin user ID but it’s so
Share This Post Award GamiPress on RCPro Membership Renewal Do you think users can also be awarded points/badges/ranks while RCPro Membership renewal? Yes, you can
Share This Post Custom Message with myCRED Transfer MyCred assigns different points to the users but it’s been sometime noticed that the users want to
Once you send the details, we will be shortly back to you. Thanks!
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.