You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.7 KiB

1 year ago
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 3,
  4. "name": "core/post-featured-image",
  5. "title": "Featured Image",
  6. "category": "theme",
  7. "description": "Display a post's featured image.",
  8. "textdomain": "default",
  9. "attributes": {
  10. "isLink": {
  11. "type": "boolean",
  12. "default": false
  13. },
  14. "aspectRatio": {
  15. "type": "string"
  16. },
  17. "width": {
  18. "type": "string"
  19. },
  20. "height": {
  21. "type": "string"
  22. },
  23. "scale": {
  24. "type": "string",
  25. "default": "cover"
  26. },
  27. "sizeSlug": {
  28. "type": "string"
  29. },
  30. "rel": {
  31. "type": "string",
  32. "attribute": "rel",
  33. "default": ""
  34. },
  35. "linkTarget": {
  36. "type": "string",
  37. "default": "_self"
  38. },
  39. "overlayColor": {
  40. "type": "string"
  41. },
  42. "customOverlayColor": {
  43. "type": "string"
  44. },
  45. "dimRatio": {
  46. "type": "number",
  47. "default": 0
  48. },
  49. "gradient": {
  50. "type": "string"
  51. },
  52. "customGradient": {
  53. "type": "string"
  54. }
  55. },
  56. "usesContext": [ "postId", "postType", "queryId" ],
  57. "supports": {
  58. "align": [ "left", "right", "center", "wide", "full" ],
  59. "color": {
  60. "__experimentalDuotone": "img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",
  61. "text": false,
  62. "background": false
  63. },
  64. "__experimentalBorder": {
  65. "color": true,
  66. "radius": true,
  67. "width": true,
  68. "__experimentalSelector": "img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",
  69. "__experimentalSkipSerialization": true,
  70. "__experimentalDefaultControls": {
  71. "color": true,
  72. "radius": true,
  73. "width": true
  74. }
  75. },
  76. "html": false,
  77. "spacing": {
  78. "margin": true,
  79. "padding": true
  80. }
  81. },
  82. "editorStyle": "wp-block-post-featured-image-editor",
  83. "style": "wp-block-post-featured-image"
  84. }