Make WordPress Core


Ignore:
Timestamp:
03/11/2015 10:48:16 PM (10 years ago)
Author:
pento
Message:

Add emoji support, with Twemoji fallback.

Replace exisiting smilies with equivalent emoji, or with shiny new smiley images where no emoji existed.

Props batmoo, joen and mkaz for the original plugin upon which this is based.

Props pento, iseulde, kraftbj and peterwilsoncc for making the internet's dreams come true.

See #31242

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r31726 r31733  
    161161add_filter( 'the_title_rss',      'esc_html'        );
    162162add_filter( 'the_content_rss',    'ent2ncr',      8 );
     163add_filter( 'the_content_feed',   'feed_emoji'      );
    163164add_filter( 'the_excerpt_rss',    'convert_chars'   );
    164165add_filter( 'the_excerpt_rss',    'ent2ncr',      8 );
     
    166167add_filter( 'comment_text_rss',   'ent2ncr',      8 );
    167168add_filter( 'comment_text_rss',   'esc_html'        );
     169add_filter( 'comment_text_rss',   'feed_emoji'      );
    168170add_filter( 'bloginfo_rss',       'ent2ncr',      8 );
    169171add_filter( 'the_author',         'ent2ncr',      8 );
    170172add_filter( 'the_guid',           'esc_url'         );
     173
     174// Email filters
     175add_filter( 'wp_mail', 'mail_emoji' );
    171176
    172177// Misc filters
     
    219224add_action( 'init',                'check_theme_switched',            99    );
    220225add_action( 'after_switch_theme',  '_wp_sidebars_changed'                   );
     226add_action( 'wp_print_styles',     'print_emoji_styles'                     );
    221227
    222228if ( isset( $_GET['replytocom'] ) )
     
    249255add_action( 'admin_print_footer_scripts', '_wp_footer_scripts'                             );
    250256add_action( 'admin_print_styles',         'print_admin_styles',                      20    );
     257add_action( 'admin_print_styles',         'print_emoji_styles'                             );
    251258add_action( 'init',                       'smilies_init',                             5    );
    252259add_action( 'plugins_loaded',             'wp_maybe_load_widgets',                    0    );
Note: See TracChangeset for help on using the changeset viewer.