mirror of
git://develop.git.wordpress.org/
synced 2025-04-26 23:22:25 +02:00
Block Editor: Backport fixes targetted for WordPress 5.8 RC4.
This includes: - Suggestion List: Check if a node exists to scroll into view. - Autocomplete: reset state for empty text. - Adds auxiliary class names for editor styles in the widgets editor. - Extract snackbars into a separate component. - Rich text: run input rules after composition end. - iframe: load inline styles. - Multi select: select all: restore ref callback. - Writing flow: allow select all from empty selection. - Post Excerpt: Fix excerpt_more filter conflict and remove wordCount attribute. - Add the percent unit to the default units in Core. Props desrosj. See #53397. git-svn-id: https://develop.svn.wordpress.org/trunk@51443 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
025e59a1ef
commit
a74568e96d
184
package-lock.json
generated
184
package-lock.json
generated
@ -3253,22 +3253,22 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/block-directory": {
|
||||
"version": "2.1.19",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-2.1.19.tgz",
|
||||
"integrity": "sha512-IQ0LKuNQ0VpV5Z0EADhZ1qCUhriAbQdfOIzPEcXM070Unx4y5BKhRnz4KW5dqS/k6L7FFe12jTeOdD3Dspv/fA==",
|
||||
"version": "2.1.20",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/block-directory/-/block-directory-2.1.20.tgz",
|
||||
"integrity": "sha512-22RezQMYfF78N2yPFabAx44U/3DlrHgT6i77wqzZktGw97PaWJtbw9pJkCxDbve3hDjb6EuAkXF1LpRxpLkGjw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/a11y": "^3.1.1",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
"@wordpress/data-controls": "^2.1.5",
|
||||
"@wordpress/edit-post": "^4.1.19",
|
||||
"@wordpress/editor": "^10.1.15",
|
||||
"@wordpress/edit-post": "^4.1.20",
|
||||
"@wordpress/editor": "^10.1.16",
|
||||
"@wordpress/element": "^3.1.1",
|
||||
"@wordpress/hooks": "^3.1.1",
|
||||
"@wordpress/html-entities": "^3.1.1",
|
||||
@ -3294,16 +3294,16 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/block-editor": {
|
||||
"version": "6.1.12",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-6.1.12.tgz",
|
||||
"integrity": "sha512-WhCGKEGDvPVAsUSLhUIzS/kW0Hn85wFLCgthSiIivzZKPlisJXnzojIcz64+FaDip9CKZKLmaxyRvpSt6JeP+Q==",
|
||||
"version": "6.1.13",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/block-editor/-/block-editor-6.1.13.tgz",
|
||||
"integrity": "sha512-I2NEN+7fUTNiJ/NDkap5NuVT6T9CP+KcpZYziYvYWomcP1iCwBFo78EqBY4mqdhcczWfl1ykjhljPq2DW4ELPg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/a11y": "^3.1.1",
|
||||
"@wordpress/blob": "^3.1.1",
|
||||
"@wordpress/block-serialization-default-parser": "^4.1.1",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
"@wordpress/data-controls": "^2.1.5",
|
||||
@ -3315,7 +3315,7 @@
|
||||
"@wordpress/i18n": "^4.1.1",
|
||||
"@wordpress/icons": "^4.0.2",
|
||||
"@wordpress/is-shallow-equal": "^4.1.1",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.5",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.6",
|
||||
"@wordpress/keycodes": "^3.1.1",
|
||||
"@wordpress/notices": "^3.1.5",
|
||||
"@wordpress/rich-text": "^4.1.5",
|
||||
@ -3352,18 +3352,18 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/block-library": {
|
||||
"version": "3.2.17",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-3.2.17.tgz",
|
||||
"integrity": "sha512-JfkLaycaF+gVEMJq0THiAjrHHJGp9APXIYWEHHQc1jzR6KSL7jiplild9eO3ZwLNSXSjzztwG0I3NBfKd5xddA==",
|
||||
"version": "3.2.18",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/block-library/-/block-library-3.2.18.tgz",
|
||||
"integrity": "sha512-f61TICHWTIjvWnf8X5NvzYUDZ+RdJ944JLxWKJEhWGljk5iw0Cis+fZbPGK0QQoo8PzKXxqsTNj0oKRYpq92Pw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/a11y": "^3.1.1",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/autop": "^3.1.1",
|
||||
"@wordpress/blob": "^3.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
@ -3379,9 +3379,9 @@
|
||||
"@wordpress/keycodes": "^3.1.1",
|
||||
"@wordpress/notices": "^3.1.5",
|
||||
"@wordpress/primitives": "^2.1.1",
|
||||
"@wordpress/reusable-blocks": "^2.1.15",
|
||||
"@wordpress/reusable-blocks": "^2.1.16",
|
||||
"@wordpress/rich-text": "^4.1.5",
|
||||
"@wordpress/server-side-render": "^2.1.10",
|
||||
"@wordpress/server-side-render": "^2.1.11",
|
||||
"@wordpress/url": "^3.1.1",
|
||||
"@wordpress/viewport": "^3.1.5",
|
||||
"classnames": "^2.2.5",
|
||||
@ -3438,9 +3438,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@wordpress/components": {
|
||||
"version": "14.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/components/-/components-14.1.9.tgz",
|
||||
"integrity": "sha512-DxKM98U/iNpHF74vd4eohwvo04V9AONoulkJALJDcB8yTGfUmtCrauDLqfMAwCZf71vCcDqmp0RbprXAXk/elQ==",
|
||||
"version": "14.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/components/-/components-14.1.10.tgz",
|
||||
"integrity": "sha512-MQ1wgJcLtZJcu2jztR2USELbEamqcPTEnZJmJMpdFYg2cR5b3puj3X0ehPjq3G7kSNCRu1J6mPEv5iADbLM6Yg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@emotion/cache": "^10.0.27",
|
||||
@ -3545,16 +3545,16 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/customize-widgets": {
|
||||
"version": "1.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-1.0.18.tgz",
|
||||
"integrity": "sha512-F0kaaVg3OEoSudJtcaPxAxmOAzQOMvPPHant8Ht3JMJlpIT0h75GvERF3ARapzNepct6M3gpKixOkPUN3o4f1w==",
|
||||
"version": "1.0.19",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/customize-widgets/-/customize-widgets-1.0.19.tgz",
|
||||
"integrity": "sha512-3nQMd0Rxy0PIPL3Q6F+ZnHoWVahcWUKvzLnHpdJSx37CGXDJcA4Mx6fl+KLJSUE1ADccZhtKYQRtVIxexaj2ng==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.11.2",
|
||||
"@wordpress/a11y": "^3.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-library": "^3.2.17",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/block-library": "^3.2.18",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
@ -3564,10 +3564,10 @@
|
||||
"@wordpress/i18n": "^4.1.1",
|
||||
"@wordpress/icons": "^4.0.2",
|
||||
"@wordpress/is-shallow-equal": "^4.1.1",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.5",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.6",
|
||||
"@wordpress/keycodes": "^3.1.1",
|
||||
"@wordpress/media-utils": "^2.1.1",
|
||||
"@wordpress/widgets": "^1.1.17",
|
||||
"@wordpress/widgets": "^1.1.18",
|
||||
"classnames": "^2.2.6",
|
||||
"lodash": "^4.17.21"
|
||||
}
|
||||
@ -3682,28 +3682,28 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/edit-post": {
|
||||
"version": "4.1.19",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-4.1.19.tgz",
|
||||
"integrity": "sha512-KZ9Xr9lrbq9sPeRJ9s+xxsPg1jJHJUge8G24mo13aI7eyNa7u3ruQPHsuI4qH7tHN5sZtjBSiY3Xboxfl6kJQg==",
|
||||
"version": "4.1.20",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/edit-post/-/edit-post-4.1.20.tgz",
|
||||
"integrity": "sha512-W420fWlb025GsXIZEawCF4O8B7vtwzGu1UmwvdM3kOcsq09yvSAoIuoiPNzQDJhkK1DcsBvglH6vEYA6uEbwPA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/a11y": "^3.1.1",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-library": "^3.2.17",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/block-library": "^3.2.18",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
"@wordpress/data-controls": "^2.1.5",
|
||||
"@wordpress/editor": "^10.1.15",
|
||||
"@wordpress/editor": "^10.1.16",
|
||||
"@wordpress/element": "^3.1.1",
|
||||
"@wordpress/hooks": "^3.1.1",
|
||||
"@wordpress/i18n": "^4.1.1",
|
||||
"@wordpress/icons": "^4.0.2",
|
||||
"@wordpress/interface": "^3.1.10",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.5",
|
||||
"@wordpress/interface": "^3.1.11",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.6",
|
||||
"@wordpress/keycodes": "^3.1.1",
|
||||
"@wordpress/media-utils": "^2.1.1",
|
||||
"@wordpress/notices": "^3.1.5",
|
||||
@ -3739,17 +3739,17 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/edit-widgets": {
|
||||
"version": "2.1.19",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-2.1.19.tgz",
|
||||
"integrity": "sha512-OW9sMWg42bY0aj/1qXREOkXbtgXQoamgdKkNQNJIrkTjmZL9xFHDXaYiUmGI3tkmeaUvYRdjXOiJWTgpPBpdZA==",
|
||||
"version": "2.1.20",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/edit-widgets/-/edit-widgets-2.1.20.tgz",
|
||||
"integrity": "sha512-nCG4DCqfU1a87BI5YQi6MjWMsLNSZ/NWaC8xGECmZF7m+jGJ3WcXDNz1wISUjRPlfTB88uDfxirK7x9RTL5zLA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/a11y": "^3.1.1",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-library": "^3.2.17",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/block-library": "^3.2.18",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
@ -3758,16 +3758,16 @@
|
||||
"@wordpress/hooks": "^3.1.1",
|
||||
"@wordpress/i18n": "^4.1.1",
|
||||
"@wordpress/icons": "^4.0.2",
|
||||
"@wordpress/interface": "^3.1.10",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.5",
|
||||
"@wordpress/interface": "^3.1.11",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.6",
|
||||
"@wordpress/keycodes": "^3.1.1",
|
||||
"@wordpress/media-utils": "^2.1.1",
|
||||
"@wordpress/notices": "^3.1.5",
|
||||
"@wordpress/plugins": "^3.1.5",
|
||||
"@wordpress/reusable-blocks": "^2.1.15",
|
||||
"@wordpress/server-side-render": "^2.1.10",
|
||||
"@wordpress/reusable-blocks": "^2.1.16",
|
||||
"@wordpress/server-side-render": "^2.1.11",
|
||||
"@wordpress/url": "^3.1.1",
|
||||
"@wordpress/widgets": "^1.1.17",
|
||||
"@wordpress/widgets": "^1.1.18",
|
||||
"classnames": "^2.2.5",
|
||||
"lodash": "^4.17.21",
|
||||
"rememo": "^3.0.0",
|
||||
@ -3788,17 +3788,17 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/editor": {
|
||||
"version": "10.1.15",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-10.1.15.tgz",
|
||||
"integrity": "sha512-IGhgRbo4pR6TrhW5XvfHV2bL0tuuMSwPYd3DpWXgFDNTALvuDgJx9BCHn0LgIZFjM0JJJgA+HAJjGl7OfPsYzQ==",
|
||||
"version": "10.1.16",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/editor/-/editor-10.1.16.tgz",
|
||||
"integrity": "sha512-QXvV6BxSKAapQeocBn5m83FPzO4x+UFw8EUuM37fiZ0VLeqRuv0Ec2HhxW3WrimeZGEhlG7M1vboGQ2U7VJtmw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/autop": "^3.1.1",
|
||||
"@wordpress/blob": "^3.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
@ -3811,13 +3811,13 @@
|
||||
"@wordpress/i18n": "^4.1.1",
|
||||
"@wordpress/icons": "^4.0.2",
|
||||
"@wordpress/is-shallow-equal": "^4.1.1",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.5",
|
||||
"@wordpress/keyboard-shortcuts": "^2.1.6",
|
||||
"@wordpress/keycodes": "^3.1.1",
|
||||
"@wordpress/media-utils": "^2.1.1",
|
||||
"@wordpress/notices": "^3.1.5",
|
||||
"@wordpress/reusable-blocks": "^2.1.15",
|
||||
"@wordpress/reusable-blocks": "^2.1.16",
|
||||
"@wordpress/rich-text": "^4.1.5",
|
||||
"@wordpress/server-side-render": "^2.1.10",
|
||||
"@wordpress/server-side-render": "^2.1.11",
|
||||
"@wordpress/url": "^3.1.1",
|
||||
"@wordpress/wordcount": "^3.1.1",
|
||||
"classnames": "^2.2.5",
|
||||
@ -3917,14 +3917,14 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/format-library": {
|
||||
"version": "2.1.12",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-2.1.12.tgz",
|
||||
"integrity": "sha512-VajW9ilcVrp3lq4Jr7ngkpTO5RNm8y7taRbKGIwpp6UrOskb5123VZxgc1PPtLW+jlXNx3JerPys3sGTsMc2oQ==",
|
||||
"version": "2.1.13",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-2.1.13.tgz",
|
||||
"integrity": "sha512-svWUeJATHapPXeh7wEGCHKy4eoYwERe1JQF7Rxir/s3Z1jAOmmzWDOxXKBcUVUGZp31laAQ3czJ7BzuPuyurlw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/a11y": "^3.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
"@wordpress/dom": "^3.1.4",
|
||||
@ -3979,12 +3979,12 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/interface": {
|
||||
"version": "3.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-3.1.10.tgz",
|
||||
"integrity": "sha512-Abv+S/NanPZfYJbv3pVegVF7tUCbeRInz7mh5uofFJ5fjWlt2n3p2Ojl2E34QzxAy14d8kJLUY0i+KSGBxD+3w==",
|
||||
"version": "3.1.11",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/interface/-/interface-3.1.11.tgz",
|
||||
"integrity": "sha512-oyDHaIzYRYLiARBS0sEvpKbNmSrv1KaVp9IugUFDOGwT6NE6l9n2+3j600G8mZBpfg3iL222rMFi40LOc6f5Kg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
"@wordpress/deprecated": "^3.1.1",
|
||||
@ -4030,9 +4030,9 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/keyboard-shortcuts": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-2.1.5.tgz",
|
||||
"integrity": "sha512-Uis6gU1vwyaI7ii6m8nJS369k34ebLaOcCHyROC40Z9FAiuIXjBH8RfwaDEKBa/D7LMygIeFlG7fcFa6qdNNQQ==",
|
||||
"version": "2.1.6",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/keyboard-shortcuts/-/keyboard-shortcuts-2.1.6.tgz",
|
||||
"integrity": "sha512-YyF0Iy6F9udYwsxHKsWFLcIUQzfbr9MS3qcm0YmhszZCtLEwKmfcL6s3n4KTFD7EosDXcxyivoifLdiWY3R27w==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
@ -4082,13 +4082,13 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/list-reusable-blocks": {
|
||||
"version": "2.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-2.1.9.tgz",
|
||||
"integrity": "sha512-aiqHf/YDuautZsZzwiNc3koY1A+bWjkuWuo59fwIAhAWlZa7KfSHyhl+t93ZmG8SFooCAXyhmnegcLmfqygWXA==",
|
||||
"version": "2.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/list-reusable-blocks/-/list-reusable-blocks-2.1.10.tgz",
|
||||
"integrity": "sha512-benX4UNOuXZR6Vzkxe48QR/eusqyCs44yCJjh1foem6kdVyMeduwEx88WALVIJq34Y6X3l3bHpQRcVVtEpdEAA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/element": "^3.1.1",
|
||||
"@wordpress/i18n": "^4.1.1",
|
||||
@ -4126,12 +4126,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"@wordpress/nux": {
|
||||
"version": "4.1.9",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-4.1.9.tgz",
|
||||
"integrity": "sha512-Fp998AcoZ/bsCZM8B+RitDRvVFR+06QoUaILZByHVLjoZ8x1XgsjPXYqIjEgnjUE9v6ediWPYNO59cigDfXSRg==",
|
||||
"version": "4.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/nux/-/nux-4.1.10.tgz",
|
||||
"integrity": "sha512-DONHYpLwZV7hAh4C0ZVJTBgKyItcq7zC2UTyXASA2jKj1KDWTQGf0SgxdK5KZLUz43/GlqfTBadl3IaFl9gpvA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
"@wordpress/deprecated": "^3.1.1",
|
||||
@ -4236,13 +4236,13 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/reusable-blocks": {
|
||||
"version": "2.1.15",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-2.1.15.tgz",
|
||||
"integrity": "sha512-S8M5g/qKUkawFykInR4WwKqLgMUkfFDS85L8wZTeKCeodQVuf/BdJ26gIUNa0ORS4MP46SmSEq8rsYfnXwIXNA==",
|
||||
"version": "2.1.16",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/reusable-blocks/-/reusable-blocks-2.1.16.tgz",
|
||||
"integrity": "sha512-CEVKQcUS7VJH7qUMRzRQqmVZB3JpZ0dKphjWYS0NacJIN2Jlm1HLJS1Sxf4Ayv0SKmYgQp2NE5Zas4aki8wPfA==",
|
||||
"requires": {
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
@ -4833,14 +4833,14 @@
|
||||
}
|
||||
},
|
||||
"@wordpress/server-side-render": {
|
||||
"version": "2.1.10",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-2.1.10.tgz",
|
||||
"integrity": "sha512-AGkH0Md+y2JKj/kwFS35RBd5Rbb8pwmX3hU7m0gEqm/dakZmQ4n02tVpOPACn8BtZIeP2HiIbjHihCnr5UK5mg==",
|
||||
"version": "2.1.11",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/server-side-render/-/server-side-render-2.1.11.tgz",
|
||||
"integrity": "sha512-TY2OcJRfGpnhCaeAsh7/tHVNOLzToZ1lJ07zfIePCVQ6lNuQvBpLWXuEf7EGXH6jc2AyRS8ler3zCxHX2MaIBA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
"@wordpress/deprecated": "^3.1.1",
|
||||
@ -4907,15 +4907,15 @@
|
||||
"integrity": "sha512-EX+/6P2bWO0zRrKJYx1yck0rY2K5z5aPb67DTU+2ggcowW8JRP7hBzGdzhXqoE32oMS7RO97nG3uD9sZtn2DJA=="
|
||||
},
|
||||
"@wordpress/widgets": {
|
||||
"version": "1.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-1.1.17.tgz",
|
||||
"integrity": "sha512-kGQhtYBEPCKFkQwpMEGIhgca4qrF0wXSqgr0Tdec4dbZGqCS6GTasUCoKoCZmogAMHVkIP6KiEM34ZFSQIM8Yw==",
|
||||
"version": "1.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@wordpress/widgets/-/widgets-1.1.18.tgz",
|
||||
"integrity": "sha512-qUg595IecNXmu/8sS5l7NJdcMJbToj+0bjOQzj3bZDapQuASpWHl9YjrrNNRwt1koq9CXp65E14dNuDFj0RKeQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.13.10",
|
||||
"@wordpress/api-fetch": "^5.1.1",
|
||||
"@wordpress/block-editor": "^6.1.12",
|
||||
"@wordpress/block-editor": "^6.1.13",
|
||||
"@wordpress/blocks": "^9.1.7",
|
||||
"@wordpress/components": "^14.1.9",
|
||||
"@wordpress/components": "^14.1.10",
|
||||
"@wordpress/compose": "^4.1.5",
|
||||
"@wordpress/core-data": "^3.1.11",
|
||||
"@wordpress/data": "^5.1.5",
|
||||
|
32
package.json
32
package.json
@ -82,52 +82,52 @@
|
||||
"@wordpress/api-fetch": "5.1.1",
|
||||
"@wordpress/autop": "3.1.1",
|
||||
"@wordpress/blob": "3.1.1",
|
||||
"@wordpress/block-directory": "2.1.19",
|
||||
"@wordpress/block-editor": "6.1.12",
|
||||
"@wordpress/block-library": "3.2.17",
|
||||
"@wordpress/block-directory": "2.1.20",
|
||||
"@wordpress/block-editor": "6.1.13",
|
||||
"@wordpress/block-library": "3.2.18",
|
||||
"@wordpress/block-serialization-default-parser": "4.1.1",
|
||||
"@wordpress/blocks": "9.1.7",
|
||||
"@wordpress/components": "14.1.9",
|
||||
"@wordpress/components": "14.1.10",
|
||||
"@wordpress/compose": "4.1.5",
|
||||
"@wordpress/core-data": "3.1.11",
|
||||
"@wordpress/customize-widgets": "1.0.18",
|
||||
"@wordpress/customize-widgets": "1.0.19",
|
||||
"@wordpress/data": "5.1.5",
|
||||
"@wordpress/data-controls": "2.1.3",
|
||||
"@wordpress/date": "4.1.1",
|
||||
"@wordpress/deprecated": "3.1.1",
|
||||
"@wordpress/dom": "3.1.4",
|
||||
"@wordpress/dom-ready": "3.1.1",
|
||||
"@wordpress/edit-post": "4.1.19",
|
||||
"@wordpress/edit-widgets": "2.1.19",
|
||||
"@wordpress/editor": "10.1.15",
|
||||
"@wordpress/edit-post": "4.1.20",
|
||||
"@wordpress/edit-widgets": "2.1.20",
|
||||
"@wordpress/editor": "10.1.16",
|
||||
"@wordpress/element": "3.1.1",
|
||||
"@wordpress/escape-html": "2.1.1",
|
||||
"@wordpress/format-library": "2.1.12",
|
||||
"@wordpress/format-library": "2.1.13",
|
||||
"@wordpress/hooks": "3.1.1",
|
||||
"@wordpress/html-entities": "3.1.1",
|
||||
"@wordpress/i18n": "4.1.1",
|
||||
"@wordpress/icons": "4.0.2",
|
||||
"@wordpress/interface": "3.1.10",
|
||||
"@wordpress/interface": "3.1.11",
|
||||
"@wordpress/is-shallow-equal": "4.1.1",
|
||||
"@wordpress/keyboard-shortcuts": "2.1.5",
|
||||
"@wordpress/keyboard-shortcuts": "2.1.6",
|
||||
"@wordpress/keycodes": "3.1.1",
|
||||
"@wordpress/list-reusable-blocks": "2.1.9",
|
||||
"@wordpress/list-reusable-blocks": "2.1.10",
|
||||
"@wordpress/media-utils": "2.1.1",
|
||||
"@wordpress/notices": "3.1.5",
|
||||
"@wordpress/nux": "4.1.9",
|
||||
"@wordpress/nux": "4.1.10",
|
||||
"@wordpress/plugins": "3.1.5",
|
||||
"@wordpress/primitives": "2.1.1",
|
||||
"@wordpress/priority-queue": "2.1.1",
|
||||
"@wordpress/redux-routine": "4.1.1",
|
||||
"@wordpress/reusable-blocks": "2.1.15",
|
||||
"@wordpress/reusable-blocks": "2.1.16",
|
||||
"@wordpress/rich-text": "4.1.5",
|
||||
"@wordpress/server-side-render": "2.1.10",
|
||||
"@wordpress/server-side-render": "2.1.11",
|
||||
"@wordpress/shortcode": "3.1.1",
|
||||
"@wordpress/token-list": "2.1.1",
|
||||
"@wordpress/url": "3.1.1",
|
||||
"@wordpress/viewport": "3.1.5",
|
||||
"@wordpress/warning": "2.1.1",
|
||||
"@wordpress/widgets": "1.1.17",
|
||||
"@wordpress/widgets": "1.1.18",
|
||||
"@wordpress/wordcount": "3.1.1",
|
||||
"backbone": "1.4.0",
|
||||
"clipboard": "2.0.8",
|
||||
|
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@ return array(
|
||||
<!-- wp:post-template -->
|
||||
<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
|
||||
<div class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px"><!-- wp:post-title {"isLink":true} /-->
|
||||
<!-- wp:post-excerpt {"wordCount":20} /-->
|
||||
<!-- wp:post-excerpt /-->
|
||||
<!-- wp:post-date /--></div>
|
||||
<!-- /wp:group -->
|
||||
<!-- /wp:post-template -->
|
||||
|
@ -18,34 +18,34 @@ function render_block_core_post_excerpt( $attributes, $content, $block ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$more_text = isset( $attributes['moreText'] ) ? '<a class="wp-block-post-excerpt__more-link" href="' . esc_url( get_the_permalink( $block->context['postId'] ) ) . '">' . $attributes['moreText'] . '</a>' : '';
|
||||
|
||||
$filter_excerpt_length = function() use ( $attributes ) {
|
||||
return isset( $attributes['wordCount'] ) ? $attributes['wordCount'] : 55;
|
||||
$more_text = ! empty( $attributes['moreText'] ) ? '<a class="wp-block-post-excerpt__more-link" href="' . esc_url( get_the_permalink( $block->context['postId'] ) ) . '">' . $attributes['moreText'] . '</a>' : '';
|
||||
$filter_excerpt_more = function( $more ) use ( $more_text ) {
|
||||
return empty( $more_text ) ? $more : '';
|
||||
};
|
||||
add_filter(
|
||||
'excerpt_length',
|
||||
$filter_excerpt_length
|
||||
);
|
||||
|
||||
/**
|
||||
* Some themes might use `excerpt_more` filter to handle the
|
||||
* `more` link displayed after a trimmed excerpt. Since the
|
||||
* block has a `more text` attribute we have to check and
|
||||
* override if needed the return value from this filter.
|
||||
* So if the block's attribute is not empty override the
|
||||
* `excerpt_more` filter and return nothing. This will
|
||||
* result in showing only one `read more` link at a time.
|
||||
*/
|
||||
add_filter( 'excerpt_more', $filter_excerpt_more );
|
||||
$classes = '';
|
||||
if ( isset( $attributes['textAlign'] ) ) {
|
||||
$classes .= 'has-text-align-' . $attributes['textAlign'];
|
||||
$classes .= "has-text-align-{$attributes['textAlign']}";
|
||||
}
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
|
||||
$content = '<p class="wp-block-post-excerpt__excerpt">' . get_the_excerpt( $block->context['postId'] );
|
||||
if ( ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine'] ) {
|
||||
$content = '<p class="wp-block-post-excerpt__excerpt">' . get_the_excerpt( $block->context['postId'] );
|
||||
$show_more_on_new_line = ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine'];
|
||||
if ( $show_more_on_new_line && ! empty( $more_text ) ) {
|
||||
$content .= '</p><p class="wp-block-post-excerpt__more-text">' . $more_text . '</p>';
|
||||
} else {
|
||||
$content .= " $more_text</p>";
|
||||
}
|
||||
|
||||
remove_filter(
|
||||
'excerpt_length',
|
||||
$filter_excerpt_length
|
||||
);
|
||||
|
||||
remove_filter( 'excerpt_more', $filter_excerpt_more );
|
||||
return sprintf( '<div %1$s>%2$s</div>', $wrapper_attributes, $content );
|
||||
}
|
||||
|
||||
|
@ -9,10 +9,6 @@
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
},
|
||||
"wordCount": {
|
||||
"type": "number",
|
||||
"default": 55
|
||||
},
|
||||
"moreText": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -1178,7 +1178,7 @@ class WP_Theme_JSON {
|
||||
$theme_settings['settings']['spacing'] = array();
|
||||
}
|
||||
$theme_settings['settings']['spacing']['units'] = ( true === $settings['enableCustomUnits'] ) ?
|
||||
array( 'px', 'em', 'rem', 'vh', 'vw' ) :
|
||||
array( 'px', 'em', 'rem', 'vh', 'vw', '%' ) :
|
||||
$settings['enableCustomUnits'];
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
||||
"spacing": {
|
||||
"customMargin": false,
|
||||
"customPadding": false,
|
||||
"units": [ "px", "em", "rem", "vh", "vw" ]
|
||||
"units": [ "px", "em", "rem", "vh", "vw", "%" ]
|
||||
},
|
||||
"typography": {
|
||||
"customFontSize": true,
|
||||
|
@ -925,7 +925,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
|
||||
),
|
||||
),
|
||||
'spacing' => array(
|
||||
'units' => array( 'px', 'em', 'rem', 'vh', 'vw' ),
|
||||
'units' => array( 'px', 'em', 'rem', 'vh', 'vw', '%' ),
|
||||
),
|
||||
'typography' => array(
|
||||
'customFontSize' => false,
|
||||
@ -1039,7 +1039,7 @@ class Tests_Theme_wpThemeJson extends WP_UnitTestCase {
|
||||
$input = get_default_block_editor_settings();
|
||||
|
||||
$expected = array(
|
||||
'units' => array( 'px', 'em', 'rem', 'vh', 'vw' ),
|
||||
'units' => array( 'px', 'em', 'rem', 'vh', 'vw', '%' ),
|
||||
'customPadding' => false,
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user