Make WordPress Core


Ignore:
Timestamp:
12/06/2021 10:12:28 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Remove the replace:emoji-banner-text Grunt task.

The task was previously used to ensure that /*! This file is auto-generated */ comment is not included on front end as part of the inline emoji detection script.

As the wp-emoji-loader.js script is now included via file_get_contents() and wp_print_inline_script_tag() instead of grunt-include to simplify the logic, the task does not find anything to replace and is no longer necessary.

Additionally, include a line break before the wp-emoji-loader.js script content for better line wrapping.

Follow-up to [48096], [50651], [52132].

See #44632, #44306, #53363.

File:
1 edited

Legend:

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

    r52294 r52325  
    57885788
    57895789    wp_print_inline_script_tag(
    5790         sprintf( 'window._wpemojiSettings = %s;', wp_json_encode( $settings ) ) .
     5790        sprintf( 'window._wpemojiSettings = %s;', wp_json_encode( $settings ) ) . "\n" .
    57915791            file_get_contents( sprintf( ABSPATH . WPINC . '/js/wp-emoji-loader' . wp_scripts_get_suffix() . '.js' ) )
    57925792    );
Note: See TracChangeset for help on using the changeset viewer.