BuddyPress seems to use the filter bp_nouveau_messages_mce_buttons to remove some of the formatting from the standard TinyMce which is great, but the same filter also adds the option to add an image to the message ie.
// Add the image button
array_push( $buttons, ‘image’ );… which I want to remove.
I can’t for the life of me figure out how to override this filter in my child theme and would be very grateful for any suggestions.
With many thanks in advance.
Hi Nick,
Please use the following code./** * Remove image button from the BP Nouveau template's compose message. */ add_filter( 'mce_buttons', function ( $buttons ) { // make sure this is for the message. if ( ! has_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons' ) ) { return $buttons; } return array_diff( $buttons, array( 'image' ) ); }, 20 );
Regards
Brajesh
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘ [Resolved] BuddyPress Private Messaging – disable addition of image’ is closed to new replies.
This topic is: resolved