From 40d3f0c776014a38abd5ea2638b469597789ef0a Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:08:08 +0900 Subject: [PATCH 01/51] Fix initial display state and toggle functionality for TOC button text --- src/blocks/_pro/table-of-contents-new/view.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/view.js b/src/blocks/_pro/table-of-contents-new/view.js index d108d6838..239c454fe 100644 --- a/src/blocks/_pro/table-of-contents-new/view.js +++ b/src/blocks/_pro/table-of-contents-new/view.js @@ -7,16 +7,16 @@ document.addEventListener('DOMContentLoaded', () => { // 開/閉 切り替え (:before 疑似要素のアクセシビリティ問題に対応 #2087) document.querySelectorAll('#vk-tab-label').forEach((item) => { + const status = item.previousElementSibling; // チェックボックス + + // 初期状態の設定: チェックボックスの状態に基づいてテキストを設定 + item.textContent = status.checked ? 'CLOSE' : 'OPEN'; + item.addEventListener('click', function () { - // 直前にあるチェックボックスで判断する - const status = item.previousElementSibling; - if (status && status.type === 'checkbox') { - if (status.checked) { - item.textContent = 'CLOSE'; - } else { - item.textContent = 'OPEN'; - } - } + // チェックボックスの状態に応じてテキストを切り替え + setTimeout(() => { + item.textContent = status.checked ? 'CLOSE' : 'OPEN'; + }, 0); }); }); }); From ef7a950e68e1c596816aaf0ce4fbd86eb38224c5 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:40:20 +0900 Subject: [PATCH 02/51] Add is-open and is-close --- src/blocks/_pro/table-of-contents-new/view.js | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/view.js b/src/blocks/_pro/table-of-contents-new/view.js index 239c454fe..2c69fd2af 100644 --- a/src/blocks/_pro/table-of-contents-new/view.js +++ b/src/blocks/_pro/table-of-contents-new/view.js @@ -6,17 +6,30 @@ document.addEventListener('DOMContentLoaded', () => { }); // 開/閉 切り替え (:before 疑似要素のアクセシビリティ問題に対応 #2087) - document.querySelectorAll('#vk-tab-label').forEach((item) => { - const status = item.previousElementSibling; // チェックボックス - - // 初期状態の設定: チェックボックスの状態に基づいてテキストを設定 - item.textContent = status.checked ? 'CLOSE' : 'OPEN'; + document.querySelectorAll('#vk-tab-label').forEach((item) => { + const status = item.previousElementSibling; // チェックボックス + const initialStateOpen = status.getAttribute('data-initial-open') === 'open'; - item.addEventListener('click', function () { - // チェックボックスの状態に応じてテキストを切り替え - setTimeout(() => { - item.textContent = status.checked ? 'CLOSE' : 'OPEN'; - }, 0); - }); - }); + // 初期状態に基づいてボタンのテキストとチェックボックスの状態を設定 + if (initialStateOpen) { + item.textContent = 'CLOSE'; + status.checked = true; // チェックボックスをチェック状態に + item.closest('.tab').classList.add('is-open'); // 開いた状態のクラスを追加 + } else { + item.textContent = 'OPEN'; + status.checked = false; // チェックボックスを非チェック状態に + item.closest('.tab').classList.add('is-close'); // 閉じた状態のクラスを追加 + } + + // ボタンクリック時にクラスをトグル + item.addEventListener('click', function () { + if (status && status.type === 'checkbox') { + setTimeout(() => { + item.textContent = status.checked ? 'CLOSE' : 'OPEN'; + item.closest('.tab').classList.toggle('is-open', status.checked); + item.closest('.tab').classList.toggle('is-close', !status.checked); + }, 0); + } + }); + }); }); From 55af056725ca4806a01930fd99683d92b72e9c07 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:46:52 +0900 Subject: [PATCH 03/51] Fix: initialStateOpen setting --- src/blocks/_pro/table-of-contents-new/view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/table-of-contents-new/view.js b/src/blocks/_pro/table-of-contents-new/view.js index 2c69fd2af..acc9223cb 100644 --- a/src/blocks/_pro/table-of-contents-new/view.js +++ b/src/blocks/_pro/table-of-contents-new/view.js @@ -8,7 +8,8 @@ document.addEventListener('DOMContentLoaded', () => { // 開/閉 切り替え (:before 疑似要素のアクセシビリティ問題に対応 #2087) document.querySelectorAll('#vk-tab-label').forEach((item) => { const status = item.previousElementSibling; // チェックボックス - const initialStateOpen = status.getAttribute('data-initial-open') === 'open'; + const tabContent = item.closest('.tab').querySelector('.tab_content-open, .tab_content-close'); + const initialStateOpen = tabContent.classList.contains('tab_content-open'); // 初期状態に基づいてボタンのテキストとチェックボックスの状態を設定 if (initialStateOpen) { From 9e8c8cac6befe392fbcd318a19a1af5c02dc469d Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:47:17 +0900 Subject: [PATCH 04/51] Add is-open and is-close --- .../_pro/table-of-contents-new/style.scss | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index 5b9246bfd..0a045fb45 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -90,6 +90,19 @@ $toc-left-margin: 1rem; .tab { width: 100%; overflow: hidden; + // label + &.is-open { + .tab_content-open, .tab_content-close { + max-height: 100%; + padding: 1em; + } + } + &.is-close { + .tab_content-open, .tab_content-close { + max-height: 0; + padding: 0 1em; + } + } &_content-open { max-height: auto; padding: 1em; @@ -108,17 +121,6 @@ $toc-left-margin: 1rem; cursor: pointer; } } - // :checked - input:checked { - ~ .tab_content-open { - max-height: 0; - padding: 0 1em; - } - ~ .tab_content-close { - max-height: 100%; - padding: 1em; - } - } .vk_tableOfContents_list { margin-bottom: 0; // for lightning From b229a2630d2f944147d3916ac88fb0edd9e28b5a Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:47:38 +0900 Subject: [PATCH 05/51] lint --- src/blocks/_pro/table-of-contents-new/view.js | 59 +++++++++++-------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/view.js b/src/blocks/_pro/table-of-contents-new/view.js index acc9223cb..f2353f598 100644 --- a/src/blocks/_pro/table-of-contents-new/view.js +++ b/src/blocks/_pro/table-of-contents-new/view.js @@ -6,31 +6,40 @@ document.addEventListener('DOMContentLoaded', () => { }); // 開/閉 切り替え (:before 疑似要素のアクセシビリティ問題に対応 #2087) - document.querySelectorAll('#vk-tab-label').forEach((item) => { - const status = item.previousElementSibling; // チェックボックス - const tabContent = item.closest('.tab').querySelector('.tab_content-open, .tab_content-close'); - const initialStateOpen = tabContent.classList.contains('tab_content-open'); + document.querySelectorAll('#vk-tab-label').forEach((item) => { + const status = item.previousElementSibling; // チェックボックス + const tabContent = item + .closest('.tab') + .querySelector('.tab_content-open, .tab_content-close'); + const initialStateOpen = + tabContent.classList.contains('tab_content-open'); - // 初期状態に基づいてボタンのテキストとチェックボックスの状態を設定 - if (initialStateOpen) { - item.textContent = 'CLOSE'; - status.checked = true; // チェックボックスをチェック状態に - item.closest('.tab').classList.add('is-open'); // 開いた状態のクラスを追加 - } else { - item.textContent = 'OPEN'; - status.checked = false; // チェックボックスを非チェック状態に - item.closest('.tab').classList.add('is-close'); // 閉じた状態のクラスを追加 - } + // 初期状態に基づいてボタンのテキストとチェックボックスの状態を設定 + if (initialStateOpen) { + item.textContent = 'CLOSE'; + status.checked = true; // チェックボックスをチェック状態に + item.closest('.tab').classList.add('is-open'); // 開いた状態のクラスを追加 + } else { + item.textContent = 'OPEN'; + status.checked = false; // チェックボックスを非チェック状態に + item.closest('.tab').classList.add('is-close'); // 閉じた状態のクラスを追加 + } - // ボタンクリック時にクラスをトグル - item.addEventListener('click', function () { - if (status && status.type === 'checkbox') { - setTimeout(() => { - item.textContent = status.checked ? 'CLOSE' : 'OPEN'; - item.closest('.tab').classList.toggle('is-open', status.checked); - item.closest('.tab').classList.toggle('is-close', !status.checked); - }, 0); - } - }); - }); + // ボタンクリック時にクラスをトグル + item.addEventListener('click', function () { + if (status && status.type === 'checkbox') { + setTimeout(() => { + item.textContent = status.checked ? 'CLOSE' : 'OPEN'; + item.closest('.tab').classList.toggle( + 'is-open', + status.checked + ); + item.closest('.tab').classList.toggle( + 'is-close', + !status.checked + ); + }, 0); + } + }); + }); }); From d7008c7dc79b48579ccd99ea27653e18f96a7db6 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:52:54 +0900 Subject: [PATCH 06/51] Add editor css --- .../_pro/table-of-contents-new/style.scss | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index 0a045fb45..fb772d837 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -90,19 +90,6 @@ $toc-left-margin: 1rem; .tab { width: 100%; overflow: hidden; - // label - &.is-open { - .tab_content-open, .tab_content-close { - max-height: 100%; - padding: 1em; - } - } - &.is-close { - .tab_content-open, .tab_content-close { - max-height: 0; - padding: 0 1em; - } - } &_content-open { max-height: auto; padding: 1em; @@ -151,3 +138,20 @@ $toc-left-margin: 1rem; } } } + +/*-------------------------------------------*/ +/* 編集画面 +/*-------------------------------------------*/ +.editor-styles-wrapper { + // :checked + input:checked { + ~ .tab_content-open { + max-height: 0; + padding: 0 1em; + } + ~ .tab_content-close { + max-height: 100%; + padding: 1em; + } + } +} From 11f07384f858f4ea014166cf3ac29c826d29514c Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:56:32 +0900 Subject: [PATCH 07/51] Add is-open and is-close --- src/blocks/_pro/table-of-contents-new/style.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index fb772d837..a418ce93e 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -90,6 +90,19 @@ $toc-left-margin: 1rem; .tab { width: 100%; overflow: hidden; + // label + &.is-open { + .tab_content-open, .tab_content-close { + max-height: 100%; + padding: 1em; + } + } + &.is-close { + .tab_content-open, .tab_content-close { + max-height: 0; + padding: 0 1em; + } + } &_content-open { max-height: auto; padding: 1em; From 7e93f21c7a051513538ba5ee1a1e28b51520e56d Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 09:59:00 +0900 Subject: [PATCH 08/51] Delete unnesecary commentout --- src/blocks/_pro/table-of-contents-new/view.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/view.js b/src/blocks/_pro/table-of-contents-new/view.js index f2353f598..eb4815345 100644 --- a/src/blocks/_pro/table-of-contents-new/view.js +++ b/src/blocks/_pro/table-of-contents-new/view.js @@ -17,12 +17,12 @@ document.addEventListener('DOMContentLoaded', () => { // 初期状態に基づいてボタンのテキストとチェックボックスの状態を設定 if (initialStateOpen) { item.textContent = 'CLOSE'; - status.checked = true; // チェックボックスをチェック状態に - item.closest('.tab').classList.add('is-open'); // 開いた状態のクラスを追加 + status.checked = true; + item.closest('.tab').classList.add('is-open'); } else { item.textContent = 'OPEN'; - status.checked = false; // チェックボックスを非チェック状態に - item.closest('.tab').classList.add('is-close'); // 閉じた状態のクラスを追加 + status.checked = false; + item.closest('.tab').classList.add('is-close'); } // ボタンクリック時にクラスをトグル From f3e1d27c2228de9263f1a78a8d67c29f4ae3aab3 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 10:12:09 +0900 Subject: [PATCH 09/51] refactoring --- .../_pro/table-of-contents-new/style.scss | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index a418ce93e..03c5b41b6 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -90,36 +90,37 @@ $toc-left-margin: 1rem; .tab { width: 100%; overflow: hidden; - // label - &.is-open { - .tab_content-open, .tab_content-close { - max-height: 100%; - padding: 1em; - } - } - &.is-close { - .tab_content-open, .tab_content-close { - max-height: 0; - padding: 0 1em; - } - } - &_content-open { - max-height: auto; + &_content-open { + max-height: auto; + padding: 1em; + transition: all 0.35s; + } + &_content-close { + max-height: 0; + padding: 0 1em; + transition: all 0.35s; + } + &-close { + display: flex; + justify-content: flex-end; + padding: 1em; + font-size: 0.75em; + cursor: pointer; + } + + // label + &.is-open { + .tab_content-open, .tab_content-close { + max-height: 100%; padding: 1em; - transition: all 0.35s; } - &_content-close { + } + &.is-close { + .tab_content-open, .tab_content-close { max-height: 0; padding: 0 1em; - transition: all 0.35s; - } - &-close { - display: flex; - justify-content: flex-end; - padding: 1em; - font-size: 0.75em; - cursor: pointer; } + } } .vk_tableOfContents_list { From 8353975c8a7a309e36d5a3a8c0e14ca426f0c627 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 10:25:26 +0900 Subject: [PATCH 10/51] Fix: label --- .../_pro/table-of-contents-new/style.scss | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index 03c5b41b6..0923de4f8 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -91,7 +91,7 @@ $toc-left-margin: 1rem; width: 100%; overflow: hidden; &_content-open { - max-height: auto; + max-height: 100%; padding: 1em; transition: all 0.35s; } @@ -109,14 +109,26 @@ $toc-left-margin: 1rem; } // label - &.is-open { - .tab_content-open, .tab_content-close { + input:checked~.button_status-open { + ~ .tab_content-open { + max-height: 0; + padding: 0 1em; + } + } + .button_status-open { + ~ .tab_content-open { + max-height: 100%; + padding: 1em; + } + } + input:checked~.button_status-close { + ~ .tab_content-close { max-height: 100%; padding: 1em; } } - &.is-close { - .tab_content-open, .tab_content-close { + .button_status-close { + ~ .tab_content-close { max-height: 0; padding: 0 1em; } From ca49248eaf542e0e8af26cf895a0b576c9644adb Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 10:30:26 +0900 Subject: [PATCH 11/51] Refactor: label --- .../_pro/table-of-contents-new/style.scss | 59 +++++++------------ 1 file changed, 21 insertions(+), 38 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index 0923de4f8..ab8c26e79 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -107,31 +107,31 @@ $toc-left-margin: 1rem; font-size: 0.75em; cursor: pointer; } + } - // label - input:checked~.button_status-open { - ~ .tab_content-open { - max-height: 0; - padding: 0 1em; - } + // label + input:checked~.button_status-open { + ~ .tab_content-open { + max-height: 100%; + padding: 1em; } - .button_status-open { - ~ .tab_content-open { - max-height: 100%; - padding: 1em; - } + } + .button_status-open { + ~ .tab_content-open { + max-height: 0; + padding: 0 1em; } - input:checked~.button_status-close { - ~ .tab_content-close { - max-height: 100%; - padding: 1em; - } + } + input:checked~.button_status-close { + ~ .tab_content-close { + max-height: 100%; + padding: 1em; } - .button_status-close { - ~ .tab_content-close { - max-height: 0; - padding: 0 1em; - } + } + .button_status-close { + ~ .tab_content-close { + max-height: 0; + padding: 0 1em; } } @@ -164,20 +164,3 @@ $toc-left-margin: 1rem; } } } - -/*-------------------------------------------*/ -/* 編集画面 -/*-------------------------------------------*/ -.editor-styles-wrapper { - // :checked - input:checked { - ~ .tab_content-open { - max-height: 0; - padding: 0 1em; - } - ~ .tab_content-close { - max-height: 100%; - padding: 1em; - } - } -} From bee85e268710842ee3240ea85653f47c5a9a87ea Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 10:33:36 +0900 Subject: [PATCH 12/51] Delete is-open and is-close --- src/blocks/_pro/table-of-contents-new/view.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/view.js b/src/blocks/_pro/table-of-contents-new/view.js index eb4815345..5c3f9d851 100644 --- a/src/blocks/_pro/table-of-contents-new/view.js +++ b/src/blocks/_pro/table-of-contents-new/view.js @@ -18,26 +18,16 @@ document.addEventListener('DOMContentLoaded', () => { if (initialStateOpen) { item.textContent = 'CLOSE'; status.checked = true; - item.closest('.tab').classList.add('is-open'); } else { item.textContent = 'OPEN'; status.checked = false; - item.closest('.tab').classList.add('is-close'); } - // ボタンクリック時にクラスをトグル + // ボタンクリック時にテキストをトグル item.addEventListener('click', function () { if (status && status.type === 'checkbox') { setTimeout(() => { item.textContent = status.checked ? 'CLOSE' : 'OPEN'; - item.closest('.tab').classList.toggle( - 'is-open', - status.checked - ); - item.closest('.tab').classList.toggle( - 'is-close', - !status.checked - ); }, 0); } }); From e67ed0e84be56a6aadd9e90c8cab8990da04754d Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 10:51:12 +0900 Subject: [PATCH 13/51] Add changelog --- readme.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 8749d5790..9584a014a 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -=== VK Blocks === + === VK Blocks === Contributors: vektor-inc,kurudrive,naoki0h,nc30,una9,kaorock72,rickaddison7634,mimitips,mthaichi,shimotomoki,sysbird,chiakikouno,doshimaf,mtdkei Donate link: Tags: Gutenberg,FAQ,alert @@ -106,6 +106,7 @@ e.g. == Changelog == +[ Bug fix ][ Table of Contents (Pro) ] Fixed "CLOSE" label not appearing after clicking the "OPEN" button when the initial state is set to "CLOSE". [ Bug fix ] The split loading option is now supported for core/heading, core/image, and core/table styles for block editor. [ Bug fix ][ Cover ] Fixed an issue where, after setting a link in the Cover block and adding two unstyled headings inside it, the content positioning would not apply upon returning to the editing screen (editing screen only). [ Add function ][ Outer (Pro) ] Add book and pyramid in divider style. From 5e91a46cb740bfd5f73a4e4b54b3e6d8fc9707e6 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 11:05:29 +0900 Subject: [PATCH 14/51] Delete unnecessary blank --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 9584a014a..4b2971987 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ - === VK Blocks === +=== VK Blocks === Contributors: vektor-inc,kurudrive,naoki0h,nc30,una9,kaorock72,rickaddison7634,mimitips,mthaichi,shimotomoki,sysbird,chiakikouno,doshimaf,mtdkei Donate link: Tags: Gutenberg,FAQ,alert From ed080a063a8202bd73b72ef8cc48254e9c0149a2 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 11:06:42 +0900 Subject: [PATCH 15/51] Undo blank --- .../_pro/table-of-contents-new/style.scss | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index ab8c26e79..571d39f38 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -90,23 +90,23 @@ $toc-left-margin: 1rem; .tab { width: 100%; overflow: hidden; - &_content-open { - max-height: 100%; - padding: 1em; - transition: all 0.35s; - } - &_content-close { - max-height: 0; - padding: 0 1em; - transition: all 0.35s; - } - &-close { - display: flex; - justify-content: flex-end; - padding: 1em; - font-size: 0.75em; - cursor: pointer; - } + &_content-open { + max-height: 100%; + padding: 1em; + transition: all 0.35s; + } + &_content-close { + max-height: 0; + padding: 0 1em; + transition: all 0.35s; + } + &-close { + display: flex; + justify-content: flex-end; + padding: 1em; + font-size: 0.75em; + cursor: pointer; + } } // label From fca798f01a6f5787782fca1343fca2b377563be4 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 11:07:53 +0900 Subject: [PATCH 16/51] Undo commentout --- src/blocks/_pro/table-of-contents-new/style.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index 571d39f38..d34b86de2 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -108,8 +108,7 @@ $toc-left-margin: 1rem; cursor: pointer; } } - - // label + // :checked input:checked~.button_status-open { ~ .tab_content-open { max-height: 100%; From 37380b1b7331f07adb621c1fb3fc9aa1b972224e Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 16:59:11 +0900 Subject: [PATCH 17/51] Delete deprecated ver0 folders --- .../deprecated/hooks/0.49.7/index.js | 20 ------------------ .../deprecated/hooks/0.58.7/index.js | 3 --- .../_pro/animation/deprecated/hooks/index.js | 9 +------- .../animation/deprecated/save/0.49.1/save.js | 21 ------------------- .../animation/deprecated/save/0.58.7/save.js | 21 ------------------- .../_pro/animation/deprecated/save/index.js | 10 --------- 6 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 src/blocks/_pro/animation/deprecated/hooks/0.49.7/index.js delete mode 100644 src/blocks/_pro/animation/deprecated/hooks/0.58.7/index.js delete mode 100644 src/blocks/_pro/animation/deprecated/save/0.49.1/save.js delete mode 100644 src/blocks/_pro/animation/deprecated/save/0.58.7/save.js diff --git a/src/blocks/_pro/animation/deprecated/hooks/0.49.7/index.js b/src/blocks/_pro/animation/deprecated/hooks/0.49.7/index.js deleted file mode 100644 index 9752706c6..000000000 --- a/src/blocks/_pro/animation/deprecated/hooks/0.49.7/index.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function SliderHook0_49_7( {el, attributes}) { - return( -
- - {el} -
- ); -} diff --git a/src/blocks/_pro/animation/deprecated/hooks/0.58.7/index.js b/src/blocks/_pro/animation/deprecated/hooks/0.58.7/index.js deleted file mode 100644 index e6064d816..000000000 --- a/src/blocks/_pro/animation/deprecated/hooks/0.58.7/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function SliderHook0_58_7( {el, attributes}) { - return el; -} diff --git a/src/blocks/_pro/animation/deprecated/hooks/index.js b/src/blocks/_pro/animation/deprecated/hooks/index.js index b68328aa1..d6d1738de 100644 --- a/src/blocks/_pro/animation/deprecated/hooks/index.js +++ b/src/blocks/_pro/animation/deprecated/hooks/index.js @@ -1,8 +1 @@ -import SliderHook0_49_7 from './0.49.7' -import SliderHook0_58_7 from './0.58.7' -export default [ - SliderHook0_58_7, // for 1.46.0 - SliderHook0_58_7, // for 1.34.1 - SliderHook0_58_7, // for 0.58.7 - SliderHook0_49_7 -]; +export default []; diff --git a/src/blocks/_pro/animation/deprecated/save/0.49.1/save.js b/src/blocks/_pro/animation/deprecated/save/0.49.1/save.js deleted file mode 100644 index f9a049aa2..000000000 --- a/src/blocks/_pro/animation/deprecated/save/0.49.1/save.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Animation block - * - */ -import classNames from "classnames"; -import { InnerBlocks } from '@wordpress/block-editor'; - -export default function save ( props ) { - let { effect, speed, range, clientId } = props.attributes; - - //For recovering block. - effect = effect ? effect : "slide-up" - speed = speed ? speed : "fast" - range = range ? range : "short" - - return ( -
- -
- ); -} diff --git a/src/blocks/_pro/animation/deprecated/save/0.58.7/save.js b/src/blocks/_pro/animation/deprecated/save/0.58.7/save.js deleted file mode 100644 index 249438ede..000000000 --- a/src/blocks/_pro/animation/deprecated/save/0.58.7/save.js +++ /dev/null @@ -1,21 +0,0 @@ -import classNames from "classnames"; -import { InnerBlocks } from '@wordpress/block-editor'; - -export default function save( props ) { - let { effect, speed, range, clientId } = props.attributes; - - //For recovering block. - effect = effect ? effect : 'slide-up'; - speed = speed ? speed : 'fast'; - range = range ? range : 'short'; - - return ( -
- -
- ); -} diff --git a/src/blocks/_pro/animation/deprecated/save/index.js b/src/blocks/_pro/animation/deprecated/save/index.js index f160263fa..496f750c3 100644 --- a/src/blocks/_pro/animation/deprecated/save/index.js +++ b/src/blocks/_pro/animation/deprecated/save/index.js @@ -1,5 +1,3 @@ -import save0_49_1 from "./0.49.1/save" -import save0_58_7 from "./0.58.7/save" import save1_34_1 from "./1.34.1/save" import save1_46_0 from "./1.46.0/save" @@ -54,14 +52,6 @@ const deprecated = [ { attributes: blockAttributes2, save: save1_34_1 - }, - { - attributes: blockAttributes2, - save: save0_58_7 - }, - { - attributes: blockAttributes2, - save: save0_49_1 } ]; From 0fbb5dbb62d25ac2254afbc3aeb0cabf6dea8faa Mon Sep 17 00:00:00 2001 From: mtdkei Date: Thu, 7 Nov 2024 17:01:16 +0900 Subject: [PATCH 18/51] Delete deprecated ver0 files --- .../blocks/vk-blocks__animation__deprecated-0-60-1.html | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__animation__deprecated-0-60-1.html diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__animation__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__animation__deprecated-0-60-1.html deleted file mode 100644 index 6e58fd725..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__animation__deprecated-0-60-1.html +++ /dev/null @@ -1,6 +0,0 @@ - -
-

