WP Multibyte Patch - Version 2.8.4

Version Description

Download this release

Release Info

Developer tenpura
Plugin Icon wp plugin WP Multibyte Patch
Version 2.8.4
Comparing to
See all releases

Code changes from version 2.8.3 to 2.8.4

Files changed (3) hide show
  1. ext/ja/class.php +2 -2
  2. readme.txt +2 -2
  3. wp-multibyte-patch.php +22 -6
ext/ja/class.php CHANGED
@@ -3,9 +3,9 @@
3
  * WP Multibyte Patch Japanese Locale Extension
4
  *
5
  * @package WP_Multibyte_Patch
6
- * @version 2.8.3
7
  * @author Seisuke Kuraishi <210pura@gmail.com>
8
- * @copyright Copyright (c) 2019 Seisuke Kuraishi, Tinybit Inc.
9
  * @license https://opensource.org/licenses/gpl-2.0.php GPLv2
10
  * @link https://eastcoder.com/code/wp-multibyte-patch/
11
  */
3
  * WP Multibyte Patch Japanese Locale Extension
4
  *
5
  * @package WP_Multibyte_Patch
6
+ * @version 2.8.4
7
  * @author Seisuke Kuraishi <210pura@gmail.com>
8
+ * @copyright Copyright (c) 2020 Seisuke Kuraishi, Tinybit Inc.
9
  * @license https://opensource.org/licenses/gpl-2.0.php GPLv2
10
  * @link https://eastcoder.com/code/wp-multibyte-patch/
11
  */
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: tenpura
3
  Tags: multibyte,i18n,wp-multibyte-patch,Japanese
4
  Requires at least: 4.5
5
- Tested up to: 5.3
6
- Stable tag: 2.8.3
7
 
8
  Multibyte functionality enhancement for the WordPress Japanese package.
9
 
2
  Contributors: tenpura
3
  Tags: multibyte,i18n,wp-multibyte-patch,Japanese
4
  Requires at least: 4.5
5
+ Tested up to: 5.4
6
+ Stable tag: 2.8.4
7
 
8
  Multibyte functionality enhancement for the WordPress Japanese package.
9
 
wp-multibyte-patch.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: WP Multibyte Patch
4
  Description: Multibyte functionality enhancement for the WordPress Japanese package.
5
- Version: 2.8.3
6
  Plugin URI: https://eastcoder.com/code/wp-multibyte-patch/
7
  Author: Seisuke Kuraishi
8
  Author URI: https://tinybit.co.jp/
@@ -15,9 +15,9 @@ Domain Path: /languages
15
  * Multibyte functionality enhancement for the WordPress Japanese package.
16
  *
17
  * @package WP_Multibyte_Patch
18
- * @version 2.8.3
19
  * @author Seisuke Kuraishi <210pura@gmail.com>
20
- * @copyright Copyright (c) 2019 Seisuke Kuraishi, Tinybit Inc.
21
  * @license https://opensource.org/licenses/gpl-2.0.php GPLv2
22
  * @link https://eastcoder.com/code/wp-multibyte-patch/
23
  */
@@ -290,6 +290,14 @@ class multibyte_patch {
290
  $scripts->add( 'wplink', plugin_dir_url( __FILE__ ) . "wplink.php{$debug_qs}", array( 'jquery', 'wp-a11y' ), false, 1 );
291
  }
292
 
 
 
 
 
 
 
 
 
293
  public function force_character_count( $translations = '', $text = '', $context = '' ) {
294
  if ( 'word count: words or characters?' == $context && 'words' == $text )
295
  return 'characters';
@@ -427,6 +435,17 @@ class multibyte_patch {
427
  if ( function_exists( 'twentyseventeen_fonts_url' ) )
428
  $this->remove_editor_style( twentyseventeen_fonts_url() );
429
  }
 
 
 
 
 
 
 
 
 
 
 
430
  }
431
 
432
  public function filters() {
@@ -469,9 +488,6 @@ class multibyte_patch {
469
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'admin_custom_css' ), 99 );
470
  }
471
 
472
- if ( false !== $this->conf['patch_wplink_js'] )
473
- add_action( 'wp_default_scripts', array( $this, 'wplink_js' ), 9 );
474
-
475
  add_action( 'after_setup_theme', array( $this, 'filters_after_setup_theme' ), 99 );
476
  add_action( 'template_redirect', array( $this, 'filters_after_template_redirect' ) );
477
  }
2
  /*
3
  Plugin Name: WP Multibyte Patch
4
  Description: Multibyte functionality enhancement for the WordPress Japanese package.
5
+ Version: 2.8.4
6
  Plugin URI: https://eastcoder.com/code/wp-multibyte-patch/
7
  Author: Seisuke Kuraishi
8
  Author URI: https://tinybit.co.jp/
15
  * Multibyte functionality enhancement for the WordPress Japanese package.
16
  *
17
  * @package WP_Multibyte_Patch
18
+ * @version 2.8.4
19
  * @author Seisuke Kuraishi <210pura@gmail.com>
20
+ * @copyright Copyright (c) 2020 Seisuke Kuraishi, Tinybit Inc.
21
  * @license https://opensource.org/licenses/gpl-2.0.php GPLv2
22
  * @link https://eastcoder.com/code/wp-multibyte-patch/
23
  */
290
  $scripts->add( 'wplink', plugin_dir_url( __FILE__ ) . "wplink.php{$debug_qs}", array( 'jquery', 'wp-a11y' ), false, 1 );
291
  }
292
 
293
+ public function wplink_js_minimum_input_length( $translations = '', $text = '', $context = '' ) {
294
+ if ( 'minimum input length for searching post links' === $context && '3' === $text ) {
295
+ return '2';
296
+ }
297
+
298
+ return $translations;
299
+ }
300
+
301
  public function force_character_count( $translations = '', $text = '', $context = '' ) {
302
  if ( 'word count: words or characters?' == $context && 'words' == $text )
303
  return 'characters';
435
  if ( function_exists( 'twentyseventeen_fonts_url' ) )
436
  $this->remove_editor_style( twentyseventeen_fonts_url() );
437
  }
438
+
439
+ if ( false !== $this->conf['patch_wplink_js'] ) {
440
+ if ( $this->is_wp_required_version( '5.4-beta1' ) ) {
441
+ if ( '2' !== _x( '3', 'minimum input length for searching post links' ) ) {
442
+ add_filter( 'gettext_with_context', array( $this, 'wplink_js_minimum_input_length' ), 10, 3 );
443
+ }
444
+ }
445
+ else {
446
+ add_action( 'wp_default_scripts', array( $this, 'wplink_js' ), 9 );
447
+ }
448
+ }
449
  }
450
 
451
  public function filters() {
488
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'admin_custom_css' ), 99 );
489
  }
490
 
 
 
 
491
  add_action( 'after_setup_theme', array( $this, 'filters_after_setup_theme' ), 99 );
492
  add_action( 'template_redirect', array( $this, 'filters_after_template_redirect' ) );
493
  }