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
This commit is contained in:
Sergey Biryukov 2020-08-03 12:09:34 +00:00
parent a5cb12dce1
commit 35a4b7bc24

View File

@ -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;