block.json 1.7 KB

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