Changeset 8567
- Timestamp:
- 04/02/2019 08:24:30 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/gutenberg-tweaks.php
r8026 r8567 17 17 return $defaults; 18 18 } 19 20 /** 21 * Disable block editor for WordCamp post types, since its not fully compatible yet. 22 * In block editor flow, when an organizer who do not have permission to change status, but are author of the post, tries to edit a WordCamp post, "Publish" button gets replaced with "Submit for Review" button. 23 * Since we do not support review flow for WordCamp Post Type, this has unintended consequences which includes post status being set to "Needs Vetting", there by accidentally changing WordCamp Status. 24 * 25 * @param string $status 26 * @param string $post_type 27 * 28 * @return bool 29 */ 30 function disable_block_editor_for_wordcamp( $use_block_editor, $post_type ) { 31 return $use_block_editor && WCPT_POST_TYPE_ID !== $post_type; 32 } 33 34 add_filter( 'use_block_editor_for_post_type', __NAMESPACE__ . '\disable_block_editor_for_wordcamp', 10, 2 );
Note: See TracChangeset
for help on using the changeset viewer.