Skip to content

Instantly share code, notes, and snippets.

@imath
Last active Nov 22, 2016
Embed
What would you like to do?
Snippet to use with the BP Reactions plugin i've created. You can add as many reactions as you wish
<?php
/**
* BuddyPress customs
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/**
* Watch this video https://vimeo.com/166707145
* from 2:25 to 3:44 for a detailed explanation.
*/
function recommandation_reaction() {
bp_reactions_register_reaction( 'recommandation', array(
'emoji' => '0x1F4BC',
'description' => __( 'recommanded an update', 'bp-reactions' ),
'label' => __( 'Recommandations', 'bp-reactions' ),
) );
}
add_action( 'bp_init', 'recommandation_reaction', 6 );
@imath
Copy link
Author

imath commented Jun 9, 2016

@valuser thanks a lot for your feedback and very nice review on the WordPress repo of the plugin 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment