diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index c1f69b6e0e..e259b79576 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -528,15 +528,6 @@ function wp_default_scripts( &$scripts ) { $scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 ); $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 ); - did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array( - /* - * translators: If your word count is based on single characters (e.g. East Asian characters), - * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'. - * Do not translate into your own language. - */ - 'type' => _x( 'words', 'Word count type. Do not translate!' ), - 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array() - ) ); $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 ); @@ -1073,6 +1064,16 @@ function wp_just_in_time_script_localization() { wp_localize_script( 'mce-view', 'mceViewL10n', array( 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array() ) ); + + wp_localize_script( 'word-count', 'wordCountL10n', array( + /* + * translators: If your word count is based on single characters (e.g. East Asian characters), + * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'. + * Do not translate into your own language. + */ + 'type' => _x( 'words', 'Word count type. Do not translate!' ), + 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array() + ) ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index a51bed5c4f..c58f343e50 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-beta1-41843'; +$wp_version = '4.9-beta1-41844'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.