Version Description
Download this release
Release Info
Developer | tenpura |
Plugin | WP Multibyte Patch |
Version | 2.8.1 |
Comparing to | |
See all releases |
Code changes from version 2.8 to 2.8.1
- ext/ja/class.php +1 -1
- readme.txt +2 -2
- wp-multibyte-patch.php +15 -3
- wpmp-config-sample-ja.php +1 -0
ext/ja/class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* WP Multibyte Patch Japanese Locale Extension
|
4 |
*
|
5 |
* @package WP_Multibyte_Patch
|
6 |
-
* @version 2.8
|
7 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
8 |
* @copyright Copyright (c) 2016 Seisuke Kuraishi, Tinybit Inc.
|
9 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
3 |
* WP Multibyte Patch Japanese Locale Extension
|
4 |
*
|
5 |
* @package WP_Multibyte_Patch
|
6 |
+
* @version 2.8.1
|
7 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
8 |
* @copyright Copyright (c) 2016 Seisuke Kuraishi, Tinybit Inc.
|
9 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
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: 4.
|
6 |
-
Stable tag: 2.8
|
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: 4.9
|
6 |
+
Stable tag: 2.8.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: 2.8
|
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 2.8
|
19 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
20 |
* @copyright Copyright (c) 2016 Seisuke Kuraishi, Tinybit Inc.
|
21 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
@@ -49,6 +49,7 @@ class multibyte_patch {
|
|
49 |
'patch_force_twentyfourteen_google_fonts_off' => false,
|
50 |
'patch_force_twentyfifteen_google_fonts_off' => false,
|
51 |
'patch_force_twentysixteen_google_fonts_off' => false,
|
|
|
52 |
'patch_sanitize_file_name' => true,
|
53 |
'patch_sanitize_feed_xml_text' => false,
|
54 |
'patch_bp_create_excerpt' => false,
|
@@ -149,7 +150,7 @@ class multibyte_patch {
|
|
149 |
$remote_source = preg_replace( "/<\/*(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/i", "\n\n", $remote_source );
|
150 |
|
151 |
preg_match( '|<title>([^<]*?)</title>|is', $remote_source, $matchtitle );
|
152 |
-
$title = $matchtitle[1];
|
153 |
|
154 |
preg_match( "/<meta[^<>]+charset=\"*([a-zA-Z0-9\-_]+)\"*[^<>]*>/i", $remote_source, $matches );
|
155 |
$charset = isset( $matches[1] ) ? $matches[1] : '';
|
@@ -314,6 +315,10 @@ class multibyte_patch {
|
|
314 |
wp_dequeue_style( 'twentysixteen-fonts' );
|
315 |
}
|
316 |
|
|
|
|
|
|
|
|
|
317 |
public function remove_editor_style( $file = '' ) {
|
318 |
global $editor_styles;
|
319 |
|
@@ -410,6 +415,13 @@ class multibyte_patch {
|
|
410 |
if ( function_exists( 'twentysixteen_fonts_url' ) )
|
411 |
$this->remove_editor_style( twentysixteen_fonts_url() );
|
412 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
}
|
414 |
|
415 |
public function filters() {
|
2 |
/*
|
3 |
Plugin Name: WP Multibyte Patch
|
4 |
Description: Multibyte functionality enhancement for the WordPress Japanese package.
|
5 |
+
Version: 2.8.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 2.8.1
|
19 |
* @author Seisuke Kuraishi <210pura@gmail.com>
|
20 |
* @copyright Copyright (c) 2016 Seisuke Kuraishi, Tinybit Inc.
|
21 |
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
|
49 |
'patch_force_twentyfourteen_google_fonts_off' => false,
|
50 |
'patch_force_twentyfifteen_google_fonts_off' => false,
|
51 |
'patch_force_twentysixteen_google_fonts_off' => false,
|
52 |
+
'patch_force_twentyseventeen_google_fonts_off' => false,
|
53 |
'patch_sanitize_file_name' => true,
|
54 |
'patch_sanitize_feed_xml_text' => false,
|
55 |
'patch_bp_create_excerpt' => false,
|
150 |
$remote_source = preg_replace( "/<\/*(h1|h2|h3|h4|h5|h6|p|th|td|li|dt|dd|pre|caption|input|textarea|button|body)[^>]*>/i", "\n\n", $remote_source );
|
151 |
|
152 |
preg_match( '|<title>([^<]*?)</title>|is', $remote_source, $matchtitle );
|
153 |
+
$title = isset( $matchtitle[1] ) ? $matchtitle[1] : '';
|
154 |
|
155 |
preg_match( "/<meta[^<>]+charset=\"*([a-zA-Z0-9\-_]+)\"*[^<>]*>/i", $remote_source, $matches );
|
156 |
$charset = isset( $matches[1] ) ? $matches[1] : '';
|
315 |
wp_dequeue_style( 'twentysixteen-fonts' );
|
316 |
}
|
317 |
|
318 |
+
public function force_twentyseventeen_google_fonts_off() {
|
319 |
+
wp_dequeue_style( 'twentyseventeen-fonts' );
|
320 |
+
}
|
321 |
+
|
322 |
public function remove_editor_style( $file = '' ) {
|
323 |
global $editor_styles;
|
324 |
|
415 |
if ( function_exists( 'twentysixteen_fonts_url' ) )
|
416 |
$this->remove_editor_style( twentysixteen_fonts_url() );
|
417 |
}
|
418 |
+
|
419 |
+
if ( false !== $this->conf['patch_force_twentyseventeen_google_fonts_off'] && 'twentyseventeen' == get_template() ) {
|
420 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'force_twentyseventeen_google_fonts_off' ), 99 );
|
421 |
+
|
422 |
+
if ( function_exists( 'twentyseventeen_fonts_url' ) )
|
423 |
+
$this->remove_editor_style( twentyseventeen_fonts_url() );
|
424 |
+
}
|
425 |
}
|
426 |
|
427 |
public function filters() {
|
wpmp-config-sample-ja.php
CHANGED
@@ -100,6 +100,7 @@ $wpmp_conf['patch_force_twentythirteen_google_fonts_off'] = false;
|
|
100 |
$wpmp_conf['patch_force_twentyfourteen_google_fonts_off'] = false;
|
101 |
$wpmp_conf['patch_force_twentyfifteen_google_fonts_off'] = false;
|
102 |
$wpmp_conf['patch_force_twentysixteen_google_fonts_off'] = false;
|
|
|
103 |
$wpmp_conf['patch_sanitize_file_name'] = true;
|
104 |
$wpmp_conf['patch_sanitize_feed_xml_text'] = false;
|
105 |
$wpmp_conf['patch_bp_create_excerpt'] = false;
|
100 |
$wpmp_conf['patch_force_twentyfourteen_google_fonts_off'] = false;
|
101 |
$wpmp_conf['patch_force_twentyfifteen_google_fonts_off'] = false;
|
102 |
$wpmp_conf['patch_force_twentysixteen_google_fonts_off'] = false;
|
103 |
+
$wpmp_conf['patch_force_twentyseventeen_google_fonts_off'] = false;
|
104 |
$wpmp_conf['patch_sanitize_file_name'] = true;
|
105 |
$wpmp_conf['patch_sanitize_feed_xml_text'] = false;
|
106 |
$wpmp_conf['patch_bp_create_excerpt'] = false;
|