Skip to content

Commit

Permalink
Add taggenv2
Browse files Browse the repository at this point in the history
  • Loading branch information
takayukister committed Aug 6, 2024
1 parent 6c0ff72 commit 0fe1807
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/includes/js/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions admin/includes/js/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { init as v1Init } from './tag-generator-v1';
import { init as v2Init } from './tag-generator-v2';

document.querySelectorAll(
'#tag-generator-list button'
Expand All @@ -9,8 +10,12 @@ document.querySelectorAll(
if ( dialog ) {
const form = dialog.querySelector( 'form.tag-generator-panel' );

if ( form && '1' === form.dataset.version ) {
v1Init( form );
if ( form ) {
if ( '1' === form.dataset.version ) {
v1Init( form );
} else if ( '2' === form.dataset.version ) {
v2Init( form );
}
}

dialog.showModal();
Expand Down
7 changes: 7 additions & 0 deletions admin/includes/js/src/tag-generator-v2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const init = form => {
};


export {
init
};

0 comments on commit 0fe1807

Please sign in to comment.