The introduction of the **Block Editor** killed all plugins which offered publishing conditions, such as minimum word counts, featured image requirements etc.

But the Block Editor *did* introduce the **pre-publish checks**:

[![Pre-publish checks][1]][1]

Beautiful. How can we disable the `Publish` button until a set amount of conditions have been fulfilled?

Examples of four (very) different conditions:

1. Minimum word count (example: 500 words)
2. Min/max tags (example: 3-5 tags)
3. Min category (that isn't `uncategorized`)
4. Featured image is assigned

What we have so far
-------------------

As expected, the documentation is non-existent. But leads are scattered across the web. 

In `core/editor`, we can use [.lockPostSaving()][2] to disabled the `Publish` button, and unlock it via `.unlockPostSaving()`.

We can add a panel to the pre-publish screen via `PluginPrePublishPanel`. Example (by [MadMaardigan](https://wordpress.stackexchange.com/a/334671/24875)):

    var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;
    var registerPlugin = wp.plugins.registerPlugin;
    
    function Component() {
        // lock post saving
        wp.data.dispatch('core/editor').lockPostSaving()

        // unlock post saving
        // wp.data.dispatch('core/editor').unlockPostSaving()

        return wp.element.createElement(
            PluginPrePublishPanel,
            {   
                className: 'my-plugin-publish-panel',
                title: 'Panel title',
                initialOpen: true,
            },  
            'Panel content'
        );  
    }
    
    registerPlugin( 'my-plugin', {
      render: Component,
    });

It works:

[![Custom pre-publish panel][3]][3]

We also have great discussions on GitHub: [#7020](https://github.com/WordPress/gutenberg/issues/7020), [#7426](https://github.com/WordPress/gutenberg/issues/7426), [#13413](https://github.com/WordPress/gutenberg/issues/13413), [#15568](https://github.com/WordPress/gutenberg/issues/15568), [#10649](https://github.com/WordPress/gutenberg/issues/10649)...


  [1]: https://i.sstatic.net/zwGUd.png
  [2]: https://developer.wordpress.org/block-editor/data/data-core-editor/#lockPostSaving
  [3]: https://i.sstatic.net/SuFJ5.png