Skip to content

Commit 0f6d6f8

Browse files
Merge pull request #1058 from Codeinwp/bugfix/pro/610
Fixed instant sharing for classic editor
2 parents 612c32d + e0cb940 commit 0f6d6f8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

includes/admin/class-rop-admin.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -773,12 +773,13 @@ public static function is_classic_editor() {
773773
return true;
774774
}
775775

776+
$post_id = ! empty( $_GET['post'] ) ? (int) $_GET['post'] : 0;
777+
776778
if ( ! class_exists( 'Classic_Editor' ) ) {
777-
return false;
779+
$post = get_post( $post_id );
780+
return $post && ! use_block_editor_for_post_type( $post->post_type );
778781
}
779782

780-
$post_id = ! empty( $_GET['post'] ) ? (int) $_GET['post'] : 0;
781-
782783
$allow_users_to_switch_editors = ( 'allow' === get_option( 'classic-editor-allow-users' ) );
783784

784785
if ( $post_id && $allow_users_to_switch_editors && ! isset( $_GET['classic-editor__forget'] ) ) {

0 commit comments

Comments
 (0)