diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index ede4333121..f01f1f0a90 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -19,10 +19,11 @@ $_wp_editor_expand = $_content_editor_dfw = false; * @since 4.0.0 * * @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 ) ) { + apply_filters( 'wp_editor_expand', true, $post_type ) ) { wp_enqueue_script('editor-expand'); $_content_editor_dfw = true; diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index b75fcf302f..e6ac370baf 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -2042,6 +2042,11 @@ final class WP_Internal_Pointers { } public static function pointer_wp410_dfw() { + // Don't show when editor-scrolling is not used. + if ( empty( $GLOBALS['_content_editor_dfw'] ) ) { + return; + } + $content = '

' . __( 'Distraction Free Writing' ) . '

'; $content .= '

' . __( 'Enable distraction free writing; everything fades away so you can focus. ' . 'Bring your admin back by moving your mouse, then start typing and it fades away.' ) . '

';