Skip to content

Commit

Permalink
Use internal helper function to determine if post type is supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Aug 17, 2022
1 parent 66008eb commit 8fcc45b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function is_using_gutenberg( $post ) {
}

// Make sure this post type supports Gutenberg
$use_block_editor = use_block_editor_for_post_type( $post->post_type );
$use_block_editor = dt_use_block_editor_for_post_type( $post->post_type );

/** This filter is documented in wp-admin/includes/post.php */
return apply_filters( 'use_block_editor_for_post', $use_block_editor, $post );
Expand Down Expand Up @@ -952,7 +952,7 @@ function dt_use_block_editor_for_post_type( $post_type ) {

// In some contexts this function doesn't exist so we can't reliably use the filter.
if ( function_exists( 'use_block_editor_for_post_type' ) ) {
// Filter documented in WordPress core.
/** This filter is documented in wp-admin/includes/post.php */
return apply_filters( 'use_block_editor_for_post_type', true, $post_type );
}

Expand Down

0 comments on commit 8fcc45b

Please sign in to comment.