diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 9356b1a245..6a1bc06ff4 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -11,12 +11,14 @@ if ( !defined('ABSPATH') ) die('-1'); wp_enqueue_script('post'); +$_wp_editor_expand = false; if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() && - ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) ) { + ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) && + apply_filters( 'wp_editor_expand', true ) ) { wp_enqueue_script('editor-expand'); - $_wp_autoresize_on = true; + $_wp_editor_expand = ( get_user_setting( 'editor_expand', 'on' ) === 'on' ); } if ( wp_is_mobile() ) @@ -490,7 +492,7 @@ do_action( 'edit_form_after_title', $post ); if ( post_type_supports($post_type, 'editor') ) { ?> -