Editor: no pointer for DFW v2 when editor-scrolling is not used. Pass $post_type
in the wp_editor_expand
filter. See #30458.
git-svn-id: https://develop.svn.wordpress.org/trunk@30641 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a411918199
commit
8dabfb3b85
@ -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;
|
||||
|
@ -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 = '<h3>' . __( 'Distraction Free Writing' ) . '</h3>';
|
||||
$content .= '<p>' . __( '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.' ) . '</p>';
|
||||
|
Loading…
Reference in New Issue
Block a user