Created
October 11, 2012 20:19
-
-
Save pdewouters/3875212 to your computer and use it in GitHub Desktop.
disable wysiwyg on specific page ID
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
add_action( 'load-post.php', 'kjs_hide_editor' ); | |
function kjs_hide_editor() { | |
global $current_screen; | |
if(in_array($current_screen->id, array('post', 'page','edit-post','edit-page'))){ | |
$post_id = isset( $_GET['post'] ) ? $_GET['post'] : $_POST['post_ID']; | |
if ( ! isset( $post_id ) || ! is_admin() ) return; | |
if ( 743 == $post_id ) | |
remove_post_type_support( 'page', 'editor' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment