Version Description
[ Bug fix ] Cope with not allow mb_convert_encoding() server
Download this release
Release Info
Developer | vektor-inc |
Plugin | VK Block Patterns |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- patterns-data/class-register-patterns-from-json.php +12 -6
- readme.txt +4 -1
- vk-block-patterns.php +2 -1
patterns-data/class-register-patterns-from-json.php
CHANGED
@@ -54,8 +54,10 @@ class VK_RegisterPatternsFromJson {
|
|
54 |
|
55 |
if ( file_exists( $category_json ) ) {
|
56 |
$json = file_get_contents( $category_json );
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
foreach ( $obj as $key => $val ) {
|
60 |
// Block Category.
|
61 |
register_block_pattern_category(
|
@@ -70,8 +72,10 @@ class VK_RegisterPatternsFromJson {
|
|
70 |
$language_json = $json_dir_path . 'term-language.json';
|
71 |
|
72 |
if ( file_exists( $language_json ) ) {
|
73 |
-
$json
|
74 |
-
|
|
|
|
|
75 |
$obj = json_decode( $json, true );
|
76 |
$languages = array();
|
77 |
foreach ( $obj as $key => $val ) {
|
@@ -107,8 +111,10 @@ class VK_RegisterPatternsFromJson {
|
|
107 |
|
108 |
if ( file_exists( $jsonUrl ) ) {
|
109 |
$json = file_get_contents( $jsonUrl );
|
110 |
-
|
111 |
-
|
|
|
|
|
112 |
|
113 |
$image_dir_path = $json_dir_path . 'images/';
|
114 |
$image_dir_uri = str_replace( wp_normalize_path( ABSPATH ), site_url() . '/', $image_dir_path );
|
54 |
|
55 |
if ( file_exists( $category_json ) ) {
|
56 |
$json = file_get_contents( $category_json );
|
57 |
+
if ( function_exists( 'mb_convert_encoding' ) ) {
|
58 |
+
$json = mb_convert_encoding( $json, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN' );
|
59 |
+
}
|
60 |
+
$obj = json_decode( $json, true );
|
61 |
foreach ( $obj as $key => $val ) {
|
62 |
// Block Category.
|
63 |
register_block_pattern_category(
|
72 |
$language_json = $json_dir_path . 'term-language.json';
|
73 |
|
74 |
if ( file_exists( $language_json ) ) {
|
75 |
+
$json = file_get_contents( $language_json );
|
76 |
+
if ( function_exists( 'mb_convert_encoding' ) ) {
|
77 |
+
$json = mb_convert_encoding( $json, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN' );
|
78 |
+
}
|
79 |
$obj = json_decode( $json, true );
|
80 |
$languages = array();
|
81 |
foreach ( $obj as $key => $val ) {
|
111 |
|
112 |
if ( file_exists( $jsonUrl ) ) {
|
113 |
$json = file_get_contents( $jsonUrl );
|
114 |
+
if ( function_exists( 'mb_convert_encoding' ) ) {
|
115 |
+
$json = mb_convert_encoding( $json, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN' );
|
116 |
+
}
|
117 |
+
$obj = json_decode( $json, true );
|
118 |
|
119 |
$image_dir_path = $json_dir_path . 'images/';
|
120 |
$image_dir_uri = str_replace( wp_normalize_path( ABSPATH ), site_url() . '/', $image_dir_path );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: Guternberg, Block Pattern
|
5 |
Requires at least: 5.8
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 1.6.
|
8 |
Requires PHP: 7.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -16,6 +16,9 @@ When you activate this plugin that create new custom post type for custom block
|
|
16 |
|
17 |
== Changelog ==
|
18 |
|
|
|
|
|
|
|
19 |
= 1.6.0 =
|
20 |
[ Add Pattern ][ Japanese ] Column Fit
|
21 |
[ Add Pattern ][ Japanese ] Column Menu
|
4 |
Tags: Guternberg, Block Pattern
|
5 |
Requires at least: 5.8
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 1.6.1
|
8 |
Requires PHP: 7.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
16 |
|
17 |
== Changelog ==
|
18 |
|
19 |
+
= 1.6.1 =
|
20 |
+
[ Bug fix ] Cope with not allow mb_convert_encoding() server
|
21 |
+
|
22 |
= 1.6.0 =
|
23 |
[ Add Pattern ][ Japanese ] Column Fit
|
24 |
[ Add Pattern ][ Japanese ] Column Menu
|
vk-block-patterns.php
CHANGED
@@ -3,7 +3,8 @@
|
|
3 |
* Plugin Name: VK Block Patterns
|
4 |
* Plugin URI: https://github.com/vektor-inc/vk-block-patterns
|
5 |
* Description: You can make and register your original custom block patterns.
|
6 |
-
* Version: 1.6.
|
|
|
7 |
* Author: Vektor,Inc.
|
8 |
* Author URI: https://vektor-inc.co.jp
|
9 |
* Text Domain: vk-block-patterns
|
3 |
* Plugin Name: VK Block Patterns
|
4 |
* Plugin URI: https://github.com/vektor-inc/vk-block-patterns
|
5 |
* Description: You can make and register your original custom block patterns.
|
6 |
+
* Version: 1.6.1
|
7 |
+
* Requires at least: 5.8
|
8 |
* Author: Vektor,Inc.
|
9 |
* Author URI: https://vektor-inc.co.jp
|
10 |
* Text Domain: vk-block-patterns
|