diff --git a/package-lock.json b/package-lock.json index e024ec359896f..961959b061cbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -139,9 +139,9 @@ } }, "@babel/helper-define-polyfill-provider": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.0.tgz", - "integrity": "sha512-JT8tHuFjKBo8NnaUbblz7mIu1nnvUDiHVjXXkulZULyidvo/7P6TY7+YqpV37IfF+KUFxmlK04elKtGKXaiVgw==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.1.tgz", + "integrity": "sha512-x3AUTVZNPunaw1opRTa5OwVA5N0YxGlIad9xQ5QflK1uIS7PnAGGU5O2Dj/G183fR//N8AzTq+Q8+oiu9m0VFg==", "dev": true, "requires": { "@babel/helper-compilation-targets": "^7.13.0", @@ -1866,9 +1866,9 @@ } }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "rimraf": { @@ -2080,9 +2080,9 @@ } }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "source-map": { @@ -2498,6 +2498,12 @@ "resolved": "https://registry.npmjs.org/@tannin/postfix/-/postfix-1.1.0.tgz", "integrity": "sha512-oocsqY7g0cR+Gur5jRQLSrX2OtpMLMse1I10JQBm8CdGMrDkh1Mg2gjsiquMHRtBs4Qwu5wgEp5GgIYHk4SNPw==" }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, "@types/babel__core": { "version": "7.1.14", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", @@ -2540,9 +2546,9 @@ } }, "@types/cheerio": { - "version": "0.22.28", - "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.28.tgz", - "integrity": "sha512-ehUMGSW5IeDxJjbru4awKYMlKGmo1wSSGUVqXtYwlgmUM8X1a0PZttEIm6yEY7vHsY/hh6iPnklF213G0UColw==", + "version": "0.22.29", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.29.tgz", + "integrity": "sha512-rNX1PsrDPxiNiyLnRKiW2NXHJFHqx0Fl3J2WsZq0MTBspa/FgwlqhXJE2crIcc+/2IglLHtSWw7g053oUR8fOg==", "dev": true, "requires": { "@types/node": "*" @@ -3214,9 +3220,9 @@ } }, "@wordpress/block-directory": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-2.1.0.tgz", - "integrity": "sha512-jTiz6LHWxFoUSCd053FnIYyJDBj64Zi3jf4W2kGeeLL/UAxoJmnHNw/7dfD+udT+/3dVLiUvr5eVuImeKTURSQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-2.1.2.tgz", + "integrity": "sha512-jjJxJ/RonDbAgNl+Vbrdhub+RxuJwaSUxumxmUcCuiwaK2tc8eLcS0rkHhq0cOILvTzLFsmk4Ql0Pjbemnx1JQ==", "requires": { "@babel/runtime": "^7.13.10", "@wordpress/a11y": "^3.1.0", @@ -3225,11 +3231,11 @@ "@wordpress/blocks": "^9.1.0", "@wordpress/components": "^14.1.0", "@wordpress/compose": "^4.1.0", - "@wordpress/core-data": "^3.1.0", + "@wordpress/core-data": "^3.1.1", "@wordpress/data": "^5.1.0", "@wordpress/data-controls": "^2.1.0", - "@wordpress/edit-post": "^4.1.0", - "@wordpress/editor": "^10.1.0", + "@wordpress/edit-post": "^4.1.2", + "@wordpress/editor": "^10.1.1", "@wordpress/element": "^3.1.0", "@wordpress/hooks": "^3.1.0", "@wordpress/html-entities": "^3.1.0", @@ -3284,12 +3290,416 @@ "rememo": "^3.0.0", "tinycolor2": "^1.4.2", "traverse": "^0.6.6" + }, + "dependencies": { + "@wordpress/a11y": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/a11y/-/a11y-3.1.0.tgz", + "integrity": "sha512-wYDXl9/JQuryAsqLaM/9g9edqq+ZXCmqyvc6OH8zjZAUuIc7zzCxzrI0A/mMyZBaBPK9BequCEoqIlbjrJqI5A==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/dom-ready": "^3.1.0", + "@wordpress/i18n": "^4.1.0" + } + }, + "@wordpress/api-fetch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-5.1.0.tgz", + "integrity": "sha512-UEB+CAv5rKV1wRZBW/hh/0fqwCtiUD6dLs0XRhESa3LdU5TRnera+bvXZ6wo5BJt/D+cSFcndznpSoFmHFFFMg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/i18n": "^4.1.0", + "@wordpress/url": "^3.1.0" + } + }, + "@wordpress/autop": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-3.1.0.tgz", + "integrity": "sha512-vfrNXODE3QNpjHQE0j5f/TDzIQcRWw9+jrwyfohV+xl0LJXgXduRcSooiRiWzEbosYp9BGieMuQql28gQ+VAhQ==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/blob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-3.1.0.tgz", + "integrity": "sha512-f17a5x/z5ugIfzjowh393IJ0pi8WUqrAdafHT3F9v5w7zBq4C1zkam5pE1qja3AWdS4VT4drF+1LOwFRAJK1UQ==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/block-serialization-default-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-4.1.0.tgz", + "integrity": "sha512-uzmp8qf9+CG9+fCq8ceQGzhbbNbeC3pVPtlnED433BoLJqJn99aXV/hkL0fGW8wRO1l8JVjwfY+uTlcPv//IjA==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/blocks": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-9.1.0.tgz", + "integrity": "sha512-gbLq+335j+NvoR2uP5/X/pjs8b35Bz1qL3j4mZkC87ZPiFIOZYakwa6Uuuq86IO+w9nMHqq83yUUjMYPkAZhSA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/autop": "^3.1.0", + "@wordpress/blob": "^3.1.0", + "@wordpress/block-serialization-default-parser": "^4.1.0", + "@wordpress/compose": "^4.1.0", + "@wordpress/data": "^5.1.0", + "@wordpress/deprecated": "^3.1.0", + "@wordpress/dom": "^3.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/hooks": "^3.1.0", + "@wordpress/html-entities": "^3.1.0", + "@wordpress/i18n": "^4.1.0", + "@wordpress/icons": "^4.0.0", + "@wordpress/is-shallow-equal": "^4.1.0", + "@wordpress/shortcode": "^3.1.0", + "hpq": "^1.3.0", + "lodash": "^4.17.21", + "rememo": "^3.0.0", + "showdown": "^1.9.1", + "simple-html-tokenizer": "^0.5.7", + "tinycolor2": "^1.4.2", + "uuid": "^8.3.0" + } + }, + "@wordpress/components": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/components/-/components-14.1.0.tgz", + "integrity": "sha512-K+/NU0Tvz53U6EI5SanF6YzndJfaVcG4wdTkEieitI71oJn3wgNDJz+exzuTN6tdG971NlnioWI4oGvgljt4NA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/cache": "^10.0.27", + "@emotion/core": "^10.1.1", + "@emotion/css": "^10.0.22", + "@emotion/native": "^10.0.22", + "@emotion/styled": "^10.0.23", + "@wordpress/a11y": "^3.1.0", + "@wordpress/compose": "^4.1.0", + "@wordpress/date": "^4.1.0", + "@wordpress/deprecated": "^3.1.0", + "@wordpress/dom": "^3.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/hooks": "^3.1.0", + "@wordpress/i18n": "^4.1.0", + "@wordpress/icons": "^4.0.0", + "@wordpress/is-shallow-equal": "^4.1.0", + "@wordpress/keycodes": "^3.1.0", + "@wordpress/primitives": "^2.1.0", + "@wordpress/rich-text": "^4.1.0", + "@wordpress/warning": "^2.1.0", + "classnames": "^2.2.5", + "dom-scroll-into-view": "^1.2.1", + "downshift": "^6.0.15", + "emotion": "^10.0.23", + "gradient-parser": "^0.1.5", + "highlight-words-core": "^1.2.2", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "moment": "^2.22.1", + "re-resizable": "^6.4.0", + "react-dates": "^17.1.1", + "react-resize-aware": "^3.1.0", + "react-spring": "^8.0.20", + "react-use-gesture": "^9.0.0", + "reakit": "^1.3.5", + "rememo": "^3.0.0", + "tinycolor2": "^1.4.2", + "uuid": "^8.3.0" + } + }, + "@wordpress/compose": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-4.1.0.tgz", + "integrity": "sha512-/luv2I9XdHT/4mRCsH2Tv9OHT4wuShRd2+9VYVvadQYg26s0OvOPBct88gYKBq4g/XlH4hJmVodCbv2hOJRw6Q==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/deprecated": "^3.1.0", + "@wordpress/dom": "^3.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/is-shallow-equal": "^4.1.0", + "@wordpress/keycodes": "^3.1.0", + "@wordpress/priority-queue": "^2.1.0", + "clipboard": "^2.0.1", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "mousetrap": "^1.6.5", + "react-resize-aware": "^3.1.0", + "use-memo-one": "^1.1.1" + } + }, + "@wordpress/data": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-5.1.0.tgz", + "integrity": "sha512-P0TT9UJLfCdi8fXChfLGwtkWAl1Qtw49tZ580RdC2wiDym52EDcDiiHhALKCPprNS23bYXxBw46kAJxhUNwNHA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.0", + "@wordpress/deprecated": "^3.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/is-shallow-equal": "^4.1.0", + "@wordpress/priority-queue": "^2.1.0", + "@wordpress/redux-routine": "^4.1.0", + "equivalent-key-map": "^0.2.2", + "is-promise": "^4.0.0", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "redux": "^4.1.0", + "turbo-combine-reducers": "^1.0.2", + "use-memo-one": "^1.1.1" + } + }, + "@wordpress/data-controls": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-2.1.0.tgz", + "integrity": "sha512-jBid81RK56cF6GDVoWiGI0yaPYBKwepa4q/HunlLwKS+mEdJTng24azRh38EvsxZLdgbXAwKb9FVcacNag7sTg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/api-fetch": "^5.1.0", + "@wordpress/data": "^5.1.0", + "@wordpress/deprecated": "^3.1.0" + } + }, + "@wordpress/date": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/date/-/date-4.1.0.tgz", + "integrity": "sha512-hMId0AQ8tcBRiG9dlMOy0q0oTZ1PM4u5S3lIUPJPIV1K/IHr4nWB1/ODvK/gMLP6JSzNr/sLQlgtCfD0hVQh+w==", + "requires": { + "@babel/runtime": "^7.13.10", + "moment": "^2.22.1", + "moment-timezone": "^0.5.31" + } + }, + "@wordpress/deprecated": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-3.1.0.tgz", + "integrity": "sha512-rgEOkBSiarmL68nkn+5CrZWUkr7LNJkBzdIrEIChENEbC26GvkskeoZxGw+xXs9GBWyv6NRRu9NvftQKcQPgUg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/hooks": "^3.1.0" + } + }, + "@wordpress/dom": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-3.1.0.tgz", + "integrity": "sha512-gjLbvmRIGi8PcxxPvzWLp6Y3SEn/t5V8rEOpLypTbE18wEcU7tZzjG1wtARLwtoKdBSwKfs5hY7B/HPkm+37tg==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21" + } + }, + "@wordpress/dom-ready": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/dom-ready/-/dom-ready-3.1.0.tgz", + "integrity": "sha512-w/SYZfZrCDMRaes2odJZ+m0P3n7bKUNcliZUhNIvSz3iNq/xIt7Ean5YJQa17M2kqGz2R1t8D7gYabT0mDZMQA==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/element": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/element/-/element-3.1.0.tgz", + "integrity": "sha512-dDCs7zIH4CCa6q+BzDHpn99NLvgKDcM9/p4pAcCppNnR352wipmWK3EK6faWfzv1M6o+VJXhIQuXahxKPLpBsg==", + "requires": { + "@babel/runtime": "^7.13.10", + "@types/react": "^16.9.0", + "@types/react-dom": "^16.9.0", + "@wordpress/escape-html": "^2.1.0", + "lodash": "^4.17.21", + "react": "^16.13.1", + "react-dom": "^16.13.1" + } + }, + "@wordpress/escape-html": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-2.1.0.tgz", + "integrity": "sha512-N0EZokyky5O5ib8jyqIyzd7Bg+z0XOxrUmHv6kE8o1FpdVwZYFAVg9ZAhb9YQYfFVqIrfbste+v3Mak0iKrD4A==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/hooks": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.1.0.tgz", + "integrity": "sha512-mE94KYLanCj3YK3TF4L1pBtLplcKVHBwv+n1u3jkrnNuH8C7LWhZMddnip0B1FlSPut3Sut+R2pQcI9xuH4fPQ==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/html-entities": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-3.1.0.tgz", + "integrity": "sha512-zKDc00lP9H7d+8vSXzUgxtDRLA/Pf+42R7sqOFpvdFM2GlGxjRP0pj10PmYov2HYO2FmIwQqCpdITX+a4/tX4Q==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/i18n": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.1.0.tgz", + "integrity": "sha512-wn4z/bspItNFghUQ3tGdXd7BgTNt0XknEvxr5yeZ9wEeXK02SBwET1GNYJMcpOCXBaYBKJ9Va80jk5bW60JJ/w==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/hooks": "^3.1.0", + "gettext-parser": "^1.3.1", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "sprintf-js": "^1.1.1", + "tannin": "^1.2.0" + } + }, + "@wordpress/icons": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-4.0.0.tgz", + "integrity": "sha512-WuHEHwuI1NtoK2poJjSE7s14Tv8JZEOaAvK0CFN0NJPOznuLzPmykrL0FtVStDDnsaFqPdnsSzk9JE+nTojeBQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/element": "^3.1.0", + "@wordpress/primitives": "^2.1.0" + } + }, + "@wordpress/is-shallow-equal": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-4.1.0.tgz", + "integrity": "sha512-qj0X9r1eVYX+XYCNA5pdNq42OU/To68aYY6iZwpJ3jaaAYmUdA9T4tjGwSgU3MSqFDV4NUE6X+kf71XgNxjFjQ==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/keyboard-shortcuts": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-2.1.0.tgz", + "integrity": "sha512-tY1Vr0ZeFtPJUhHOj8UUY8E3C6l521E44a5CKC1oJURXDbIriVPQIN/Cvv8gMDDhX31Fj94Qzz+0du3znUxd8Q==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.0", + "@wordpress/data": "^5.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/keycodes": "^3.1.0", + "lodash": "^4.17.21", + "rememo": "^3.0.0" + } + }, + "@wordpress/keycodes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.1.0.tgz", + "integrity": "sha512-P9w9e68cSrQo8ypG+nHXMhQOm7YkCxwqkrFz8L5Y2T1hGqb3SJF9/IrBQiBjV5e6yTQRgWk5mGZqK8pEAM+WZQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/i18n": "^4.1.0", + "lodash": "^4.17.21" + } + }, + "@wordpress/notices": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/notices/-/notices-3.1.0.tgz", + "integrity": "sha512-PiqHUT4Ftk4KdvEUZ89BTIGugFA60NdAquu5OVj5373vWtezaJO8gwcKvA+qY7sIroWEiN+7etcsq4SJR0i6oQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.0", + "@wordpress/data": "^5.1.0", + "lodash": "^4.17.21" + } + }, + "@wordpress/primitives": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-2.1.0.tgz", + "integrity": "sha512-MAWLEN5ZhNBlHBDbjq3HIp78Ny53KAjLzGJ5OHTxspsbyOp+AbWMaxxkZ3k8Cm6sXWVD8UOiTbDElK70U+X/MQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/element": "^3.1.0", + "classnames": "^2.2.5" + } + }, + "@wordpress/priority-queue": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-2.1.0.tgz", + "integrity": "sha512-0jfdKTFQnOPg+t2x/Zs6vkpb76lzClT8QP+dnUjHJvsn8WZ+b2BC9R7Qo7RBeQjnz5ii3nFnRAA0YgpsLBRXdQ==", + "requires": { + "@babel/runtime": "^7.13.10" + } + }, + "@wordpress/redux-routine": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-4.1.0.tgz", + "integrity": "sha512-Ju+YKXQOo6S8gy/ctfCf+bQ4eR7zsCMABLF7X/yk2+WE5kA91+STuWLHMX9AwKW2LOwS1cOhYzqJnmGPrY14uw==", + "requires": { + "@babel/runtime": "^7.13.10", + "is-promise": "^4.0.0", + "lodash": "^4.17.21", + "rungen": "^0.3.2" + } + }, + "@wordpress/rich-text": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/rich-text/-/rich-text-4.1.0.tgz", + "integrity": "sha512-+7DvKaD+NmgrMWYHb+bsZ+2C+hq6OUiQzMdIlZH0XdsY95CF83b6Fp+MMLJ0tWR0dw5YShKOQnY3gm969AJTxA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/compose": "^4.1.0", + "@wordpress/data": "^5.1.0", + "@wordpress/dom": "^3.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/escape-html": "^2.1.0", + "@wordpress/is-shallow-equal": "^4.1.0", + "@wordpress/keycodes": "^3.1.0", + "classnames": "^2.2.5", + "lodash": "^4.17.21", + "memize": "^1.1.0", + "rememo": "^3.0.0" + } + }, + "@wordpress/shortcode": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-3.1.0.tgz", + "integrity": "sha512-a32GLIvW57j2crzAR05gDgtYuE8B00eoex79t27kFL9C/qftD28qpF63KpkM4E9+fyDFEaZFLxQoLiRYpcVenQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "memize": "^1.1.0" + } + }, + "@wordpress/token-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/token-list/-/token-list-2.1.0.tgz", + "integrity": "sha512-EE+Kt0R+FgZtEa4lbYDlWSIA9KAr7wjOIogpBFPbDmwD6f2tEa3gFvIX5LlffvMjIm8ftWCN2oYCHdI1r2AqnA==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21" + } + }, + "@wordpress/url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.1.0.tgz", + "integrity": "sha512-XGvM4WZhQveRZOalGwUaj0xfrohMPtUZY5rfwWWTdSX9yo3fZECFsfg0msm0x1UwRxcxS9fBk9YgixtyaGdnCA==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "react-native-url-polyfill": "^1.1.2" + } + }, + "@wordpress/warning": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.1.0.tgz", + "integrity": "sha512-/pGUDZK5ONnsvLAhHXFGI6bRPBJvKzY0/6G9ZpA37oNa49S/BB9cxt5cNFEt+mFapRg6U+Tz8FAsi0qJ8ruupQ==" + }, + "@wordpress/wordcount": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.1.0.tgz", + "integrity": "sha512-a9K1KUGl9KcWP1j0LuYEJw1OXYWTKNh9R8jEw8Jc5v4DiMABaxY97l2SZGpJoFfVWJt93bgp2v3YadAoKnsNGg==", + "requires": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21" + } + } } }, "@wordpress/block-library": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-3.1.0.tgz", - "integrity": "sha512-m1oMg64kfB2qR+A+eXQCNIue9+4S901csm4gI18Gz5bV1cOPC76DabRJADnC2+JOwtuFunWAQkz1cPLQMaC20w==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-3.2.1.tgz", + "integrity": "sha512-4vwOJSIijBQsgY1paqdvolfyFIkHkjmYJX7svQYACyarUl4wPMiA3unBARE0dcsq2vNGuKr69uAwf5fYk0d3Kw==", "requires": { "@babel/runtime": "^7.13.10", "@wordpress/a11y": "^3.1.0", @@ -3300,12 +3710,12 @@ "@wordpress/blocks": "^9.1.0", "@wordpress/components": "^14.1.0", "@wordpress/compose": "^4.1.0", - "@wordpress/core-data": "^3.1.0", + "@wordpress/core-data": "^3.1.1", "@wordpress/data": "^5.1.0", "@wordpress/date": "^4.1.0", "@wordpress/deprecated": "^3.1.0", "@wordpress/dom": "^3.1.0", - "@wordpress/editor": "^10.1.0", + "@wordpress/editor": "^10.1.1", "@wordpress/element": "^3.1.0", "@wordpress/escape-html": "^2.1.0", "@wordpress/hooks": "^3.1.0", @@ -3315,7 +3725,7 @@ "@wordpress/keycodes": "^3.1.0", "@wordpress/notices": "^3.1.0", "@wordpress/primitives": "^2.1.0", - "@wordpress/reusable-blocks": "^2.1.0", + "@wordpress/reusable-blocks": "^2.1.1", "@wordpress/rich-text": "^4.1.0", "@wordpress/server-side-render": "^2.1.0", "@wordpress/url": "^3.1.0", @@ -3439,9 +3849,9 @@ } }, "@wordpress/core-data": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-3.1.0.tgz", - "integrity": "sha512-Wh3MJERzhpAEkQBcfnutx1U8hgBU9DDR2Cu9SpDhKocZgDueU+HyZ6i6tlE38Ous1R8gk1r9b5W0N9YXQfbL3Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-3.1.1.tgz", + "integrity": "sha512-O9aEqVdLRjo0g9UlgNaFsa/swbPdsdscQ/q8IBirDTWMoeRJTaINa2fQHe5G9QeeGA1frKwrKRPeWQ9lwM6ANg==", "requires": { "@babel/runtime": "^7.13.10", "@wordpress/api-fetch": "^5.1.0", @@ -3468,6 +3878,34 @@ "escape-string-regexp": "^1.0.5" } }, + "@wordpress/customize-widgets": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-1.0.1.tgz", + "integrity": "sha512-ndGtrDdXqrD1FrBUM5wwzcYrj1gfvhZtKmJudJQ+L17lxPWNnpxRHWDNsK80/UxaTluatDU782kuucTu3S5Icw==", + "requires": { + "@babel/runtime": "^7.11.2", + "@wordpress/a11y": "^3.1.0", + "@wordpress/block-editor": "^6.1.0", + "@wordpress/block-library": "^3.2.1", + "@wordpress/blocks": "^9.1.0", + "@wordpress/components": "^14.1.0", + "@wordpress/compose": "^4.1.0", + "@wordpress/core-data": "^3.1.1", + "@wordpress/data": "^5.1.0", + "@wordpress/dom": "^3.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/hooks": "^3.1.0", + "@wordpress/i18n": "^4.1.0", + "@wordpress/icons": "^4.0.0", + "@wordpress/is-shallow-equal": "^4.1.0", + "@wordpress/keyboard-shortcuts": "^2.1.0", + "@wordpress/keycodes": "^3.1.0", + "@wordpress/media-utils": "^2.1.0", + "@wordpress/widgets": "^1.1.1", + "classnames": "^2.2.6", + "lodash": "^4.17.21" + } + }, "@wordpress/data": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@wordpress/data/-/data-5.1.0.tgz", @@ -3578,22 +4016,22 @@ } }, "@wordpress/edit-post": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-4.1.0.tgz", - "integrity": "sha512-JkWuOSkBtpIUzzG78S+AUaAHE8oBT7lzJyRhMlOX+yThhPGWgGyqB670vvDBUFk59BCPTEknZGGtYLrMYmrjCQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-4.1.2.tgz", + "integrity": "sha512-BJrBXqK/2AcC+ooNNLWkxNrBKcbDJSVtCpE76jNyk/Qv7211p++HrcaubY0z5veMeRTB4ayEa0ky9HYwgcy3Nw==", "requires": { "@babel/runtime": "^7.13.10", "@wordpress/a11y": "^3.1.0", "@wordpress/api-fetch": "^5.1.0", "@wordpress/block-editor": "^6.1.0", - "@wordpress/block-library": "^3.1.0", + "@wordpress/block-library": "^3.2.1", "@wordpress/blocks": "^9.1.0", "@wordpress/components": "^14.1.0", "@wordpress/compose": "^4.1.0", - "@wordpress/core-data": "^3.1.0", + "@wordpress/core-data": "^3.1.1", "@wordpress/data": "^5.1.0", "@wordpress/data-controls": "^2.1.0", - "@wordpress/editor": "^10.1.0", + "@wordpress/editor": "^10.1.1", "@wordpress/element": "^3.1.0", "@wordpress/hooks": "^3.1.0", "@wordpress/i18n": "^4.1.0", @@ -3623,10 +4061,46 @@ } } }, + "@wordpress/edit-widgets": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-2.1.2.tgz", + "integrity": "sha512-P4aH1KikWJmJxWo+MnFoi+x7b3b4WLDRmWEwU06XcrMtcYN1U4Zmu0aygp+e949qPSbcSYPMOyIKVK32NuNpMA==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/a11y": "^3.1.0", + "@wordpress/api-fetch": "^5.1.0", + "@wordpress/block-editor": "^6.1.0", + "@wordpress/block-library": "^3.2.1", + "@wordpress/blocks": "^9.1.0", + "@wordpress/components": "^14.1.0", + "@wordpress/compose": "^4.1.0", + "@wordpress/core-data": "^3.1.1", + "@wordpress/data": "^5.1.0", + "@wordpress/data-controls": "^2.1.0", + "@wordpress/element": "^3.1.0", + "@wordpress/hooks": "^3.1.0", + "@wordpress/i18n": "^4.1.0", + "@wordpress/icons": "^4.0.0", + "@wordpress/interface": "^3.1.0", + "@wordpress/keyboard-shortcuts": "^2.1.0", + "@wordpress/keycodes": "^3.1.0", + "@wordpress/media-utils": "^2.1.0", + "@wordpress/notices": "^3.1.0", + "@wordpress/plugins": "^3.1.0", + "@wordpress/reusable-blocks": "^2.1.1", + "@wordpress/server-side-render": "^2.1.0", + "@wordpress/url": "^3.1.0", + "@wordpress/widgets": "^1.1.1", + "classnames": "^2.2.5", + "lodash": "^4.17.21", + "rememo": "^3.0.0", + "uuid": "^8.3.0" + } + }, "@wordpress/editor": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-10.1.0.tgz", - "integrity": "sha512-dEudn+0DQCD8Ryiq1J7BrKEU+kttgnKIX1dZEs60gD+dNwrTPMBr78g0qsxwVZlWIbFT/honHRWgLHBo4qeg9g==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-10.1.1.tgz", + "integrity": "sha512-4o4s8Mxyn06h+JtzQOnsLloYLvkn4gu/7bIm5g5ubA7W4BJ/DGYxt5bBM21Qh1E+SVaClM7+5dFQ8RK+QYZIBA==", "requires": { "@babel/runtime": "^7.13.10", "@wordpress/api-fetch": "^5.1.0", @@ -3636,7 +4110,7 @@ "@wordpress/blocks": "^9.1.0", "@wordpress/components": "^14.1.0", "@wordpress/compose": "^4.1.0", - "@wordpress/core-data": "^3.1.0", + "@wordpress/core-data": "^3.1.1", "@wordpress/data": "^5.1.0", "@wordpress/data-controls": "^2.1.0", "@wordpress/date": "^4.1.0", @@ -3651,7 +4125,7 @@ "@wordpress/keycodes": "^3.1.0", "@wordpress/media-utils": "^2.1.0", "@wordpress/notices": "^3.1.0", - "@wordpress/reusable-blocks": "^2.1.0", + "@wordpress/reusable-blocks": "^2.1.1", "@wordpress/rich-text": "^4.1.0", "@wordpress/server-side-render": "^2.1.0", "@wordpress/url": "^3.1.0", @@ -4086,15 +4560,15 @@ } }, "@wordpress/reusable-blocks": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-2.1.0.tgz", - "integrity": "sha512-5xXMgLTaULcaBLYSeRegacz3mC9dPEZUssySFx10ill6yxnNR7W5QXtdXxeuQE43la7fPuCdqCf6W0nrCoxSgA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-2.1.1.tgz", + "integrity": "sha512-SD4oEYBBqYnuKBiCGM3sSO3tOdi5JhCCjdos2MXbD5oaoY8QeVKYvCYIwdDk1xlGIoV0PaX7dinUEB0Hu5a2bQ==", "requires": { "@wordpress/block-editor": "^6.1.0", "@wordpress/blocks": "^9.1.0", "@wordpress/components": "^14.1.0", "@wordpress/compose": "^4.1.0", - "@wordpress/core-data": "^3.1.0", + "@wordpress/core-data": "^3.1.1", "@wordpress/data": "^5.1.0", "@wordpress/element": "^3.1.0", "@wordpress/i18n": "^4.1.0", @@ -4756,6 +5230,20 @@ "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.1.0.tgz", "integrity": "sha512-/pGUDZK5ONnsvLAhHXFGI6bRPBJvKzY0/6G9ZpA37oNa49S/BB9cxt5cNFEt+mFapRg6U+Tz8FAsi0qJ8ruupQ==" }, + "@wordpress/widgets": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-1.1.1.tgz", + "integrity": "sha512-DnPvVcjx/QfGRX57vecpL1vIQFrijsVB6t6dzlZjCM+Kw4QY/qjmyyTg32G8TKhHg+d6amsscc9CTLawdArBtQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@wordpress/blocks": "^9.1.0", + "@wordpress/components": "^14.1.0", + "@wordpress/core-data": "^3.1.1", + "@wordpress/data": "^5.1.0", + "@wordpress/i18n": "^4.1.0", + "@wordpress/icons": "^4.0.0" + } + }, "@wordpress/wordcount": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@wordpress/wordcount/-/wordcount-3.1.0.tgz", @@ -5972,13 +6460,13 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.0.tgz", - "integrity": "sha512-9bNwiR0dS881c5SHnzCmmGlMkJLl0OUZvxrxHo9w/iNoRuqaPjqlvBf4HrovXtQs/au5yKkpcdgfT1cC5PAZwg==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.1.tgz", + "integrity": "sha512-hXGSPbr6IbjeMyGew+3uGIAkRjBFSOJ9FLDZNOfHuyJZCcoia4nd/72J0bSgvfytcVfUcP/dxEVcUhVJuQRtSw==", "dev": true, "requires": { "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.2.0", + "@babel/helper-define-polyfill-provider": "^0.2.1", "semver": "^6.1.1" }, "dependencies": { @@ -5991,22 +6479,22 @@ } }, "babel-plugin-polyfill-corejs3": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.0.tgz", - "integrity": "sha512-zZyi7p3BCUyzNxLx8KV61zTINkkV65zVkDAFNZmrTCRVhjo1jAS+YLvDJ9Jgd/w2tsAviCwFHReYfxO3Iql8Yg==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.1.tgz", + "integrity": "sha512-WZCqF3DLUhdTD/P381MDJfuP18hdCZ+iqJ+wHtzhWENpsiof284JJ1tMQg1CE+hfCWyG48F7e5gDMk2c3Laz7w==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.2.0", + "@babel/helper-define-polyfill-provider": "^0.2.1", "core-js-compat": "^3.9.1" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.0.tgz", - "integrity": "sha512-J7vKbCuD2Xi/eEHxquHN14bXAW9CXtecwuLrOIDJtcZzTaPzV1VdEfoUf9AzcRBMolKUQKM9/GVojeh0hFiqMg==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.1.tgz", + "integrity": "sha512-T3bYyL3Sll2EtC94v3f+fA8M28q7YPTOZdB++SRHjvYZTvtd+WorMUq3tDTD4Q7Kjk1LG0gGromslKjcO5p2TA==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.2.0" + "@babel/helper-define-polyfill-provider": "^0.2.1" } }, "babel-plugin-syntax-jsx": { @@ -7856,27 +8344,6 @@ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", "dev": true }, - "contains-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-1.0.0.tgz", - "integrity": "sha1-NFizMhhWA+ju0Y9RjUoQiIo6vJE=", - "dev": true, - "requires": { - "normalize-path": "^2.1.1", - "path-starts-with": "^1.0.0" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -9745,9 +10212,9 @@ } }, "eslint": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.26.0.tgz", - "integrity": "sha512-4R1ieRf52/izcZE7AlLy56uIHHDLT74Yzz2Iv2l6kDaYvEu9x+wMB5dZArVL8SYGXSYV2YAg70FcW5Y5nGGNIg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.27.0.tgz", + "integrity": "sha512-JZuR6La2ZF0UD384lcbnd0Cgg6QJjiCwhMD6eU4h/VGPcVGwawNNzKU41tgokGXnfjOOyI6QIffthhJTPzzuRA==", "dev": true, "requires": { "@babel/code-frame": "7.12.11", @@ -9758,12 +10225,14 @@ "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", @@ -9775,7 +10244,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.21", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -9784,7 +10253,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -9824,6 +10293,12 @@ "esutils": "^2.0.2" } }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -9994,14 +10469,13 @@ } }, "eslint-plugin-import": { - "version": "2.23.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.2.tgz", - "integrity": "sha512-LmNoRptHBxOP+nb0PIKz1y6OSzCJlB+0g0IGS3XV4KaKk2q4szqQ6s6F1utVf5ZRkxk/QOTjdxe7v4VjS99Bsg==", + "version": "2.23.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.3.tgz", + "integrity": "sha512-wDxdYbSB55F7T5CC7ucDjY641VvKmlRwT0Vxh7PkY1mI4rclVRFWYfsrjDgZvwYYDZ5ee0ZtfFKXowWjqvEoRQ==", "dev": true, "requires": { "array-includes": "^3.1.3", "array.prototype.flat": "^1.2.4", - "contains-path": "^1.0.0", "debug": "^2.6.9", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.4", @@ -11141,9 +11615,9 @@ }, "dependencies": { "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true } } @@ -11652,9 +12126,9 @@ "dev": true }, "fraction.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.0.tgz", - "integrity": "sha512-o9lSKpK0TDqDwTL24Hxqi6I99s942l6TYkfl6WvGWgLOIFz/YonSGKfiSeMadoiNvTfqnfOa9mjb5SGVbBK9/w==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz", + "integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==", "dev": true }, "fragment-cache": { @@ -13400,6 +13874,28 @@ "requires-port": "^1.0.0" } }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "dependencies": { + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + } + } + }, "http-proxy-middleware": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", @@ -14933,9 +15429,9 @@ } }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "to-regex-range": { @@ -15154,9 +15650,9 @@ } }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "to-regex-range": { @@ -15270,9 +15766,9 @@ } }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "to-regex-range": { @@ -15703,9 +16199,9 @@ } }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "to-regex-range": { @@ -15942,13 +16438,13 @@ "dev": true }, "jsdom": { - "version": "16.5.3", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.3.tgz", - "integrity": "sha512-Qj1H+PEvUsOtdPJ056ewXM4UJPCi4hhLA8wpiz9F2YvsRBhuFsXxtrIFAgGBDynQA9isAMGE91PfUYbdMPXuTA==", + "version": "16.6.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.6.0.tgz", + "integrity": "sha512-Ty1vmF4NHJkolaEmdjtxTfSfkdb8Ywarwf63f+F8/mDD1uLSSWDxDuMiZxiPhwunLrn9LOSVItWj4bLYsLN3Dg==", "dev": true, "requires": { "abab": "^2.0.5", - "acorn": "^8.1.0", + "acorn": "^8.2.4", "acorn-globals": "^6.0.0", "cssom": "^0.4.4", "cssstyle": "^2.3.0", @@ -15956,12 +16452,13 @@ "decimal.js": "^10.2.1", "domexception": "^2.0.1", "escodegen": "^2.0.0", + "form-data": "^3.0.0", "html-encoding-sniffer": "^2.0.1", - "is-potential-custom-element-name": "^1.0.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.0", "parse5": "6.0.1", - "request": "^2.88.2", - "request-promise-native": "^1.0.9", "saxes": "^5.0.1", "symbol-tree": "^3.2.4", "tough-cookie": "^4.0.0", @@ -15971,7 +16468,7 @@ "whatwg-encoding": "^1.0.5", "whatwg-mimetype": "^2.3.0", "whatwg-url": "^8.5.0", - "ws": "^7.4.4", + "ws": "^7.4.5", "xml-name-validator": "^3.0.0" }, "dependencies": { @@ -15981,6 +16478,36 @@ "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==", "dev": true }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, "webidl-conversions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", @@ -16577,6 +17104,12 @@ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -18984,26 +19517,6 @@ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, - "path-starts-with": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/path-starts-with/-/path-starts-with-1.0.0.tgz", - "integrity": "sha1-soJDAV6LE43lcmgqxS2kLmRq2E4=", - "dev": true, - "requires": { - "normalize-path": "^2.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -21110,38 +21623,6 @@ } } }, - "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "dev": true, - "requires": { - "lodash": "^4.17.19" - } - }, - "request-promise-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", - "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", - "dev": true, - "requires": { - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - }, - "dependencies": { - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - } - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -22702,12 +23183,6 @@ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "dev": true }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true - }, "stream-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", @@ -23523,9 +23998,9 @@ "dev": true }, "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, "postcss-selector-parser": { @@ -24337,9 +24812,9 @@ } }, "tr46": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.0.2.tgz", - "integrity": "sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", "dev": true, "requires": { "punycode": "^2.1.1" diff --git a/package.json b/package.json index 5defc3c7861f5..9dfe439594988 100644 --- a/package.json +++ b/package.json @@ -82,22 +82,24 @@ "@wordpress/api-fetch": "5.1.0", "@wordpress/autop": "3.1.0", "@wordpress/blob": "3.1.0", - "@wordpress/block-directory": "2.1.0", + "@wordpress/block-directory": "2.1.2", "@wordpress/block-editor": "6.1.0", - "@wordpress/block-library": "3.1.0", + "@wordpress/block-library": "3.2.1", "@wordpress/block-serialization-default-parser": "4.1.0", "@wordpress/blocks": "9.1.0", "@wordpress/components": "14.1.0", "@wordpress/compose": "4.1.0", - "@wordpress/core-data": "3.1.0", + "@wordpress/core-data": "3.1.1", + "@wordpress/customize-widgets": "1.0.1", "@wordpress/data": "5.1.0", "@wordpress/data-controls": "2.1.0", "@wordpress/date": "4.1.0", "@wordpress/deprecated": "3.1.0", "@wordpress/dom": "3.1.0", "@wordpress/dom-ready": "3.1.0", - "@wordpress/edit-post": "4.1.0", - "@wordpress/editor": "10.1.0", + "@wordpress/edit-post": "4.1.2", + "@wordpress/edit-widgets": "2.1.2", + "@wordpress/editor": "10.1.1", "@wordpress/element": "3.1.0", "@wordpress/escape-html": "2.1.0", "@wordpress/format-library": "2.1.0", @@ -117,7 +119,7 @@ "@wordpress/primitives": "2.1.0", "@wordpress/priority-queue": "2.1.0", "@wordpress/redux-routine": "4.1.0", - "@wordpress/reusable-blocks": "2.1.0", + "@wordpress/reusable-blocks": "2.1.1", "@wordpress/rich-text": "4.1.0", "@wordpress/server-side-render": "2.1.0", "@wordpress/shortcode": "3.1.0", @@ -125,6 +127,7 @@ "@wordpress/url": "3.1.0", "@wordpress/viewport": "3.1.0", "@wordpress/warning": "2.1.0", + "@wordpress/widgets": "1.1.1", "@wordpress/wordcount": "3.1.0", "backbone": "1.4.0", "clipboard": "2.0.8", diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php index d2b5fda09eed8..7ee3d03b74cc1 100644 --- a/src/wp-admin/admin-header.php +++ b/src/wp-admin/admin-header.php @@ -190,8 +190,7 @@ $admin_body_class .= ' no-customize-support no-svg'; if ( $current_screen->is_block_editor() ) { - // Default to is-fullscreen-mode to avoid jumps in the UI. - $admin_body_class .= ' block-editor-page is-fullscreen-mode wp-embed-responsive'; + $admin_body_class .= ' block-editor-page wp-embed-responsive'; } $error_get_last = error_get_last(); diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 848157de961e2..eaf0138412a97 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -29,6 +29,14 @@ $current_screen = get_current_screen(); $current_screen->is_block_editor( true ); +// Default to is-fullscreen-mode to avoid jumps in the UI. +add_filter( + 'admin_body_class', + function( $classes ) { + return "$classes is-fullscreen-mode"; + } +); + /* * Emoji replacement is disabled for now, until it plays nicely with React. */ diff --git a/src/wp-admin/widgets-form-blocks.php b/src/wp-admin/widgets-form-blocks.php new file mode 100644 index 0000000000000..c6cb6624e8ee2 --- /dev/null +++ b/src/wp-admin/widgets-form-blocks.php @@ -0,0 +1,66 @@ +is_block_editor( true ); + +$block_editor_context = new WP_Block_Editor_Context(); + +$preload_paths = array( + array( '/wp/v2/media', 'OPTIONS' ), + '/wp/v2/sidebars?context=edit&per_page=-1', + '/wp/v2/widgets?context=edit&per_page=-1&_embed=about', +); +block_editor_rest_api_preload( $preload_paths, $block_editor_context ); + +$editor_settings = get_block_editor_settings( array(), $block_editor_context ); + +wp_add_inline_script( + 'wp-edit-widgets', + sprintf( + 'wp.domReady( function() { + wp.editWidgets.initialize( "widgets-editor", %s ); + } );', + wp_json_encode( $editor_settings ) + ) +); + +// Preload server-registered block schemas. +wp_add_inline_script( + 'wp-blocks', + 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' +); + +wp_add_inline_script( + 'wp-blocks', + sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( 'widgets-editor' ) ) ), + 'after' +); + +wp_enqueue_script( 'wp-edit-widgets' ); +wp_enqueue_script( 'admin-widgets' ); +wp_enqueue_script( 'wp-format-library' ); +wp_enqueue_style( 'wp-edit-widgets' ); +wp_enqueue_style( 'wp-format-library' ); + +/** This action is documented in edit-form-blocks.php */ +do_action( 'enqueue_block_editor_assets' ); + +require_once ABSPATH . 'wp-admin/admin-header.php'; +?> + +
+ +add_help_tab( + array( + 'id' => 'overview', + 'title' => __( 'Overview' ), + 'content' => + '' . __( 'Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.' ) . '
+' . __( 'The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.' ) . '
', + ) +); +get_current_screen()->add_help_tab( + array( + 'id' => 'removing-reusing', + 'title' => __( 'Removing and Reusing' ), + 'content' => + '' . __( 'If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.' ) . '
+' . __( 'Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.' ) . '
+' . __( 'Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.' ) . '
', + ) +); +get_current_screen()->add_help_tab( + array( + 'id' => 'missing-widgets', + 'title' => __( 'Missing Widgets' ), + 'content' => + '' . __( 'Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.' ) . '
' . + '' . __( 'When changing themes, there is often some variation in the number and setup of widget areas/sidebars and sometimes these conflicts make the transition a bit less smooth. If you changed themes and seem to be missing widgets, scroll down on this screen to the Inactive Widgets area, where all of your widgets and their settings will have been saved.' ) . '
', + ) +); + +get_current_screen()->set_help_sidebar( + '' . __( 'For more information:' ) . '
' . + '' . __( 'Documentation on Widgets' ) . '
' . + '' . __( 'Support' ) . '
' +); + +if ( ! current_theme_supports( 'widgets' ) ) { + wp_die( __( 'The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.' ) ); +} + +// These are the widgets grouped by sidebar. +$sidebars_widgets = wp_get_sidebars_widgets(); + +if ( empty( $sidebars_widgets ) ) { + $sidebars_widgets = wp_get_widget_defaults(); +} + +foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { + if ( 'wp_inactive_widgets' === $sidebar_id ) { + continue; + } + + if ( ! is_registered_sidebar( $sidebar_id ) ) { + if ( ! empty( $widgets ) ) { // Register the inactive_widgets area as sidebar. + register_sidebar( + array( + 'name' => __( 'Inactive Sidebar (not used)' ), + 'id' => $sidebar_id, + 'class' => 'inactive-sidebar orphan-sidebar', + 'description' => __( 'This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.' ), + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', + ) + ); + } else { + unset( $sidebars_widgets[ $sidebar_id ] ); + } + } +} + +// Register the inactive_widgets area as sidebar. +register_sidebar( + array( + 'name' => __( 'Inactive Widgets' ), + 'id' => 'wp_inactive_widgets', + 'class' => 'inactive-sidebar', + 'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ), + 'before_widget' => '', + 'after_widget' => '', + 'before_title' => '', + 'after_title' => '', + ) +); + +retrieve_widgets(); + +// We're saving a widget without JS. +if ( isset( $_POST['savewidget'] ) || isset( $_POST['removewidget'] ) ) { + $widget_id = $_POST['widget-id']; + check_admin_referer( "save-delete-widget-$widget_id" ); + + $number = isset( $_POST['multi_number'] ) ? (int) $_POST['multi_number'] : ''; + if ( $number ) { + foreach ( $_POST as $key => $val ) { + if ( is_array( $val ) && preg_match( '/__i__|%i%/', key( $val ) ) ) { + $_POST[ $key ] = array( $number => array_shift( $val ) ); + break; + } + } + } + + $sidebar_id = $_POST['sidebar']; + $position = isset( $_POST[ $sidebar_id . '_position' ] ) ? (int) $_POST[ $sidebar_id . '_position' ] - 1 : 0; + + $id_base = $_POST['id_base']; + $sidebar = isset( $sidebars_widgets[ $sidebar_id ] ) ? $sidebars_widgets[ $sidebar_id ] : array(); + + // Delete. + if ( isset( $_POST['removewidget'] ) && $_POST['removewidget'] ) { + + if ( ! in_array( $widget_id, $sidebar, true ) ) { + wp_redirect( admin_url( 'widgets.php?error=0' ) ); + exit; + } + + $sidebar = array_diff( $sidebar, array( $widget_id ) ); + $_POST = array( + 'sidebar' => $sidebar_id, + 'widget-' . $id_base => array(), + 'the-widget-id' => $widget_id, + 'delete_widget' => '1', + ); + + /** + * Fires immediately after a widget has been marked for deletion. + * + * @since 4.4.0 + * + * @param string $widget_id ID of the widget marked for deletion. + * @param string $sidebar_id ID of the sidebar the widget was deleted from. + * @param string $id_base ID base for the widget. + */ + do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base ); + } + + $_POST['widget-id'] = $sidebar; + + foreach ( (array) $wp_registered_widget_updates as $name => $control ) { + if ( $name !== $id_base || ! is_callable( $control['callback'] ) ) { + continue; + } + + ob_start(); + call_user_func_array( $control['callback'], $control['params'] ); + ob_end_clean(); + + break; + } + + $sidebars_widgets[ $sidebar_id ] = $sidebar; + + // Remove old position. + if ( ! isset( $_POST['delete_widget'] ) ) { + foreach ( $sidebars_widgets as $key => $sb ) { + if ( is_array( $sb ) ) { + $sidebars_widgets[ $key ] = array_diff( $sb, array( $widget_id ) ); + } + } + array_splice( $sidebars_widgets[ $sidebar_id ], $position, 0, $widget_id ); + } + + wp_set_sidebars_widgets( $sidebars_widgets ); + wp_redirect( admin_url( 'widgets.php?message=0' ) ); + exit; +} + +// Remove inactive widgets without JS. +if ( isset( $_POST['removeinactivewidgets'] ) ) { + check_admin_referer( 'remove-inactive-widgets', '_wpnonce_remove_inactive_widgets' ); + + if ( $_POST['removeinactivewidgets'] ) { + foreach ( $sidebars_widgets['wp_inactive_widgets'] as $key => $widget_id ) { + $pieces = explode( '-', $widget_id ); + $multi_number = array_pop( $pieces ); + $id_base = implode( '-', $pieces ); + $widget = get_option( 'widget_' . $id_base ); + unset( $widget[ $multi_number ] ); + update_option( 'widget_' . $id_base, $widget ); + unset( $sidebars_widgets['wp_inactive_widgets'][ $key ] ); + } + + wp_set_sidebars_widgets( $sidebars_widgets ); + } + + wp_redirect( admin_url( 'widgets.php?message=0' ) ); + exit; +} + +// Output the widget form without JS. +if ( isset( $_GET['editwidget'] ) && $_GET['editwidget'] ) { + $widget_id = $_GET['editwidget']; + + if ( isset( $_GET['addnew'] ) ) { + // Default to the first sidebar. + $keys = array_keys( $wp_registered_sidebars ); + $sidebar = reset( $keys ); + + if ( isset( $_GET['base'] ) && isset( $_GET['num'] ) ) { // Multi-widget. + // Copy minimal info from an existing instance of this widget to a new instance. + foreach ( $wp_registered_widget_controls as $control ) { + if ( $_GET['base'] === $control['id_base'] ) { + $control_callback = $control['callback']; + $multi_number = (int) $_GET['num']; + $control['params'][0]['number'] = -1; + $control['id'] = $control['id_base'] . '-' . $multi_number; + $widget_id = $control['id']; + $wp_registered_widget_controls[ $control['id'] ] = $control; + break; + } + } + } + } + + if ( isset( $wp_registered_widget_controls[ $widget_id ] ) && ! isset( $control ) ) { + $control = $wp_registered_widget_controls[ $widget_id ]; + $control_callback = $control['callback']; + } elseif ( ! isset( $wp_registered_widget_controls[ $widget_id ] ) && isset( $wp_registered_widgets[ $widget_id ] ) ) { + $name = esc_html( strip_tags( $wp_registered_widgets[ $widget_id ]['name'] ) ); + } + + if ( ! isset( $name ) ) { + $name = esc_html( strip_tags( $control['name'] ) ); + } + + if ( ! isset( $sidebar ) ) { + $sidebar = isset( $_GET['sidebar'] ) ? $_GET['sidebar'] : 'wp_inactive_widgets'; + } + + if ( ! isset( $multi_number ) ) { + $multi_number = isset( $control['params'][0]['number'] ) ? $control['params'][0]['number'] : ''; + } + + $id_base = isset( $control['id_base'] ) ? $control['id_base'] : $control['id']; + + // Show the widget form. + $width = ' style="width:' . max( $control['width'], 350 ) . 'px"'; + $key = isset( $_GET['key'] ) ? (int) $_GET['key'] : 0; + + require_once ABSPATH . 'wp-admin/admin-header.php'; ?> +' . __( 'Widgets are independent sections of content that can be placed into any widgetized area provided by your theme (commonly called sidebars). To populate your sidebars/widget areas with individual widgets, drag and drop the title bars into the desired area. By default, only the first widget area is expanded. To populate additional widget areas, click on their title bars to expand them.' ) . '
-' . __( 'The Available Widgets section contains all the widgets you can choose from. Once you drag a widget into a sidebar, it will open to allow you to configure its settings. When you are happy with the widget settings, click the Save button and the widget will go live on your site. If you click Delete, it will remove the widget.' ) . '
', - ) -); -get_current_screen()->add_help_tab( - array( - 'id' => 'removing-reusing', - 'title' => __( 'Removing and Reusing' ), - 'content' => - '' . __( 'If you want to remove the widget but save its setting for possible future use, just drag it into the Inactive Widgets area. You can add them back anytime from there. This is especially helpful when you switch to a theme with fewer or different widget areas.' ) . '
-' . __( 'Widgets may be used multiple times. You can give each widget a title, to display on your site, but it’s not required.' ) . '
-' . __( 'Enabling Accessibility Mode, via Screen Options, allows you to use Add and Edit buttons instead of using drag and drop.' ) . '
', - ) -); -get_current_screen()->add_help_tab( - array( - 'id' => 'missing-widgets', - 'title' => __( 'Missing Widgets' ), - 'content' => - '' . __( 'Many themes show some sidebar widgets by default until you edit your sidebars, but they are not automatically displayed in your sidebar management tool. After you make your first widget change, you can re-add the default widgets by adding them from the Available Widgets area.' ) . '
' . - '' . __( 'When changing themes, there is often some variation in the number and setup of widget areas/sidebars and sometimes these conflicts make the transition a bit less smooth. If you changed themes and seem to be missing widgets, scroll down on this screen to the Inactive Widgets area, where all of your widgets and their settings will have been saved.' ) . '
', - ) -); - -get_current_screen()->set_help_sidebar( - '' . __( 'For more information:' ) . '
' . - '' . __( 'Documentation on Widgets' ) . '
' . - '' . __( 'Support' ) . '
' -); - -if ( ! current_theme_supports( 'widgets' ) ) { - wp_die( __( 'The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.' ) ); -} - -// These are the widgets grouped by sidebar. -$sidebars_widgets = wp_get_sidebars_widgets(); - -if ( empty( $sidebars_widgets ) ) { - $sidebars_widgets = wp_get_widget_defaults(); -} - -foreach ( $sidebars_widgets as $sidebar_id => $widgets ) { - if ( 'wp_inactive_widgets' === $sidebar_id ) { - continue; - } - - if ( ! is_registered_sidebar( $sidebar_id ) ) { - if ( ! empty( $widgets ) ) { // Register the inactive_widgets area as sidebar. - register_sidebar( - array( - 'name' => __( 'Inactive Sidebar (not used)' ), - 'id' => $sidebar_id, - 'class' => 'inactive-sidebar orphan-sidebar', - 'description' => __( 'This sidebar is no longer available and does not show anywhere on your site. Remove each of the widgets below to fully remove this inactive sidebar.' ), - 'before_widget' => '', - 'after_widget' => '', - 'before_title' => '', - 'after_title' => '', - ) - ); - } else { - unset( $sidebars_widgets[ $sidebar_id ] ); - } - } -} - -// Register the inactive_widgets area as sidebar. -register_sidebar( - array( - 'name' => __( 'Inactive Widgets' ), - 'id' => 'wp_inactive_widgets', - 'class' => 'inactive-sidebar', - 'description' => __( 'Drag widgets here to remove them from the sidebar but keep their settings.' ), - 'before_widget' => '', - 'after_widget' => '', - 'before_title' => '', - 'after_title' => '', - ) -); - -retrieve_widgets(); - -// We're saving a widget without JS. -if ( isset( $_POST['savewidget'] ) || isset( $_POST['removewidget'] ) ) { - $widget_id = $_POST['widget-id']; - check_admin_referer( "save-delete-widget-$widget_id" ); - - $number = isset( $_POST['multi_number'] ) ? (int) $_POST['multi_number'] : ''; - if ( $number ) { - foreach ( $_POST as $key => $val ) { - if ( is_array( $val ) && preg_match( '/__i__|%i%/', key( $val ) ) ) { - $_POST[ $key ] = array( $number => array_shift( $val ) ); - break; - } - } - } - - $sidebar_id = $_POST['sidebar']; - $position = isset( $_POST[ $sidebar_id . '_position' ] ) ? (int) $_POST[ $sidebar_id . '_position' ] - 1 : 0; - - $id_base = $_POST['id_base']; - $sidebar = isset( $sidebars_widgets[ $sidebar_id ] ) ? $sidebars_widgets[ $sidebar_id ] : array(); - - // Delete. - if ( isset( $_POST['removewidget'] ) && $_POST['removewidget'] ) { - - if ( ! in_array( $widget_id, $sidebar, true ) ) { - wp_redirect( admin_url( 'widgets.php?error=0' ) ); - exit; - } - - $sidebar = array_diff( $sidebar, array( $widget_id ) ); - $_POST = array( - 'sidebar' => $sidebar_id, - 'widget-' . $id_base => array(), - 'the-widget-id' => $widget_id, - 'delete_widget' => '1', - ); - - /** - * Fires immediately after a widget has been marked for deletion. - * - * @since 4.4.0 - * - * @param string $widget_id ID of the widget marked for deletion. - * @param string $sidebar_id ID of the sidebar the widget was deleted from. - * @param string $id_base ID base for the widget. - */ - do_action( 'delete_widget', $widget_id, $sidebar_id, $id_base ); - } - - $_POST['widget-id'] = $sidebar; - - foreach ( (array) $wp_registered_widget_updates as $name => $control ) { - if ( $name !== $id_base || ! is_callable( $control['callback'] ) ) { - continue; - } - - ob_start(); - call_user_func_array( $control['callback'], $control['params'] ); - ob_end_clean(); - - break; - } - - $sidebars_widgets[ $sidebar_id ] = $sidebar; - - // Remove old position. - if ( ! isset( $_POST['delete_widget'] ) ) { - foreach ( $sidebars_widgets as $key => $sb ) { - if ( is_array( $sb ) ) { - $sidebars_widgets[ $key ] = array_diff( $sb, array( $widget_id ) ); - } - } - array_splice( $sidebars_widgets[ $sidebar_id ], $position, 0, $widget_id ); - } - - wp_set_sidebars_widgets( $sidebars_widgets ); - wp_redirect( admin_url( 'widgets.php?message=0' ) ); - exit; -} - -// Remove inactive widgets without JS. -if ( isset( $_POST['removeinactivewidgets'] ) ) { - check_admin_referer( 'remove-inactive-widgets', '_wpnonce_remove_inactive_widgets' ); - - if ( $_POST['removeinactivewidgets'] ) { - foreach ( $sidebars_widgets['wp_inactive_widgets'] as $key => $widget_id ) { - $pieces = explode( '-', $widget_id ); - $multi_number = array_pop( $pieces ); - $id_base = implode( '-', $pieces ); - $widget = get_option( 'widget_' . $id_base ); - unset( $widget[ $multi_number ] ); - update_option( 'widget_' . $id_base, $widget ); - unset( $sidebars_widgets['wp_inactive_widgets'][ $key ] ); - } - - wp_set_sidebars_widgets( $sidebars_widgets ); - } - - wp_redirect( admin_url( 'widgets.php?message=0' ) ); - exit; -} - -// Output the widget form without JS. -if ( isset( $_GET['editwidget'] ) && $_GET['editwidget'] ) { - $widget_id = $_GET['editwidget']; - - if ( isset( $_GET['addnew'] ) ) { - // Default to the first sidebar. - $keys = array_keys( $wp_registered_sidebars ); - $sidebar = reset( $keys ); - - if ( isset( $_GET['base'] ) && isset( $_GET['num'] ) ) { // Multi-widget. - // Copy minimal info from an existing instance of this widget to a new instance. - foreach ( $wp_registered_widget_controls as $control ) { - if ( $_GET['base'] === $control['id_base'] ) { - $control_callback = $control['callback']; - $multi_number = (int) $_GET['num']; - $control['params'][0]['number'] = -1; - $control['id'] = $control['id_base'] . '-' . $multi_number; - $widget_id = $control['id']; - $wp_registered_widget_controls[ $control['id'] ] = $control; - break; - } - } - } - } - - if ( isset( $wp_registered_widget_controls[ $widget_id ] ) && ! isset( $control ) ) { - $control = $wp_registered_widget_controls[ $widget_id ]; - $control_callback = $control['callback']; - } elseif ( ! isset( $wp_registered_widget_controls[ $widget_id ] ) && isset( $wp_registered_widgets[ $widget_id ] ) ) { - $name = esc_html( strip_tags( $wp_registered_widgets[ $widget_id ]['name'] ) ); - } - - if ( ! isset( $name ) ) { - $name = esc_html( strip_tags( $control['name'] ) ); - } - - if ( ! isset( $sidebar ) ) { - $sidebar = isset( $_GET['sidebar'] ) ? $_GET['sidebar'] : 'wp_inactive_widgets'; - } - - if ( ! isset( $multi_number ) ) { - $multi_number = isset( $control['params'][0]['number'] ) ? $control['params'][0]['number'] : ''; - } - - $id_base = isset( $control['id_base'] ) ? $control['id_base'] : $control['id']; - - // Show the widget form. - $width = ' style="width:' . max( $control['width'], 350 ) . 'px"'; - $key = isset( $_GET['key'] ) ? (int) $_GET['key'] : 0; - - require_once ABSPATH . 'wp-admin/admin-header.php'; ?> -