Make WordPress Core

Ticket #41917: 41917.patch

File 41917.patch, 1.7 KB (added by ocean90, 9 years ago)
  • src/wp-includes/script-loader.php

     
    528528        $scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 );
    529529
    530530        $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 );
    531         did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array(
    532                 /*
    533                  * translators: If your word count is based on single characters (e.g. East Asian characters),
    534                  * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
    535                  * Do not translate into your own language.
    536                  */
    537                 'type' => _x( 'words', 'Word count type. Do not translate!' ),
    538                 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array()
    539         ) );
    540531
    541532        $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 );
    542533
     
    10511042                'autosaveInterval' => AUTOSAVE_INTERVAL,
    10521043                'blog_id' => get_current_blog_id(),
    10531044        ) );
     1045
     1046        wp_localize_script( 'word-count', 'wordCountL10n', array(
     1047                /*
     1048                 * translators: If your word count is based on single characters (e.g. East Asian characters),
     1049                 * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
     1050                 * Do not translate into your own language.
     1051                 */
     1052                'type' => _x( 'words', 'Word count type. Do not translate!' ),
     1053                'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array()
     1054        ) );
    10541055}
    10551056
    10561057/**