Skip to content

Commit

Permalink
add lockPostSaving
Browse files Browse the repository at this point in the history
  • Loading branch information
rizaardiyanto1412 committed Aug 8, 2024
1 parent f8253ac commit 00bdce4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/checklists/assets/js/meta-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@

if (showBlockMessage) {
if (PP_Checklists.is_gutenberg_active()) {
wp.data.dispatch('core/editor').lockPostSaving(gutenbergLockName);
wp.hooks.doAction('pp-checklists.update-failed-requirements', uncheckedItems);
} else {
if (isUpdatingPublishedPost) {
Expand Down Expand Up @@ -458,6 +459,7 @@
}
} else if (showWarning) {
if (PP_Checklists.is_gutenberg_active()) {
wp.data.dispatch('core/editor').unlockPostSaving(gutenbergLockName);
wp.hooks.doAction('pp-checklists.update-failed-requirements', uncheckedItems);
} else {
// Only display a warning
Expand Down Expand Up @@ -487,6 +489,7 @@
}
} else {
if (PP_Checklists.is_gutenberg_active()) {
wp.data.dispatch('core/editor').unlockPostSaving(gutenbergLockName);
wp.hooks.doAction('pp-checklists.update-failed-requirements', uncheckedItems);
}

Expand Down

0 comments on commit 00bdce4

Please sign in to comment.