diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index ad0f47b69a..b64869ec91 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -160,19 +160,19 @@ add_filter( 'the_title_rss', 'strip_tags' ); add_filter( 'the_title_rss', 'ent2ncr', 8 ); add_filter( 'the_title_rss', 'esc_html' ); add_filter( 'the_content_rss', 'ent2ncr', 8 ); -add_filter( 'the_content_feed', '_wp_staticize_emoji_for_feeds' ); +add_filter( 'the_content_feed', 'wp_staticize_emoji' ); add_filter( 'the_excerpt_rss', 'convert_chars' ); add_filter( 'the_excerpt_rss', 'ent2ncr', 8 ); add_filter( 'comment_author_rss', 'ent2ncr', 8 ); add_filter( 'comment_text_rss', 'ent2ncr', 8 ); add_filter( 'comment_text_rss', 'esc_html' ); -add_filter( 'comment_text_rss', '_wp_staticize_emoji_for_feeds' ); +add_filter( 'comment_text_rss', 'wp_staticize_emoji' ); add_filter( 'bloginfo_rss', 'ent2ncr', 8 ); add_filter( 'the_author', 'ent2ncr', 8 ); add_filter( 'the_guid', 'esc_url' ); // Email filters -add_filter( 'wp_mail', '_wp_staticize_emoji_for_email' ); +add_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); // Misc filters add_filter( 'option_ping_sites', 'privacy_ping_filter' ); diff --git a/wp-includes/feed.php b/wp-includes/feed.php index dc26188d12..8638554146 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -649,16 +649,3 @@ function fetch_feed( $url ) { return $feed; } - -/** - * Convert emoji characters in a feed into static images. - * - * @ignore - * @since 4.2.0 - * - * @param string $content The content to convert. - * @return The converted content. - */ -function _wp_staticize_emoji_for_feeds( $content ) { - return wp_staticize_emoji( $content, true ); -} diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 793c6383ad..c37755515e 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4236,10 +4236,6 @@ function wp_encode_emoji( $content ) { function wp_staticize_emoji( $text ) { $text = wp_encode_emoji( $text ); - if ( ! class_exists( 'DOMDocument' ) ) { - return $text; - } - /** This filter is documented in wp-includes/formatting.php */ $cdn_url = apply_filters( 'emoji_url', set_url_scheme( '//s.w.org/images/core/emoji/72x72/' ) ); @@ -4314,13 +4310,12 @@ function wp_staticize_emoji( $text ) { /** * Convert emoji in emails into static images. * - * @ignore * @since 4.2.0 * * @param array $mail The email data array. * @return array The email data array, with emoji in the message staticized. */ -function _wp_staticize_emoji_for_email( $mail ) { +function wp_staticize_emoji_for_email( $mail ) { if ( ! isset( $mail['message'] ) ) { return $mail; } @@ -4373,7 +4368,7 @@ function _wp_staticize_emoji_for_email( $mail ) { $content_type = apply_filters( 'wp_mail_content_type', $content_type ); if ( 'text/html' === $content_type ) { - $mail['message'] = wp_staticize_emoji( $mail['message'], true ); + $mail['message'] = wp_staticize_emoji( $mail['message'] ); } return $mail; diff --git a/wp-includes/version.php b/wp-includes/version.php index a407bf58f5..db7eb70880 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-RC1-32152'; +$wp_version = '4.2-RC1-32161'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.