Make WordPress Core

Ticket #45145: 45145.diff

File 45145.diff, 9.0 KB (added by pento, 6 years ago)
  • package.json

    diff --git a/package.json b/package.json
    index b44371e13d..3731d53278 100644
    a b  
    5151        "dependencies": {
    5252                "@babel/polyfill": "^7.0.0",
    5353                "@wordpress/a11y": "^2.0.2",
    54                 "@wordpress/api-fetch": "^2.1.0",
     54                "@wordpress/api-fetch": "^2.2.0",
    5555                "@wordpress/autop": "^2.0.2",
    5656                "@wordpress/blob": "^2.1.0",
    57                 "@wordpress/block-library": "^2.1.4",
     57                "@wordpress/block-library": "^2.1.5",
    5858                "@wordpress/block-serialization-default-parser": "^1.0.1",
    59                 "@wordpress/blocks": "^4.0.4",
    60                 "@wordpress/components": "^4.2.1",
    61                 "@wordpress/compose": "^2.0.5",
    62                 "@wordpress/core-data": "^2.0.6",
    63                 "@wordpress/data": "^2.1.4",
    64                 "@wordpress/date": "^2.0.3",
    65                 "@wordpress/deprecated": "^2.0.2",
     59                "@wordpress/blocks": "^5.0.0",
     60                "@wordpress/components": "^5.0.0",
     61                "@wordpress/compose": "^2.1.0",
     62                "@wordpress/core-data": "^2.0.7",
     63                "@wordpress/data": "^3.0.0",
     64                "@wordpress/date": "^2.1.0",
     65                "@wordpress/deprecated": "^2.0.3",
    6666                "@wordpress/dom": "^2.0.4",
    6767                "@wordpress/dom-ready": "^2.0.2",
    68                 "@wordpress/edit-post": "^1.0.4",
    69                 "@wordpress/editor": "^5.0.1",
    70                 "@wordpress/element": "^2.1.4",
     68                "@wordpress/edit-post": "^2.0.0",
     69                "@wordpress/editor": "^6.0.0",
     70                "@wordpress/element": "^2.1.5",
    7171                "@wordpress/escape-html": "^1.0.1",
    72                 "@wordpress/hooks": "^2.0.2",
     72                "@wordpress/format-library": "^1.0.0",
     73                "@wordpress/hooks": "^2.0.3",
    7374                "@wordpress/html-entities": "^2.0.2",
    7475                "@wordpress/i18n": "^3.0.1",
    7576                "@wordpress/is-shallow-equal": "^1.1.4",
    7677                "@wordpress/keycodes": "^2.0.2",
    77                 "@wordpress/list-reusable-blocks": "^1.1.4",
    78                 "@wordpress/nux": "^2.0.6",
    79                 "@wordpress/plugins": "^2.0.5",
     78                "@wordpress/list-reusable-blocks": "^1.1.5",
     79                "@wordpress/notices": "^1.0.0",
     80                "@wordpress/nux": "^2.0.7",
     81                "@wordpress/plugins": "^2.0.6",
    8082                "@wordpress/redux-routine": "^3.0.3",
    81                 "@wordpress/rich-text": "^1.0.1",
     83                "@wordpress/rich-text": "^1.0.2",
    8284                "@wordpress/shortcode": "^2.0.2",
    8385                "@wordpress/token-list": "^1.0.2",
    84                 "@wordpress/url": "^2.1.0",
    85                 "@wordpress/viewport": "^2.0.5",
    86                 "@wordpress/wordcount": "^2.0.2",
     86                "@wordpress/url": "^2.2.0",
     87                "@wordpress/viewport": "^2.0.6",
     88                "@wordpress/wordcount": "^2.0.3",
    8789                "element-closest": "^2.0.2",
    8890                "formdata-polyfill": "^3.0.12",
    8991                "lodash": "^4.17.11",
     
    9395                "react-dom": "^16.5.2",
    9496                "whatwg-fetch": "^3.0.0"
    9597        },
    96         "scripts":{
     98        "scripts": {
    9799                "grunt": "grunt"
    98100        }
    99101}
  • src/wp-admin/edit-form-blocks.php

    diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php
    index f242b48eb9..8e9d6e05b0 100644
    a b remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); 
    3737
    3838wp_enqueue_script( 'heartbeat' );
    3939wp_enqueue_script( 'wp-edit-post' );
     40wp_enqueue_script( 'wp-format-library' );
    4041
    4142$rest_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;
    4243
    wp_enqueue_editor(); 
    355356 * Styles
    356357 */
    357358wp_enqueue_style( 'wp-edit-post' );
     359wp_enqueue_style( 'wp-format-library' );
    358360
    359361/**
    360362 * Fires after block assets have been enqueued for the editing interface.
  • src/wp-admin/includes/post.php

    diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
    index a95ff78bc6..2f444d293b 100644
    a b function get_block_categories( $post ) { 
    19581958                array(
    19591959                        'slug'  => 'common',
    19601960                        'title' => __( 'Common Blocks' ),
     1961                        'icon'  => 'screenoptions',
    19611962                ),
    19621963                array(
    19631964                        'slug'  => 'formatting',
    19641965                        'title' => __( 'Formatting' ),
     1966                        'icon'  => null,
    19651967                ),
    19661968                array(
    19671969                        'slug'  => 'layout',
    19681970                        'title' => __( 'Layout Elements' ),
     1971                        'icon'  => null,
    19691972                ),
    19701973                array(
    19711974                        'slug'  => 'widgets',
    19721975                        'title' => __( 'Widgets' ),
     1976                        'icon'  => null,
    19731977                ),
    19741978                array(
    19751979                        'slug'  => 'embed',
    19761980                        'title' => __( 'Embeds' ),
     1981                        'icon'  => null,
    19771982                ),
    19781983                array(
    19791984                        'slug'  => 'reusable',
    19801985                        'title' => __( 'Reusable Blocks' ),
     1986                        'icon'  => null,
    19811987                ),
    19821988        );
    19831989
  • src/wp-includes/blocks/archives.php

    diff --git a/src/wp-includes/blocks/archives.php b/src/wp-includes/blocks/archives.php
    index adcc61c233..97c8849ffc 100644
    a b function render_block_core_archives( $attributes ) { 
    2929
    3030        if ( ! empty( $attributes['displayAsDropdown'] ) ) {
    3131
     32                $class .= ' wp-block-archives-dropdown';
     33
    3234                $dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
    3335                $title       = __( 'Archives', 'gutenberg' );
    3436
    function render_block_core_archives( $attributes ) { 
    7779                );
    7880        } else {
    7981
     82                $class .= ' wp-block-archives-list';
     83
    8084                /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
    8185                $archives_args = apply_filters(
    8286                        'widget_archives_args',
  • src/wp-includes/blocks/latest-posts.php

    diff --git a/src/wp-includes/blocks/latest-posts.php b/src/wp-includes/blocks/latest-posts.php
    index 070abafeb4..b395d8a2ba 100644
    a b function render_block_core_latest_posts( $attributes ) { 
    6262                $class .= ' columns-' . $attributes['columns'];
    6363        }
    6464
     65        if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
     66                $class .= ' has-dates';
     67        }
     68
    6569        if ( isset( $attributes['className'] ) ) {
    6670                $class .= ' ' . $attributes['className'];
    6771        }
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index 93783ebf6c..4bbedd4639 100644
    a b function wp_default_packages_scripts( &$scripts ) { 
    175175                        'wp-blob',
    176176                        'wp-block-serialization-default-parser',
    177177                        'wp-data',
    178                         'wp-deprecated',
    179178                        'wp-dom',
    180179                        'wp-element',
    181180                        'wp-hooks',
    function wp_default_packages_scripts( &$scripts ) { 
    225224                        'wp-is-shallow-equal',
    226225                        'wp-keycodes',
    227226                        'wp-polyfill',
    228                         'wp-url',
    229227                        'wp-rich-text',
     228                        'wp-url',
     229                ),
     230                'compose' => array(
     231                        'lodash',
     232                        'wp-deprecated',
     233                        'wp-element',
     234                        'wp-is-shallow-equal',
     235                        'wp-polyfill'
    230236                ),
    231                 'compose' => array( 'lodash', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill' ),
    232237                'core-data' => array( 'wp-data', 'wp-api-fetch', 'wp-polyfill', 'wp-url', 'lodash' ),
    233238                'data' => array(
    234239                        'lodash',
    235240                        'wp-compose',
    236                         'wp-deprecated',
    237241                        'wp-element',
    238242                        'wp-is-shallow-equal',
    239243                        'wp-polyfill',
    function wp_default_packages_scripts( &$scripts ) { 
    291295                        'wp-i18n',
    292296                        'wp-is-shallow-equal',
    293297                        'wp-keycodes',
     298                        'wp-notices',
    294299                        'wp-nux',
    295300                        'wp-polyfill',
    296301                        'wp-tinymce',
    function wp_default_packages_scripts( &$scripts ) { 
    302307                ),
    303308                'element' => array( 'wp-polyfill', 'react', 'react-dom', 'lodash', 'wp-escape-html' ),
    304309                'escape-html' => array( 'wp-polyfill' ),
     310                'format-library' => array(
     311                        'wp-components',
     312                        'wp-dom',
     313                        'wp-editor',
     314                        'wp-element',
     315                        'wp-i18n',
     316                        'wp-keycodes',
     317                        'wp-polyfill',
     318                        'wp-rich-text',
     319                        'wp-url',
     320                ),
    305321                'hooks' => array( 'wp-polyfill' ),
    306322                'html-entities' => array( 'wp-polyfill' ),
    307323                'i18n' => array( 'wp-polyfill' ),
    function wp_default_packages_scripts( &$scripts ) { 
    316332                        'wp-i18n',
    317333                        'wp-polyfill',
    318334                ),
     335                'notices' => array(
     336                        'lodash',
     337                        'wp-a11y',
     338                        'wp-data',
     339                        'wp-polyfill-ecmascript',
     340                ),
    319341                'nux' => array(
    320342                        'wp-element',
    321343                        'wp-components',
    322344                        'wp-compose',
    323345                        'wp-data',
     346                        'wp-deprecated',
    324347                        'wp-i18n',
    325348                        'wp-polyfill',
    326349                        'lodash',
    327350                ),
    328351                'plugins' => array( 'lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill' ),
    329352                'redux-routine' => array( 'wp-polyfill' ),
    330                 'rich-text' => array( 'wp-polyfill', 'wp-escape-html', 'lodash' ),
     353                'rich-text' => array(
     354                        'lodash',
     355                        'wp-polyfill',
     356                        'wp-data',
     357                        'wp-escape-html',
     358                ),
    331359                'shortcode' => array( 'wp-polyfill', 'lodash' ),
    332360                'token-list' => array( 'lodash', 'wp-polyfill' ),
    333361                'url' => array( 'wp-polyfill' ),
    function wp_default_packages_inline_scripts( &$scripts ) { 
    380408                                '       var storageKey = "WP_DATA_USER_" + userId;',
    381409                                '       wp.data',
    382410                                '               .use( wp.data.plugins.persistence, { storageKey: storageKey } )',
    383                                 '               .use( wp.data.plugins.asyncGenerator )',
    384411                                '               .use( wp.data.plugins.controls );',
    385412                                '} )()',
    386413                        )
    function wp_default_styles( &$styles ) { 
    16321659                'components' => array(),
    16331660                'edit-post' => array( 'wp-components', 'wp-editor', 'wp-edit-blocks', 'wp-block-library', 'wp-nux' ),
    16341661                'editor' => array( 'wp-components', 'wp-editor-font', 'wp-nux' ),
     1662                'format-library' => array(),
    16351663                'list-reusable-blocks' => array( 'wp-components' ),
    16361664                'nux' => array( 'wp-components' ),
    16371665        );
  • tools/webpack/packages.js

    diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js
    index 4ed4bc23fe..3a9f67e33a 100644
    a b module.exports = function( env = { environment: 'production', watch: false } ) { 
    7474                'editor',
    7575                'element',
    7676                'escape-html',
     77                'format-library',
    7778                'hooks',
    7879                'html-entities',
    7980                'i18n',
    8081                'is-shallow-equal',
    8182                'keycodes',
    8283                'list-reusable-blocks',
     84                'notices',
    8385                'nux',
    8486                'plugins',
    8587                'redux-routine',