block.json
76 lines
| 1 | { |
| 2 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 | "apiVersion": 3, |
| 4 | "name": "post-views-counter/most-viewed-posts", |
| 5 | "version": "1.0.0", |
| 6 | "title": "Most Viewed Posts", |
| 7 | "category": "post-views-counter", |
| 8 | "icon": "list-view", |
| 9 | "description": "Displays a list of the most viewed posts.", |
| 10 | "keywords": [ "views", "popular", "counter", "analytics", "trending" ], |
| 11 | "example": { |
| 12 | "attributes": { |
| 13 | "title": "Most Viewed Posts", |
| 14 | "numberOfPosts": 3, |
| 15 | "displayPostViews": true |
| 16 | } |
| 17 | }, |
| 18 | "attributes": { |
| 19 | "title": { |
| 20 | "type": "string", |
| 21 | "default": "Most Viewed Posts" |
| 22 | }, |
| 23 | "postTypes": { |
| 24 | "type": "object", |
| 25 | "default": { |
| 26 | "post": true |
| 27 | } |
| 28 | }, |
| 29 | "period": { |
| 30 | "type": "string", |
| 31 | "default": "total" |
| 32 | }, |
| 33 | "numberOfPosts": { |
| 34 | "type": "integer", |
| 35 | "default": 5 |
| 36 | }, |
| 37 | "noPostsMessage": { |
| 38 | "type": "string", |
| 39 | "default": "No most viewed posts found." |
| 40 | }, |
| 41 | "order": { |
| 42 | "type": "string", |
| 43 | "default": "desc" |
| 44 | }, |
| 45 | "listType": { |
| 46 | "type": "string", |
| 47 | "default": "unordered" |
| 48 | }, |
| 49 | "displayPostViews": { |
| 50 | "type": "boolean", |
| 51 | "default": false |
| 52 | }, |
| 53 | "displayPostExcerpt": { |
| 54 | "type": "boolean", |
| 55 | "default": false |
| 56 | }, |
| 57 | "displayPostAuthor": { |
| 58 | "type": "boolean", |
| 59 | "default": false |
| 60 | }, |
| 61 | "displayPostThumbnail": { |
| 62 | "type": "boolean", |
| 63 | "default": false |
| 64 | }, |
| 65 | "thumbnailSize": { |
| 66 | "type": "string", |
| 67 | "default": "thumbnail" |
| 68 | } |
| 69 | }, |
| 70 | "supports": { |
| 71 | "html": false |
| 72 | }, |
| 73 | "textdomain": "post-views-counter", |
| 74 | "editorScript": "file:./index.js" |
| 75 | } |
| 76 |