block.json 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 2,
  4. "name": "core/query",
  5. "title": "Query Loop",
  6. "category": "theme",
  7. "description": "An advanced block that allows displaying post types based on different query parameters and visual configurations.",
  8. "textdomain": "default",
  9. "attributes": {
  10. "queryId": {
  11. "type": "number"
  12. },
  13. "query": {
  14. "type": "object",
  15. "default": {
  16. "perPage": null,
  17. "pages": 0,
  18. "offset": 0,
  19. "postType": "post",
  20. "order": "desc",
  21. "orderBy": "date",
  22. "author": "",
  23. "search": "",
  24. "exclude": [],
  25. "sticky": "",
  26. "inherit": true,
  27. "taxQuery": null,
  28. "parents": []
  29. }
  30. },
  31. "tagName": {
  32. "type": "string",
  33. "default": "div"
  34. },
  35. "displayLayout": {
  36. "type": "object",
  37. "default": {
  38. "type": "list"
  39. }
  40. },
  41. "namespace": {
  42. "type": "string"
  43. }
  44. },
  45. "providesContext": {
  46. "queryId": "queryId",
  47. "query": "query",
  48. "displayLayout": "displayLayout"
  49. },
  50. "supports": {
  51. "align": [ "wide", "full" ],
  52. "html": false,
  53. "color": {
  54. "gradients": true,
  55. "link": true,
  56. "__experimentalDefaultControls": {
  57. "background": true,
  58. "text": true
  59. }
  60. },
  61. "__experimentalLayout": true
  62. },
  63. "editorStyle": "wp-block-query-editor"
  64. }