Make WordPress Core


Ignore:
Timestamp:
12/14/2018 04:42:55 AM (6 years ago)
Author:
pento
Message:

Build Tools: Update the @wordpress/* packages.

Merges [43801,43803] from the 5.0 branch to trunk.

See #45145.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/script-loader.php

    r44162 r44163  
    167167
    168168    $packages_dependencies = array(
    169         'api-fetch'                          => array( 'wp-polyfill', 'wp-hooks', 'wp-i18n' ),
     169        'api-fetch'                          => array( 'wp-polyfill', 'wp-hooks', 'wp-i18n', 'wp-url' ),
    170170        'a11y'                               => array( 'wp-dom-ready', 'wp-polyfill' ),
    171171        'autop'                              => array( 'wp-polyfill' ),
     
    963963                        'mejs.download-video'      => __( 'Download Video' ),
    964964                        'mejs.fullscreen'          => __( 'Fullscreen' ),
     965                        'mejs.time-jump-forward'   => array( __( 'Jump forward 1 second' ), __( 'Jump forward %1 seconds' ) ),
    965966                        'mejs.loop'                => __( 'Toggle Loop' ),
    966967                        'mejs.play'                => __( 'Play' ),
     
    969970                        'mejs.time-slider'         => __( 'Time Slider' ),
    970971                        'mejs.time-help-text'      => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ),
     972                        'mejs.time-skip-back'      => array( __( 'Skip back 1 second' ), __( 'Skip back %1 seconds' ) ),
    971973                        'mejs.captions-subtitles'  => __( 'Captions/Subtitles' ),
    972974                        'mejs.captions-chapters'   => __( 'Chapters' ),
     
    980982                        'mejs.audio-player'        => __( 'Audio Player' ),
    981983                        'mejs.ad-skip'             => __( 'Skip ad' ),
     984                        'mejs.ad-skip-info'        => array( __( 'Skip in 1 second' ), __( 'Skip in %1 seconds' ) ),
    982985                        'mejs.source-chooser'      => __( 'Source Chooser' ),
    983986                        'mejs.stop'                => __( 'Stop' ),
     
    10681071    $scripts->add( 'wp-codemirror', '/wp-includes/js/codemirror/codemirror.min.js', array(), '5.29.1-alpha-ee20357' );
    10691072    $scripts->add( 'csslint', '/wp-includes/js/codemirror/csslint.js', array(), '1.0.5' );
    1070     $scripts->add( 'jshint', '/wp-includes/js/codemirror/fakejshint.js', array( 'esprima' ), '2.9.5' );
    1071     $scripts->add( 'esprima', '/wp-includes/js/codemirror/esprima.js', array(), '4.0.0' );
     1073    $scripts->add( 'jshint', '/wp-includes/js/codemirror/jshint.js', array(), '2.9.5.999' );
    10721074    $scripts->add( 'jsonlint', '/wp-includes/js/codemirror/jsonlint.js', array(), '1.6.2' );
    10731075    $scripts->add( 'htmlhint', '/wp-includes/js/codemirror/htmlhint.js', array(), '0.9.14-xwp' );
     
    12281230            'themeInstallUnavailable' => sprintf(
    12291231                /* translators: %s: URL to Add Themes admin screen */
    1230                 __( 'You won&#8217;t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href="%s">add themes in the admin</a>.' ),
     1232                   __( 'You won&#8217;t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href="%s">add themes in the admin</a>.' ),
    12311233                esc_url( admin_url( 'theme-install.php' ) )
    12321234            ),
     
    13361338                'termAdded'    => __( 'Term added.' ),
    13371339                'termRemoved'  => __( 'Term removed.' ),
    1338                 'restURL'      => rest_url( '/wp/v2/tags' ),
    1339 
    1340                 /**
    1341                  * Filters the minimum number of characters required to fire a tag search via Ajax.
    1342                  *
    1343                  * Previous to 5.0.0, this filter passed taxonomy and search context parameters.
    1344                  * @since 4.0.0
    1345                  *
    1346                  * @param int         $characters The minimum number of characters required. Default 2.
    1347                  */
    1348                 'minChars'     => (int) apply_filters( 'term_search_min_chars', 2 ),
    13491340            )
    13501341        );
     
    13991390        $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) );
    14001391
    1401         $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-a11y' ), false, 1 );
     1392        $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 );
    14021393        did_action( 'init' ) && $scripts->add_inline_script(
    14031394            'admin-widgets',
     
    14061397                wp_json_encode(
    14071398                    array(
    1408                         'save'        => __( 'Save' ),
    1409                         'saved'       => __( 'Saved' ),
    1410                         'saveAlert'   => __( 'The changes you made will be lost if you navigate away from this page.' ),
    1411                         'widgetAdded' => __( 'Widget has been added to the selected sidebar' ),
     1399                        'save'      => __( 'Save' ),
     1400                        'saved'     => __( 'Saved' ),
     1401                        'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
    14121402                    )
    14131403                )
     
    24172407    }
    24182408}
    2419 
    2420 /**
    2421  * Handles the enqueueing of block scripts and styles that are common to both
    2422  * the editor and the front-end.
    2423  *
    2424  * @since 5.0.0
    2425  *
    2426  * @global WP_Screen $current_screen
    2427  */
    2428 function wp_common_block_scripts_and_styles() {
    2429     global $current_screen;
    2430 
    2431     if ( is_admin() && ! $current_screen->is_block_editor() ) {
    2432         return;
    2433     }
    2434 
    2435     wp_enqueue_style( 'wp-block-library' );
    2436 
    2437     if ( current_theme_supports( 'wp-block-styles' ) ) {
    2438         wp_enqueue_style( 'wp-block-library-theme' );
    2439     }
    2440 
    2441     /**
    2442      * Fires after enqueuing block assets for both editor and front-end.
    2443      *
    2444      * Call `add_action` on any hook before 'wp_enqueue_scripts'.
    2445      *
    2446      * In the function call you supply, simply use `wp_enqueue_script` and
    2447      * `wp_enqueue_style` to add your functionality to the Gutenberg editor.
    2448      *
    2449      * @since 5.0.0
    2450      */
    2451       do_action( 'enqueue_block_assets' );
    2452 }
    2453 
    2454 /**
    2455  * Enqueues registered block scripts and styles, depending on current rendered
    2456  * context (only enqueuing editor scripts while in context of the editor).
    2457  *
    2458  * @since 5.0.0
    2459  *
    2460  * @global WP_Screen $current_screen
    2461  */
    2462 function wp_enqueue_registered_block_scripts_and_styles() {
    2463     global $current_screen;
    2464 
    2465     $is_editor = ( is_admin() && $current_screen->is_block_editor() );
    2466 
    2467     $block_registry = WP_Block_Type_Registry::get_instance();
    2468     foreach ( $block_registry->get_all_registered() as $block_name => $block_type ) {
    2469         // Front-end styles.
    2470         if ( ! empty( $block_type->style ) ) {
    2471             wp_enqueue_style( $block_type->style );
    2472         }
    2473 
    2474         // Front-end script.
    2475         if ( ! empty( $block_type->script ) ) {
    2476             wp_enqueue_script( $block_type->script );
    2477         }
    2478 
    2479         // Editor styles.
    2480         if ( $is_editor && ! empty( $block_type->editor_style ) ) {
    2481             wp_enqueue_style( $block_type->editor_style );
    2482         }
    2483 
    2484         // Editor script.
    2485         if ( $is_editor && ! empty( $block_type->editor_script ) ) {
    2486             wp_enqueue_script( $block_type->editor_script );
    2487         }
    2488     }
    2489 }
Note: See TracChangeset for help on using the changeset viewer.