Make WordPress Core

Changeset 30641


Ignore:
Timestamp:
11/30/2014 06:36:59 AM (10 years ago)
Author:
azaozz
Message:

Editor: no pointer for DFW v2 when editor-scrolling is not used. Pass $post_type in the wp_editor_expand filter. See #30458.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r30599 r30641  
    2020 *
    2121 * @param bool $expand Whether to enable the 'expand' functionality. Default true.
     22 * @param string $post_type Post type.
    2223 */
    2324if ( post_type_supports( $post_type, 'editor' ) && ! wp_is_mobile() &&
    2425     ! ( $is_IE && preg_match( '/MSIE [5678]/', $_SERVER['HTTP_USER_AGENT'] ) ) &&
    25      apply_filters( 'wp_editor_expand', true ) ) {
     26     apply_filters( 'wp_editor_expand', true, $post_type ) ) {
    2627
    2728    wp_enqueue_script('editor-expand');
  • trunk/src/wp-admin/includes/template.php

    r30574 r30641  
    20432043
    20442044    public static function pointer_wp410_dfw() {
     2045        // Don't show when editor-scrolling is not used.
     2046        if ( empty( $GLOBALS['_content_editor_dfw'] ) ) {
     2047            return;
     2048        }
     2049
    20452050        $content  = '<h3>' . __( 'Distraction Free Writing' ) . '</h3>';
    20462051        $content .= '<p>' . __( 'Enable distraction free writing; everything fades away so you can focus. '
Note: See TracChangeset for help on using the changeset viewer.