Not for Publication
This extends the pmc-not-for-publication plugin functionality for Gutenberg. That plugin handles
the registration of the post type and taxonomies, but the class and script in this plugin extends
support for the block editor.
Only available on the pmc-nfp post types.
Behavior
- The
pmc-nfppost type only supports saving as a draft. - The "Copy to Post" button is only usable if the user can publish posts.
- Once a post is copied, that post is saved to the post type as a draft.
- The
pmc-nfppost can then be moved to trash or kept, but can not longer be copied. - On copy the
pmc-nfppost has a new post meta valuepmc_nfp_post_copywhich is the post id of the new post. - All post meta saved to the
pmc-nfppost type, available to REST, will be transfered on save.
Available Filters
editor.NotForPublicationButton.allowedPostType
Usage
wp.hooks.addFilter(
'editor.NotForPublicationButton.allowedPostType',
'pmc/custom-allowed-post-type',
'page'
);