Skip to content

Commit

Permalink
chore(NO-TASK): Bump version, block block editor
Browse files Browse the repository at this point in the history
Release-As: v1.7.0
  • Loading branch information
aaronware committed Aug 26, 2024
1 parent 44dbfca commit 3ff6e06
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions src/Controller/Admin/Courier_Notice_Metabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@ class Courier_Notice_Metabox {
public function register_actions() {
add_action( 'add_meta_boxes_courier_notice', array( $this, 'add_meta_boxes' ), 99 );

add_filter( 'use_block_editor_for_post_type', [ $this, 'disable_block_editor' ], 10, 2 );
}

/**
* Disable the block editor for courier notices
*
* Until we create blocks
*
* @param $current_status
* @param $post_type
*
* @return mixed
*/
public function disable_block_editor( $current_status, $post_type ) {

if ( $post_type === 'courier_notice' ) {
return false;
}

return $current_status; // Keep current editor status
}


Expand Down

0 comments on commit 3ff6e06

Please sign in to comment.