Skip to content
Snippets Groups Projects
Commit 03510ad3 authored by Erick Hitter's avatar Erick Hitter
Browse files

WP compat

parent 90d762ee
Branches
Tags
1 merge request!12Introduce native Gutenberg controls
Pipeline #3544 failed
...@@ -292,7 +292,10 @@ class WP_Revisions_Control { ...@@ -292,7 +292,10 @@ class WP_Revisions_Control {
*/ */
public function action_add_meta_boxes( $post_type, $post ) { public function action_add_meta_boxes( $post_type, $post ) {
if ( if (
use_block_editor_for_post( $post ) (
function_exists( 'use_block_editor_for_post' )
&& use_block_editor_for_post( $post )
)
|| ! post_type_supports( $post_type, 'revisions' ) || ! post_type_supports( $post_type, 'revisions' )
|| 'auto-draft' === get_post_status() || 'auto-draft' === get_post_status()
|| count( wp_get_post_revisions( $post ) ) < 1 || count( wp_get_post_revisions( $post ) ) < 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment