block.json 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 2,
  4. "name": "core/post-author",
  5. "title": "Post Author",
  6. "category": "theme",
  7. "description": "Display post author details such as name, avatar, and bio.",
  8. "textdomain": "default",
  9. "attributes": {
  10. "textAlign": {
  11. "type": "string"
  12. },
  13. "avatarSize": {
  14. "type": "number",
  15. "default": 48
  16. },
  17. "showAvatar": {
  18. "type": "boolean",
  19. "default": true
  20. },
  21. "showBio": {
  22. "type": "boolean"
  23. },
  24. "byline": {
  25. "type": "string"
  26. }
  27. },
  28. "usesContext": [ "postType", "postId", "queryId" ],
  29. "supports": {
  30. "html": false,
  31. "spacing": {
  32. "margin": true,
  33. "padding": true
  34. },
  35. "typography": {
  36. "fontSize": true,
  37. "lineHeight": true,
  38. "__experimentalFontFamily": true,
  39. "__experimentalFontWeight": true,
  40. "__experimentalFontStyle": true,
  41. "__experimentalTextTransform": true,
  42. "__experimentalTextDecoration": true,
  43. "__experimentalLetterSpacing": true,
  44. "__experimentalDefaultControls": {
  45. "fontSize": true
  46. }
  47. },
  48. "color": {
  49. "gradients": true,
  50. "link": true,
  51. "__experimentalDuotone": ".wp-block-post-author__avatar img",
  52. "__experimentalDefaultControls": {
  53. "background": true,
  54. "text": true
  55. }
  56. }
  57. },
  58. "editorStyle": "wp-block-post-author-editor",
  59. "style": "wp-block-post-author"
  60. }