Editor: no pointer for DFW v2 when editor-scrolling is not used. Pass `$post_type` in the `wp_editor_expand` filter. See #30458.
Built from https://develop.svn.wordpress.org/trunk@30641 git-svn-id: http://core.svn.wordpress.org/trunk@30631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4718bf4f76
commit
760e3e5fbd
|
@ -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>';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-beta2-30640';
|
||||
$wp_version = '4.1-beta2-30641';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue