Last active
December 10, 2018 05:22
-
-
Save webbingstudio/3b9bc494f877389b6e2503dede1d270f to your computer and use it in GitHub Desktop.
WordPress5.0でプラグインの新規追加画面・編集画面が真っ白になった場合の対処 ref: https://qiita.com/webbingstudio@github/items/f86e964226e7617a72f4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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