WordPress.org

Make WordPress Core

Changeset 32161


Ignore:
Timestamp:
04/20/2015 04:14:32 AM (6 years ago)
Author:
nacin
Message:

Clean up wp_staticize_emoji() and friends.

  • DOMDocument was removed in [31752] but not the check.
  • wp_staticize_emoji() has never accepted a second arg; remove it from calls.
  • Remove wp_staticize_emoji_for_feeds(), no need for it.
  • Remove _ and @ignore from wp_staticize_emoji_for_email(), no need for it.

see #31242.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

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

    r31879 r32161  
    161161add_filter( 'the_title_rss',      'esc_html'                      );
    162162add_filter( 'the_content_rss',    'ent2ncr',                    8 );
    163 add_filter( 'the_content_feed',   '_wp_staticize_emoji_for_feeds' );
     163add_filter( 'the_content_feed',   'wp_staticize_emoji'            );
    164164add_filter( 'the_excerpt_rss',    'convert_chars'                 );
    165165add_filter( 'the_excerpt_rss',    'ent2ncr',                    8 );
     
    167167add_filter( 'comment_text_rss',   'ent2ncr',                    8 );
    168168add_filter( 'comment_text_rss',   'esc_html'                      );
    169 add_filter( 'comment_text_rss',   '_wp_staticize_emoji_for_feeds' );
     169add_filter( 'comment_text_rss',   'wp_staticize_emoji'            );
    170170add_filter( 'bloginfo_rss',       'ent2ncr',                    8 );
    171171add_filter( 'the_author',         'ent2ncr',                    8 );
     
    173173
    174174// Email filters
    175 add_filter( 'wp_mail', '_wp_staticize_emoji_for_email' );
     175add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
    176176
    177177// Misc filters
  • trunk/src/wp-includes/feed.php

    r31791 r32161  
    650650    return $feed;
    651651}
    652 
    653 /**
    654  * Convert emoji characters in a feed into static images.
    655  *
    656  * @ignore
    657  * @since 4.2.0
    658  *
    659  * @param string $content The content to convert.
    660  * @return The converted content.
    661  */
    662 function _wp_staticize_emoji_for_feeds( $content ) {
    663     return wp_staticize_emoji( $content, true );
    664 }
  • trunk/src/wp-includes/formatting.php

    r32097 r32161  
    42374237    $text = wp_encode_emoji( $text );
    42384238
    4239     if ( ! class_exists( 'DOMDocument' ) ) {
    4240         return $text;
    4241     }
    4242 
    42434239    /** This filter is documented in wp-includes/formatting.php */
    42444240    $cdn_url = apply_filters( 'emoji_url', set_url_scheme( '//s.w.org/images/core/emoji/72x72/' ) );
     
    43154311 * Convert emoji in emails into static images.
    43164312 *
    4317  * @ignore
    43184313 * @since 4.2.0
    43194314 *
     
    43214316 * @return array The email data array, with emoji in the message staticized.
    43224317 */
    4323 function _wp_staticize_emoji_for_email( $mail ) {
     4318function wp_staticize_emoji_for_email( $mail ) {
    43244319    if ( ! isset( $mail['message'] ) ) {
    43254320        return $mail;
     
    43744369
    43754370    if ( 'text/html' === $content_type ) {
    4376         $mail['message'] = wp_staticize_emoji( $mail['message'], true );
     4371        $mail['message'] = wp_staticize_emoji( $mail['message'] );
    43774372    }
    43784373
Note: See TracChangeset for help on using the changeset viewer.