You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
347 B
15 lines
347 B
<?php
|
|
|
|
Kirby::plugin('ucomeugo/jsonField', [
|
|
'fields' => [
|
|
'json' => [
|
|
// here we could define the backend logic for our field if needed
|
|
]
|
|
],
|
|
'fieldMethods' => [
|
|
'parseJSON' => function ($field) {
|
|
// $field->value = json_decode($field->value);
|
|
return json_decode($field->value, true);
|
|
}
|
|
]
|
|
]);
|
|
|