WordPress.org

Make WordPress Core

Ticket #33120: 33120.3.diff

File 33120.3.diff, 1.2 KB (added by extendwings, 5 years ago)
  • wp-includes/script-loader.php

    diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
    index e3460a2..fd7f7cc 100644
    a b function wp_default_scripts( &$scripts ) { 
    401401
    402402        $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 );
    403403        did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array(
     404                /**
     405                 * Filter the word count type.
     406                 *
     407                 * @since 4.3.0
     408                 *
     409                 * @param string $type The type of word count. Default 'words'.
     410                 *                     Accepts 'characters_excluding_spaces', 'characters_including_spaces' and 'words'.
     411                 */
    404412                /*
    405413                 * translators: If your word count is based on single characters (e.g. East Asian characters),
    406414                 * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
    407415                 * Do not translate into your own language.
    408416                 */
    409                 'type' => _x( 'words', 'Word count type. Do not translate!' ),
     417                'type' => apply_filters( 'word_count_type', _x( 'words', 'Word count type. Do not translate!' ) ),
    410418                'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array()
    411419        ) );
    412420