Last active
November 22, 2016 15:01
-
-
Save imath/8b100a78c6fef5807e31c64c8e5eab17 to your computer and use it in GitHub Desktop.
Snippet to use with the BP Reactions plugin i've created. You can add as many reactions as you wish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First thanks so much for this plugin and for your work on the core.
For customisation I had to wrap function recommendation_reaction() with (if ( is_plugin_active( 'bp-reactions/bp-reactions.php' ) ) {)
(- probably because there were networks in which the plugin was not yet active.)
changed recommand to recommend
Any way I just think this plugin is fantastic! magnifique! merveilleux!
Thanks!