WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/14/17 17:08:20 (4 months 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.

Props westonruter, melchoyce, gitlost for testing, obenland for testing, dougal for testing, afercia for testing.
See #35243.
Fixes #40951.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r40948 r41050  
    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.