Make WordPress Core


Ignore:
Timestamp:
07/14/2017 05:27:33 PM (7 years ago)
Author:
westonruter
Message:

Widgets: Add legacy mode for Text widget and add usage pointers to default visual mode.

The Text widget in legacy mode omits TinyMCE and retains old behavior for matching pre-existing Text widgets. Usage pointers added to default visual mode appear when attempting to paste HTML code into the Visual tab and when clicking on the Text tab, informing users of the new Custom HTML widget.

Merges [41050] to 4.8 branch.
Props westonruter, melchoyce, gitlost for testing, obenland for testing, dougal for testing, afercia for testing.
See #35243.
Fixes #40951 for 4.8.1.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

  • branches/4.8/src/wp-includes/script-loader.php

    r40866 r41053  
    609609        $scripts->add( 'media-image-widget', "/wp-admin/js/widgets/media-image-widget$suffix.js", array( 'media-widgets' ) );
    610610        $scripts->add( 'media-video-widget', "/wp-admin/js/widgets/media-video-widget$suffix.js", array( 'media-widgets', 'media-audiovideo' ) );
    611         $scripts->add( 'text-widgets', "/wp-admin/js/widgets/text-widgets$suffix.js", array( 'jquery', 'backbone', 'editor', 'wp-util' ) );
     611        $scripts->add( 'text-widgets', "/wp-admin/js/widgets/text-widgets$suffix.js", array( 'jquery', 'backbone', 'editor', 'wp-util', 'wp-a11y' ) );
    612612        $scripts->add_inline_script( 'text-widgets', 'wp.textWidgets.init();', 'after' );
    613613
     
    846846    $styles->add( 'about',               "/wp-admin/css/about$suffix.css" );
    847847    $styles->add( 'nav-menus',           "/wp-admin/css/nav-menus$suffix.css" );
    848     $styles->add( 'widgets',             "/wp-admin/css/widgets$suffix.css" );
     848    $styles->add( 'widgets',             "/wp-admin/css/widgets$suffix.css", array( 'wp-pointer' ) );
    849849    $styles->add( 'site-icon',           "/wp-admin/css/site-icon$suffix.css" );
    850850    $styles->add( 'l10n',                "/wp-admin/css/l10n$suffix.css" );
Note: See TracChangeset for help on using the changeset viewer.