Make WordPress Core

Ticket #31719: 31719-2.patch

File 31719-2.patch, 1.1 KB (added by janhenckens, 9 years ago)

Fixes inline emoji styling

  • src/wp-includes/formatting.php

    diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
    index 0377bbd..eda8e9c 100644
    function translate_smiley( $matches ) { 
    21092109         */
    21102110        $src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
    21112111
    2112         return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
     2112        return sprintf( '<img src="%s" alt="%s" class="wp-smiley" style="max-height: 1em;" />', esc_url( $src_url ), esc_attr( $smiley ) );
    21132113}
    21142114
    21152115/**
    function wp_staticize_emoji( $text ) { 
    42004200                                                $chars = str_replace( array( '&#x', ';'), '', $flag );
    42014201
    42024202                                                list( $char1, $char2 ) = str_split( $chars, 5 );
    4203                                                 $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="height: 1em;" />';
     4203                                                $entity = '<img src="' . $cdn_url . $char1 . '-' . $char2 . $ext . '" class="wp-smiley" style="max-height: 1em;" />';
    42044204
    42054205                                                $content = str_replace( $flag, $entity, $content );
    42064206                                        }