From a97462e755eaae6ed7dc06a502969610b61aba73 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 16 Mar 2015 10:46:26 +0000 Subject: [PATCH] Emoji: Rename the email and feed filter functions to be `_` prefixed, and `@ignore`-d in the PHPDocs. See #31242 Built from https://develop.svn.wordpress.org/trunk@31791 git-svn-id: http://core.svn.wordpress.org/trunk@31773 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 30 +++++++++++++++--------------- wp-includes/feed.php | 6 ++++-- wp-includes/formatting.php | 3 ++- wp-includes/version.php | 2 +- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 581e54cc1f..69905be1c3 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -156,23 +156,23 @@ add_filter( 'list_cats', 'wptexturize' ); add_filter( 'wp_sprintf', 'wp_sprintf_l', 10, 2 ); // RSS filters -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', 'feed_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', 'feed_emoji' ); -add_filter( 'bloginfo_rss', 'ent2ncr', 8 ); -add_filter( 'the_author', 'ent2ncr', 8 ); -add_filter( 'the_guid', 'esc_url' ); +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_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( 'bloginfo_rss', 'ent2ncr', 8 ); +add_filter( 'the_author', 'ent2ncr', 8 ); +add_filter( 'the_guid', 'esc_url' ); // Email filters -add_filter( 'wp_mail', 'mail_emoji' ); +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 feb135e000..dc26188d12 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -653,10 +653,12 @@ function fetch_feed( $url ) { /** * Convert emoji characters in a feed into static images. * - * @param string $content The content to convert. + * @ignore + * @since 4.2.0 * + * @param string $content The content to convert. * @return The converted content. */ -function feed_emoji( $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 4e7d0da664..6a259069d1 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4192,12 +4192,13 @@ 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 mail_emoji( $mail ) { +function _wp_staticize_emoji_for_email( $mail ) { $mail['message'] = wp_staticize_emoji( $mail['message'], true ); return $mail; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1a29fc3632..ee770cadc0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta1-31790'; +$wp_version = '4.2-beta1-31791'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.