22 lines
842 B
JSON
22 lines
842 B
JSON
{
|
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
"apiVersion": 3,
|
|
"name": "chrnx/related-posts",
|
|
"version": "0.1.0",
|
|
"title": "Related Posts",
|
|
"category": "theme",
|
|
"description": "Related stories selected by topic, tags, and recency.",
|
|
"textdomain": "chrnx",
|
|
"usesContext": ["postId", "postType"],
|
|
"attributes": {
|
|
"limit": { "type": "integer", "default": 3, "enum": [3, 5] },
|
|
"layout": { "type": "string", "default": "adaptive", "enum": ["adaptive", "grid", "carousel"] },
|
|
"headingLevel": { "type": "integer", "default": 2, "enum": [2, 3, 4, 5, 6] }
|
|
},
|
|
"supports": { "html": false, "align": ["wide", "full"] },
|
|
"editorScript": "file:../../assets/js/editor-related-posts.js",
|
|
"viewScript": "file:../../assets/js/related-posts.js",
|
|
"style": "file:./style.css",
|
|
"render": "file:./render.php"
|
|
}
|