Skip to:
Content

BuddyPress.org

Ticket #6529: 6529.03.patch

File 6529.03.patch, 2.3 KB (added by r-a-y, 4 years ago)

Switches out WP version check for function check.

  • src/bp-activity/bp-activity-filters.php

     
    3333add_filter( 'bp_activity_content_before_save',       'force_balance_tags' );
    3434add_filter( 'bp_activity_action_before_save',        'force_balance_tags' );
    3535
     36if ( function_exists( 'wp_encode_emoji' ) ) {
     37        add_filter( 'bp_activity_content_before_save', 'wp_encode_emoji' );
     38}
     39
    3640add_filter( 'bp_get_activity_action',                'wptexturize' );
    3741add_filter( 'bp_get_activity_content_body',          'wptexturize' );
    3842add_filter( 'bp_get_activity_content',               'wptexturize' );
  • src/bp-groups/bp-groups-filters.php

     
    5454add_filter( 'groups_group_name_before_save',        'trim' );
    5555add_filter( 'groups_group_description_before_save', 'trim' );
    5656
     57// Support emojis.
     58if ( function_exists( 'wp_encode_emoji' ) ) {
     59        add_filter( 'groups_group_description_before_save', 'wp_encode_emoji' );
     60}
     61
    5762// Escape output of new group creation details.
    5863add_filter( 'bp_get_new_group_id',          'esc_attr'     );
    5964add_filter( 'bp_get_new_group_name',        'esc_attr'     );
  • src/bp-messages/bp-messages-filters.php

     
    3333add_filter( 'messages_notice_message_before_save',  'force_balance_tags' );
    3434add_filter( 'messages_notice_subject_before_save',  'force_balance_tags' );
    3535
     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}
     42
    3643add_filter( 'bp_get_message_notice_subject',     'wptexturize' );
    3744add_filter( 'bp_get_message_notice_text',        'wptexturize' );
    3845add_filter( 'bp_get_message_thread_subject',     'wptexturize' );