block.json
69 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 | "example": {}, |
| 11 | "attributes": { |
| 12 | "title": { |
| 13 | "type": "string", |
| 14 | "default": "Most Viewed Posts" |
| 15 | }, |
| 16 | "postTypes": { |
| 17 | "type": "object", |
| 18 | "default": { |
| 19 | "post": true |
| 20 | } |
| 21 | }, |
| 22 | "period": { |
| 23 | "type": "string", |
| 24 | "default": "total" |
| 25 | }, |
| 26 | "numberOfPosts": { |
| 27 | "type": "integer", |
| 28 | "default": 5 |
| 29 | }, |
| 30 | "noPostsMessage": { |
| 31 | "type": "string", |
| 32 | "default": "No most viewed posts found." |
| 33 | }, |
| 34 | "order": { |
| 35 | "type": "string", |
| 36 | "default": "desc" |
| 37 | }, |
| 38 | "listType": { |
| 39 | "type": "string", |
| 40 | "default": "unordered" |
| 41 | }, |
| 42 | "displayPostViews": { |
| 43 | "type": "boolean", |
| 44 | "default": false |
| 45 | }, |
| 46 | "displayPostExcerpt": { |
| 47 | "type": "boolean", |
| 48 | "default": false |
| 49 | }, |
| 50 | "displayPostAuthor": { |
| 51 | "type": "boolean", |
| 52 | "default": false |
| 53 | }, |
| 54 | "displayPostThumbnail": { |
| 55 | "type": "boolean", |
| 56 | "default": false |
| 57 | }, |
| 58 | "thumbnailSize": { |
| 59 | "type": "string", |
| 60 | "default": "thumbnail" |
| 61 | } |
| 62 | }, |
| 63 | "supports": { |
| 64 | "html": false |
| 65 | }, |
| 66 | "textdomain": "post-views-counter", |
| 67 | "editorScript": "file:./index.js" |
| 68 | } |
| 69 |