Skip to content

Instantly share code, notes, and snippets.

@webbingstudio
Last active December 10, 2018 05:22
Show Gist options
  • Save webbingstudio/3b9bc494f877389b6e2503dede1d270f to your computer and use it in GitHub Desktop.
Save webbingstudio/3b9bc494f877389b6e2503dede1d270f to your computer and use it in GitHub Desktop.
WordPress5.0でプラグインの新規追加画面・編集画面が真っ白になった場合の対処 ref: https://qiita.com/webbingstudio@github/items/f86e964226e7617a72f4
function WS_remove_block_editor( $user_block_editor, $post ) {
if ( $post->post_type === 'acf-field-group' ) {
$use_block_editor = false;
} else {
$use_block_editor = true;
}
return $use_block_editor;
}
add_filter( 'use_block_editor_for_post', 'WS_remove_block_editor', 10, 2 );
function WS_remove_block_editor( $user_block_editor, $post ) {
if (
( $post->post_type === 'acf-field-group' )
||( $post->post_type === 'mw-wp-form' )
) {
$use_block_editor = false;
} else {
$use_block_editor = true;
}
return $use_block_editor;
}
add_filter( 'use_block_editor_for_post', 'WS_remove_block_editor', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment