WP Multibyte Patch - Version 1.6.1

Version Description

Download this release

Release Info

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

Code changes from version 1.6 to 1.6.1

ext/ja/admin.css CHANGED
@@ -1,4 +1,6 @@
 
 
1
  body *:not(textarea) {
2
  font-style: normal !important;
3
- font-family: Arial, "Bitstream Vera Sans", Helvetica, Verdana, sans-serif !important;
4
  }
1
+ @charset "utf-8";
2
+
3
  body *:not(textarea) {
4
  font-style: normal !important;
5
+ font-family: "Helvetica Neue", Helvetica, "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", "メイリオ", Meiryo, "MS Pゴシック", Arial, Verdana, sans-serif !important;
6
  }
ext/ja/class.php CHANGED
@@ -3,7 +3,7 @@
3
  * WP Multibyte Patch Japanese Locale Extension
4
  *
5
  * @package WP_Multibyte_Patch
6
- * @version 1.6
7
  * @author Seisuke Kuraishi <210pura@gmail.com>
8
  * @copyright Copyright (c) 2012 Seisuke Kuraishi, Tinybit Inc.
9
  * @license http://opensource.org/licenses/gpl-2.0.php GPLv2
@@ -142,7 +142,8 @@ class multibyte_patch_ext extends multibyte_patch {
142
  }
143
 
144
  function admin_custom_css() {
145
- echo "\n" . '<link rel="stylesheet" type="text/css" href="' . plugin_dir_url(__FILE__) . 'admin.css' . '" />' . "\n";
 
146
  }
147
 
