Make WordPress Core

Ticket #31590: 31590.patch

File 31590.patch, 1.6 KB (added by peterwilsoncc, 10 years ago)
  • src/wp-includes/default-filters.php

    diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php
    index 57e02d6..e0fafaa 100644
    a b add_action( 'template_redirect', 'wp_shortlink_header', 11, 0 ); 
    217217add_action( 'wp_print_footer_scripts', '_wp_footer_scripts'                 );
    218218add_action( 'init',                'check_theme_switched',            99    );
    219219add_action( 'after_switch_theme',  '_wp_sidebars_changed'                   );
     220add_action( 'wp_print_scripts',    'wp_save_early_comment_reply_clicks', 99 );
    220221
    221222if ( isset( $_GET['replytocom'] ) )
    222223    add_action( 'wp_head', 'wp_no_robots' );
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index 97fb681..29e1dcd 100644
    a b function wp_just_in_time_script_localization() { 
    746746}
    747747
    748748/**
     749 * Save clicks on a comment reply link before the script has loaded
     750 *
     751 * On long comment threads, it's possible a visitor will click a reply link
     752 * before the comment-reply script loads. React gracefully.
     753 *
     754 * @since 4.2
     755 */
     756function wp_save_early_comment_reply_clicks() {
     757
     758        // check if comment reply script is enqueued
     759        if ( wp_script_is( 'comment-reply' ) ) {
     760                echo "<script>\n";
     761                echo "var addComment = { moveForm : function() { return true; } }\n";
     762                echo "</script>\n";
     763        }
     764
     765}
     766
     767
     768/**
    749769 * Administration Screen CSS for changing the styles.
    750770 *
    751771 * If installing the 'wp-admin/' directory will be replaced with './'.