Skip to content

Commit

Permalink
Update from vk-blocks-pro
Browse files Browse the repository at this point in the history
  • Loading branch information
vektorinc committed Nov 13, 2024
1 parent 03b7ede commit bc67126
Show file tree
Hide file tree
Showing 60 changed files with 52 additions and 3,127 deletions.
24 changes: 21 additions & 3 deletions inc/vk-blocks/vk-blocks-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,30 @@ function vk_blocks_active() {
return true;
}

// 翻訳を実行
add_action(
'plugins_loaded',
function () {
// Load language files.
$path = dirname( plugin_basename( __FILE__ ) ) . '/languages';
load_plugin_textdomain( 'vk-blocks-pro', false, $path );
// サイトのロケールを取得
$locale = determine_locale();
// 翻訳ファイルのパスを指定
$path = plugin_dir_path( __FILE__ ) . 'languages';

// 日本語の設定のみ翻訳ファイルを読み込み
if ( strpos( $locale, 'ja' ) === 0 ) {
// PHPファイルの翻訳読み込み
load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' );

// JavaScriptファイルの翻訳設定
add_action(
'wp_enqueue_scripts',
function () use ( $path ) {
// スクリプト登録後に翻訳設定
wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path );
wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path );
}
);
}
}
);

Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: vektor-inc,kurudrive,naoki0h,nc30,una9,kaorock72,rickaddison7634,mimitips,mthaichi,shimotomoki,sysbird,chiakikouno,doshimaf,mtdkei
Donate link:
Tags: Gutenberg,FAQ,alert
Requires at least: 6.3
Tested up to: 6.6
Requires at least: 6.4
Tested up to: 6.7
Stable tag: 1.90.1.1
Requires PHP: 7.4
License: GPLv2 or later
Expand Down Expand Up @@ -106,6 +106,10 @@ e.g.

== Changelog ==

= 1.91.0 =
[ Specification change ] Adjusted translation file loading to comply with changes in WordPress 6.7.
[ Bug fix ][ Table of Contents (Pro) ] Fixed "CLOSE" label not appearing after clicking the "OPEN" button when the initial state is set to "CLOSE".

= 1.90.1 =
[ Bug fix ][ Cover ] Fixed inline styles not being retained when adding a link.

Expand Down
10 changes: 0 additions & 10 deletions src/blocks/alert/deprecated/0.0.0/save.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/blocks/alert/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { save as save1_79_0, migrate as migrate1_79_0 } from './1.79.0/save';
import save000 from './0.0.0/save';

const blockAttributes = {
style: {
Expand All @@ -19,9 +18,5 @@ const deprecated = [
migrate: migrate1_79_0,
save: save1_79_0,
},
{
attributes: blockAttributes,
save: save000,
},
];
export default deprecated;
20 changes: 0 additions & 20 deletions src/blocks/faq/deprecated/0.0.0/save.js

This file was deleted.

20 changes: 0 additions & 20 deletions src/blocks/faq/deprecated/0.0.1/save.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/blocks/faq/deprecated/0.0.2/save.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/blocks/faq/deprecated/0.58.6/save.js

This file was deleted.

24 changes: 0 additions & 24 deletions src/blocks/faq/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import save000 from './0.0.0/save';
import save001 from './0.0.1/save';
import save002 from './0.0.2/save';
import save0_58_6 from './0.58.6/save';
import save1_76_2 from './1.76.2/save';

const blockAttributes = {
Expand All @@ -18,26 +14,6 @@ const blockAttributes = {
};

const deprecated = [
{
attributes: blockAttributes,
save: save000,
},
{
attributes: blockAttributes,
save: save001,
},
{
attributes: {
...blockAttributes,
},
save: save002,
},
{
attributes: {
...blockAttributes,
},
save: save0_58_6,
},
{
attributes: {
...blockAttributes,
Expand Down
9 changes: 0 additions & 9 deletions src/blocks/faq2-a/deprecated/0.58.7/save.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/blocks/faq2-a/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import save000 from './0.58.7/save';
import save1_76_2 from './1.76.2/save';

const blockAttributes = {};
Expand All @@ -8,9 +7,5 @@ const deprecated = [
attributes: blockAttributes,
save: save1_76_2,
},
{
attributes: blockAttributes,
save: save000,
},
];
export default deprecated;
9 changes: 0 additions & 9 deletions src/blocks/faq2-q/deprecated/0.58.7/save.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/blocks/faq2-q/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import save000 from './0.58.7/save';
import save1_76_2 from './1.76.2/save';

const blockAttributes = {};

const deprecated = [
{
attributes: blockAttributes,
save: save000,
},
{
attributes: blockAttributes,
save: save1_76_2,
Expand Down
9 changes: 0 additions & 9 deletions src/blocks/faq2/deprecated/0.0.0/save.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/blocks/faq2/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import save000 from './0.0.0/save';
import save1_3_9 from './1.3.9/save';
import save1_76_2 from './1.76.2/save';
const blockAttributes = {
Expand All @@ -20,10 +19,6 @@ const deprecated = [
{
attributes: blockAttributes,
save: save1_3_9,
},
{
attributes: blockAttributes,
save: save000,
}
];
export default deprecated;
31 changes: 0 additions & 31 deletions src/blocks/flow/deprecated/0.0.0/save.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/blocks/flow/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import save000 from './0.0.0/save';
import save1_8_0 from './1.8.0/save';


Expand Down Expand Up @@ -28,9 +27,5 @@ const deprecated = [
attributes: blockAttributes,
save: save1_8_0,
},
{
attributes: blockAttributes,
save: save000,
},
];
export default deprecated;
Loading

0 comments on commit bc67126

Please sign in to comment.