Skip to content

Commit a678e6b

Browse files
authored
Merge pull request #50 from humanmade/fix-undefined-var-shouldBlockPublish
Check the global flag for blocking publish status
2 parents d9e3ae2 + 2e4cba1 commit a678e6b

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

inc/namespace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
const INTERNAL_CHECKED_KEY = '__altis_publication_checklist_checked';
1010
const POSTS_COLUMN = 'altis_publication_checklist_status';
1111
const SCRIPT_ID = 'altis_publication_checklist';
12-
const VERSION = '0.4.4';
12+
const VERSION = '0.4.5';
1313

1414
/**
1515
* Bootstrap.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@humanmade/publication-checklist",
3-
"version": "1.0.0",
3+
"version": "0.4.5",
44
"description": "A simple, yet flexible publication checklist for WordPress.",
55
"author": "Human Made",
66
"license": "GPL-2.0-or-later",

plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Description: Ensure authors meet requirements before publishing.
55
* Author: Human Made
66
* Author URI: https://humanmade.com/
7-
* Version: 0.4.4
7+
* Version: 0.4.5
88
*/
99

1010
namespace Altis\Workflow\PublicationChecklist;

src/components/ChecklistPanelContent.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ import ConfirmOverrideHelpText from './ConfirmOverrideHelpText';
1212

1313
import { itemsCollectionPropType } from '../propTypes';
1414

15+
1516
const ChecklistPanelContent = ( {
1617
baseClassName,
1718
completableItems,
1819
completed,
1920
otherItems,
20-
shouldBlockPublish,
2121
toComplete,
2222
onConfirmedReady,
2323
} ) => {
2424
const [ isExpanded, setExpanded ] = useState( false );
2525
const [ confirmedReady, setConfirmedReady ] = useState( false );
2626

27+
const shouldBlockPublish = !! window.altisPublicationChecklist.block_publish ?? false;
28+
2729
useEffect( () => {
2830
onConfirmedReady( completed >= toComplete || confirmedReady );
2931
}, [ completed, confirmedReady, toComplete ] );

0 commit comments

Comments
 (0)