Hello World!

-
- - From a067f7c932f1221356f5981226380a8c6a1841c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Sun, 10 Nov 2024 10:35:51 +0900 Subject: [PATCH 19/51] Edit and delete deprecated files --- src/blocks/alert/deprecated/0.0.0/save.js | 10 ---------- src/blocks/alert/deprecated/index.js | 5 ----- .../blocks/vk-blocks__alert__deprecated-0-60-1.html | 3 --- 3 files changed, 18 deletions(-) delete mode 100644 src/blocks/alert/deprecated/0.0.0/save.js delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__alert__deprecated-0-60-1.html diff --git a/src/blocks/alert/deprecated/0.0.0/save.js b/src/blocks/alert/deprecated/0.0.0/save.js deleted file mode 100644 index 961cbf5d8..000000000 --- a/src/blocks/alert/deprecated/0.0.0/save.js +++ /dev/null @@ -1,10 +0,0 @@ -import { RichText } from '@wordpress/block-editor'; - -export default function save({ attributes }) { - const { style, content } = attributes; - return ( -
- -
- ); -} diff --git a/src/blocks/alert/deprecated/index.js b/src/blocks/alert/deprecated/index.js index 177fd9f90..4117a2283 100644 --- a/src/blocks/alert/deprecated/index.js +++ b/src/blocks/alert/deprecated/index.js @@ -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: { @@ -19,9 +18,5 @@ const deprecated = [ migrate: migrate1_79_0, save: save1_79_0, }, - { - attributes: blockAttributes, - save: save000, - }, ]; export default deprecated; diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__alert__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__alert__deprecated-0-60-1.html deleted file mode 100644 index 004cbc94d..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__alert__deprecated-0-60-1.html +++ /dev/null @@ -1,3 +0,0 @@ - -

