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 );
@valuser
Copy link

valuser commented Jun 7, 2016

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!

@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