← All changes
|
src/modules/Blocks/Language_Switcher/Standard/block.json
+50
-12
3.8.3
→
trunk
View file →
| @@ -1,42 +1,80 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 | 3 | "apiVersion": 3, |
| 4 | 4 | "name": "polylang/language-switcher", |
| 5 | - "version": "3.8", | |
| 5 | + "version": "3.9.0.0-beta2", | |
| 6 | 6 | "title": "Language Switcher", |
| 7 | 7 | "category": "widgets", |
| 8 | 8 | "description": "Language switcher to insert in content or as a widget.", |
| 9 | 9 | "example": {}, |
| 10 | 10 | "attributes": { |
| 11 | - "dropdown": { | |
| 12 | - "type": "boolean", | |
| 13 | - "default": 0 | |
| 11 | + "layout": { | |
| 12 | + "type": "string", | |
| 13 | + "enum": ["vertical", "horizontal", "dropdown", "select"], | |
| 14 | + "default": "vertical" | |
| 14 | 15 | }, |
| 15 | - "show_names": { | |
| 16 | - "type": "boolean", | |
| 17 | - "default": 1 | |
| 16 | + "show_labels": { | |
| 17 | + "type": "string", | |
| 18 | + "enum": ["names", "codes", ""], | |
| 19 | + "default": "names" | |
| 18 | 20 | }, |
| 19 | 21 | "show_flags": { |
| 20 | 22 | "type": "boolean", |
| 21 | - "default": 0 | |
| 23 | + "default": false | |
| 22 | 24 | }, |
| 23 | 25 | "force_home": { |
| 24 | 26 | "type": "boolean", |
| 25 | - "default": 0 | |
| 27 | + "default": false | |
| 26 | 28 | }, |
| 27 | 29 | "hide_current": { |
| 28 | 30 | "type": "boolean", |
| 29 | - "default": 0 | |
| 31 | + "default": false | |
| 30 | 32 | }, |
| 31 | 33 | "hide_if_no_translation": { |
| 32 | 34 | "type": "boolean", |
| 35 | + "default": false | |
| 36 | + }, | |
| 37 | + "flag_aspect_ratio": { | |
| 38 | + "type": "string", | |
| 39 | + "enum": ["3:2", "1:1"], | |
| 40 | + "default": "3:2" | |
| 41 | + }, | |
| 42 | + "flag_border_radius": { | |
| 43 | + "type": "number", | |
| 33 | 44 | "default": 0 |
| 34 | 45 | }, |
| 46 | + "flag_width": { | |
| 47 | + "type": "string", | |
| 48 | + "default": "18px" | |
| 49 | + }, | |
| 50 | + "flag_label_spacing": { | |
| 51 | + "type": "string", | |
| 52 | + "default": "0.3em" | |
| 53 | + }, | |
| 35 | 54 | "className": { |
| 36 | 55 | "type": "string", |
| 37 | 56 | "default": "" |
| 38 | 57 | } |
| 39 | 58 | }, |
| 40 | - "textdomain": "polylang", | |
| 41 | - "editorScript": "pll_blocks" | |
| 59 | + "supports": { | |
| 60 | + "spacing": { | |
| 61 | + "margin": true, | |
| 62 | + "padding": true, | |
| 63 | + "blockGap": true | |
| 64 | + }, | |
| 65 | + "align": true, | |
| 66 | + "color": { | |
| 67 | + "background": true | |
| 68 | + }, | |
| 69 | + "typography": { | |
| 70 | + "fontSize": true, | |
| 71 | + "lineHeight": true, | |
| 72 | + "textAlign": true | |
| 73 | + } | |
| 74 | + }, | |
| 75 | + "textdomain": "polylang", | |
| 76 | + "style": "pll-language-switcher", | |
| 77 | + "editorStyle": "pll-language-switcher-editor", | |
| 78 | + "editorScript": "pll_blocks", | |
| 79 | + "viewScript": "pll-language-switcher" | |
| 42 | 80 | } |