-
Notifications
You must be signed in to change notification settings - Fork 1
/
acf.php
125 lines (101 loc) · 3.89 KB
/
acf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
return [
/*
|--------------------------------------------------------------------------
| The registred ACF field groups & layouts
|--------------------------------------------------------------------------
|
| Here you can set your ACF fields. Please note that flexible content groups
| doesn't need to get registred this way, you only need to register the
| flexible content group as you're cloning the group fields inside.
|
*/
'groups' => [
# Layouts
// App\Acf\Layouts\SinglePost::class,
// App\Acf\Layouts\Templates\FlexibleSection::class,
# Options
// App\Acf\Options\General::class,
],
/*
|--------------------------------------------------------------------------
| The registred ACF Gutemberg blocks
|--------------------------------------------------------------------------
|
| Here you can set your ACF Gutemberg blocks.
|
*/
'blocks' => [
// App\Acf\Gutemberg\Numbers::class,
],
/*
|--------------------------------------------------------------------------
| The ACF groups configuration defaults
|--------------------------------------------------------------------------
|
| Here you can set ACF fields configuration defaults, which will be applied
| automatically to each fields if you didn't explicitly set a config
| value for the concerned field.
|
*/
'defaults' => [
// 'wpml_cf_preferences' => 3, // copy once
],
/*
|--------------------------------------------------------------------------
| The ACF Flexible field names
|--------------------------------------------------------------------------
|
| Here you can set your flexible field names so they
| get recursively parsed into FieldSet classes.
|
| @deprecated use the Flexible transformer instead.
|
*/
'flexibles' => [],
/*
|--------------------------------------------------------------------------
| The ACF fields casts (FieldSet)
|--------------------------------------------------------------------------
|
| Here you can set specify which fields should be casted to something.
| For exemple, you may use the `Grogu\Acf\Transformers\EloquentPost`
| transformer to cast a relationnal field into a single post model
| Please note that in that case, your relationnal field MUST return ids.
|
*/
'casts' => [
# Flexibles
'components' => Grogu\Acf\Transformers\Flexible::class,
# Single post model (Eloquent ORM)
'post' => Grogu\Acf\Transformers\EloquentPost::class,
'page' => Grogu\Acf\Transformers\EloquentPost::class,
'product' => Grogu\Acf\Transformers\EloquentPost::class,
'image' => Grogu\Acf\Transformers\EloquentPost::class,
'picto' => Grogu\Acf\Transformers\EloquentPost::class,
# Multiple post models (Eloquent ORM, keeps the relationnal field order)
'posts' => Grogu\Acf\Transformers\EloquentPosts::class,
# Video link (parses a classic YouTube/Vimeo link into an array with embed link, video id, platform name)
'video_link' => Grogu\Acf\Transformers\VideoLink::class,
# Theme casts..
// 'field_name' => App\Acf\Transformers\MyField::class,
],
/*
|--------------------------------------------------------------------------
| Gutemberg configuration
|--------------------------------------------------------------------------
|
| Here you can set your Gutemberg configuration.
| You may specify a stylesheet & define categories.
|
*/
'gutemberg' => [
'categories' => [
// 'theme-blocks' => 'Theme Blocks',
],
'stylesheets' => [
// '*' => 'dist/css/editor.css',
// 'post' => 'dist/css/editor-post.css',
],
],
];