148
  function __construct() {
@@ -154,6 +155,7 @@ class multibyte_patch_ext extends multibyte_patch {
154
  $this->conf['patch_incoming_pingback'] = true;
155
  $this->conf['patch_process_search_terms'] = true;
156
  $this->conf['patch_admin_custom_css'] = true;
 
157
  // auto, JIS, UTF-8
158
  $this->conf['mail_mode'] = 'JIS';
159
 
3
  * WP Multibyte Patch Japanese Locale Extension
4
  *
5
  * @package WP_Multibyte_Patch
6
+ * @version 1.6.1
7
  * @author Seisuke Kuraishi <210pura@gmail.com>
8
  * @copyright Copyright (c) 2012 Seisuke Kuraishi, Tinybit Inc.
9
  * @license http://opensource.org/licenses/gpl-2.0.php GPLv2
142
  }
143
 
144
  function admin_custom_css() {
145
+ wp_register_style('wpmp-admin-custom', plugin_dir_url(__FILE__) . 'admin.css', array(), false);
146
+ wp_enqueue_style('wpmp-admin-custom');
147
  }
148
 
149
  function __construct() {
155
  $this->conf['patch_incoming_pingback'] = true;
156
  $this->conf['patch_process_search_terms'] = true;
157
  $this->conf['patch_admin_custom_css'] = true;
158
+ $this->conf['patch_force_character_count'] = true;
159
  // auto, JIS, UTF-8
160
  $this->conf['mail_mode'] = 'JIS';
161
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: tenpura
3
  Tags: multibyte,i18n,wp-multibyte-patch,Japanese
4
  Requires at least: 3.4-RC2
5
  Tested up to: 3.4
6
- Stable tag: 1.6
7
 
8
  Multibyte functionality enhancement for the WordPress Japanese package.
9
 
3
  Tags: multibyte,i18n,wp-multibyte-patch,Japanese
4
  Requires at least: 3.4-RC2
5
  Tested up to: 3.4
6
+ Stable tag: 1.6.1
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: 1.6
6
  Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
7
  Author: Seisuke Kuraishi
8
  Author URI: http://tinybit.co.jp/
@@ -15,7 +15,7 @@ Domain Path: /languages
15
  * Multibyte functionality enhancement for the WordPress Japanese package.
16
  *
17
  * @package WP_Multibyte_Patch
18
- * @version 1.6
19
  * @author Seisuke Kuraishi <210pura@gmail.com>
20
  * @copyright Copyright (c) 2012 Seisuke Kuraishi, Tinybit Inc.
21
  * @license http://opensource.org/licenses/gpl-2.0.php GPLv2
@@ -338,6 +338,12 @@ class multibyte_patch {
338
  return preg_match_all("/./us", $str, $match);
339
  }
340
 
 
 
 
 
 
 
341
  function filters() {
342
  // add filter
343
  add_filter('preprocess_comment', array(&$this, 'preprocess_comment'), 99);
@@ -361,9 +367,6 @@ class multibyte_patch {
361
  add_filter('bp_get_activity_content_body', array(&$this, 'bp_get_activity_content_body'), 99);
362
  }
363
 
364
- if(false !== $this->conf['patch_force_character_count'])
365
- add_filter('gettext_with_context', array(&$this, 'force_character_count'), 10, 3);
366
-
367
  // add action
368
  add_action('wp', array(&$this, 'query_based_settings'));
369
 
@@ -373,17 +376,21 @@ class multibyte_patch {
373
  if(method_exists($this, 'wp_mail') && false !== $this->conf['patch_wp_mail'])
374
  add_action('phpmailer_init', array(&$this, 'wp_mail'));
375
 
376
- if(method_exists($this, 'admin_custom_css') && false !== $this->conf['patch_admin_custom_css'])
377
- add_action('admin_head' , array(&$this, 'admin_custom_css'), 99);
 
 
378
 
379
  if(false !== $this->conf['patch_wplink_js'])
380
- add_action('wp_default_scripts' , array(&$this, 'wplink_js'), 9);
381
 
382
  if(false !== $this->conf['patch_word_count_js'])
383
- add_action('wp_default_scripts' , array(&$this, 'word_count_js'), 9);
384
 
385
  if(false !== $this->conf['patch_dashboard_recent_drafts'])
386
- add_action('wp_dashboard_setup' , array(&$this, 'dashboard_recent_drafts'));
 
 
387
  }
388
 
389
  function mbfunctions_exist() {
2
  /*
3
  Plugin Name: WP Multibyte Patch
4
  Description: Multibyte functionality enhancement for the WordPress Japanese package.
5
+ Version: 1.6.1
6
  Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
7
  Author: Seisuke Kuraishi
8
  Author URI: http://tinybit.co.jp/
15
  * Multibyte functionality enhancement for the WordPress Japanese package.
16
  *
17
  * @package WP_Multibyte_Patch
18
+ * @version 1.6.1
19
  * @author Seisuke Kuraishi <210pura@gmail.com>
20
  * @copyright Copyright (c) 2012 Seisuke Kuraishi, Tinybit Inc.
21
  * @license http://opensource.org/licenses/gpl-2.0.php GPLv2
338
  return preg_match_all("/./us", $str, $match);
339
  }
340
 
341
+ function filters_after_setup_theme() {
342
+ // add filter
343
+ if(false !== $this->conf['patch_force_character_count'] && 'characters' != _x('words', 'word count: words or characters?'))
344
+ add_filter('gettext_with_context', array(&$this, 'force_character_count'), 10, 3);
345
+ }
346
+
347
  function filters() {
348
  // add filter
349
  add_filter('preprocess_comment', array(&$this, 'preprocess_comment'), 99);
367
  add_filter('bp_get_activity_content_body', array(&$this, 'bp_get_activity_content_body'), 99);
368
  }
369
 
 
 
 
370
  // add action
371
  add_action('wp', array(&$this, 'query_based_settings'));
372
 
376
  if(method_exists($this, 'wp_mail') && false !== $this->conf['patch_wp_mail'])
377
  add_action('phpmailer_init', array(&$this, 'wp_mail'));
378
 
379
+ if(method_exists($this, 'admin_custom_css') && false !== $this->conf['patch_admin_custom_css']) {
380
+ add_action('admin_enqueue_scripts', array(&$this, 'admin_custom_css'), 99);
381
+ add_action('customize_controls_enqueue_scripts', array(&$this, 'admin_custom_css'), 99);
382
+ }
383
 
384
  if(false !== $this->conf['patch_wplink_js'])
385
+ add_action('wp_default_scripts', array(&$this, 'wplink_js'), 9);
386
 
387
  if(false !== $this->conf['patch_word_count_js'])
388
+ add_action('wp_default_scripts', array(&$this, 'word_count_js'), 9);
389
 
390
  if(false !== $this->conf['patch_dashboard_recent_drafts'])
391
+ add_action('wp_dashboard_setup', array(&$this, 'dashboard_recent_drafts'));
392
+
393
+ add_action('after_setup_theme', array(&$this, 'filters_after_setup_theme'));
394
  }
395
 
396
  function mbfunctions_exist() {
wpmp-config-sample-ja.php CHANGED
@@ -85,7 +85,7 @@ $wpmp_conf['patch_process_search_terms'] = true;
85
  $wpmp_conf['patch_admin_custom_css'] = true;
86
  $wpmp_conf['patch_wplink_js'] = true;
87
  $wpmp_conf['patch_word_count_js'] = true;
88
- $wpmp_conf['patch_force_character_count'] = false;
89
  $wpmp_conf['patch_sanitize_file_name'] = true;
90
  $wpmp_conf['patch_bp_create_excerpt'] = false;
91
 
85
  $wpmp_conf['patch_admin_custom_css'] = true;
86
  $wpmp_conf['patch_wplink_js'] = true;
87
  $wpmp_conf['patch_word_count_js'] = true;
88
+ $wpmp_conf['patch_force_character_count'] = true;
89
  $wpmp_conf['patch_sanitize_file_name'] = true;
90
  $wpmp_conf['patch_bp_create_excerpt'] = false;
91