Make WordPress Core

Changeset 31861


Ignore:
Timestamp:
03/23/2015 02:10:35 AM (10 years ago)
Author:
pento
Message:

Emoji: Set the emoji image protocol with set_url_scheme(), instead of defaulting to HTTPS.

Props extendwings.

Fixes #31735.

File:
1 edited

Legend:

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

    r31860 r31861  
    41654165
    41664166    /** This filter is documented in wp-includes/script-loader.php */
    4167     $cdn_url = apply_filters( 'emoji_url', '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' );
     4167    $cdn_url = apply_filters( 'emoji_url', set_url_scheme( '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' ) );
    41684168
    41694169    /** This filter is documented in wp-includes/script-loader.php */
     
    42014201
    42024202                        list( $char1, $char2 ) = str_split( $chars, 5 );
    4203                         $entity = '<img src="https:' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em;" />';
     4203                        $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em;" />';
    42044204
    42054205                        $content = str_replace( $flag, $entity, $content );
     
    42164216                    foreach ( $matches[1] as $emoji ) {
    42174217                        $char = str_replace( array( '&#x', ';'), '', $emoji );
    4218                         $entity = '<img src="https:' . $cdn_url . $char . $ext . '" class="wp-smiley" style="height: 1em;" />';
     4218                        $entity = '<img src="' . $cdn_url . $char . $ext . '" class="wp-smiley" style="height: 1em;" />';
    42194219
    42204220                        $content = str_replace( $emoji, $entity, $content );
Note: See TracChangeset for help on using the changeset viewer.