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.

Built from https://develop.svn.wordpress.org/trunk@32161


git-svn-id: http://core.svn.wordpress.org/trunk@32136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2015-04-20 04:15:26 +00:00
parent 9e92fab289
commit 7f1b31f80f
4 changed files with 6 additions and 24 deletions

View File

@ -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' );

View File

@ -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 );
}

View File

@ -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;

View File

@ -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.