Make WordPress Core

Ticket #31735: WordPress_master...shield-9_emoji_cdn_scheme.diff.txt

File WordPress_master...shield-9_emoji_cdn_scheme.diff.txt, 1.1 KB (added by extendwings, 11 years ago)
Line 
1diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
2index 4c229b7..ff4b904 100644
3--- a/wp-includes/formatting.php
4+++ b/wp-includes/formatting.php
5@@ -4164,7 +4164,7 @@ function wp_staticize_emoji( $text ) {
6 }
7
8 /** This filter is documented in wp-includes/script-loader.php */
9- $cdn_url = apply_filters( 'emoji_url', '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' );
10+ $cdn_url = apply_filters( 'emoji_url', set_url_scheme( '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' ) );
11
12 /** This filter is documented in wp-includes/script-loader.php */
13 $ext = apply_filters( 'emoji_ext', '.png' );
14@@ -4200,7 +4200,7 @@ function wp_staticize_emoji( $text ) {
15 $chars = str_replace( array( '&#x', ';'), '', $flag );
16
17 list( $char1, $char2 ) = str_split( $chars, 5 );
18- $entity = '<img src="https:' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em;" />';
19+ $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em;" />';
20
21 $content = str_replace( $flag, $entity, $content );
22 }