Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/08/2016 10:39:28 PM (9 years ago)
Author:
r-a-y
Message:

Support emojis for those using WordPress 4.2+.

WordPress introduced a function in WP 4.2 to encode emojis,
wp_encode_emoji().

We're using this function to encode emojis in activity streams, private
messages and group descriptions.

🍕

Fixes #6529.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-filters.php

    r10417 r10572  
    3333add_filter( 'messages_notice_message_before_save',  'force_balance_tags' );
    3434add_filter( 'messages_notice_subject_before_save',  'force_balance_tags' );
     35
     36if ( function_exists( 'wp_encode_emoji' ) ) {
     37    add_filter( 'messages_message_subject_before_save', 'wp_encode_emoji' );
     38    add_filter( 'messages_message_content_before_save', 'wp_encode_emoji' );
     39    add_filter( 'messages_notice_message_before_save',  'wp_encode_emoji' );
     40    add_filter( 'messages_notice_subject_before_save',  'wp_encode_emoji' );
     41}
    3542
    3643add_filter( 'bp_get_message_notice_subject',     'wptexturize' );
Note: See TracChangeset for help on using the changeset viewer.