Skip to content

Commit

Permalink
Moved content shape selection from block to theme settings
Browse files Browse the repository at this point in the history
  • Loading branch information
IntoJHyyry committed Dec 14, 2021
1 parent f7324b7 commit 2d7f71d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 59 deletions.
44 changes: 39 additions & 5 deletions acf-json/group_603cc1cbc50b8.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
"class": "",
"id": ""
},
"default_value": "#253764"
"default_value": "#253764",
"enable_opacity": false,
"return_format": "string"
},
{
"key": "field_603cc2b6777e6",
Expand All @@ -107,7 +109,9 @@
"class": "",
"id": ""
},
"default_value": "#1c769d"
"default_value": "#1c769d",
"enable_opacity": false,
"return_format": "string"
},
{
"key": "field_603cc30995e46",
Expand All @@ -122,7 +126,9 @@
"class": "",
"id": ""
},
"default_value": "#FFFFFF"
"default_value": "#FFFFFF",
"enable_opacity": false,
"return_format": "string"
},
{
"key": "field_603cc33295e47",
Expand All @@ -137,10 +143,37 @@
"class": "",
"id": ""
},
"default_value": "#FFFFFF"
"default_value": "#FFFFFF",
"enable_opacity": false,
"return_format": "string"
}
]
},
{
"key": "field_61b87fd057e2c",
"label": "Sisällön kuvio",
"name": "content_shape",
"type": "select",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"path": "Polku",
"mountain": "Vuori"
},
"default_value": "path",
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_603f76bd59a24",
"label": "Juicer syöte",
Expand Down Expand Up @@ -196,5 +229,6 @@
"hide_on_screen": "",
"active": true,
"description": "",
"modified": 1617103819
"show_in_rest": 0,
"modified": 1639481343
}
28 changes: 2 additions & 26 deletions acf-json/group_603cf8c77da65.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@
"key": "group_603cf8c77da65",
"title": "Block \/ Content",
"fields": [
{
"key": "field_61a8813f21a93",
"label": "Kuvio",
"name": "shape",
"type": "select",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"path": "Polku",
"mountain": "Vuori"
},
"default_value": "path",
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_603cf8d5b9d04",
"label": "Piilota kuvio",
Expand Down Expand Up @@ -64,5 +39,6 @@
"hide_on_screen": "",
"active": true,
"description": "",
"modified": 1638433101
"show_in_rest": 0,
"modified": 1639481382
}
28 changes: 2 additions & 26 deletions acf-json/group_603f928cc0606.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@
"key": "group_603f928cc0606",
"title": "Block \/ Content with sidebar",
"fields": [
{
"key": "field_61a87ef5c492c",
"label": "Kuvio",
"name": "shape",
"type": "select",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"path": "Polku",
"mountain": "Vuori"
},
"default_value": "path",
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_61a87ee0c492b",
"label": "Piilota kuvio",
Expand Down Expand Up @@ -64,5 +39,6 @@
"hide_on_screen": "",
"active": true,
"description": "",
"modified": 1638432692
"show_in_rest": 0,
"modified": 1639481378
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
);

$hide_figure = get_field('hide_figure');
$shape = get_field('shape');
$shape = get_field('content_shape', 'option');

if(empty($shape)) {
$shape = 'path';
Expand Down
2 changes: 1 addition & 1 deletion components/block-content/block-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
);

$hide_figure = get_field('hide_figure');
$shape = get_field('shape');
$shape = get_field('content_shape', 'option');

if(empty($shape)) {
$shape = 'path';
Expand Down

0 comments on commit 2d7f71d

Please sign in to comment.