mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Editor: Fix post editor layout when Post Content has no attributes.
Changes output of `wp_get_post_content_block_attributes` to return null if Post Content block doesn’t exist or empty array if it has no attributes. Props flixos90, mukesh27. Fixes #59358. git-svn-id: https://develop.svn.wordpress.org/trunk@56629 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
Theme Name: Block Theme Post Content Default
|
||||
Theme URI: https://wordpress.org/
|
||||
Description: For testing purposes only.
|
||||
Version: 1.0.0
|
||||
Text Domain: block-theme-post-content-default
|
||||
*/
|
||||
@@ -0,0 +1,3 @@
|
||||
<!-- wp:paragraph -->
|
||||
<p>Index Template</p>
|
||||
<!-- /wp:paragraph -->
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- wp:post-title {"level":1,"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"}}}} /-->
|
||||
<!-- wp:post-content /-->
|
||||
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"version": 1,
|
||||
"title": "Block theme",
|
||||
"settings": {
|
||||
"color": {
|
||||
"palette": [
|
||||
{
|
||||
"slug": "light",
|
||||
"name": "Light",
|
||||
"color": "#f5f7f9"
|
||||
},
|
||||
{
|
||||
"slug": "dark",
|
||||
"name": "Dark",
|
||||
"color": "#000"
|
||||
}
|
||||
],
|
||||
"gradients": [
|
||||
{
|
||||
"name": "Custom gradient",
|
||||
"gradient": "linear-gradient(135deg,rgba(0,0,0) 0%,rgb(0,0,0) 100%)",
|
||||
"slug": "custom-gradient"
|
||||
}
|
||||
],
|
||||
"duotone": [
|
||||
{
|
||||
"colors": [ "#333333", "#aaaaaa" ],
|
||||
"slug": "custom-duotone",
|
||||
"name": "Custom Duotone"
|
||||
}
|
||||
],
|
||||
"custom": false,
|
||||
"customGradient": false
|
||||
},
|
||||
"typography": {
|
||||
"fontSizes": [
|
||||
{
|
||||
"name": "Custom",
|
||||
"slug": "custom",
|
||||
"size": "100px"
|
||||
}
|
||||
],
|
||||
"customFontSize": false,
|
||||
"customLineHeight": true
|
||||
},
|
||||
"spacing": {
|
||||
"units": ["rem"],
|
||||
"customPadding": true,
|
||||
"blockGap": true
|
||||
},
|
||||
"blocks": {
|
||||
"core/paragraph": {
|
||||
"color": {
|
||||
"palette": [
|
||||
{
|
||||
"slug": "light",
|
||||
"name": "Light",
|
||||
"color": "#f5f7f9"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"styles" : {
|
||||
"blocks" :{
|
||||
"core/post-featured-image": {
|
||||
"shadow": "10px 10px 5px 0px rgba(0,0,0,0.66)",
|
||||
"filter": {
|
||||
"duotone": "var(--wp--preset--duotone--custom-duotone)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"elements": {
|
||||
"button": {
|
||||
"shadow": "10px 10px 5px 0px rgba(0,0,0,0.66)"
|
||||
},
|
||||
"link": {
|
||||
"typography": {
|
||||
"textDecoration": "none"
|
||||
},
|
||||
"border": {
|
||||
"bottom": {
|
||||
"width": "2px",
|
||||
"color": "currentColor",
|
||||
"style": "solid"
|
||||
}
|
||||
},
|
||||
":hover": {
|
||||
"typography": {
|
||||
"textDecoration": "none"
|
||||
},
|
||||
"border": {
|
||||
"bottom": {
|
||||
"width": "2px",
|
||||
"color": "#000",
|
||||
"style": "dotted"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user