From 35a4b7bc24f692fc889fd56bd44dbfd51f662c07 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 3 Aug 2020 12:09:34 +0000 Subject: [PATCH] Docs: Correct placement for `wp_editor_expand` filter DocBlock. See #50768. git-svn-id: https://develop.svn.wordpress.org/trunk@48714 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-advanced.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index bc452a0776..993856d927 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -53,9 +53,13 @@ $_content_editor_dfw = false; * @param bool $expand Whether to enable the 'expand' functionality. Default true. * @param string $post_type Post type. */ -if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() && - ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) && - apply_filters( 'wp_editor_expand', true, $post_type ) ) { +$_wp_editor_expand_enabled = apply_filters( 'wp_editor_expand', true, $post_type ); + +if ( post_type_supports( $post_type, 'editor' ) + && ! wp_is_mobile() + && ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) + && $_wp_editor_expand_enabled +) { wp_enqueue_script( 'editor-expand' ); $_content_editor_dfw = true;