Hello World!

- \ No newline at end of file From 8efbda270760ed8d7970284b493ba199b5330d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Sun, 10 Nov 2024 11:15:46 +0900 Subject: [PATCH 20/51] Edit and delete deprecated files --- src/blocks/faq/deprecated/0.0.0/save.js | 20 ---------------- src/blocks/faq/deprecated/0.0.1/save.js | 20 ---------------- src/blocks/faq/deprecated/0.0.2/save.js | 17 ------------- src/blocks/faq/deprecated/0.58.6/save.js | 17 ------------- src/blocks/faq/deprecated/index.js | 24 ------------------- .../vk-blocks__faq__deprecated-0-60-1.html | 5 ---- 6 files changed, 103 deletions(-) delete mode 100644 src/blocks/faq/deprecated/0.0.0/save.js delete mode 100644 src/blocks/faq/deprecated/0.0.1/save.js delete mode 100644 src/blocks/faq/deprecated/0.0.2/save.js delete mode 100644 src/blocks/faq/deprecated/0.58.6/save.js delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__faq__deprecated-0-60-1.html diff --git a/src/blocks/faq/deprecated/0.0.0/save.js b/src/blocks/faq/deprecated/0.0.0/save.js deleted file mode 100644 index 892ec2261..000000000 --- a/src/blocks/faq/deprecated/0.0.0/save.js +++ /dev/null @@ -1,20 +0,0 @@ -import { RichText } from '@wordpress/block-editor'; - -export default function save({ attributes, className }) { - const { heading, content } = attributes; - - return ( -
- - -
- ); -} diff --git a/src/blocks/faq/deprecated/0.0.1/save.js b/src/blocks/faq/deprecated/0.0.1/save.js deleted file mode 100644 index 4d5f3b158..000000000 --- a/src/blocks/faq/deprecated/0.0.1/save.js +++ /dev/null @@ -1,20 +0,0 @@ -import { RichText } from '@wordpress/block-editor'; - -export default function save({ attributes }) { - const { heading, content } = attributes; - - return ( -
- - -
- ); -} diff --git a/src/blocks/faq/deprecated/0.0.2/save.js b/src/blocks/faq/deprecated/0.0.2/save.js deleted file mode 100644 index 22ca87f96..000000000 --- a/src/blocks/faq/deprecated/0.0.2/save.js +++ /dev/null @@ -1,17 +0,0 @@ -import { RichText, InnerBlocks } from '@wordpress/block-editor'; - -export default function save({ attributes }) { - const { heading } = attributes; - return ( -
- -
- -
-
- ); -} diff --git a/src/blocks/faq/deprecated/0.58.6/save.js b/src/blocks/faq/deprecated/0.58.6/save.js deleted file mode 100644 index 20a4c424b..000000000 --- a/src/blocks/faq/deprecated/0.58.6/save.js +++ /dev/null @@ -1,17 +0,0 @@ -import { RichText, InnerBlocks } from '@wordpress/block-editor'; - -export default function save({ attributes }) { - const { heading } = attributes; - return ( -
- -
- -
-
- ); -} diff --git a/src/blocks/faq/deprecated/index.js b/src/blocks/faq/deprecated/index.js index 3502275dc..33be628fe 100644 --- a/src/blocks/faq/deprecated/index.js +++ b/src/blocks/faq/deprecated/index.js @@ -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 = { @@ -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, diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__faq__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__faq__deprecated-0-60-1.html deleted file mode 100644 index 6f46bd3d9..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__faq__deprecated-0-60-1.html +++ /dev/null @@ -1,5 +0,0 @@ - -
質問を入力
-

回答を入力してください。

-
- \ No newline at end of file From 45850a2e3a6b3ef46ed1b2fd159f9f7318e23484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Sun, 10 Nov 2024 11:53:15 +0900 Subject: [PATCH 21/51] Edit and delete deprecated files --- src/blocks/faq2-a/deprecated/0.58.7/save.js | 9 --------- src/blocks/faq2-a/deprecated/index.js | 5 ----- src/blocks/faq2-q/deprecated/0.58.7/save.js | 9 --------- src/blocks/faq2-q/deprecated/index.js | 5 ----- src/blocks/faq2/deprecated/0.0.0/save.js | 9 --------- src/blocks/faq2/deprecated/index.js | 5 ----- .../blocks/vk-blocks__faq2__deprecated-0-60-1.html | 13 ------------- 7 files changed, 55 deletions(-) delete mode 100644 src/blocks/faq2-a/deprecated/0.58.7/save.js delete mode 100644 src/blocks/faq2-q/deprecated/0.58.7/save.js delete mode 100644 src/blocks/faq2/deprecated/0.0.0/save.js delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__faq2__deprecated-0-60-1.html diff --git a/src/blocks/faq2-a/deprecated/0.58.7/save.js b/src/blocks/faq2-a/deprecated/0.58.7/save.js deleted file mode 100644 index 15b616d49..000000000 --- a/src/blocks/faq2-a/deprecated/0.58.7/save.js +++ /dev/null @@ -1,9 +0,0 @@ -import { InnerBlocks } from '@wordpress/block-editor'; - -export default function save() { - return ( -
- -
- ); -} diff --git a/src/blocks/faq2-a/deprecated/index.js b/src/blocks/faq2-a/deprecated/index.js index ebeb98acd..941ba0e2f 100644 --- a/src/blocks/faq2-a/deprecated/index.js +++ b/src/blocks/faq2-a/deprecated/index.js @@ -1,4 +1,3 @@ -import save000 from './0.58.7/save'; import save1_76_2 from './1.76.2/save'; const blockAttributes = {}; @@ -8,9 +7,5 @@ const deprecated = [ attributes: blockAttributes, save: save1_76_2, }, - { - attributes: blockAttributes, - save: save000, - }, ]; export default deprecated; diff --git a/src/blocks/faq2-q/deprecated/0.58.7/save.js b/src/blocks/faq2-q/deprecated/0.58.7/save.js deleted file mode 100644 index 92316bc8c..000000000 --- a/src/blocks/faq2-q/deprecated/0.58.7/save.js +++ /dev/null @@ -1,9 +0,0 @@ -import { InnerBlocks } from '@wordpress/block-editor'; - -export default function save() { - return ( -
- -
- ); -} diff --git a/src/blocks/faq2-q/deprecated/index.js b/src/blocks/faq2-q/deprecated/index.js index 3f13a9046..941ba0e2f 100644 --- a/src/blocks/faq2-q/deprecated/index.js +++ b/src/blocks/faq2-q/deprecated/index.js @@ -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, diff --git a/src/blocks/faq2/deprecated/0.0.0/save.js b/src/blocks/faq2/deprecated/0.0.0/save.js deleted file mode 100644 index bd5defd1c..000000000 --- a/src/blocks/faq2/deprecated/0.0.0/save.js +++ /dev/null @@ -1,9 +0,0 @@ -import { InnerBlocks } from '@wordpress/block-editor'; - -export default function save() { - return ( -
- -
- ); -} diff --git a/src/blocks/faq2/deprecated/index.js b/src/blocks/faq2/deprecated/index.js index 229186b16..047439a9e 100644 --- a/src/blocks/faq2/deprecated/index.js +++ b/src/blocks/faq2/deprecated/index.js @@ -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 = { @@ -20,10 +19,6 @@ const deprecated = [ { attributes: blockAttributes, save: save1_3_9, - }, - { - attributes: blockAttributes, - save: save000, } ]; export default deprecated; diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__faq2__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__faq2__deprecated-0-60-1.html deleted file mode 100644 index 20b413dd2..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__faq2__deprecated-0-60-1.html +++ /dev/null @@ -1,13 +0,0 @@ - -
-
-

質問を入力してください

-
- - - -
-

回答を入力してください

-
-
- \ No newline at end of file From d198141cd04992fb1dfb1313aff5fe35c9850343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Mon, 11 Nov 2024 16:31:30 +0900 Subject: [PATCH 22/51] Edit and delete deprecated files --- src/blocks/flow/deprecated/0.0.0/save.js | 31 ------------------- src/blocks/flow/deprecated/index.js | 5 --- .../vk-blocks__flow__deprecated-0-60-1.html | 3 -- 3 files changed, 39 deletions(-) delete mode 100644 src/blocks/flow/deprecated/0.0.0/save.js delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__flow__deprecated-0-60-1.html diff --git a/src/blocks/flow/deprecated/0.0.0/save.js b/src/blocks/flow/deprecated/0.0.0/save.js deleted file mode 100644 index dd913b488..000000000 --- a/src/blocks/flow/deprecated/0.0.0/save.js +++ /dev/null @@ -1,31 +0,0 @@ -import { RichText } from '@wordpress/block-editor'; - -export default function save({ attributes }) { - const { heading, content, insertImage, arrowFlag } = attributes; - - return ( -
-
-
- - -
- {insertImage ? ( -
- -
- ) : ( - '' - )} -
-
- ); -} diff --git a/src/blocks/flow/deprecated/index.js b/src/blocks/flow/deprecated/index.js index 71a087f94..326c60d01 100644 --- a/src/blocks/flow/deprecated/index.js +++ b/src/blocks/flow/deprecated/index.js @@ -1,4 +1,3 @@ -import save000 from './0.0.0/save'; import save1_8_0 from './1.8.0/save'; @@ -28,9 +27,5 @@ const deprecated = [ attributes: blockAttributes, save: save1_8_0, }, - { - attributes: blockAttributes, - save: save000, - }, ]; export default deprecated; diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__flow__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__flow__deprecated-0-60-1.html deleted file mode 100644 index e6a0a772f..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__flow__deprecated-0-60-1.html +++ /dev/null @@ -1,3 +0,0 @@ - -
タイトルを入力
説明を入力
- \ No newline at end of file From 24319d2413705620a5d57a9e09d9a7e6b0c2efce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Mon, 11 Nov 2024 18:14:47 +0900 Subject: [PATCH 23/51] Edit and delete deprecated files --- .../pr-content/deprecated/0.0.0/save.js | 229 ------------ .../pr-content/deprecated/0.0.1/save.js | 205 ----------- .../pr-content/deprecated/0.0.2/save.js | 328 ------------------ .../deprecated/0.0.3/component-fontawesome.js | 34 -- .../pr-content/deprecated/0.0.3/component.js | 287 --------------- .../pr-content/deprecated/0.0.3/save.js | 14 - .../pr-content/deprecated/0.43.0/save.js | 299 ---------------- .../pr-content/deprecated/0.5.1/save.js | 215 ------------ .../pr-content/deprecated/0.56.3/component.js | 249 ------------- .../pr-content/deprecated/0.56.3/save.js | 11 - .../pr-content/deprecated/0.58.7/component.js | 281 --------------- .../pr-content/deprecated/0.58.7/save.js | 15 - .../pr-content/deprecated/0.58.9/component.js | 280 --------------- .../pr-content/deprecated/0.58.9/save.js | 14 - src/blocks/pr-content/deprecated/index.js | 47 --- ...blocks__pr-content__deprecated-0-60-1.html | 3 - ...precated-0-60-1__button-color-success.html | 3 - ...cated-0-60-1__button-linkTarget-blank.html | 3 - 18 files changed, 2517 deletions(-) delete mode 100644 src/blocks/pr-content/deprecated/0.0.0/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.0.1/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.0.2/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.0.3/component-fontawesome.js delete mode 100644 src/blocks/pr-content/deprecated/0.0.3/component.js delete mode 100644 src/blocks/pr-content/deprecated/0.0.3/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.43.0/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.5.1/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.56.3/component.js delete mode 100644 src/blocks/pr-content/deprecated/0.56.3/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.58.7/component.js delete mode 100644 src/blocks/pr-content/deprecated/0.58.7/save.js delete mode 100644 src/blocks/pr-content/deprecated/0.58.9/component.js delete mode 100644 src/blocks/pr-content/deprecated/0.58.9/save.js delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1.html delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-color-success.html delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-linkTarget-blank.html diff --git a/src/blocks/pr-content/deprecated/0.0.0/save.js b/src/blocks/pr-content/deprecated/0.0.0/save.js deleted file mode 100644 index e45b7435d..000000000 --- a/src/blocks/pr-content/deprecated/0.0.0/save.js +++ /dev/null @@ -1,229 +0,0 @@ -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; - -import classNames from 'classnames'; -import { Fontawesome } from '../component-fontawesome-deprecated'; - -class PRContent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - } = attributes; - - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - let imageBorderProperty = ''; - - if (layout === 'right') { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageRight' - ); - } else { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageLeft' - ); - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - //borderColorが指定されなかった場合はボーダーを非表示に - if (ImageBorderColor === null || ImageBorderColor === undefined) { - imageBorderProperty = 'none'; - } else { - imageBorderProperty = `1px solid ${ImageBorderColor}`; - } - - return ( -
-
- {for_ === 'edit' ? ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ) : !Image ? ( - __('Select image', 'vk-blocks-pro') - ) : ( - {__('Upload - )} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={{ color: titleColor }} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={{ color: contentColor }} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} - -export default function save({ attributes, className }) { - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/0.0.1/save.js b/src/blocks/pr-content/deprecated/0.0.1/save.js deleted file mode 100644 index 165b5180e..000000000 --- a/src/blocks/pr-content/deprecated/0.0.1/save.js +++ /dev/null @@ -1,205 +0,0 @@ -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; -import { Fontawesome } from '../component-fontawesome-deprecated'; - -export class PRContent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = attributes; - const setAttributes = this.props.setAttributes; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - - if (layout === 'right') { - containerClass = `${containerClass} vk_prContent-layout-imageRight`; - } else { - containerClass = `${containerClass} vk_prContent-layout-imageLeft`; - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - return ( -
-
- {for_ === 'edit' ? ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ) : !Image ? ( - __('Select image', 'vk-blocks-pro') - ) : ( - {__('Upload - )} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={{ color: titleColor }} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={{ color: contentColor }} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} - -export default function save({ attributes, className }) { - return ; -} diff --git a/src/blocks/pr-content/deprecated/0.0.2/save.js b/src/blocks/pr-content/deprecated/0.0.2/save.js deleted file mode 100644 index 6fcfafdf9..000000000 --- a/src/blocks/pr-content/deprecated/0.0.2/save.js +++ /dev/null @@ -1,328 +0,0 @@ -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; - -import classNames from 'classnames'; -import { fixBrokenUnicode } from '@vkblocks/utils/fixBrokenUnicode'; - -export class Fontawesome extends Component { - render() { - const { - buttonText, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = this.props.attributes; - - let iconBefore = ''; - let iconAfter = ''; - - if (fontAwesomeIconBefore) { - iconBefore = ( - - ); - } - if (fontAwesomeIconAfter) { - iconAfter = ( - - ); - } - - return ( - <> - {iconBefore} - {buttonText} - {iconAfter} - - ); - } -} - -export class PRContent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = attributes; - - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - let imageBorderProperty = 'none'; - - if (layout === 'right') { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageRight' - ); - } else { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageLeft' - ); - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - //borderColorが指定されなかった場合はボーダーを非表示に - if (ImageBorderColor) { - imageBorderProperty = `1px solid ${ImageBorderColor}`; - } else { - imageBorderProperty = `none`; - } - - const saveImage = (value) => { - if (value) { - setAttributes({ Image: JSON.stringify(value) }); - } - }; - - const renderImage = (for_) => { - if (for_ === 'edit') { - if (Image && Image.indexOf('{') === -1) { - return ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - return ( - ( - - )} - /> - ); - } else if (for_ === 'save') { - if (!Image) { - return __('Select image', 'vk-blocks-pro'); - } - if (Image && Image.indexOf('{') === -1) { - return ( - {__('Upload - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - if (ImageParse && typeof ImageParse.sizes !== 'undefined') { - return ( - {ImageParse.alt} - ); - } - return ''; - } - }; - - return ( -
-
- {renderImage(for_)} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={{ color: titleColor }} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={{ color: contentColor }} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} - -export default function save({ attributes, className }) { - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/0.0.3/component-fontawesome.js b/src/blocks/pr-content/deprecated/0.0.3/component-fontawesome.js deleted file mode 100644 index 275a3160a..000000000 --- a/src/blocks/pr-content/deprecated/0.0.3/component-fontawesome.js +++ /dev/null @@ -1,34 +0,0 @@ -import parse from 'html-react-parser'; -import { Component } from '@wordpress/element'; - -export class Fontawesome extends Component { - render() { - let { - buttonText, - fontAwesomeIconAfter, - } = this.props.attributes; - - let iconAfter = ''; - let faIconFragmentAfter; - - //過去バージョンをリカバリーした時にiconを正常に表示する - if (fontAwesomeIconAfter && !fontAwesomeIconAfter.match(/`; - } - - if (fontAwesomeIconAfter) { - //add class and inline css - faIconFragmentAfter = fontAwesomeIconAfter.split(' '); - faIconFragmentAfter[1] = - ' ' + faIconFragmentAfter[1] + ` vk_button_link_after `; - iconAfter = faIconFragmentAfter.join(''); - } - - return ( - <> - {buttonText} - {parse(iconAfter)} - - ); - } -} diff --git a/src/blocks/pr-content/deprecated/0.0.3/component.js b/src/blocks/pr-content/deprecated/0.0.3/component.js deleted file mode 100644 index ec06f7c9c..000000000 --- a/src/blocks/pr-content/deprecated/0.0.3/component.js +++ /dev/null @@ -1,287 +0,0 @@ -import classNames from 'classnames'; -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; -import { fixBrokenUnicode } from '@vkblocks/utils/fixBrokenUnicode'; -import { Fontawesome } from './component-fontawesome'; - -export class PRcontent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - } = attributes; - - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - let imageBorderProperty = 'none'; - - let titleStyle = {} - if(titleColor && titleColor !== "") { - titleStyle = {color:titleColor} - } - let contentStyle = {} - if(contentColor && contentColor !== "") { - contentStyle = {color:contentColor} - } - - if (layout === 'right') { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageRight' - ); - } else { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageLeft' - ); - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - //borderColorが指定されなかった場合はボーダーを非表示に - if (ImageBorderColor) { - imageBorderProperty = `1px solid ${ImageBorderColor}`; - } else { - imageBorderProperty = `none`; - } - - const saveImage = (value) => { - if (value) { - setAttributes({ Image: JSON.stringify(value) }); - } - }; - - const renderImage = (for_) => { - if (for_ === 'edit') { - if (Image && Image.indexOf('{') === -1) { - return ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - return ( - ( - - )} - /> - ); - } else if (for_ === 'save') { - if (!Image) { - return __('Select image', 'vk-blocks-pro'); - } - if (Image && Image.indexOf('{') === -1) { - return ( - {__('Upload - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - if (ImageParse && typeof ImageParse.sizes !== 'undefined') { - return ( - {ImageParse.alt} - ); - } - return ''; - } - }; - - return ( -
-
- {renderImage(for_)} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={titleStyle} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={contentStyle} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} diff --git a/src/blocks/pr-content/deprecated/0.0.3/save.js b/src/blocks/pr-content/deprecated/0.0.3/save.js deleted file mode 100644 index bacc07bfc..000000000 --- a/src/blocks/pr-content/deprecated/0.0.3/save.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Pr-Content block type - * - */ -import { PRcontent } from './component'; -export default function save({ attributes, className }) { - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/0.43.0/save.js b/src/blocks/pr-content/deprecated/0.43.0/save.js deleted file mode 100644 index f16120d28..000000000 --- a/src/blocks/pr-content/deprecated/0.43.0/save.js +++ /dev/null @@ -1,299 +0,0 @@ -/** - * Pr-Content block type - * - */ -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; - -import classNames from 'classnames'; -import { fixBrokenUnicode } from '@vkblocks/utils/fixBrokenUnicode'; -import { Fontawesome } from '../component-fontawesome'; - -export class PRcontent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = attributes; - - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - let imageBorderProperty = 'none'; - - if (layout === 'right') { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageRight' - ); - } else { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageLeft' - ); - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - //borderColorが指定されなかった場合はボーダーを非表示に - if (ImageBorderColor) { - imageBorderProperty = `1px solid ${ImageBorderColor}`; - } else { - imageBorderProperty = `none`; - } - - const saveImage = (value) => { - if (value) { - setAttributes({ Image: JSON.stringify(value) }); - } - }; - - const renderImage = (for_) => { - if (for_ === 'edit') { - if (Image && Image.indexOf('{') === -1) { - return ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - return ( - ( - - )} - /> - ); - } else if (for_ === 'save') { - if (!Image) { - return __('Select image', 'vk-blocks-pro'); - } - if (Image && Image.indexOf('{') === -1) { - return ( - {__('Upload - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - if (ImageParse && typeof ImageParse.sizes !== 'undefined') { - return ( - {ImageParse.alt} - ); - } - return ''; - } - }; - - return ( -
-
- {renderImage(for_)} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={{ color: titleColor }} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={{ color: contentColor }} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} - -export default function save({ attributes, className }) { - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/0.5.1/save.js b/src/blocks/pr-content/deprecated/0.5.1/save.js deleted file mode 100644 index b5dca8a06..000000000 --- a/src/blocks/pr-content/deprecated/0.5.1/save.js +++ /dev/null @@ -1,215 +0,0 @@ -/** - * Pr-Content block type - * - */ -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; -import { Fontawesome } from '../component-fontawesome-deprecated'; - -export class PRcontent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = attributes; - const setAttributes = this.props.setAttributes; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - - if (layout === 'right') { - containerClass = `${containerClass} vk_prContent-layout-imageRight`; - } else { - containerClass = `${containerClass} vk_prContent-layout-imageLeft`; - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - return ( -
-
- {for_ === 'edit' ? ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ) : !Image ? ( - __('Select image', 'vk-blocks-pro') - ) : ( - {__('Upload - )} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={{ color: titleColor }} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={{ color: contentColor }} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} - -export default function save({ attributes, className }) { - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/0.56.3/component.js b/src/blocks/pr-content/deprecated/0.56.3/component.js deleted file mode 100644 index 7cbf52442..000000000 --- a/src/blocks/pr-content/deprecated/0.56.3/component.js +++ /dev/null @@ -1,249 +0,0 @@ -import classNames from 'classnames'; -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component, Fragment } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; -import { fixBrokenUnicode } from '@vkblocks/utils/fixBrokenUnicode'; -import { Fontawesome } from '../component-fontawesome'; - -export class PRcontent extends Component { - render() { - const attributes = this.props.attributes; - let { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - fontAwesomeIconBefore, - fontAwesomeIconAfter - } = attributes; - - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let containerClass = "vk_prContent"; - let btnClass = "vk_button"; - let aClass = "btn btn-block vk_button_link vk_prContent_colTxt_btn"; - let aStyle = {}; - let imageBorderProperty = "none"; - - if (layout === "right") { - containerClass = classNames( - className, - containerClass, - "vk_prContent-layout-imageRight" - ); - } else { - containerClass = classNames( - className, - containerClass, - "vk_prContent-layout-imageLeft" - ); - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === "0") { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}` - }; - // 塗りなし - } else if (buttonType === "1") { - aStyle = { - backgroundColor: "transparent", - border: "1px solid " + buttonColorCustom, - color: buttonColorCustom - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === "0") { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === "1") { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - //borderColorが指定されなかった場合はボーダーを非表示に - if (ImageBorderColor) { - imageBorderProperty = `1px solid ${ImageBorderColor}`; - } else { - imageBorderProperty = `none`; - } - - const saveImage = value => { - if (value) { - setAttributes({ Image: JSON.stringify(value) }); - } - }; - - const renderImage = for_ => { - if (for_ === "edit") { - if (Image && Image.indexOf("{") === -1) { - return ( - setAttributes({ Image: value.sizes.full.url }) } - type=" image" - value={ Image } - render={ ({ open }) => ( - - ) } - /> - ); - } - const ImageParse = JSON.parse( fixBrokenUnicode(Image) ); - return ( - ( - - ) } - /> - ); - - } else if (for_ === "save") { - if (!Image) { - return __("Select image", 'vk-blocks-pro'); - } - if (Image && Image.indexOf("{") === -1) { - return ( - { - ); - } - const ImageParse = JSON.parse( fixBrokenUnicode(Image) ); - if (ImageParse && typeof ImageParse.sizes !== "undefined") { - return ( - { - ); - }else{ - return ""; - } - } - }; - - return ( -
-
{ renderImage(for_) }
-
- { (() => { - if (for_ === "edit") { - return ( - - setAttributes({ title: value }) } - value={ title } - placeholder={ __("Input title.", 'vk-blocks-pro') } - style={ { color: titleColor } } - /> - setAttributes({ content: value }) } - value={ content } - placeholder={ __("Input content.", 'vk-blocks-pro') } - style={ { color: contentColor } } - /> - - ); - } - return ( - - - - - ); - })() } - { //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== "" && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() } -
-
- ); - } - } diff --git a/src/blocks/pr-content/deprecated/0.56.3/save.js b/src/blocks/pr-content/deprecated/0.56.3/save.js deleted file mode 100644 index 0b7b0bcbd..000000000 --- a/src/blocks/pr-content/deprecated/0.56.3/save.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Pr-Content block type - * - */ -import { PRcontent } from './component'; -export default function save(props) { - const { attributes, className } = props - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/0.58.7/component.js b/src/blocks/pr-content/deprecated/0.58.7/component.js deleted file mode 100644 index 9a772da3e..000000000 --- a/src/blocks/pr-content/deprecated/0.58.7/component.js +++ /dev/null @@ -1,281 +0,0 @@ -import classNames from 'classnames'; -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; -import { fixBrokenUnicode } from '@vkblocks/utils/fixBrokenUnicode'; -import { Fontawesome } from '../component-fontawesome'; - -export class PRcontent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = attributes; - - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - let imageBorderProperty = 'none'; - - if (layout === 'right') { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageRight' - ); - } else { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageLeft' - ); - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - //borderColorが指定されなかった場合はボーダーを非表示に - if (ImageBorderColor) { - imageBorderProperty = `1px solid ${ImageBorderColor}`; - } else { - imageBorderProperty = `none`; - } - - const saveImage = (value) => { - if (value) { - setAttributes({ Image: JSON.stringify(value) }); - } - }; - - const renderImage = (for_) => { - if (for_ === 'edit') { - if (Image && Image.indexOf('{') === -1) { - return ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - return ( - ( - - )} - /> - ); - } else if (for_ === 'save') { - if (!Image) { - return __('Select image', 'vk-blocks-pro'); - } - if (Image && Image.indexOf('{') === -1) { - return ( - {__('Upload - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - if (ImageParse && typeof ImageParse.sizes !== 'undefined') { - return ( - {ImageParse.alt} - ); - } - return ''; - } - }; - - return ( -
-
- {renderImage(for_)} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={{ color: titleColor }} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={{ color: contentColor }} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} diff --git a/src/blocks/pr-content/deprecated/0.58.7/save.js b/src/blocks/pr-content/deprecated/0.58.7/save.js deleted file mode 100644 index da7310fd0..000000000 --- a/src/blocks/pr-content/deprecated/0.58.7/save.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Pr-Content block type - * - */ -import { PRcontent } from './component'; -export default function save(props) { - const { attributes, className } = props; - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/0.58.9/component.js b/src/blocks/pr-content/deprecated/0.58.9/component.js deleted file mode 100644 index 8823ef35b..000000000 --- a/src/blocks/pr-content/deprecated/0.58.9/component.js +++ /dev/null @@ -1,280 +0,0 @@ -import classNames from 'classnames'; -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { MediaUpload, RichText } from '@wordpress/block-editor'; -import { fixBrokenUnicode } from '@vkblocks/utils/fixBrokenUnicode'; -import { Fontawesome } from '../component-fontawesome'; - -export class PRcontent extends Component { - render() { - const attributes = this.props.attributes; - const { - title, - titleColor, - content, - contentColor, - url, - buttonType, - buttonColor, - buttonColorCustom, - buttonText, - buttonTarget, - Image, - ImageBorderColor, - layout, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = attributes; - - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let containerClass = 'vk_prContent'; - let btnClass = 'vk_button'; - let aClass = 'btn btn-block vk_button_link vk_prContent_colTxt_btn'; - let aStyle = {}; - let imageBorderProperty = 'none'; - - if (layout === 'right') { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageRight' - ); - } else { - containerClass = classNames( - className, - containerClass, - 'vk_prContent-layout-imageLeft' - ); - } - - if (buttonColorCustom) { - btnClass = `${btnClass} vk_button-color-custom`; - aClass = `${aClass} btn-primary`; - - // 塗り - if (buttonType === '0') { - aStyle = { - backgroundColor: buttonColorCustom, - border: `1px solid ${buttonColorCustom}`, - }; - // 塗りなし - } else if (buttonType === '1') { - aStyle = { - backgroundColor: 'transparent', - border: '1px solid ' + buttonColorCustom, - color: buttonColorCustom, - }; - } - - // カスタムカラーじゃない場合 - } else if (!buttonColorCustom) { - // 塗り - if (buttonType === '0') { - aClass = `${aClass} btn-${buttonColor}`; - aStyle = null; - // 塗りなし - } else if (buttonType === '1') { - aClass = `${aClass} btn-outline-${buttonColor}`; - aStyle = null; - } - } - - //borderColorが指定されなかった場合はボーダーを非表示に - if (ImageBorderColor) { - imageBorderProperty = `1px solid ${ImageBorderColor}`; - } else { - imageBorderProperty = `none`; - } - - const saveImage = (value) => { - if (value) { - setAttributes({ Image: JSON.stringify(value) }); - } - }; - - const renderImage = (for_) => { - if (for_ === 'edit') { - if (Image && Image.indexOf('{') === -1) { - return ( - - setAttributes({ Image: value.sizes.full.url }) - } - type=" image" - value={Image} - render={({ open }) => ( - - )} - /> - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - return ( - ( - - )} - /> - ); - } else if (for_ === 'save') { - if (!Image) { - return __('Select image', 'vk-blocks-pro'); - } - if (Image && Image.indexOf('{') === -1) { - return ( - {__('Upload - ); - } - const ImageParse = JSON.parse(fixBrokenUnicode(Image)); - if (ImageParse && typeof ImageParse.sizes !== 'undefined') { - return ( - {ImageParse.alt} - ); - } - return ''; - } - }; - - return ( -
-
- {renderImage(for_)} -
-
- {(() => { - if (for_ === 'edit') { - return ( - <> - - setAttributes({ title: value }) - } - value={title} - placeholder={__( - 'Input title.', - 'vk-blocks-pro' - )} - style={{ color: titleColor }} - /> - - setAttributes({ content: value }) - } - value={content} - placeholder={__( - 'Input content.', - 'vk-blocks-pro' - )} - style={{ color: contentColor }} - /> - - ); - } - return ( - <> - - - - ); - })()} - { - //ボタンテキストが入力されるとボタンを表示。 - (() => { - if (buttonText !== '' && buttonText !== undefined) { - return ( -
- - - -
- ); - } - })() - } -
-
- ); - } -} diff --git a/src/blocks/pr-content/deprecated/0.58.9/save.js b/src/blocks/pr-content/deprecated/0.58.9/save.js deleted file mode 100644 index bacc07bfc..000000000 --- a/src/blocks/pr-content/deprecated/0.58.9/save.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Pr-Content block type - * - */ -import { PRcontent } from './component'; -export default function save({ attributes, className }) { - return ( - - ); -} diff --git a/src/blocks/pr-content/deprecated/index.js b/src/blocks/pr-content/deprecated/index.js index f2020dbd7..a58bbdc81 100644 --- a/src/blocks/pr-content/deprecated/index.js +++ b/src/blocks/pr-content/deprecated/index.js @@ -1,12 +1,3 @@ -import save000 from './0.0.0/save'; -import save001 from './0.0.1/save'; -import save002 from './0.0.2/save'; -import save003 from './0.0.3/save'; -import save0_5_1 from './0.5.1/save'; -import save0_43_0 from './0.43.0/save'; -import save0_56_3 from './0.56.3/save'; -import save0_58_7 from './0.58.7/save'; -import save0_58_9 from './0.58.9/save'; import save1_7_1 from './1.7.1/save'; const blockAttributes = { @@ -122,44 +113,6 @@ const deprecated = [ attributes: blockAttributes3, save: save1_7_1, }, - //Fix: https://github.com/vektor-inc/vk-blocks-pro/issues/355 - // 独自後方互換で変化したデータ用の後方互換バージョン - { - attributes: blockAttributes3, - save: save003, - }, - { - attributes: blockAttributes3, - save: save0_58_9, - }, - { - attributes: blockAttributes3, - save: save0_58_7, - }, - { - attributes: blockAttributes3, - save: save0_56_3, - }, - { - attributes: blockAttributes3, - save: save0_43_0, - }, - { - attributes: blockAttributes2, - save: save0_5_1, - }, - { - attributes: blockAttributes2, - save: save002, - }, - { - attributes: blockAttributes, - save: save001, - }, - { - attributes: blockAttributes, - save: save000, - }, ]; export default deprecated; diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1.html deleted file mode 100644 index d1fb62eef..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1.html +++ /dev/null @@ -1,3 +0,0 @@ - -
VK Blocks

テキスト

テキスト

- \ No newline at end of file diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-color-success.html b/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-color-success.html deleted file mode 100644 index 90b7ec3a1..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-color-success.html +++ /dev/null @@ -1,3 +0,0 @@ - -
VK Blocks

テキスト

テキスト

- \ No newline at end of file diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-linkTarget-blank.html b/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-linkTarget-blank.html deleted file mode 100644 index 7a72aaf60..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__pr-content__deprecated-0-60-1__button-linkTarget-blank.html +++ /dev/null @@ -1,3 +0,0 @@ - -
VK Blocks

テキスト

テキスト

- \ No newline at end of file From b8dd75dc505a6bed0253090821bb27db171e79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Mon, 11 Nov 2024 18:36:58 +0900 Subject: [PATCH 24/51] Edit and delete deprecated files --- src/blocks/staff/deprecated/0.58/component.js | 153 ------------------ src/blocks/staff/deprecated/0.58/save.js | 12 -- src/blocks/staff/deprecated/index.js | 5 - .../vk-blocks__staff__deprecated-0-60-1.html | 3 - 4 files changed, 173 deletions(-) delete mode 100644 src/blocks/staff/deprecated/0.58/component.js delete mode 100644 src/blocks/staff/deprecated/0.58/save.js delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__staff__deprecated-0-60-1.html diff --git a/src/blocks/staff/deprecated/0.58/component.js b/src/blocks/staff/deprecated/0.58/component.js deleted file mode 100644 index 731d1c5a8..000000000 --- a/src/blocks/staff/deprecated/0.58/component.js +++ /dev/null @@ -1,153 +0,0 @@ -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { Component } from '@wordpress/element'; -import { RichText, MediaUpload } from '@wordpress/block-editor'; - -export class NewComponent extends Component { - - render() { - - const { - vk_staff_text_name, - vk_staff_text_caption, - vk_staff_text_role, - vk_staff_text_profileTitle, - vk_staff_text_profileText, - vk_staff_photo_image, - vk_staff_photo_image_alt, - vk_staff_layout, - vk_staff_nameColor, - vk_staff_captionColor, - vk_staff_positionColor, - vk_staff_profileTitleColor, - vk_staff_profileTextColor, - vk_staff_photoBorder, - vk_staff_fontFamily - } = this.props.attributes; - const setAttributes = this.props.setAttributes; - const className = this.props.className; - const for_ = this.props.for_; - let returnELm = ''; - - let staffTextClassName = 'vk_staff_text'; - if (vk_staff_fontFamily === '1') { - staffTextClassName = classnames( - staffTextClassName, - 'vk_staff-headingFont-serif' - ); - } - - if (for_ === 'edit') { - - returnELm =
-
- setAttributes({ vk_staff_text_name: value }) } - value={ vk_staff_text_name } - placeholder={ __('Your Name', 'vk-blocks-pro') } - /> - setAttributes({ vk_staff_text_caption: value }) } - value={ vk_staff_text_caption } - placeholder={ __('Caption', 'vk-blocks-pro') } - /> - setAttributes({ vk_staff_text_role: value }) } - value={ vk_staff_text_role } - placeholder={ __('Role position', 'vk-blocks-pro') } - /> - setAttributes({ vk_staff_text_profileTitle: value }) } - value={ vk_staff_text_profileTitle } - placeholder={ __('Profile title', 'vk-blocks-pro') } - /> - setAttributes({ vk_staff_text_profileText: value }) } - value={ vk_staff_text_profileText } - placeholder={ __('Profile text', 'vk-blocks-pro') } - /> -
-
- setAttributes({ vk_staff_photo_image: value.sizes.full.url }) } - type="image" - className={ 'vk_staff_photo_image' } - value={ vk_staff_photo_image } - render={ ({ open }) => ( - - ) } - /> -
-
; - - } else if (for_ === 'save') { - - returnELm =
-
- - - - - -
- { vk_staff_photo_image ? -
- { -
- : '' - } -
; - } - return (returnELm); - } -} diff --git a/src/blocks/staff/deprecated/0.58/save.js b/src/blocks/staff/deprecated/0.58/save.js deleted file mode 100644 index 3e7f94e24..000000000 --- a/src/blocks/staff/deprecated/0.58/save.js +++ /dev/null @@ -1,12 +0,0 @@ -import { NewComponent } from "./component"; - -export default function save({ attributes }) { - return ( - - ); -} diff --git a/src/blocks/staff/deprecated/index.js b/src/blocks/staff/deprecated/index.js index b29e62dfc..715f504fa 100644 --- a/src/blocks/staff/deprecated/index.js +++ b/src/blocks/staff/deprecated/index.js @@ -1,6 +1,5 @@ import save1_20_2 from './1.20.2/save'; import save1_3_1 from './1.3.1/save'; -import save0_58 from './0.58/save'; export const blockAttributes = { vk_staff_text_name: { @@ -82,10 +81,6 @@ const deprecated = [ { attributes: blockAttributes2, save: save1_3_1 - }, - { - attributes: blockAttributes, - save: save0_58 } ]; diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__staff__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__staff__deprecated-0-60-1.html deleted file mode 100644 index e59b0a27e..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__staff__deprecated-0-60-1.html +++ /dev/null @@ -1,3 +0,0 @@ - -

山田太郎

Yamada Tarou

代表取締役

プロフィール

名古屋のウェブ制作会社数社に10年程度務めた後、株式会社ベクトル設立。
企画・運営・コンサルティング〜WordPressを中心としたシステム開発まで幅広く携わる。

Profile Picture
- \ No newline at end of file From 127e6648d70c9950cc4c73195111a69f6fddfee3 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 12 Nov 2024 14:59:10 +0900 Subject: [PATCH 25/51] Add: Editor css --- .../_pro/table-of-contents-new/style.scss | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/blocks/_pro/table-of-contents-new/style.scss b/src/blocks/_pro/table-of-contents-new/style.scss index d34b86de2..5549ed95d 100644 --- a/src/blocks/_pro/table-of-contents-new/style.scss +++ b/src/blocks/_pro/table-of-contents-new/style.scss @@ -163,3 +163,20 @@ $toc-left-margin: 1rem; } } } + +/* 編集画面 +/*-------------------------------------------*/ +.editor-styles-wrapper { + input:checked~.button_status-open { + ~ .tab_content-open { + max-height: 0; + padding: 0 1em; + } + } + .button_status-open { + ~ .tab_content-open { + max-height: 100%; + padding: 1em; + } + } +} \ No newline at end of file From 6918cd6c1ed7167a66772eef2c5786e191251c10 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 12 Nov 2024 17:56:38 +0900 Subject: [PATCH 26/51] Fix: Adjust translation file loading to comply with WordPress 6.7 changes --- vk-blocks.php | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/vk-blocks.php b/vk-blocks.php index 9a64ec0dd..e48320e16 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -150,14 +150,26 @@ function vk_blocks_is_pro() { if ( function_exists( 'vk_blocks_is_pro' ) && vk_blocks_is_pro() ) { // 翻訳を実行 - add_action( - 'plugins_loaded', - function () { - // Load language files. - $path = dirname( plugin_basename( __FILE__ ) ) . '/languages'; - load_plugin_textdomain( 'vk-blocks-pro', false, $path ); - } - ); + add_action('init', function() { + $path = plugin_dir_path( __FILE__ ) . 'languages'; + // PHPファイルの翻訳読み込み + load_textdomain('vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo'); + + // JavaScriptファイルの翻訳設定 + wp_set_script_translations('vk-blocks-build-js', 'vk-blocks-pro', $path); + wp_set_script_translations('vk-blocks-admin-js', 'vk-blocks-pro', $path); + }); + + add_action('plugins_loaded', function() { + $path = plugin_dir_path( __FILE__ ) . 'languages'; + // PHPファイルの翻訳読み込み + load_textdomain('vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo'); + + // JavaScriptファイルの翻訳設定 + wp_set_script_translations('vk-blocks-build-js', 'vk-blocks-pro', $path); + wp_set_script_translations('vk-blocks-admin-js', 'vk-blocks-pro', $path); + }); + // 本来 Pro 版でしか読み込まないが、1.36.0.0 は間違って読み込んでしまっており // 無料版 1.36.0 を有効化していると previously declared になるため ! function_exists() を通した上で宣言している. From 4d1c8afc4974f86488a099ac9f4acb75f83d6740 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 12 Nov 2024 17:58:10 +0900 Subject: [PATCH 27/51] Add chagelog --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index dd9948ebd..0b0aa4014 100644 --- a/readme.txt +++ b/readme.txt @@ -106,6 +106,7 @@ e.g. == Changelog == +[ 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 = From 6b7233dc9780926410a3142cd47caea468d581ac Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 12 Nov 2024 18:04:33 +0900 Subject: [PATCH 28/51] Fix: lint --- vk-blocks.php | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/vk-blocks.php b/vk-blocks.php index e48320e16..6ce683c51 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -150,26 +150,32 @@ function vk_blocks_is_pro() { if ( function_exists( 'vk_blocks_is_pro' ) && vk_blocks_is_pro() ) { // 翻訳を実行 - add_action('init', function() { - $path = plugin_dir_path( __FILE__ ) . 'languages'; - // PHPファイルの翻訳読み込み - load_textdomain('vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo'); - - // JavaScriptファイルの翻訳設定 - wp_set_script_translations('vk-blocks-build-js', 'vk-blocks-pro', $path); - wp_set_script_translations('vk-blocks-admin-js', 'vk-blocks-pro', $path); - }); - - add_action('plugins_loaded', function() { - $path = plugin_dir_path( __FILE__ ) . 'languages'; - // PHPファイルの翻訳読み込み - load_textdomain('vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo'); - - // JavaScriptファイルの翻訳設定 - wp_set_script_translations('vk-blocks-build-js', 'vk-blocks-pro', $path); - wp_set_script_translations('vk-blocks-admin-js', 'vk-blocks-pro', $path); - }); - + add_action( + 'init', + function () { + $path = plugin_dir_path( __FILE__ ) . 'languages'; + // PHPファイルの翻訳読み込み + load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); + + // JavaScriptファイルの翻訳設定 + wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); + wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + } + ); + + add_action( + 'plugins_loaded', + function () { + $path = plugin_dir_path( __FILE__ ) . 'languages'; + // PHPファイルの翻訳読み込み + load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); + + // JavaScriptファイルの翻訳設定 + wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); + wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + } + ); + // 本来 Pro 版でしか読み込まないが、1.36.0.0 は間違って読み込んでしまっており // 無料版 1.36.0 を有効化していると previously declared になるため ! function_exists() を通した上で宣言している. From a9a7e6341c331a01399d9916b098032df36e026c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Tue, 12 Nov 2024 18:08:38 +0900 Subject: [PATCH 29/51] Edit and delete deprecated files --- .../spacer/deprecated/0.0.0/component.js | 21 ----------- src/blocks/spacer/deprecated/0.0.0/save.js | 7 ---- .../spacer/deprecated/0.0.1/component.js | 22 ------------ src/blocks/spacer/deprecated/0.0.1/save.js | 7 ---- .../spacer/deprecated/0.0.2/component.js | 24 ------------- src/blocks/spacer/deprecated/0.0.2/save.js | 7 ---- .../spacer/deprecated/0.57.4/component.js | 34 ------------------ src/blocks/spacer/deprecated/0.57.4/save.js | 7 ---- src/blocks/spacer/deprecated/0.57.4/schema.js | 35 ------------------- src/blocks/spacer/deprecated/index.js | 20 ----------- .../vk-blocks__spacer__deprecated-0-60-1.html | 3 -- ..._deprecated-0-60-1__has_ID_margin-top.html | 3 -- 12 files changed, 190 deletions(-) delete mode 100644 src/blocks/spacer/deprecated/0.0.0/component.js delete mode 100644 src/blocks/spacer/deprecated/0.0.0/save.js delete mode 100644 src/blocks/spacer/deprecated/0.0.1/component.js delete mode 100644 src/blocks/spacer/deprecated/0.0.1/save.js delete mode 100644 src/blocks/spacer/deprecated/0.0.2/component.js delete mode 100644 src/blocks/spacer/deprecated/0.0.2/save.js delete mode 100644 src/blocks/spacer/deprecated/0.57.4/component.js delete mode 100644 src/blocks/spacer/deprecated/0.57.4/save.js delete mode 100644 src/blocks/spacer/deprecated/0.57.4/schema.js delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1.html delete mode 100644 test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1__has_ID_margin-top.html diff --git a/src/blocks/spacer/deprecated/0.0.0/component.js b/src/blocks/spacer/deprecated/0.0.0/component.js deleted file mode 100644 index f0ef2a1c7..000000000 --- a/src/blocks/spacer/deprecated/0.0.0/component.js +++ /dev/null @@ -1,21 +0,0 @@ -import { Component } from '@wordpress/element'; - -export class SpacerComponent extends Component { - - render() { - const { - unit, - pc, - tablet, - mobile, - } = this.props.attributes; - - return ( -
-
-
-
-
- ); - } -} diff --git a/src/blocks/spacer/deprecated/0.0.0/save.js b/src/blocks/spacer/deprecated/0.0.0/save.js deleted file mode 100644 index 1fd966da6..000000000 --- a/src/blocks/spacer/deprecated/0.0.0/save.js +++ /dev/null @@ -1,7 +0,0 @@ -import { SpacerComponent } from "./component"; - -export default function save({ attributes }) { - return ( - - ); -} diff --git a/src/blocks/spacer/deprecated/0.0.1/component.js b/src/blocks/spacer/deprecated/0.0.1/component.js deleted file mode 100644 index 83ff6a672..000000000 --- a/src/blocks/spacer/deprecated/0.0.1/component.js +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@wordpress/element'; - -export class SpacerComponent extends Component { - - render() { - const { - unit, - pc, - tablet, - mobile, - } = this.props.attributes; - const className = this.props.className; - - return ( -
-
-
-
-
- ); - } -} diff --git a/src/blocks/spacer/deprecated/0.0.1/save.js b/src/blocks/spacer/deprecated/0.0.1/save.js deleted file mode 100644 index 1fd966da6..000000000 --- a/src/blocks/spacer/deprecated/0.0.1/save.js +++ /dev/null @@ -1,7 +0,0 @@ -import { SpacerComponent } from "./component"; - -export default function save({ attributes }) { - return ( - - ); -} diff --git a/src/blocks/spacer/deprecated/0.0.2/component.js b/src/blocks/spacer/deprecated/0.0.2/component.js deleted file mode 100644 index b08ecb367..000000000 --- a/src/blocks/spacer/deprecated/0.0.2/component.js +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@wordpress/element'; -import classNames from "classnames"; - -export class SpacerComponent extends Component { - - render() { - const { - anchor, - unit, - pc, - tablet, - mobile, - } = this.props.attributes; - const className = this.props.className; - - return ( -
-
-
-
-
- ); - } -} diff --git a/src/blocks/spacer/deprecated/0.0.2/save.js b/src/blocks/spacer/deprecated/0.0.2/save.js deleted file mode 100644 index 1fd966da6..000000000 --- a/src/blocks/spacer/deprecated/0.0.2/save.js +++ /dev/null @@ -1,7 +0,0 @@ -import { SpacerComponent } from "./component"; - -export default function save({ attributes }) { - return ( - - ); -} diff --git a/src/blocks/spacer/deprecated/0.57.4/component.js b/src/blocks/spacer/deprecated/0.57.4/component.js deleted file mode 100644 index cdb88c0e0..000000000 --- a/src/blocks/spacer/deprecated/0.57.4/component.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Component } from '@wordpress/element'; -import classNames from 'classnames'; - -export class SpacerComponent extends Component { - - render() { - const { - anchor, - spaceType, - unit, - pc, - tablet, - mobile, - } = this.props.attributes; - const className = this.props.className; - if ( spaceType === 'height') { - return ( -
-
-
-
-
- ); - } else if ( spaceType === 'margin-top') { - return ( -
-
-
-
-
- ); - } - } -} diff --git a/src/blocks/spacer/deprecated/0.57.4/save.js b/src/blocks/spacer/deprecated/0.57.4/save.js deleted file mode 100644 index 1fd966da6..000000000 --- a/src/blocks/spacer/deprecated/0.57.4/save.js +++ /dev/null @@ -1,7 +0,0 @@ -import { SpacerComponent } from "./component"; - -export default function save({ attributes }) { - return ( - - ); -} diff --git a/src/blocks/spacer/deprecated/0.57.4/schema.js b/src/blocks/spacer/deprecated/0.57.4/schema.js deleted file mode 100644 index 1fede51f3..000000000 --- a/src/blocks/spacer/deprecated/0.57.4/schema.js +++ /dev/null @@ -1,35 +0,0 @@ -export const schema = { - anchor: { - type: 'string', - default: null, - }, - spaceType: { - type: 'string', - default: 'height', - }, - unit: { - type: 'string', - default: 'px', - }, - pc: { - type: 'number', - default: 40, - }, - tablet: { - type: 'number', - default: 30, - }, - mobile: { - type: 'number', - default: 20, - }, -}; - -export const example = { - anchor: null, - spaceType: 'height', - unit: 'px', - pc: 40, - tablet: 30, - mobile: 20 -}; diff --git a/src/blocks/spacer/deprecated/index.js b/src/blocks/spacer/deprecated/index.js index 0b7069ea8..7de01ab43 100644 --- a/src/blocks/spacer/deprecated/index.js +++ b/src/blocks/spacer/deprecated/index.js @@ -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_57_4 from './0.57.4/save'; import save1_3_2 from './1.3.2/save'; import save1_13_2 from './1.13.2/save'; import save1_25_1 from './1.25.1/save'; @@ -80,22 +76,6 @@ const deprecated = [ attributes:blockAttributes2, save: save1_3_2, }, - { - attributes: blockAttributes2, - save: save0_57_4, - }, - { - attributes: blockAttributes2, - save: save002, - }, - { - attributes: blockAttributes, - save: save001, - }, - { - attributes: blockAttributes, - save: save000, - }, ]; export default deprecated; diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1.html b/test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1.html deleted file mode 100644 index cdf50dd61..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1.html +++ /dev/null @@ -1,3 +0,0 @@ - -
- \ No newline at end of file diff --git a/test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1__has_ID_margin-top.html b/test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1__has_ID_margin-top.html deleted file mode 100644 index 8f6b61f3e..000000000 --- a/test/e2e-tests/fixtures/blocks/vk-blocks__spacer__deprecated-0-60-1__has_ID_margin-top.html +++ /dev/null @@ -1,3 +0,0 @@ - -
- \ No newline at end of file From 4ff771322602e7288fc904728d5d7a28454445de Mon Sep 17 00:00:00 2001 From: mtdkei Date: Tue, 12 Nov 2024 18:17:46 +0900 Subject: [PATCH 30/51] Delete unnecessary line --- vk-blocks.php | 1 - 1 file changed, 1 deletion(-) diff --git a/vk-blocks.php b/vk-blocks.php index 6ce683c51..d01f880fe 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -176,7 +176,6 @@ function () { } ); - // 本来 Pro 版でしか読み込まないが、1.36.0.0 は間違って読み込んでしまっており // 無料版 1.36.0 を有効化していると previously declared になるため ! function_exists() を通した上で宣言している. if ( ! function_exists( 'vk_blocks_update_checker' ) ) { From fcf777eaf3ccf261946ba3f90a345855a1438895 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:01:35 +0900 Subject: [PATCH 31/51] Add: languages location --- vk-blocks.php | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/vk-blocks.php b/vk-blocks.php index d01f880fe..2b19b4ed3 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -153,26 +153,35 @@ function vk_blocks_is_pro() { add_action( 'init', function () { + $locale = determine_locale(); // サイトのロケールを取得 $path = plugin_dir_path( __FILE__ ) . 'languages'; - // PHPファイルの翻訳読み込み - load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); - - // JavaScriptファイルの翻訳設定 - wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); - wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + + // 日本語の設定のみ翻訳ファイルを読み込み + if ( strpos( $locale, 'ja' ) === 0 ) { + // PHPファイルの翻訳読み込み + load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); + + // JavaScriptファイルの翻訳設定 + wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); + wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + } } ); add_action( 'plugins_loaded', function () { + $locale = determine_locale(); $path = plugin_dir_path( __FILE__ ) . 'languages'; - // PHPファイルの翻訳読み込み - load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); - - // JavaScriptファイルの翻訳設定 - wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); - wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + + if ( strpos( $locale, 'ja' ) === 0 ) { + // PHPファイルの翻訳読み込み + load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); + + // JavaScriptファイルの翻訳設定 + wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); + wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + } } ); From 5cc94c6300f2eda09faeaa609928aec79aa26ebe Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:03:57 +0900 Subject: [PATCH 32/51] Fix: lint --- vk-blocks.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vk-blocks.php b/vk-blocks.php index 2b19b4ed3..2c6dbdd64 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -154,8 +154,8 @@ function vk_blocks_is_pro() { 'init', function () { $locale = determine_locale(); // サイトのロケールを取得 - $path = plugin_dir_path( __FILE__ ) . 'languages'; - + $path = plugin_dir_path( __FILE__ ) . 'languages'; + // 日本語の設定のみ翻訳ファイルを読み込み if ( strpos( $locale, 'ja' ) === 0 ) { // PHPファイルの翻訳読み込み @@ -172,8 +172,8 @@ function () { 'plugins_loaded', function () { $locale = determine_locale(); - $path = plugin_dir_path( __FILE__ ) . 'languages'; - + $path = plugin_dir_path( __FILE__ ) . 'languages'; + if ( strpos( $locale, 'ja' ) === 0 ) { // PHPファイルの翻訳読み込み load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); From e35d5a75aabadf4a8f69eb28614298c4f5aa230e Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:19:52 +0900 Subject: [PATCH 33/51] Fix: Adjust translation file loading to comply with WordPress 6.7 changes --- inc/vk-blocks/vk-blocks-functions.php | 33 ++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/inc/vk-blocks/vk-blocks-functions.php b/inc/vk-blocks/vk-blocks-functions.php index 0af5c2970..3f3ca164b 100644 --- a/inc/vk-blocks/vk-blocks-functions.php +++ b/inc/vk-blocks/vk-blocks-functions.php @@ -55,12 +55,39 @@ function vk_blocks_active() { return true; } +// 翻訳を実行 +add_action( + 'init', + function () { + $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ファイルの翻訳設定 + wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); + wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + } + } +); + 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ファイルの翻訳設定 + wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); + wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + } } ); From 7bd2d33715b75b8baeeee2f2a0cbcce7cfbd4500 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:21:37 +0900 Subject: [PATCH 34/51] Add: languages location --- inc/vk-blocks/vk-blocks-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/vk-blocks/vk-blocks-functions.php b/inc/vk-blocks/vk-blocks-functions.php index 3f3ca164b..d632c5bd7 100644 --- a/inc/vk-blocks/vk-blocks-functions.php +++ b/inc/vk-blocks/vk-blocks-functions.php @@ -59,7 +59,7 @@ function vk_blocks_active() { add_action( 'init', function () { - $locale = determine_locale(); // サイトのロケールを取得 + $locale = determine_locale(); $path = plugin_dir_path( __FILE__ ) . 'languages'; // 日本語の設定のみ翻訳ファイルを読み込み From 21e825a673e39baf374262f39d3d936318ab8a19 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:39:58 +0900 Subject: [PATCH 35/51] Fix: Change class name --- test/e2e/heading-transform.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/heading-transform.spec.ts b/test/e2e/heading-transform.spec.ts index b06ed9d18..53f718c77 100644 --- a/test/e2e/heading-transform.spec.ts +++ b/test/e2e/heading-transform.spec.ts @@ -52,7 +52,7 @@ test.describe( 'Block', () => { // 変換内容 await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', From 659bb3d4771d2c5e0a494a2d7bd9ba4d691950eb Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:42:44 +0900 Subject: [PATCH 36/51] Fix: Change class name --- test/e2e/heading-transform.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/heading-transform.spec.ts b/test/e2e/heading-transform.spec.ts index 53f718c77..4d613d957 100644 --- a/test/e2e/heading-transform.spec.ts +++ b/test/e2e/heading-transform.spec.ts @@ -63,7 +63,7 @@ test.describe( 'Block', () => { '32px' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', From c4b1011cc016c6751970ad19c772ad543b8334b0 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:57:57 +0900 Subject: [PATCH 37/51] Fix: translate action --- inc/vk-blocks/vk-blocks-functions.php | 37 ++++++++++----------------- vk-blocks.php | 37 ++++++++++----------------- 2 files changed, 28 insertions(+), 46 deletions(-) diff --git a/inc/vk-blocks/vk-blocks-functions.php b/inc/vk-blocks/vk-blocks-functions.php index d632c5bd7..11e663d0e 100644 --- a/inc/vk-blocks/vk-blocks-functions.php +++ b/inc/vk-blocks/vk-blocks-functions.php @@ -56,37 +56,28 @@ function vk_blocks_active() { } // 翻訳を実行 -add_action( - 'init', - function () { - $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ファイルの翻訳設定 - wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); - wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); - } - } -); - add_action( 'plugins_loaded', function () { + // サイトのロケールを取得 $locale = determine_locale(); + // 翻訳ファイルのパスを指定 $path = plugin_dir_path( __FILE__ ) . 'languages'; - - if ( strpos( $locale, 'ja' ) === 0 ) { + + // 日本語の設定のみ翻訳ファイルを読み込み + if ( strpos( $locale, 'ja' ) === 0 ) { // PHPファイルの翻訳読み込み load_textdomain( 'vk-blocks-pro', $path . '/vk-blocks-pro-ja.mo' ); - + // JavaScriptファイルの翻訳設定 - wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); - wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + 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 ); + } + ); } } ); diff --git a/vk-blocks.php b/vk-blocks.php index 2c6dbdd64..62694497a 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -150,40 +150,31 @@ function vk_blocks_is_pro() { if ( function_exists( 'vk_blocks_is_pro' ) && vk_blocks_is_pro() ) { // 翻訳を実行 - add_action( - 'init', - function () { - $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ファイルの翻訳設定 - wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); - wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); - } - } - ); - add_action( 'plugins_loaded', function () { + // サイトのロケールを取得 $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ファイルの翻訳設定 - wp_set_script_translations( 'vk-blocks-build-js', 'vk-blocks-pro', $path ); - wp_set_script_translations( 'vk-blocks-admin-js', 'vk-blocks-pro', $path ); + 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 ); + } + ); } } - ); + ); // 本来 Pro 版でしか読み込まないが、1.36.0.0 は間違って読み込んでしまっており // 無料版 1.36.0 を有効化していると previously declared になるため ! function_exists() を通した上で宣言している. From ed4b17593880f745c6dd1ddc415cfe684dbf2d27 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 09:59:05 +0900 Subject: [PATCH 38/51] Revert heading-transform.spec.ts to develop branch version --- test/e2e/heading-transform.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/heading-transform.spec.ts b/test/e2e/heading-transform.spec.ts index 4d613d957..b06ed9d18 100644 --- a/test/e2e/heading-transform.spec.ts +++ b/test/e2e/heading-transform.spec.ts @@ -52,7 +52,7 @@ test.describe( 'Block', () => { // 変換内容 await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', @@ -63,7 +63,7 @@ test.describe( 'Block', () => { '32px' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', From 40b6ca1a6f52337cb390955a155264b7823b603e Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 10:25:38 +0900 Subject: [PATCH 39/51] Update readme.txt --- readme.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.txt b/readme.txt index dd9948ebd..584e1f73d 100644 --- a/readme.txt +++ b/readme.txt @@ -1,3 +1,5 @@ +!!!TEST WORK ACTION for Github!!! + === VK Blocks === Contributors: vektor-inc,kurudrive,naoki0h,nc30,una9,kaorock72,rickaddison7634,mimitips,mthaichi,shimotomoki,sysbird,chiakikouno,doshimaf,mtdkei Donate link: From 6747e406d28300a1823a0b6daa9d661adb96818c Mon Sep 17 00:00:00 2001 From: kurudrive Date: Wed, 13 Nov 2024 11:15:28 +0900 Subject: [PATCH 40/51] =?UTF-8?q?=E8=A6=8B=E5=87=BA=E3=81=97=E3=81=AE?= =?UTF-8?q?=E3=82=AF=E3=83=A9=E3=82=B9=E5=90=8D=E5=A4=89=E6=9B=B4=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/e2e/heading-transform.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/heading-transform.spec.ts b/test/e2e/heading-transform.spec.ts index b06ed9d18..4d613d957 100644 --- a/test/e2e/heading-transform.spec.ts +++ b/test/e2e/heading-transform.spec.ts @@ -52,7 +52,7 @@ test.describe( 'Block', () => { // 変換内容 await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', @@ -63,7 +63,7 @@ test.describe( 'Block', () => { '32px' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', From 7f447df9c8f31ded3db3c9c8327c43eef8f667a4 Mon Sep 17 00:00:00 2001 From: drill-lancer Date: Wed, 13 Nov 2024 11:20:53 +0900 Subject: [PATCH 41/51] fix: pwee --- test/e2e/heading-transform.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/heading-transform.spec.ts b/test/e2e/heading-transform.spec.ts index b06ed9d18..ba868bf92 100644 --- a/test/e2e/heading-transform.spec.ts +++ b/test/e2e/heading-transform.spec.ts @@ -52,7 +52,7 @@ test.describe( 'Block', () => { // 変換内容 await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', @@ -60,10 +60,10 @@ test.describe( 'Block', () => { ); await expect( page.locator( 'p.has-text-color' ) ).toHaveCSS( 'font-size', - '32px' + '31.2896px' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveClass( - 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-contrast-color has-text-color wp-block-heading rich-text' + 'block-editor-rich-text__editable block-editor-block-list__block wp-block is-multi-selected wp-elements-0 has-accent-1-color has-text-color wp-block-heading rich-text' ); await expect( page.locator( '.wp-block-heading' ) ).toHaveCSS( 'margin-bottom', @@ -71,7 +71,7 @@ test.describe( 'Block', () => { ); await expect( page.locator( 'p.has-text-color' ) ).toHaveCSS( 'font-size', - '32px' + '31.2896px' ); } ); From 50301d968ab2a92282972baeb555bd1996c85a36 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 12:54:20 +0900 Subject: [PATCH 42/51] Delete test comment --- readme.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/readme.txt b/readme.txt index 584e1f73d..dd9948ebd 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,3 @@ -!!!TEST WORK ACTION for Github!!! - === VK Blocks === Contributors: vektor-inc,kurudrive,naoki0h,nc30,una9,kaorock72,rickaddison7634,mimitips,mthaichi,shimotomoki,sysbird,chiakikouno,doshimaf,mtdkei Donate link: From 8f567a948e1e46b5e0cd7b062e16574c23a3c93a Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 13:44:44 +0900 Subject: [PATCH 43/51] Fix: Enhanced error handling for deprecated function index in addAnimationActiveClass --- src/blocks/_pro/animation/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/blocks/_pro/animation/index.js b/src/blocks/_pro/animation/index.js index 80f09a16a..a3b11e523 100644 --- a/src/blocks/_pro/animation/index.js +++ b/src/blocks/_pro/animation/index.js @@ -34,7 +34,7 @@ export const settings = { */ const addAnimationActiveClass = (el, type, attributes) => { if ('vk-blocks/animation' === type.name) { - //現在実行されている deprecated内の save関数のindexを取得 + // 現在実行されている deprecated 内の save 関数の index を取得 const deprecatedFuncIndex = deprecated.findIndex( (item) => item.save === type.save ); @@ -42,9 +42,14 @@ const addAnimationActiveClass = (el, type, attributes) => { // 最新版 if (-1 === deprecatedFuncIndex) { return el; + } - //後方互換 + // deprecatedFuncIndex が予期せぬ数値の場合も考慮して、エラーハンドリングを強化 + if (typeof deprecatedFuncIndex !== 'number' || deprecatedFuncIndex < 0) { + return el; } + + // 後方互換 const DeprecatedHook = deprecatedHooks[deprecatedFuncIndex]; return ; } From b44d23adc227d10d22f904dc49f707fedf200791 Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 13:45:25 +0900 Subject: [PATCH 44/51] Fix lint --- src/blocks/_pro/animation/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/animation/index.js b/src/blocks/_pro/animation/index.js index a3b11e523..ec84ad621 100644 --- a/src/blocks/_pro/animation/index.js +++ b/src/blocks/_pro/animation/index.js @@ -45,7 +45,10 @@ const addAnimationActiveClass = (el, type, attributes) => { } // deprecatedFuncIndex が予期せぬ数値の場合も考慮して、エラーハンドリングを強化 - if (typeof deprecatedFuncIndex !== 'number' || deprecatedFuncIndex < 0) { + if ( + typeof deprecatedFuncIndex !== 'number' || + deprecatedFuncIndex < 0 + ) { return el; } From 3c1b54e4e31addd2bd95ccc967a0ac1030e6ffda Mon Sep 17 00:00:00 2001 From: mtdkei Date: Wed, 13 Nov 2024 10:00:21 +0900 Subject: [PATCH 45/51] Fix: lint --- inc/vk-blocks/vk-blocks-functions.php | 10 +++++----- vk-blocks.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/inc/vk-blocks/vk-blocks-functions.php b/inc/vk-blocks/vk-blocks-functions.php index 11e663d0e..01f0ac87c 100644 --- a/inc/vk-blocks/vk-blocks-functions.php +++ b/inc/vk-blocks/vk-blocks-functions.php @@ -62,17 +62,17 @@ function () { // サイトのロケールを取得 $locale = determine_locale(); // 翻訳ファイルのパスを指定 - $path = plugin_dir_path( __FILE__ ) . 'languages'; - + $path = plugin_dir_path( __FILE__ ) . 'languages'; + // 日本語の設定のみ翻訳ファイルを読み込み - if ( strpos( $locale, 'ja' ) === 0 ) { + 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 ) { + 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 ); diff --git a/vk-blocks.php b/vk-blocks.php index 62694497a..f09423e36 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -156,17 +156,17 @@ function () { // サイトのロケールを取得 $locale = determine_locale(); // 翻訳ファイルのパスを指定 - $path = plugin_dir_path( __FILE__ ) . 'languages'; - + $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 ) { + 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 ); @@ -174,7 +174,7 @@ function() use ( $path ) { ); } } - ); + ); // 本来 Pro 版でしか読み込まないが、1.36.0.0 は間違って読み込んでしまっており // 無料版 1.36.0 を有効化していると previously declared になるため ! function_exists() を通した上で宣言している. From 334868dc890cfcf690870f6f2beea16ab343b850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A3=AE=E6=9C=AC=E9=9B=85=E4=B9=9F?= Date: Wed, 13 Nov 2024 15:31:42 +0900 Subject: [PATCH 46/51] Delete component-fontawesome*.js files --- .../component-fontawesome-deprecated.js | 37 -------------- .../deprecated/component-fontawesome.js | 48 ------------------- 2 files changed, 85 deletions(-) delete mode 100644 src/blocks/pr-content/deprecated/component-fontawesome-deprecated.js delete mode 100644 src/blocks/pr-content/deprecated/component-fontawesome.js diff --git a/src/blocks/pr-content/deprecated/component-fontawesome-deprecated.js b/src/blocks/pr-content/deprecated/component-fontawesome-deprecated.js deleted file mode 100644 index e3c5f856b..000000000 --- a/src/blocks/pr-content/deprecated/component-fontawesome-deprecated.js +++ /dev/null @@ -1,37 +0,0 @@ -import { Component } from '@wordpress/element'; - -export class Fontawesome extends Component { - render() { - const { - buttonText, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = this.props.attributes; - - let iconBefore = ''; - let iconAfter = ''; - - if (fontAwesomeIconBefore) { - iconBefore = ( - - ); - } - if (fontAwesomeIconAfter) { - iconAfter = ( - - ); - } - - return ( - <> - {iconBefore} - {buttonText} - {iconAfter} - - ); - } -} diff --git a/src/blocks/pr-content/deprecated/component-fontawesome.js b/src/blocks/pr-content/deprecated/component-fontawesome.js deleted file mode 100644 index 6ce6f7ac5..000000000 --- a/src/blocks/pr-content/deprecated/component-fontawesome.js +++ /dev/null @@ -1,48 +0,0 @@ -import parse from 'html-react-parser'; -import { Component } from '@wordpress/element'; - -export class Fontawesome extends Component { - render() { - let { - buttonText, - fontAwesomeIconBefore, - fontAwesomeIconAfter, - } = this.props.attributes; - - let iconBefore = ''; - let faIconFragmentBefore; - let iconAfter = ''; - let faIconFragmentAfter; - - //過去バージョンをリカバリーした時にiconを正常に表示する - if (fontAwesomeIconBefore && !fontAwesomeIconBefore.match(/`; - } - if (fontAwesomeIconAfter && !fontAwesomeIconAfter.match(/`; - } - - if (fontAwesomeIconBefore) { - //add class and inline css - faIconFragmentBefore = fontAwesomeIconBefore.split(' '); - faIconFragmentBefore[1] = - ' ' + faIconFragmentBefore[1] + ` vk_button_link_before `; - iconBefore = faIconFragmentBefore.join(''); - } - if (fontAwesomeIconAfter) { - //add class and inline css - faIconFragmentAfter = fontAwesomeIconAfter.split(' '); - faIconFragmentAfter[1] = - ' ' + faIconFragmentAfter[1] + ` vk_button_link_after `; - iconAfter = faIconFragmentAfter.join(''); - } - - return ( - <> - {parse(iconBefore)} - {buttonText} - {parse(iconAfter)} - - ); - } -} From 8ed8cb543f9e3efdebb219f69e6bb2928bdf613e Mon Sep 17 00:00:00 2001 From: Taichi Maruyama Date: Wed, 13 Nov 2024 17:20:33 +0900 Subject: [PATCH 47/51] fix: for empty deplicated hooks --- src/blocks/_pro/animation/deprecated/hooks/index.js | 6 +++++- src/blocks/_pro/animation/index.js | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/blocks/_pro/animation/deprecated/hooks/index.js b/src/blocks/_pro/animation/deprecated/hooks/index.js index d6d1738de..2f6c90df8 100644 --- a/src/blocks/_pro/animation/deprecated/hooks/index.js +++ b/src/blocks/_pro/animation/deprecated/hooks/index.js @@ -1 +1,5 @@ -export default []; +import AnimationHooksOrig from '../../save'; +export default [ + AnimationHooksOrig, + AnimationHooksOrig, +]; diff --git a/src/blocks/_pro/animation/index.js b/src/blocks/_pro/animation/index.js index ec84ad621..134477587 100644 --- a/src/blocks/_pro/animation/index.js +++ b/src/blocks/_pro/animation/index.js @@ -45,10 +45,7 @@ const addAnimationActiveClass = (el, type, attributes) => { } // deprecatedFuncIndex が予期せぬ数値の場合も考慮して、エラーハンドリングを強化 - if ( - typeof deprecatedFuncIndex !== 'number' || - deprecatedFuncIndex < 0 - ) { + if (deprecatedFuncIndex >= 0 && deprecatedFuncIndex < deprecatedHooks.length && deprecatedHooks[deprecatedFuncIndex]) { return el; } From 77d313cdc26adbdf5c031bae7dcba08ead68f04c Mon Sep 17 00:00:00 2001 From: Taichi Maruyama Date: Wed, 13 Nov 2024 17:21:04 +0900 Subject: [PATCH 48/51] lint --- src/blocks/_pro/animation/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/blocks/_pro/animation/index.js b/src/blocks/_pro/animation/index.js index 134477587..279ae82e2 100644 --- a/src/blocks/_pro/animation/index.js +++ b/src/blocks/_pro/animation/index.js @@ -45,7 +45,11 @@ const addAnimationActiveClass = (el, type, attributes) => { } // deprecatedFuncIndex が予期せぬ数値の場合も考慮して、エラーハンドリングを強化 - if (deprecatedFuncIndex >= 0 && deprecatedFuncIndex < deprecatedHooks.length && deprecatedHooks[deprecatedFuncIndex]) { + if ( + deprecatedFuncIndex >= 0 && + deprecatedFuncIndex < deprecatedHooks.length && + deprecatedHooks[deprecatedFuncIndex] + ) { return el; } From 6f3d8ccce6a48532d811ba4d0fafff8f76abfbaa Mon Sep 17 00:00:00 2001 From: Taichi Maruyama Date: Wed, 13 Nov 2024 17:23:56 +0900 Subject: [PATCH 49/51] fix: comment --- src/blocks/_pro/animation/deprecated/hooks/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blocks/_pro/animation/deprecated/hooks/index.js b/src/blocks/_pro/animation/deprecated/hooks/index.js index 2f6c90df8..8e32dc5ca 100644 --- a/src/blocks/_pro/animation/deprecated/hooks/index.js +++ b/src/blocks/_pro/animation/deprecated/hooks/index.js @@ -1,5 +1,5 @@ import AnimationHooksOrig from '../../save'; export default [ - AnimationHooksOrig, - AnimationHooksOrig, + AnimationHooksOrig, // for 1.46.0 + AnimationHooksOrig, // for 1.34.1 ]; From c02526767ff4ccdb63351f0488f0169ee80cb07d Mon Sep 17 00:00:00 2001 From: Taichi Maruyama Date: Wed, 13 Nov 2024 17:28:04 +0900 Subject: [PATCH 50/51] =?UTF-8?q?fix:=20=E5=86=8D=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/blocks/_pro/animation/deprecated/hooks/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/blocks/_pro/animation/deprecated/hooks/index.js b/src/blocks/_pro/animation/deprecated/hooks/index.js index 8e32dc5ca..d6d1738de 100644 --- a/src/blocks/_pro/animation/deprecated/hooks/index.js +++ b/src/blocks/_pro/animation/deprecated/hooks/index.js @@ -1,5 +1 @@ -import AnimationHooksOrig from '../../save'; -export default [ - AnimationHooksOrig, // for 1.46.0 - AnimationHooksOrig, // for 1.34.1 -]; +export default []; From b3267ce12279cfd95ec6378d3c805739a41a63c5 Mon Sep 17 00:00:00 2001 From: kurudrive Date: Wed, 13 Nov 2024 18:20:18 +0900 Subject: [PATCH 51/51] [ Change version ] 1.91.0.0 --- readme.txt | 7 ++++--- vk-blocks.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/readme.txt b/readme.txt index 0b0aa4014..55dec11a4 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ 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 -Stable tag: 1.90.0.1 +Requires at least: 6.4 +Tested up to: 6.7 +Stable tag: 1.90.1.1 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -106,6 +106,7 @@ 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". diff --git a/vk-blocks.php b/vk-blocks.php index f09423e36..771345bfe 100644 --- a/vk-blocks.php +++ b/vk-blocks.php @@ -3,8 +3,8 @@ * Plugin Name: VK Blocks Pro * Plugin URI: https://github.com/vektor-inc/vk-blocks * Description: This is a plugin that extends Block Editor. - * Version: 1.90.1.0 - * Stable tag: 1.90.0.1 + * Version: 1.91.0.0 + * Stable tag: 1.90.1.1 * Requires at least: 6.3 * Author: Vektor,Inc. * Author URI: https://vektor-inc.co.jp