Make WordPress Core

Ticket #50643: 50643.2.diff

File 50643.2.diff, 27.1 KB (added by kraftbj, 5 years ago)
  • package-lock.json

    diff --git package-lock.json package-lock.json
    index bc1f2273b6..0a113e3bbc 100644
     
    21162116                        }
    21172117                },
    21182118                "@sinonjs/fake-timers": {
    2119                         "version": "6.0.0",
    2120                         "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.0.tgz",
    2121                         "integrity": "sha512-atR1J/jRXvQAb47gfzSK8zavXy7BcpnYq21ALon0U99etu99vsir0trzIO3wpeLtW+LLVY6X7EkfVTbjGSH8Ww==",
     2119                        "version": "6.0.1",
     2120                        "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz",
     2121                        "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==",
    21222122                        "dev": true,
    21232123                        "requires": {
    21242124                                "@sinonjs/commons": "^1.7.0"
     
    1281712817                        }
    1281812818                },
    1281912819                "grunt-rtlcss": {
    12820                         "version": "2.0.1",
    12821                         "resolved": "https://registry.npmjs.org/grunt-rtlcss/-/grunt-rtlcss-2.0.1.tgz",
    12822                         "integrity": "sha1-6eYc5DdAY5f546Sxv2aeR+cf/MM=",
     12820                        "version": "2.0.2",
     12821                        "resolved": "https://registry.npmjs.org/grunt-rtlcss/-/grunt-rtlcss-2.0.2.tgz",
     12822                        "integrity": "sha512-WbI2thnwlF04N+xvJu+NxqEaCyPuLyar196SYhEQFZ2EJHkOS8YYE+Zkh+X9cWhwAtKp7ZEpR/IKXcyQggOIsQ==",
    1282312823                        "dev": true,
    1282412824                        "requires": {
    1282512825                                "chalk": "^1.0.0",
     
    1762417624                        "dev": true
    1762517625                },
    1762617626                "nise": {
    17627                         "version": "4.0.3",
    17628                         "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz",
    17629                         "integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==",
     17627                        "version": "4.0.4",
     17628                        "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz",
     17629                        "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==",
    1763017630                        "dev": true,
    1763117631                        "requires": {
    1763217632                                "@sinonjs/commons": "^1.7.0",
     
    2221622216                        }
    2221722217                },
    2221822218                "sinon": {
    22219                         "version": "9.0.1",
    22220                         "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.1.tgz",
    22221                         "integrity": "sha512-iTTyiQo5T94jrOx7X7QLBZyucUJ2WvL9J13+96HMfm2CGoJYbIPqRfl6wgNcqmzk0DI28jeGx5bUTXizkrqBmg==",
     22219                        "version": "9.0.2",
     22220                        "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz",
     22221                        "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==",
    2222222222                        "dev": true,
    2222322223                        "requires": {
    22224                                 "@sinonjs/commons": "^1.7.0",
    22225                                 "@sinonjs/fake-timers": "^6.0.0",
     22224                                "@sinonjs/commons": "^1.7.2",
     22225                                "@sinonjs/fake-timers": "^6.0.1",
    2222622226                                "@sinonjs/formatio": "^5.0.1",
    2222722227                                "@sinonjs/samsam": "^5.0.3",
    2222822228                                "diff": "^4.0.2",
     
    2223022230                                "supports-color": "^7.1.0"
    2223122231                        },
    2223222232                        "dependencies": {
     22233                                "@sinonjs/commons": {
     22234                                        "version": "1.8.0",
     22235                                        "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz",
     22236                                        "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==",
     22237                                        "dev": true,
     22238                                        "requires": {
     22239                                                "type-detect": "4.0.8"
     22240                                        }
     22241                                },
    2223322242                                "diff": {
    2223422243                                        "version": "4.0.2",
    2223522244                                        "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
    2223622245                                        "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
    2223722246                                        "dev": true
    22238                                 },
    22239                                 "has-flag": {
    22240                                         "version": "4.0.0",
    22241                                         "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
    22242                                         "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
    22243                                         "dev": true
    22244                                 },
    22245                                 "supports-color": {
    22246                                         "version": "7.1.0",
    22247                                         "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
    22248                                         "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
    22249                                         "dev": true,
    22250                                         "requires": {
    22251                                                 "has-flag": "^4.0.0"
    22252                                         }
    2225322247                                }
    2225422248                        }
    2225522249                },
     
    2414824142                                        }
    2414924143                                },
    2415024144                                "tar-stream": {
    24151                                         "version": "2.1.2",
    24152                                         "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz",
    24153                                         "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==",
     24145                                        "version": "2.1.3",
     24146                                        "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.3.tgz",
     24147                                        "integrity": "sha512-Z9yri56Dih8IaK8gncVPx4Wqt86NDmQTSh49XLZgjWpGZL9GK9HKParS2scqHCC4w6X9Gh2jwaU45V47XTKwVA==",
    2415424148                                        "dev": true,
    2415524149                                        "requires": {
    2415624150                                                "bl": "^4.0.1",
     
    2469624690                        "dev": true
    2469724691                },
    2469824692                "uglify-js": {
    24699                         "version": "3.6.0",
    24700                         "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
    24701                         "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
    24702                         "dev": true,
    24703                         "requires": {
    24704                                 "commander": "~2.20.0",
    24705                                 "source-map": "~0.6.1"
    24706                         },
    24707                         "dependencies": {
    24708                                 "source-map": {
    24709                                         "version": "0.6.1",
    24710                                         "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
    24711                                         "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
    24712                                         "dev": true
    24713                                 }
    24714                         }
     24693                        "version": "3.10.0",
     24694                        "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz",
     24695                        "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==",
     24696                        "dev": true
    2471524697                },
    2471624698                "uglify-to-browserify": {
    2471724699                        "version": "1.0.2",
  • package.json

    diff --git package.json package.json
    index 8c1e589be4..959900f90b 100644
     
    5656                "grunt-patch-wordpress": "~2.0.0",
    5757                "grunt-postcss": "~0.9.0",
    5858                "grunt-replace-lts": "~1.1.0",
    59                 "grunt-rtlcss": "~2.0.1",
     59                "grunt-rtlcss": "2.0.2",
    6060                "grunt-sass": "~3.1.0",
    6161                "grunt-webpack": "^3.1.3",
    6262                "ink-docstrap": "1.3.2",
     
    6767                "prettier": "npm:wp-prettier@2.0.5",
    6868                "puppeteer": "npm:puppeteer-core@3.0.0",
    6969                "qunit": "~2.9.0",
    70                 "sinon": "~9.0.0",
     70                "sinon": "9.0.2",
    7171                "sinon-test": "~3.0.0",
    7272                "source-map-loader": "^0.2.4",
    73                 "uglify-js": "^3.6.0",
     73                "uglify-js": "3.10.0",
    7474                "uglifyjs-webpack-plugin": "2.2.0",
    7575                "uuid": "8.2.0",
    7676                "wait-on": "3.3.0",
  • src/wp-includes/assets/script-loader-packages.php

    diff --git src/wp-includes/assets/script-loader-packages.php src/wp-includes/assets/script-loader-packages.php
    index 34122d8bb7..4a21fc038d 100644
     
    1 <?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '6d98587879c8c19080b1e3a855e946be'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '260b045f4c676d091d7e8a97723357dc'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '74653372c4595d464e30438faccf7290'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e3a7061e1087f5cf077a68aeaf0ea714'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27195f29e36179999f6e1fa7d1f079b3'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '8a4c748538664b3d2a3d81670e5308df'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'faf18017b6902eb340b24b9f18a574f3'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '4990ef5b5ef7063ecd4415396556fa5a'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27585bbfe083d705c915c21bf47047df'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-shortcode'), 'version' => 'f8c36e24ce9e4fa0d878d93384a12c76'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '85abda5cd53db6f40d14a256d1bd4740'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue'), 'version' => 'd544688da01336df14c1fb668a60fa88'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'fd10eb49751e8e9638e48e34947288ed'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'bdecf088172566c402cb7e60959c75d4'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill'), 'version' => 'ea191e898b70efcaa0314934334db8d2'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => '71ad0d58f6b8efd48fffc625b1968750'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '26aefabb46263ab5dac6d7f6c63b664c'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'e54be95ed4c9e5422fcf44a2cee53217'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a6586b64552c9c6924b8093e9ef4f74e'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => 'db891ec5e87b386b6015b2520fd4ad7d'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '473d94ac60336cbc66926d8e2f6ade43'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'b2a51f1f50dee6f6fb90f1dd39a4b151'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11a9ed20aa0e5b49a24e416455d2311e'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '8f528a8c90b4108d003d53908a3c42ed'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd3b8b40265078ab4bf9a60e4be8c928e'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5f0f2fc8f6cde41ab343549aa0b50183'), 'i18n.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c818ff88cdaa24964e36a1c89e447c77'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b2327d0572e72da49f9e26cc3a53de34'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-keycodes', 'wp-polyfill'), 'version' => '0dca10a23ad5f1fa6c5ea705402ac449'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '8fa475945c1ee2fa9fbf41b45c02a131'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '91fd753476dc10e1f35ebaee4cbb95ff'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '21f10d37b05bd05ac894d5fc2329378e'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'c8419832e15a611ba10b8c9db5b628bf'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '9a0d3d4ed32b44e6c499e6d90e80aa1a'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '96bfd27bc78c4cab5ff0f524fa2f9318'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'ec81efc9895bf6b2e092f8e56bc7aec4'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '21998ef9ac35858b8751c443f5003831'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'f85fd85702ab43e4cbf75c2b252c19bd'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c98ed3bbbe1c848f34d82b1572d6dadf'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4ef0a464287b500da6136547cfdaa558'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '0f4a8551daa990e80114889793034ff6'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '8c1de0af2850ea512bf7ee4ea8a6af09'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '5cfad922551470f0d04552a83d5e7eb4'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => 'de07809632bb717b3bef9fb526a17f20'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '202ac16e99afe7c33c257b248625a947'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'ababa914c8610cc872482756daceab10'));
    2  No newline at end of file
     1<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '6d98587879c8c19080b1e3a855e946be'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '260b045f4c676d091d7e8a97723357dc'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '74653372c4595d464e30438faccf7290'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e3a7061e1087f5cf077a68aeaf0ea714'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27195f29e36179999f6e1fa7d1f079b3'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-data-controls', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '8a4c748538664b3d2a3d81670e5308df'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'faf18017b6902eb340b24b9f18a574f3'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', 'react', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '4990ef5b5ef7063ecd4415396556fa5a'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '27585bbfe083d705c915c21bf47047df'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-shortcode'), 'version' => 'f8c36e24ce9e4fa0d878d93384a12c76'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '7698dad1be7c7c111147883139ee3d9e'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue'), 'version' => 'd544688da01336df14c1fb668a60fa88'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-data-controls', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'fd10eb49751e8e9638e48e34947288ed'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => 'bdecf088172566c402cb7e60959c75d4'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill'), 'version' => 'ea191e898b70efcaa0314934334db8d2'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => '71ad0d58f6b8efd48fffc625b1968750'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '26aefabb46263ab5dac6d7f6c63b664c'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'e54be95ed4c9e5422fcf44a2cee53217'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a6586b64552c9c6924b8093e9ef4f74e'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => 'db891ec5e87b386b6015b2520fd4ad7d'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '473d94ac60336cbc66926d8e2f6ade43'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => 'b2a51f1f50dee6f6fb90f1dd39a4b151'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11a9ed20aa0e5b49a24e416455d2311e'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => '8f528a8c90b4108d003d53908a3c42ed'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd3b8b40265078ab4bf9a60e4be8c928e'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5f0f2fc8f6cde41ab343549aa0b50183'), 'i18n.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c818ff88cdaa24964e36a1c89e447c77'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b2327d0572e72da49f9e26cc3a53de34'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-keycodes', 'wp-polyfill'), 'version' => '0dca10a23ad5f1fa6c5ea705402ac449'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '8fa475945c1ee2fa9fbf41b45c02a131'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '91fd753476dc10e1f35ebaee4cbb95ff'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '21f10d37b05bd05ac894d5fc2329378e'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'c8419832e15a611ba10b8c9db5b628bf'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '9a0d3d4ed32b44e6c499e6d90e80aa1a'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '96bfd27bc78c4cab5ff0f524fa2f9318'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => 'ec81efc9895bf6b2e092f8e56bc7aec4'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '21998ef9ac35858b8751c443f5003831'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'f85fd85702ab43e4cbf75c2b252c19bd'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-keycodes', 'wp-polyfill'), 'version' => 'c98ed3bbbe1c848f34d82b1572d6dadf'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '4ef0a464287b500da6136547cfdaa558'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '0f4a8551daa990e80114889793034ff6'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '8c1de0af2850ea512bf7ee4ea8a6af09'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '5cfad922551470f0d04552a83d5e7eb4'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => 'de07809632bb717b3bef9fb526a17f20'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '202ac16e99afe7c33c257b248625a947'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'ababa914c8610cc872482756daceab10'));
     2 No newline at end of file
  • src/wp-includes/sitemaps.php

    diff --git src/wp-includes/sitemaps.php src/wp-includes/sitemaps.php
    index 8678993dbd..9600540156 100644
     
    1717 *
    1818 * @global WP_Sitemaps $wp_sitemaps Global Core Sitemaps instance.
    1919 *
    20  * @return WP_Sitemaps|null Sitemaps instance, or null if sitemaps are disabled.
     20 * @return WP_Sitemaps Sitemaps instance.
    2121 */
    2222function wp_sitemaps_get_server() {
    2323        global $wp_sitemaps;
    2424
    2525        $is_enabled = (bool) get_option( 'blog_public' );
    2626
    27         /**
    28          * Filters whether XML Sitemaps are enabled or not.
    29          *
    30          * @since 5.5.0
    31          *
    32          * @param bool $is_enabled Whether XML Sitemaps are enabled or not. Defaults to true for public sites.
    33          */
    34         $is_enabled = (bool) apply_filters( 'wp_sitemaps_enabled', $is_enabled );
    35 
    36         if ( ! $is_enabled ) {
    37                 return null;
    38         }
    39 
    4027        // If there isn't a global instance, set and bootstrap the sitemaps system.
    4128        if ( empty( $wp_sitemaps ) ) {
    4229                $wp_sitemaps = new WP_Sitemaps();
  • src/wp-includes/sitemaps/class-wp-sitemaps.php

    diff --git src/wp-includes/sitemaps/class-wp-sitemaps.php src/wp-includes/sitemaps/class-wp-sitemaps.php
    index 918220317b..656fd58416 100644
    class WP_Sitemaps { 
    5656        /**
    5757         * Initiates all sitemap functionality.
    5858         *
     59         * If sitemaps are disabled, only the rewrite rules will be registered
     60         * by this method, in order to properly send 404s.
     61         *
    5962         * @since 5.5.0
    6063         */
    6164        public function init() {
    6265                // These will all fire on the init hook.
    6366                $this->register_rewrites();
     67
     68                add_action( 'template_redirect', array( $this, 'render_sitemaps' ) );
     69
     70                if ( ! $this->sitemaps_enabled() ) {
     71                        return;
     72                }
     73
    6474                $this->register_sitemaps();
    6575
    6676                // Add additional action callbacks.
    67                 add_action( 'template_redirect', array( $this, 'render_sitemaps' ) );
    6877                add_filter( 'pre_handle_404', array( $this, 'redirect_sitemapxml' ), 10, 2 );
    6978                add_filter( 'robots_txt', array( $this, 'add_robots' ), 0, 2 );
    7079        }
    7180
     81        /**
     82         * Determines whether sitemaps are enabled or not.
     83         *
     84         * @since 5.5.0
     85         *
     86         * @return bool Whether sitemaps are enabled.
     87         */
     88        public function sitemaps_enabled() {
     89                $is_enabled = (bool) get_option( 'blog_public' );
     90
     91                /**
     92                 * Filters whether XML Sitemaps are enabled or not.
     93                 *
     94                 * When XML Sitemaps are disabled via this filter, rewrite rules are still in place to ensure a 404 is returned.
     95                 * @see WP_Sitemaps->register_rewrites().
     96                 *
     97                 * @since 5.5.0
     98                 *
     99                 * @param bool $is_enabled Whether XML Sitemaps are enabled or not. Defaults to true for public sites.
     100                 */
     101                return (bool) apply_filters( 'wp_sitemaps_enabled', $is_enabled );
     102        }
     103
    72104        /**
    73105         * Registers and sets up the functionality for all supported sitemaps.
    74106         *
    class WP_Sitemaps { 
    143175         * @global WP_Query $wp_query WordPress Query object.
    144176         */
    145177        public function render_sitemaps() {
     178                /* @var WP_Query $wp_query */
    146179                global $wp_query;
    147180
    148181                $sitemap         = sanitize_text_field( get_query_var( 'sitemap' ) );
    class WP_Sitemaps { 
    155188                        return;
    156189                }
    157190
     191                if ( ! $this->sitemaps_enabled() ) {
     192                        $wp_query->set_404();
     193                        status_header( 404 );
     194                        return;
     195                }
     196
    158197                // Render stylesheet if this is stylesheet route.
    159198                if ( $stylesheet_type ) {
    160199                        $stylesheet = new WP_Sitemaps_Stylesheet();
    class WP_Sitemaps { 
    186225                // Force a 404 and bail early if no URLs are present.
    187226                if ( empty( $url_list ) ) {
    188227                        $wp_query->set_404();
     228                        status_header( 404 );
    189229                        return;
    190230                }
    191231