Version Description
Download this release
Release Info
Developer | tenpura |
Plugin | WP Multibyte Patch |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4.2 to 1.5
- ext/ja/class.php +3 -3
- ext/ja/config-sample.php +0 -9
- readme.txt +1 -1
- wp-multibyte-patch.php +25 -20
- wpmp-config-sample.php +8 -1
ext/ja/class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
|
4 |
/*
|
5 |
WPLANG: ja
|
6 |
-
Plugin Version: 1.
|
7 |
Description: Japanese Locale Extension.
|
8 |
Author: Kuraishi (tenpura)
|
9 |
Extension URI: http://eastcoder.com/code/wp-multibyte-patch/
|
@@ -154,8 +154,8 @@ class multibyte_patch_ext extends multibyte_patch {
|
|
154 |
}
|
155 |
|
156 |
function __construct() {
|
157 |
-
// auto,
|
158 |
-
$this->conf['mail_mode'] = '
|
159 |
// Treats any post as a multibyte text.
|
160 |
$this->conf['ascii_threshold'] = 100;
|
161 |
$this->debug_suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
|
3 |
|
4 |
/*
|
5 |
WPLANG: ja
|
6 |
+
Plugin Version: 1.5
|
7 |
Description: Japanese Locale Extension.
|
8 |
Author: Kuraishi (tenpura)
|
9 |
Extension URI: http://eastcoder.com/code/wp-multibyte-patch/
|
154 |
}
|
155 |
|
156 |
function __construct() {
|
157 |
+
// auto, JIS, UTF-8
|
158 |
+
$this->conf['mail_mode'] = 'JIS';
|
159 |
// Treats any post as a multibyte text.
|
160 |
$this->conf['ascii_threshold'] = 100;
|
161 |
$this->debug_suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
|
ext/ja/config-sample.php
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* WP Multibyte Patch extension config file */
|
3 |
-
|
4 |
-
// Sets the encoding for wp_mail().
|
5 |
-
// Available options are "JIS", "UTF-8" or "auto".
|
6 |
-
// "auto" picks "JIS" or "UTF-8" automatically.
|
7 |
-
$wpmp_conf['mail_mode'] = 'JIS';
|
8 |
-
|
9 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: tenpura
|
|
3 |
Tags: multibyte,i18n,wp-multibyte-patch,Japanese
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.2.1
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Multibyte functionality enhancement for the WordPress Japanese package.
|
9 |
|
3 |
Tags: multibyte,i18n,wp-multibyte-patch,Japanese
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.2.1
|
6 |
+
Stable tag: 1.5
|
7 |
|
8 |
Multibyte functionality enhancement for the WordPress Japanese package.
|
9 |
|
wp-multibyte-patch.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: WP Multibyte Patch
|
|
4 |
Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
|
5 |
Description: Enhances multibyte string I/O functionality of WordPress.
|
6 |
Author: Kuraishi (tenpura)
|
7 |
-
Version: 1.
|
8 |
Author URI: http://eastcoder.com/
|
9 |
Text Domain: wp-multibyte-patch
|
10 |
Domain Path: /languages
|
@@ -17,6 +17,8 @@ Domain Path: /languages
|
|
17 |
|
18 |
class multibyte_patch {
|
19 |
|
|
|
|
|
20 |
var $conf = array(
|
21 |
'excerpt_length' => 55,
|
22 |
'excerpt_mblength' => 110,
|
@@ -43,7 +45,7 @@ class multibyte_patch {
|
|
43 |
var $has_mbfunctions;
|
44 |
var $textdomain = 'wp-multibyte-patch';
|
45 |
var $lang_dir = 'languages';
|
46 |
-
var $required_version = '3.2
|
47 |
var $query_based_vars = array();
|
48 |
|
49 |
function guess_encoding($string, $encoding = '') {
|
@@ -395,9 +397,23 @@ class multibyte_patch {
|
|
395 |
}
|
396 |
}
|
397 |
|
398 |
-
function
|
399 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
$this->conf = array_merge($this->conf, $wpmp_conf);
|
|
|
|
|
|
|
|
|
401 |
|
402 |
$this->blog_encoding = get_option('blog_charset');
|
403 |
$this->has_mbfunctions = $this->mbfunctions_exist();
|
@@ -410,25 +426,14 @@ class multibyte_patch {
|
|
410 |
}
|
411 |
|
412 |
if(defined('WP_PLUGIN_URL')) {
|
413 |
-
global $
|
414 |
-
$wpmp_conf = array();
|
415 |
-
$wpmp_conf['base_dir'] = dirname(__FILE__);
|
416 |
|
417 |
-
if(file_exists(
|
418 |
-
require_once(
|
419 |
-
|
420 |
-
if(file_exists($wpmp_conf['base_dir'] . '/ext/' . get_locale() . '/class.php')) {
|
421 |
-
if(file_exists($wpmp_conf['base_dir'] . '/ext/' . get_locale() . '/config.php'))
|
422 |
-
require_once($wpmp_conf['base_dir'] . '/ext/' . get_locale() . '/config.php');
|
423 |
-
|
424 |
-
require_once($wpmp_conf['base_dir'] . '/ext/' . get_locale() . '/class.php');
|
425 |
$wpmp = new multibyte_patch_ext();
|
426 |
}
|
427 |
-
elseif(file_exists(
|
428 |
-
|
429 |
-
require_once($wpmp_conf['base_dir'] . '/ext/default/config.php');
|
430 |
-
|
431 |
-
require_once($wpmp_conf['base_dir'] . '/ext/default/class.php');
|
432 |
$wpmp = new multibyte_patch_ext();
|
433 |
}
|
434 |
else
|
4 |
Plugin URI: http://eastcoder.com/code/wp-multibyte-patch/
|
5 |
Description: Enhances multibyte string I/O functionality of WordPress.
|
6 |
Author: Kuraishi (tenpura)
|
7 |
+
Version: 1.5
|
8 |
Author URI: http://eastcoder.com/
|
9 |
Text Domain: wp-multibyte-patch
|
10 |
Domain Path: /languages
|
17 |
|
18 |
class multibyte_patch {
|
19 |
|
20 |
+
// Do not edit this section. Use wpmp-config.php instead.
|
21 |
+
|
22 |
var $conf = array(
|
23 |
'excerpt_length' => 55,
|
24 |
'excerpt_mblength' => 110,
|
45 |
var $has_mbfunctions;
|
46 |
var $textdomain = 'wp-multibyte-patch';
|
47 |
var $lang_dir = 'languages';
|
48 |
+
var $required_version = '3.2';
|
49 |
var $query_based_vars = array();
|
50 |
|
51 |
function guess_encoding($string, $encoding = '') {
|
397 |
}
|
398 |
}
|
399 |
|
400 |
+
function load_conf() {
|
401 |
+
$wpmp_conf = array();
|
402 |
+
|
403 |
+
if(file_exists(WP_CONTENT_DIR . '/wpmp-config.php'))
|
404 |
+
require_once(WP_CONTENT_DIR . '/wpmp-config.php');
|
405 |
+
|
406 |
+
if(is_multisite()) {
|
407 |
+
$blog_id = get_current_blog_id();
|
408 |
+
if(file_exists(WP_CONTENT_DIR . '/wpmp-config-blog-' . $blog_id . '.php'))
|
409 |
+
require_once(WP_CONTENT_DIR . '/wpmp-config-blog-' . $blog_id . '.php');
|
410 |
+
}
|
411 |
+
|
412 |
$this->conf = array_merge($this->conf, $wpmp_conf);
|
413 |
+
}
|
414 |
+
|
415 |
+
function __construct() {
|
416 |
+
$this->load_conf();
|
417 |
|
418 |
$this->blog_encoding = get_option('blog_charset');
|
419 |
$this->has_mbfunctions = $this->mbfunctions_exist();
|
426 |
}
|
427 |
|
428 |
if(defined('WP_PLUGIN_URL')) {
|
429 |
+
global $wpmp;
|
|
|
|
|
430 |
|
431 |
+
if(file_exists(dirname(__FILE__) . '/ext/' . get_locale() . '/class.php')) {
|
432 |
+
require_once(dirname(__FILE__) . '/ext/' . get_locale() . '/class.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
$wpmp = new multibyte_patch_ext();
|
434 |
}
|
435 |
+
elseif(file_exists(dirname(__FILE__) . '/ext/default/class.php')) {
|
436 |
+
require_once(dirname(__FILE__) . '/ext/default/class.php');
|
|
|
|
|
|
|
437 |
$wpmp = new multibyte_patch_ext();
|
438 |
}
|
439 |
else
|
wpmp-config-sample.php
CHANGED
@@ -24,4 +24,11 @@ $wpmp_conf['patch_wplink_js'] = true;
|
|
24 |
$wpmp_conf['patch_word_count_js'] = true;
|
25 |
$wpmp_conf['patch_sanitize_file_name'] = true;
|
26 |
$wpmp_conf['patch_bp_create_excerpt'] = false;
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
$wpmp_conf['patch_word_count_js'] = true;
|
25 |
$wpmp_conf['patch_sanitize_file_name'] = true;
|
26 |
$wpmp_conf['patch_bp_create_excerpt'] = false;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Set the encoding for wp_mail().
|
30 |
+
* Available options are "JIS", "UTF-8" and "auto".
|
31 |
+
* "auto" picks "JIS" or "UTF-8" automatically.
|
32 |
+
* This option is specific to Japanese.
|
33 |
+
*/
|
34 |
+
$wpmp_conf['mail_mode'] = 'JIS';
|