block.json
66 lines
| 1 | { |
| 2 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 | "apiVersion": 3, |
| 4 | "name": "postaffiliatepro/top-affiliates", |
| 5 | "version": "1.29.2", |
| 6 | "title": "Top Affiliates", |
| 7 | "category": "widgets", |
| 8 | "icon": "groups", |
| 9 | "description": "Top Affiliates widgets allows you to add performance statistics from your Post Affiliate Pro directly to your WordPress with ease.", |
| 10 | "keywords": ["affiliates", "top", "leaderboard", "postaffiliatepro"], |
| 11 | "textdomain": "postaffiliatepro", |
| 12 | "attributes": { |
| 13 | "title": { |
| 14 | "type": "string", |
| 15 | "default": "Top Affiliates" |
| 16 | }, |
| 17 | "refreshInterval": { |
| 18 | "type": "integer", |
| 19 | "default": 10 |
| 20 | }, |
| 21 | "orderBy": { |
| 22 | "type": "string", |
| 23 | "default": "salesCount", |
| 24 | "enum": ["name", "salesCount", "commissions", "clicksRaw"] |
| 25 | }, |
| 26 | "orderAsc": { |
| 27 | "type": "boolean", |
| 28 | "default": false |
| 29 | }, |
| 30 | "limit": { |
| 31 | "type": "integer", |
| 32 | "default": 5 |
| 33 | }, |
| 34 | "rowTemplate": { |
| 35 | "type": "string", |
| 36 | "default": "{$firstname} {$lastname} ({$userid}): clicks: {$clicksRaw}; sales: {$salesCount}; commissions: {$commissions} [parent: {$parentuserid}]" |
| 37 | } |
| 38 | }, |
| 39 | "supports": { |
| 40 | "html": false, |
| 41 | "align": ["wide", "full"], |
| 42 | "spacing": { |
| 43 | "margin": true, |
| 44 | "padding": true |
| 45 | }, |
| 46 | "typography": { |
| 47 | "fontSize": true, |
| 48 | "lineHeight": true |
| 49 | }, |
| 50 | "color": { |
| 51 | "background": true, |
| 52 | "text": true |
| 53 | } |
| 54 | }, |
| 55 | "editorScript": "postaffiliatepro-top-affiliates-editor", |
| 56 | "editorStyle": "postaffiliatepro-top-affiliates-editor-style", |
| 57 | "style": "postaffiliatepro-top-affiliates-style", |
| 58 | "render": "file:./src/render.php", |
| 59 | "example": { |
| 60 | "attributes": { |
| 61 | "title": "Top Affiliates", |
| 62 | "limit": 5, |
| 63 | "orderBy": "salesCount" |
| 64 | } |
| 65 | } |
| 66 | } |