Version Description
- General: Added WPML & Polylang compatibility for Options Pages with custom post ids. ie:
my-theme
post id will be translated tomy-theme_en
with WPML &my-theme_en_US
with Polylang - Modules: Dynamic Post Types, Taxonomies, Options Pages & Block Types - Added Multilingual compatibility for WPML & Polylang. Items are automatically registered as strings for both WPML & Polylang plugins
- Modules: Dynamic Post Types, Taxonomies, Options Pages & Block Types - Added l10n support for the ACF Exporting Tools
- Module: Dynamic Post Type Archive - Added "Edit Archive Page" in the Admin Bar in the front-end when visiting an Archive Page
- Module: Dynamic Post Type Archive - Added l10n on the Label
- Module: Dynamic Post Type - Fixed Typo in UI
- Module: Single Meta Save - Enhanced code logic & compatibility
- Module: Single Meta Save - Added
get_fields()
support - Module: Single Meta Save - Removed the "Delete Orphan Meta" feature from Options Pages
- Module: Dev Mode - Fixed Bulk Actions being displayed when the Postboxes were hidden by user
- Module: Dev Mode - Added Clone in Sub Fields support (previously displayed as
Undefined
) - Module: Dev Mode - Fixed PHP 7.4 notices
- Module: Dynamic Forms - Query Var setting has been removed
- Module: Dynamic Forms - Query vars are now always generated. If no action name has been set, the query var will be named
{form_name}-{action}
. ie:my-form-post
. The next post action will be namedmy-form-post-2
- Module: Dynamic Forms - Added "Label Placement: Hidden" setting
- Module: Dynamic Forms - Added
{current:post:post_author_data}
template tags in the "Cheatsheet" tab - Module: Dynamic Forms - Added all available
{query_var}
template tags in the "Cheatsheet" tab - Module: Dynamic Forms - Form Fields Groups, E-mail Action From/To/Subject fields are not required anymore
- Module: Dynamic Forms - Added JS Form Submit Action code example in the "Submission" tab
- Module: Dynamic Forms - Tweaked UI
- Field: Flexible Content - Added "Layout Toggle" setting allowing the user to hide specific layout from the front-end
- Field: Flexible Content - Fixed "Layout State" setting which incorrectly forced it as "Closed" when using the "Dynamic Render" setting
- Field: Flexible Content - Fixed "Layout Title" CSS
- Field: WYSIWYG - Fixed the Smart Delayed Init in the Flexible Content when the layout had the "Layout State" on "Opened"
- Fields: Advanced Validation - Added
count()
,is_array()
,is_string()
,is_numeric()
,get_post_type()
,get_post_by_id()
,get_post_by_title()
rules andMatches regex
,Doesn't matches regex
, `!
Download this release
Release Info
Developer | hwk-fr |
Plugin | Advanced Custom Fields: Extended |
Version | 0.8.6.5 |
Comparing to | |
See all releases |
Code changes from version 0.8.6.3 to 0.8.6.5
- acf-extended.php +5 -3
- assets/acf-extended-fc-control.css +14 -1
- assets/acf-extended-fc-control.js +57 -0
- assets/acf-extended-fc.js +5 -1
- assets/acf-extended-fg.css +9 -25
- assets/acf-extended-fg.js +77 -5
- assets/acf-extended-fields.js +79 -38
- assets/acf-extended-form.js +0 -51
- assets/acf-extended-modal.css +4 -0
- assets/acf-extended.css +18 -7
- assets/acf-extended.js +84 -6
- includes/admin/settings.php +4 -4
- includes/admin/tools/dbt-export.php +12 -1
- includes/admin/tools/dop-export.php +14 -1
- includes/admin/tools/dpt-export.php +21 -0
- includes/admin/tools/dt-export.php +22 -1
- includes/core/compatibility.php +1 -37
- includes/core/enqueue.php +4 -4
- includes/core/helpers.php +268 -0
- includes/core/menu.php +4 -1
- includes/core/multilang.php +342 -0
- includes/core/settings.php +1 -1
- includes/field-groups/field-group.php +51 -41
- includes/field-groups/field-groups.php +1 -124
- includes/fields-settings/settings.php +4 -0
- includes/fields-settings/validation.php +100 -4
- includes/fields/field-flexible-content.php +187 -4
- includes/fields/field-group.php +0 -24
- includes/fields/field-image.php +26 -1
- includes/fields/field-post-object.php +187 -104
- includes/fields/field-taxonomy-terms.php +313 -166
- includes/locations/post-type-archive.php +196 -172
- includes/modules/dev.php +55 -27
- includes/modules/dynamic-block-type.php +24 -34
- includes/modules/dynamic-options-page.php +50 -47
- includes/modules/dynamic-post-type.php +34 -3
- includes/modules/dynamic-taxonomy.php +34 -3
- includes/modules/form/actions/custom.php +27 -3
- includes/modules/form/actions/email.php +32 -25
- includes/modules/form/actions/post.php +56 -49
- includes/modules/form/actions/term.php +37 -30
- includes/modules/form/actions/user.php +60 -53
- includes/modules/form/admin.php +561 -48
- includes/modules/form/field-group.php +4461 -4533
- includes/modules/form/form-front.php +64 -79
- includes/modules/single-meta.php +88 -92
- readme.txt +147 -22
acf-extended.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Advanced Custom Fields: Extended
|
4 |
* Description: Enhancement Suite which improves Advanced Custom Fields administration
|
5 |
-
* Version: 0.8.6.
|
6 |
* Author: ACF Extended
|
7 |
* Author URI: https://www.acf-extended.com
|
8 |
* Text Domain: acfe
|
@@ -16,7 +16,7 @@ if(!class_exists('ACFE')):
|
|
16 |
class ACFE{
|
17 |
|
18 |
// Version
|
19 |
-
var $version = '0.8.6.
|
20 |
|
21 |
// Settings
|
22 |
var $settings = array();
|
@@ -60,6 +60,7 @@ class ACFE{
|
|
60 |
'acfe/modules/dynamic_options_pages' => true,
|
61 |
'acfe/modules/dynamic_post_types' => true,
|
62 |
'acfe/modules/dynamic_taxonomies' => true,
|
|
|
63 |
'acfe/modules/options' => true,
|
64 |
'acfe/modules/single_meta' => false,
|
65 |
'acfe/modules/ui' => true,
|
@@ -102,6 +103,8 @@ class ACFE{
|
|
102 |
|
103 |
// Additional
|
104 |
acfe_include('includes/core/compatibility.php');
|
|
|
|
|
105 |
acfe_include('includes/core/settings.php');
|
106 |
acfe_include('includes/core/upgrades.php');
|
107 |
|
@@ -116,7 +119,6 @@ class ACFE{
|
|
116 |
* Core
|
117 |
*/
|
118 |
acfe_include('includes/core/enqueue.php');
|
119 |
-
acfe_include('includes/core/helpers.php');
|
120 |
acfe_include('includes/core/menu.php');
|
121 |
|
122 |
/**
|
2 |
/**
|
3 |
* Plugin Name: Advanced Custom Fields: Extended
|
4 |
* Description: Enhancement Suite which improves Advanced Custom Fields administration
|
5 |
+
* Version: 0.8.6.5
|
6 |
* Author: ACF Extended
|
7 |
* Author URI: https://www.acf-extended.com
|
8 |
* Text Domain: acfe
|
16 |
class ACFE{
|
17 |
|
18 |
// Version
|
19 |
+
var $version = '0.8.6.5';
|
20 |
|
21 |
// Settings
|
22 |
var $settings = array();
|
60 |
'acfe/modules/dynamic_options_pages' => true,
|
61 |
'acfe/modules/dynamic_post_types' => true,
|
62 |
'acfe/modules/dynamic_taxonomies' => true,
|
63 |
+
'acfe/modules/multilang' => true,
|
64 |
'acfe/modules/options' => true,
|
65 |
'acfe/modules/single_meta' => false,
|
66 |
'acfe/modules/ui' => true,
|
103 |
|
104 |
// Additional
|
105 |
acfe_include('includes/core/compatibility.php');
|
106 |
+
acfe_include('includes/core/helpers.php');
|
107 |
+
acfe_include('includes/core/multilang.php');
|
108 |
acfe_include('includes/core/settings.php');
|
109 |
acfe_include('includes/core/upgrades.php');
|
110 |
|
119 |
* Core
|
120 |
*/
|
121 |
acfe_include('includes/core/enqueue.php');
|
|
|
122 |
acfe_include('includes/core/menu.php');
|
123 |
|
124 |
/**
|
assets/acf-extended-fc-control.css
CHANGED
@@ -67,6 +67,8 @@ input.acfe-flexible-control-title{
|
|
67 |
padding:0 !important;
|
68 |
display:none;
|
69 |
min-height:20px;
|
|
|
|
|
70 |
}
|
71 |
|
72 |
.layout > .acf-fc-layout-handle .acfe-layout-title{
|
@@ -74,7 +76,7 @@ input.acfe-flexible-control-title{
|
|
74 |
position:relative;
|
75 |
}
|
76 |
|
77 |
-
.layout > .acf-fc-layout-handle .acfe-layout-title:hover{
|
78 |
background:#f4f4f4;
|
79 |
}
|
80 |
|
@@ -85,4 +87,15 @@ input.acfe-flexible-control-title{
|
|
85 |
|
86 |
.layout.acfe-flexible-title-edition > .acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text{
|
87 |
display:none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
67 |
padding:0 !important;
|
68 |
display:none;
|
69 |
min-height:20px;
|
70 |
+
vertical-align: unset;
|
71 |
+
background:none;
|
72 |
}
|
73 |
|
74 |
.layout > .acf-fc-layout-handle .acfe-layout-title{
|
76 |
position:relative;
|
77 |
}
|
78 |
|
79 |
+
.layout:not(.acfe-flexible-title-edition) > .acf-fc-layout-handle .acfe-layout-title:hover{
|
80 |
background:#f4f4f4;
|
81 |
}
|
82 |
|
87 |
|
88 |
.layout.acfe-flexible-title-edition > .acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text{
|
89 |
display:none;
|
90 |
+
}
|
91 |
+
|
92 |
+
/*
|
93 |
+
* ACFE: Toggle
|
94 |
+
*/
|
95 |
+
.layout.acfe-flexible-layout-hidden > .acf-fc-layout-handle,
|
96 |
+
.layout.acfe-flexible-layout-hidden > .acf-fc-layout-controls,
|
97 |
+
.layout.acfe-flexible-layout-hidden > .acfe-fc-placeholder,
|
98 |
+
.layout.acfe-flexible-layout-hidden > .acf-fields{
|
99 |
+
filter: alpha(opacity=50);
|
100 |
+
opacity: 0.5;
|
101 |
}
|
assets/acf-extended-fc-control.js
CHANGED
@@ -162,6 +162,63 @@
|
|
162 |
});
|
163 |
|
164 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
// Layout: Clone
|
167 |
model.events['click [data-acfe-flexible-control-clone]'] = 'acfeCloneLayout';
|
162 |
});
|
163 |
|
164 |
}
|
165 |
+
|
166 |
+
/*
|
167 |
+
* Layout: Toggle Action
|
168 |
+
*/
|
169 |
+
model.events['click [data-acfe-flexible-control-toggle]'] = 'acfeLayoutToggle';
|
170 |
+
model.acfeLayoutToggle = function(e, $el){
|
171 |
+
|
172 |
+
// Get Flexible
|
173 |
+
var flexible = this;
|
174 |
+
|
175 |
+
// Vars
|
176 |
+
var $layout = $el.closest('.layout');
|
177 |
+
|
178 |
+
var $field = $layout.find('> .acfe-flexible-layout-toggle');
|
179 |
+
|
180 |
+
if(!$field.length)
|
181 |
+
return;
|
182 |
+
|
183 |
+
if($field.val() === '1'){
|
184 |
+
|
185 |
+
$layout.removeClass('acfe-flexible-layout-hidden');
|
186 |
+
$field.val('');
|
187 |
+
|
188 |
+
}else{
|
189 |
+
|
190 |
+
$layout.addClass('acfe-flexible-layout-hidden');
|
191 |
+
$field.val('1');
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
/*
|
198 |
+
* Layout: Toggle Spawn
|
199 |
+
*/
|
200 |
+
acf.addAction('acfe/flexible/layouts', function($layout, flexible){
|
201 |
+
|
202 |
+
if(!flexible.has('acfeFlexibleToggle'))
|
203 |
+
return;
|
204 |
+
|
205 |
+
// Layout Closed
|
206 |
+
var $field = $layout.find('> .acfe-flexible-layout-toggle');
|
207 |
+
|
208 |
+
if(!$field.length)
|
209 |
+
return;
|
210 |
+
|
211 |
+
if($field.val() === '1'){
|
212 |
+
|
213 |
+
$layout.addClass('acfe-flexible-layout-hidden');
|
214 |
+
|
215 |
+
}else{
|
216 |
+
|
217 |
+
$layout.removeClass('acfe-flexible-layout-hidden');
|
218 |
+
|
219 |
+
}
|
220 |
+
|
221 |
+
});
|
222 |
|
223 |
// Layout: Clone
|
224 |
model.events['click [data-acfe-flexible-control-clone]'] = 'acfeCloneLayout';
|
assets/acf-extended-fc.js
CHANGED
@@ -165,7 +165,7 @@
|
|
165 |
|
166 |
var acfeFlexibleDelayInit = function(editor){
|
167 |
|
168 |
-
if(editor.has('id') || !editor.$el.is(':visible'))
|
169 |
return;
|
170 |
|
171 |
var $wrap = editor.$control();
|
@@ -318,8 +318,12 @@
|
|
318 |
|
319 |
if(flexible.has('acfeFlexibleOpen')){
|
320 |
|
|
|
|
|
321 |
flexible.openLayout($layout);
|
322 |
|
|
|
|
|
323 |
}
|
324 |
|
325 |
}
|
165 |
|
166 |
var acfeFlexibleDelayInit = function(editor){
|
167 |
|
168 |
+
if(editor.has('id') || !editor.$el.is(':visible') || acfe.isFilterEnabled('acfeForceOpen'))
|
169 |
return;
|
170 |
|
171 |
var $wrap = editor.$control();
|
318 |
|
319 |
if(flexible.has('acfeFlexibleOpen')){
|
320 |
|
321 |
+
acfe.enableFilter('acfeForceOpen');
|
322 |
+
|
323 |
flexible.openLayout($layout);
|
324 |
|
325 |
+
acfe.disableFilter('acfeForceOpen');
|
326 |
+
|
327 |
}
|
328 |
|
329 |
}
|
assets/acf-extended-fg.css
CHANGED
@@ -2,9 +2,7 @@
|
|
2 |
.acf-field-setting-acfe_settings > .acf-input > .acf-fields,
|
3 |
.acf-field-setting-acfe_validate > .acf-input > .acf-fields,
|
4 |
.acf-field-setting-acfe_update > .acf-input > .acf-fields,
|
5 |
-
.acf-field-setting-acfe_google_map_zooms > .acf-input > .acf-fields,
|
6 |
.acf-field-setting-acfe_hide > .acf-input > .acf-fields,
|
7 |
-
.acf-field-setting-acfe_wysiwyg_toolbar_buttons > .acf-input > .acf-fields,
|
8 |
|
9 |
.acf-field-setting-acfe_bidirectional > .acf-input > .acf-fields,
|
10 |
.acf-field-setting-acfe_settings > .acf-input > .acf-fields > .acf-field.acf-field-acfe-settings-rules-or,
|
@@ -18,35 +16,14 @@
|
|
18 |
.acf-field-setting-acfe_settings > .acf-input > .acf-fields > .acf-field,
|
19 |
.acf-field-setting-acfe_validate > .acf-input > .acf-fields > .acf-field,
|
20 |
.acf-field-setting-acfe_update > .acf-input > .acf-fields > .acf-field,
|
21 |
-
.acf-field-setting-acfe_google_map_zooms > .acf-input > .acf-fields > .acf-field,
|
22 |
.acf-field-setting-acfe_hide > .acf-input > .acf-fields > .acf-field{
|
23 |
padding:0;
|
24 |
}
|
25 |
|
26 |
-
|
27 |
-
.acf-field-setting-acfe_wysiwyg_toolbar_buttons > .acf-input > .acf-fields{
|
28 |
-
margin-left:-12px;
|
29 |
-
margin-right:-12px;
|
30 |
-
}
|
31 |
-
|
32 |
-
.acf-field-setting-acfe_wysiwyg_toolbar_buttons > .acf-input > .acf-fields .acf-actions{
|
33 |
-
text-align:left;
|
34 |
-
}
|
35 |
-
|
36 |
-
.acf-field-setting-acfe_wysiwyg_toolbar_buttons > .acf-input > .acf-fields > .acf-field{
|
37 |
-
padding-top:0;
|
38 |
-
padding-bottom:0;
|
39 |
-
border:0;
|
40 |
-
}
|
41 |
-
|
42 |
.acf-field-setting-acfe_field_data{
|
43 |
display:none;
|
44 |
}
|
45 |
|
46 |
-
.acf-field-setting-acfe_google_map_zooms > .acf-input > .acf-fields > .acf-field{
|
47 |
-
border-left:0;
|
48 |
-
}
|
49 |
-
|
50 |
.acf-field-hide-front.acfe_width_auto{
|
51 |
margin-right:30px;
|
52 |
}
|
@@ -280,9 +257,16 @@ body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select select{
|
|
280 |
* ACFE Taxonomy Terms
|
281 |
*/
|
282 |
.acf-field-setting-allow_terms > .acf-input > ul > li:first-of-type{
|
283 |
-
width: calc(100% -
|
284 |
}
|
285 |
|
286 |
.acf-field-setting-allow_terms > .acf-input > ul > li:last-of-type{
|
287 |
-
width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
}
|
2 |
.acf-field-setting-acfe_settings > .acf-input > .acf-fields,
|
3 |
.acf-field-setting-acfe_validate > .acf-input > .acf-fields,
|
4 |
.acf-field-setting-acfe_update > .acf-input > .acf-fields,
|
|
|
5 |
.acf-field-setting-acfe_hide > .acf-input > .acf-fields,
|
|
|
6 |
|
7 |
.acf-field-setting-acfe_bidirectional > .acf-input > .acf-fields,
|
8 |
.acf-field-setting-acfe_settings > .acf-input > .acf-fields > .acf-field.acf-field-acfe-settings-rules-or,
|
16 |
.acf-field-setting-acfe_settings > .acf-input > .acf-fields > .acf-field,
|
17 |
.acf-field-setting-acfe_validate > .acf-input > .acf-fields > .acf-field,
|
18 |
.acf-field-setting-acfe_update > .acf-input > .acf-fields > .acf-field,
|
|
|
19 |
.acf-field-setting-acfe_hide > .acf-input > .acf-fields > .acf-field{
|
20 |
padding:0;
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
.acf-field-setting-acfe_field_data{
|
24 |
display:none;
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
27 |
.acf-field-hide-front.acfe_width_auto{
|
28 |
margin-right:30px;
|
29 |
}
|
257 |
* ACFE Taxonomy Terms
|
258 |
*/
|
259 |
.acf-field-setting-allow_terms > .acf-input > ul > li:first-of-type{
|
260 |
+
width: calc(100% - 125px);
|
261 |
}
|
262 |
|
263 |
.acf-field-setting-allow_terms > .acf-input > ul > li:last-of-type{
|
264 |
+
width: 125px;
|
265 |
+
}
|
266 |
+
|
267 |
+
/*
|
268 |
+
* ACFE: Field Group Conditional Logic
|
269 |
+
*/
|
270 |
+
#acf-field-group-locations .rule-groups > .rule-group > table > tbody > tr > td.value > .acf-field{
|
271 |
+
margin: 0;
|
272 |
}
|
assets/acf-extended-fg.js
CHANGED
@@ -3,6 +3,83 @@
|
|
3 |
if(typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
/*
|
7 |
* ACF Extended: 0.8.4.5
|
8 |
* Field Flexible Content: Fix duplicated "layout_settings" & "layout_title"
|
@@ -58,11 +135,6 @@
|
|
58 |
});
|
59 |
|
60 |
});
|
61 |
-
|
62 |
-
/*
|
63 |
-
* Field Group: Advanced Settings
|
64 |
-
*/
|
65 |
-
$('.acf-field[data-name="active"]').after($('.acf-field[data-name="acfe_form"]'));
|
66 |
|
67 |
});
|
68 |
|
3 |
if(typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
+
/*
|
7 |
+
* Field Attribute: data-after="field_name"
|
8 |
+
*/
|
9 |
+
var fieldAfterManager = new acf.Model({
|
10 |
+
|
11 |
+
actions: {
|
12 |
+
'new_field' : 'onNewField'
|
13 |
+
},
|
14 |
+
|
15 |
+
onNewField: function(field){
|
16 |
+
|
17 |
+
// bail early if not after
|
18 |
+
if(!field.has('after'))
|
19 |
+
return;
|
20 |
+
|
21 |
+
// vars
|
22 |
+
var after = field.get('after');
|
23 |
+
var $sibling = field.$el.siblings('[data-name="' + after + '"]').first();
|
24 |
+
|
25 |
+
// bail early if no sibling
|
26 |
+
if(!$sibling.length)
|
27 |
+
return;
|
28 |
+
|
29 |
+
$sibling.after(field.$el);
|
30 |
+
|
31 |
+
}
|
32 |
+
});
|
33 |
+
|
34 |
+
/*
|
35 |
+
* Field Group Conditional Logic: Init fields
|
36 |
+
*/
|
37 |
+
var conditionalLogicFields = new acf.Model({
|
38 |
+
|
39 |
+
wait: 'ready',
|
40 |
+
|
41 |
+
actions:{
|
42 |
+
'append': 'onAppend',
|
43 |
+
'acfe/field_group/rule_refresh': 'refreshFields'
|
44 |
+
},
|
45 |
+
|
46 |
+
initialize: function(){
|
47 |
+
this.$el = $('#acf-field-group-locations');
|
48 |
+
},
|
49 |
+
|
50 |
+
onAppend: function($el){
|
51 |
+
|
52 |
+
if(!$el.is('.rule-group') && !$el.parent().parent().parent().is('.rule-group'))
|
53 |
+
return;
|
54 |
+
|
55 |
+
this.refreshFields();
|
56 |
+
|
57 |
+
},
|
58 |
+
|
59 |
+
refreshFields: function(){
|
60 |
+
|
61 |
+
var fields = acf.getFields({
|
62 |
+
parent: this.$('td.value')
|
63 |
+
});
|
64 |
+
|
65 |
+
$.each(fields, function(){
|
66 |
+
|
67 |
+
var field = this;
|
68 |
+
|
69 |
+
if(field.get('type') === 'date_picker' || field.get('type') === 'date_time_picker' || field.get('type') === 'time_picker'){
|
70 |
+
|
71 |
+
field.$inputText().removeClass('hasDatepicker').removeAttr('id');
|
72 |
+
|
73 |
+
field.initialize();
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
});
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
});
|
82 |
+
|
83 |
/*
|
84 |
* ACF Extended: 0.8.4.5
|
85 |
* Field Flexible Content: Fix duplicated "layout_settings" & "layout_title"
|
135 |
});
|
136 |
|
137 |
});
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
});
|
140 |
|
assets/acf-extended-fields.js
CHANGED
@@ -860,7 +860,7 @@ function acfe_recaptcha(){
|
|
860 |
wait: 'new_field',
|
861 |
|
862 |
type: 'acfe_column',
|
863 |
-
|
864 |
$control: function(){
|
865 |
return this.$('.acf-fields:first');
|
866 |
},
|
@@ -928,7 +928,7 @@ function acfe_recaptcha(){
|
|
928 |
});
|
929 |
|
930 |
/**
|
931 |
-
*
|
932 |
*/
|
933 |
acf.addAction('select2_init', function($select, options, data, field, instance){
|
934 |
|
@@ -974,7 +974,7 @@ function acfe_recaptcha(){
|
|
974 |
});
|
975 |
|
976 |
/**
|
977 |
-
*
|
978 |
*/
|
979 |
acf.addFilter('select2_args', function(options, $select, fieldData, field, instance){
|
980 |
|
@@ -1028,7 +1028,7 @@ function acfe_recaptcha(){
|
|
1028 |
if(!found)
|
1029 |
data.unshift(tag);
|
1030 |
|
1031 |
-
}
|
1032 |
|
1033 |
options.templateSelection = function(state){
|
1034 |
|
@@ -1042,6 +1042,7 @@ function acfe_recaptcha(){
|
|
1042 |
var match_fields = /{fields}/g;
|
1043 |
var match_get_field = /{get_field:(.*)}/g;
|
1044 |
var match_query_var = /{query_var:(.*)}/g;
|
|
|
1045 |
var match_current = /{current:(.*)}/g;
|
1046 |
|
1047 |
text = text.replace(match_field, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{field:$1}</code>");
|
@@ -1049,6 +1050,7 @@ function acfe_recaptcha(){
|
|
1049 |
text = text.replace(match_current, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{current:$1}</code>");
|
1050 |
text = text.replace(match_get_field, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{get_field:$1}</code>");
|
1051 |
text = text.replace(match_query_var, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{query_var:$1}</code>");
|
|
|
1052 |
|
1053 |
|
1054 |
return text;
|
@@ -1067,12 +1069,14 @@ function acfe_recaptcha(){
|
|
1067 |
var match_fields = /{fields}/g;
|
1068 |
var match_get_field = /{get_field:(.*?)}/g;
|
1069 |
var match_query_var = /{query_var:(.*?)}/g;
|
|
|
1070 |
var match_current = /{current:(.*?)}/g;
|
1071 |
|
1072 |
text = text.replace(match_field, "<code style='font-size:12px;'>{field:$1}</code>");
|
1073 |
text = text.replace(match_fields, "<code style='font-size:12px;'>{fields}</code>");
|
1074 |
text = text.replace(match_get_field, "<code style='font-size:12px;'>{get_field:$1}</code>");
|
1075 |
text = text.replace(match_query_var, "<code style='font-size:12px;'>{query_var:$1}</code>");
|
|
|
1076 |
text = text.replace(match_current, "<code style='font-size:12px;'>{current:$1}</code>");
|
1077 |
|
1078 |
return text;
|
@@ -1086,7 +1090,7 @@ function acfe_recaptcha(){
|
|
1086 |
});
|
1087 |
|
1088 |
/**
|
1089 |
-
*
|
1090 |
*/
|
1091 |
acf.addFilter('select2_args', function(options, $select, data, field, instance){
|
1092 |
|
@@ -1099,7 +1103,7 @@ function acfe_recaptcha(){
|
|
1099 |
});
|
1100 |
|
1101 |
/**
|
1102 |
-
*
|
1103 |
*/
|
1104 |
acf.addAction('select2_init', function($select, options, data, field, instance){
|
1105 |
|
@@ -1108,9 +1112,9 @@ function acfe_recaptcha(){
|
|
1108 |
acf.doAction('select2_init/key=' + field.get('key'), $select, options, data, field, instance);
|
1109 |
|
1110 |
});
|
1111 |
-
|
1112 |
/**
|
1113 |
-
*
|
1114 |
*/
|
1115 |
acf.addFilter('select2_ajax_data', function(ajaxData, data, $el, field, instance){
|
1116 |
|
@@ -1127,9 +1131,19 @@ function acfe_recaptcha(){
|
|
1127 |
return ajaxData;
|
1128 |
|
1129 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1130 |
|
1131 |
/**
|
1132 |
-
* Field: Forms
|
1133 |
*/
|
1134 |
acf.registerConditionForFieldType('equalTo', 'acfe_forms');
|
1135 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_forms');
|
@@ -1139,7 +1153,7 @@ function acfe_recaptcha(){
|
|
1139 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_forms');
|
1140 |
|
1141 |
/**
|
1142 |
-
* Field: Post Status
|
1143 |
*/
|
1144 |
acf.registerConditionForFieldType('equalTo', 'acfe_post_statuses');
|
1145 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_post_statuses');
|
@@ -1149,7 +1163,7 @@ function acfe_recaptcha(){
|
|
1149 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_post_statuses');
|
1150 |
|
1151 |
/**
|
1152 |
-
* Field: Post Types
|
1153 |
*/
|
1154 |
acf.registerConditionForFieldType('equalTo', 'acfe_post_types');
|
1155 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_post_types');
|
@@ -1159,7 +1173,7 @@ function acfe_recaptcha(){
|
|
1159 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_post_types');
|
1160 |
|
1161 |
/**
|
1162 |
-
* Field: Taxonomies
|
1163 |
*/
|
1164 |
acf.registerConditionForFieldType('equalTo', 'acfe_taxonomies');
|
1165 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_taxonomies');
|
@@ -1169,7 +1183,7 @@ function acfe_recaptcha(){
|
|
1169 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_taxonomies');
|
1170 |
|
1171 |
/**
|
1172 |
-
* Field: Taxonomy Terms
|
1173 |
*/
|
1174 |
acf.registerConditionForFieldType('equalTo', 'acfe_taxonomy_terms');
|
1175 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_taxonomy_terms');
|
@@ -1179,7 +1193,7 @@ function acfe_recaptcha(){
|
|
1179 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_taxonomy_terms');
|
1180 |
|
1181 |
/**
|
1182 |
-
* Field: User Roles
|
1183 |
*/
|
1184 |
acf.registerConditionForFieldType('equalTo', 'acfe_user_roles');
|
1185 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_user_roles');
|
@@ -1254,30 +1268,6 @@ function acfe_recaptcha(){
|
|
1254 |
acf.addAction('new_field/name=acfe_form_term_map_parent', acfe_form_map_fields);
|
1255 |
acf.addAction('new_field/name=acfe_form_term_map_description', acfe_form_map_fields);
|
1256 |
|
1257 |
-
|
1258 |
-
/**
|
1259 |
-
* Module: Dynamic Forms - Select2 Ajax Data
|
1260 |
-
*/
|
1261 |
-
function acfe_form_select_add_value(ajaxData, data, $el, field, instance){
|
1262 |
-
|
1263 |
-
ajaxData.value = field.val();
|
1264 |
-
|
1265 |
-
return ajaxData;
|
1266 |
-
|
1267 |
-
}
|
1268 |
-
|
1269 |
-
// Post
|
1270 |
-
acf.addFilter('select2_ajax_data/name=acfe_form_post_save_target', acfe_form_select_add_value);
|
1271 |
-
acf.addFilter('select2_ajax_data/name=acfe_form_post_load_source', acfe_form_select_add_value);
|
1272 |
-
|
1273 |
-
// Term
|
1274 |
-
acf.addFilter('select2_ajax_data/name=acfe_form_term_save_target', acfe_form_select_add_value);
|
1275 |
-
acf.addFilter('select2_ajax_data/name=acfe_form_term_load_source', acfe_form_select_add_value);
|
1276 |
-
|
1277 |
-
// User
|
1278 |
-
acf.addFilter('select2_ajax_data/name=acfe_form_user_save_target', acfe_form_select_add_value);
|
1279 |
-
acf.addFilter('select2_ajax_data/name=acfe_form_user_load_source', acfe_form_select_add_value);
|
1280 |
-
|
1281 |
/**
|
1282 |
* Module: Dynamic Forms (actions)
|
1283 |
*/
|
@@ -1345,5 +1335,56 @@ function acfe_recaptcha(){
|
|
1345 |
acf.addAction('show_postbox', function(postbox){
|
1346 |
postbox.$el.removeClass('acfe-postbox-left');
|
1347 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1348 |
|
1349 |
})(jQuery);
|
860 |
wait: 'new_field',
|
861 |
|
862 |
type: 'acfe_column',
|
863 |
+
|
864 |
$control: function(){
|
865 |
return this.$('.acf-fields:first');
|
866 |
},
|
928 |
});
|
929 |
|
930 |
/**
|
931 |
+
* Fields: Select2 - Placeholder
|
932 |
*/
|
933 |
acf.addAction('select2_init', function($select, options, data, field, instance){
|
934 |
|
974 |
});
|
975 |
|
976 |
/**
|
977 |
+
* Fields: Select2 - Allow Custom
|
978 |
*/
|
979 |
acf.addFilter('select2_args', function(options, $select, fieldData, field, instance){
|
980 |
|
1028 |
if(!found)
|
1029 |
data.unshift(tag);
|
1030 |
|
1031 |
+
};
|
1032 |
|
1033 |
options.templateSelection = function(state){
|
1034 |
|
1042 |
var match_fields = /{fields}/g;
|
1043 |
var match_get_field = /{get_field:(.*)}/g;
|
1044 |
var match_query_var = /{query_var:(.*)}/g;
|
1045 |
+
var match_request = /{request:(.*)}/g;
|
1046 |
var match_current = /{current:(.*)}/g;
|
1047 |
|
1048 |
text = text.replace(match_field, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{field:$1}</code>");
|
1050 |
text = text.replace(match_current, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{current:$1}</code>");
|
1051 |
text = text.replace(match_get_field, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{get_field:$1}</code>");
|
1052 |
text = text.replace(match_query_var, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{query_var:$1}</code>");
|
1053 |
+
text = text.replace(match_request, "<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{request:$1}</code>");
|
1054 |
|
1055 |
|
1056 |
return text;
|
1069 |
var match_fields = /{fields}/g;
|
1070 |
var match_get_field = /{get_field:(.*?)}/g;
|
1071 |
var match_query_var = /{query_var:(.*?)}/g;
|
1072 |
+
var match_request = /{request:(.*?)}/g;
|
1073 |
var match_current = /{current:(.*?)}/g;
|
1074 |
|
1075 |
text = text.replace(match_field, "<code style='font-size:12px;'>{field:$1}</code>");
|
1076 |
text = text.replace(match_fields, "<code style='font-size:12px;'>{fields}</code>");
|
1077 |
text = text.replace(match_get_field, "<code style='font-size:12px;'>{get_field:$1}</code>");
|
1078 |
text = text.replace(match_query_var, "<code style='font-size:12px;'>{query_var:$1}</code>");
|
1079 |
+
text = text.replace(match_request, "<code style='font-size:12px;'>{request:$1}</code>");
|
1080 |
text = text.replace(match_current, "<code style='font-size:12px;'>{current:$1}</code>");
|
1081 |
|
1082 |
return text;
|
1090 |
});
|
1091 |
|
1092 |
/**
|
1093 |
+
* Fields: Select2 - Args Variations
|
1094 |
*/
|
1095 |
acf.addFilter('select2_args', function(options, $select, data, field, instance){
|
1096 |
|
1103 |
});
|
1104 |
|
1105 |
/**
|
1106 |
+
* Fields: Select2 - Init Variations
|
1107 |
*/
|
1108 |
acf.addAction('select2_init', function($select, options, data, field, instance){
|
1109 |
|
1112 |
acf.doAction('select2_init/key=' + field.get('key'), $select, options, data, field, instance);
|
1113 |
|
1114 |
});
|
1115 |
+
|
1116 |
/**
|
1117 |
+
* Fields: Select2 - Ajax Data Variations
|
1118 |
*/
|
1119 |
acf.addFilter('select2_ajax_data', function(ajaxData, data, $el, field, instance){
|
1120 |
|
1131 |
return ajaxData;
|
1132 |
|
1133 |
});
|
1134 |
+
|
1135 |
+
/**
|
1136 |
+
* Field Conditions: Datepicker
|
1137 |
+
*/
|
1138 |
+
acf.registerConditionForFieldType('equalTo', 'date_picker');
|
1139 |
+
acf.registerConditionForFieldType('notEqualTo', 'date_picker');
|
1140 |
+
acf.registerConditionForFieldType('patternMatch', 'date_picker');
|
1141 |
+
acf.registerConditionForFieldType('contains', 'date_picker');
|
1142 |
+
acf.registerConditionForFieldType('greaterThan', 'date_picker');
|
1143 |
+
acf.registerConditionForFieldType('lessThan', 'date_picker');
|
1144 |
|
1145 |
/**
|
1146 |
+
* Field Conditions: Forms
|
1147 |
*/
|
1148 |
acf.registerConditionForFieldType('equalTo', 'acfe_forms');
|
1149 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_forms');
|
1153 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_forms');
|
1154 |
|
1155 |
/**
|
1156 |
+
* Field Conditions: Post Status
|
1157 |
*/
|
1158 |
acf.registerConditionForFieldType('equalTo', 'acfe_post_statuses');
|
1159 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_post_statuses');
|
1163 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_post_statuses');
|
1164 |
|
1165 |
/**
|
1166 |
+
* Field Conditions: Post Types
|
1167 |
*/
|
1168 |
acf.registerConditionForFieldType('equalTo', 'acfe_post_types');
|
1169 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_post_types');
|
1173 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_post_types');
|
1174 |
|
1175 |
/**
|
1176 |
+
* Field Conditions: Taxonomies
|
1177 |
*/
|
1178 |
acf.registerConditionForFieldType('equalTo', 'acfe_taxonomies');
|
1179 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_taxonomies');
|
1183 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_taxonomies');
|
1184 |
|
1185 |
/**
|
1186 |
+
* Field Conditions: Taxonomy Terms
|
1187 |
*/
|
1188 |
acf.registerConditionForFieldType('equalTo', 'acfe_taxonomy_terms');
|
1189 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_taxonomy_terms');
|
1193 |
acf.registerConditionForFieldType('hasNoValue', 'acfe_taxonomy_terms');
|
1194 |
|
1195 |
/**
|
1196 |
+
* Field Conditions: User Roles
|
1197 |
*/
|
1198 |
acf.registerConditionForFieldType('equalTo', 'acfe_user_roles');
|
1199 |
acf.registerConditionForFieldType('notEqualTo', 'acfe_user_roles');
|
1268 |
acf.addAction('new_field/name=acfe_form_term_map_parent', acfe_form_map_fields);
|
1269 |
acf.addAction('new_field/name=acfe_form_term_map_description', acfe_form_map_fields);
|
1270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1271 |
/**
|
1272 |
* Module: Dynamic Forms (actions)
|
1273 |
*/
|
1335 |
acf.addAction('show_postbox', function(postbox){
|
1336 |
postbox.$el.removeClass('acfe-postbox-left');
|
1337 |
});
|
1338 |
+
|
1339 |
+
// Allow conditions to work within wrapped div
|
1340 |
+
acf.newCondition = function( rule, conditions ){
|
1341 |
+
|
1342 |
+
// currently setting up conditions for fieldX, this field is the 'target'
|
1343 |
+
var target = conditions.get('field');
|
1344 |
+
|
1345 |
+
// use the 'target' to find the 'trigger' field.
|
1346 |
+
// - this field is used to setup the conditional logic events
|
1347 |
+
var field = target.getField( rule.field );
|
1348 |
+
|
1349 |
+
// ACF Extended: Check in all form if targeted field not found
|
1350 |
+
if( target && !field ) {
|
1351 |
+
|
1352 |
+
field = acf.getField( rule.field );
|
1353 |
+
|
1354 |
+
}
|
1355 |
+
|
1356 |
+
// bail ealry if no target or no field (possible if field doesn't exist due to HTML error)
|
1357 |
+
if( !target || !field ) {
|
1358 |
+
return false;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
// vars
|
1362 |
+
var args = {
|
1363 |
+
rule: rule,
|
1364 |
+
target: target,
|
1365 |
+
conditions: conditions,
|
1366 |
+
field: field
|
1367 |
+
};
|
1368 |
+
|
1369 |
+
// vars
|
1370 |
+
var fieldType = field.get('type');
|
1371 |
+
var operator = rule.operator;
|
1372 |
+
|
1373 |
+
// get avaibale conditions
|
1374 |
+
var conditionTypes = acf.getConditionTypes({
|
1375 |
+
fieldType: fieldType,
|
1376 |
+
operator: operator,
|
1377 |
+
});
|
1378 |
+
|
1379 |
+
// instantiate
|
1380 |
+
var model = conditionTypes[0] || acf.Condition;
|
1381 |
+
|
1382 |
+
// instantiate
|
1383 |
+
var condition = new model( args );
|
1384 |
+
|
1385 |
+
// return
|
1386 |
+
return condition;
|
1387 |
+
|
1388 |
+
};
|
1389 |
|
1390 |
})(jQuery);
|
assets/acf-extended-form.js
CHANGED
@@ -32,57 +32,6 @@
|
|
32 |
|
33 |
});
|
34 |
|
35 |
-
// Allow conditions to work within wrapped div
|
36 |
-
acf.newCondition = function( rule, conditions ){
|
37 |
-
|
38 |
-
// currently setting up conditions for fieldX, this field is the 'target'
|
39 |
-
var target = conditions.get('field');
|
40 |
-
|
41 |
-
// use the 'target' to find the 'trigger' field.
|
42 |
-
// - this field is used to setup the conditional logic events
|
43 |
-
var field = target.getField( rule.field );
|
44 |
-
|
45 |
-
// ACF Extended: Check in all form if targeted field not found
|
46 |
-
if( target && !field ) {
|
47 |
-
|
48 |
-
field = acf.getField( rule.field );
|
49 |
-
|
50 |
-
}
|
51 |
-
|
52 |
-
// bail ealry if no target or no field (possible if field doesn't exist due to HTML error)
|
53 |
-
if( !target || !field ) {
|
54 |
-
return false;
|
55 |
-
}
|
56 |
-
|
57 |
-
// vars
|
58 |
-
var args = {
|
59 |
-
rule: rule,
|
60 |
-
target: target,
|
61 |
-
conditions: conditions,
|
62 |
-
field: field
|
63 |
-
};
|
64 |
-
|
65 |
-
// vars
|
66 |
-
var fieldType = field.get('type');
|
67 |
-
var operator = rule.operator;
|
68 |
-
|
69 |
-
// get avaibale conditions
|
70 |
-
var conditionTypes = acf.getConditionTypes({
|
71 |
-
fieldType: fieldType,
|
72 |
-
operator: operator,
|
73 |
-
});
|
74 |
-
|
75 |
-
// instantiate
|
76 |
-
var model = conditionTypes[0] || acf.Condition;
|
77 |
-
|
78 |
-
// instantiate
|
79 |
-
var condition = new model( args );
|
80 |
-
|
81 |
-
// return
|
82 |
-
return condition;
|
83 |
-
|
84 |
-
};
|
85 |
-
|
86 |
// Datepicker: Add field class
|
87 |
acf.addAction('new_field/type=date_picker', function(field){
|
88 |
|
32 |
|
33 |
});
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
// Datepicker: Add field class
|
36 |
acf.addAction('new_field/type=date_picker', function(field){
|
37 |
|
assets/acf-extended-modal.css
CHANGED
@@ -259,6 +259,10 @@ body.acfe-modal-opened{
|
|
259 |
overflow:auto;
|
260 |
}
|
261 |
|
|
|
|
|
|
|
|
|
262 |
.acfe-modal.-open.acfe-modal-sub > .acfe-modal-wrapper > .acfe-modal-content{
|
263 |
pointer-events: none;
|
264 |
}
|
259 |
overflow:auto;
|
260 |
}
|
261 |
|
262 |
+
.acfe-modal.-open.-iframe .acfe-modal-content{
|
263 |
+
overflow:hidden;
|
264 |
+
}
|
265 |
+
|
266 |
.acfe-modal.-open.acfe-modal-sub > .acfe-modal-wrapper > .acfe-modal-content{
|
267 |
pointer-events: none;
|
268 |
}
|
assets/acf-extended.css
CHANGED
@@ -68,6 +68,11 @@ body.-loading *{
|
|
68 |
|
69 |
.acf-field-acfe-code-editor > .acf-input > .acf-input-wrap > .CodeMirror-wrap.cm-s-default{
|
70 |
border:1px solid #7e8993;
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
body:not(.acf-admin-5-3) .acf-field-acfe-code-editor > .acf-input > .acf-input-wrap > .CodeMirror-wrap.cm-s-default{
|
@@ -171,6 +176,11 @@ body:not(.acf-admin-5-3) .acf-field-acfe-code-editor > .acf-input > .acf-input-w
|
|
171 |
padding:0 12px;
|
172 |
}
|
173 |
|
|
|
|
|
|
|
|
|
|
|
174 |
/*
|
175 |
* ACF Field: Group - Terms
|
176 |
*/
|
@@ -321,14 +331,8 @@ tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"] > .acf-input > .acfe-mod
|
|
321 |
}
|
322 |
|
323 |
/*
|
324 |
-
* ACF Field:
|
325 |
*/
|
326 |
-
.acf-field-wysiwyg[data-acfe-wysiwyg-transparent="1"] .acf-editor-wrap .wp-editor-container,
|
327 |
-
.acf-field-wysiwyg[data-acfe-wysiwyg-transparent="1"] .acf-editor-wrap .mce-tinymce,
|
328 |
-
.acf-field-wysiwyg[data-acfe-wysiwyg-transparent="1"] .acf-editor-wrap .mce-edit-area{
|
329 |
-
background:transparent;
|
330 |
-
}
|
331 |
-
|
332 |
.acf-editor-wrap iframe{
|
333 |
min-height:60px;
|
334 |
}
|
@@ -717,4 +721,11 @@ form.acfe-form.is-invalid[data-errors-position="below"] .acf-field .acf-notice{
|
|
717 |
background: #f1f1f1 !important;
|
718 |
border-color: #016087 !important;
|
719 |
color: #016087 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
720 |
}
|
68 |
|
69 |
.acf-field-acfe-code-editor > .acf-input > .acf-input-wrap > .CodeMirror-wrap.cm-s-default{
|
70 |
border:1px solid #7e8993;
|
71 |
+
border-radius: 4px;
|
72 |
+
}
|
73 |
+
|
74 |
+
.acf-field-acfe-code-editor > .acf-input > .acf-input-wrap > .CodeMirror-wrap.cm-s-default .CodeMirror-gutters{
|
75 |
+
border-right: 1px solid #7e8993;
|
76 |
}
|
77 |
|
78 |
body:not(.acf-admin-5-3) .acf-field-acfe-code-editor > .acf-input > .acf-input-wrap > .CodeMirror-wrap.cm-s-default{
|
176 |
padding:0 12px;
|
177 |
}
|
178 |
|
179 |
+
.acf-fields > .acf-field-group[data-acfe-group-modal="1"] > .acf-input > .acf-table,
|
180 |
+
.acf-fields > .acf-field-group[data-acfe-group-modal="1"] > .acf-input > .acf-fields{
|
181 |
+
display:none;
|
182 |
+
}
|
183 |
+
|
184 |
/*
|
185 |
* ACF Field: Group - Terms
|
186 |
*/
|
331 |
}
|
332 |
|
333 |
/*
|
334 |
+
* ACF Field: WYSIWYG
|
335 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
.acf-editor-wrap iframe{
|
337 |
min-height:60px;
|
338 |
}
|
721 |
background: #f1f1f1 !important;
|
722 |
border-color: #016087 !important;
|
723 |
color: #016087 !important;
|
724 |
+
}
|
725 |
+
|
726 |
+
/*
|
727 |
+
* ACF Medium Editor
|
728 |
+
*/
|
729 |
+
body .medium-editor-toolbar {
|
730 |
+
z-index: 999999 !important;
|
731 |
}
|
assets/acf-extended.js
CHANGED
@@ -183,6 +183,46 @@
|
|
183 |
|
184 |
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
};
|
187 |
|
188 |
acf.addAction('ready_field', function(field){
|
@@ -264,9 +304,19 @@
|
|
264 |
|
265 |
acf.addAction('prepare', function(){
|
266 |
|
|
|
|
|
|
|
|
|
267 |
// Move Bulk Button
|
268 |
-
$('#acfe-wp-custom-fields .tablenav.bottom').insertAfter($
|
269 |
-
$('#acfe-acf-custom-fields .tablenav.bottom').insertAfter($
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
// Bulk Delete
|
272 |
$('#acfe_bulk_deleta_meta_submit').click(function(e){
|
@@ -324,19 +374,19 @@
|
|
324 |
|
325 |
if(!$('#acfe-wp-custom-fields tbody tr').length){
|
326 |
|
327 |
-
$
|
328 |
|
329 |
}
|
330 |
|
331 |
if(!$('#acfe-acf-custom-fields tbody tr').length){
|
332 |
|
333 |
-
$
|
334 |
|
335 |
}
|
336 |
|
337 |
if(!$('#acfe-wp-custom-fields tbody tr').length && !$('#acfe-acf-custom-fields tbody tr').length){
|
338 |
|
339 |
-
$
|
340 |
|
341 |
}
|
342 |
|
@@ -399,7 +449,7 @@
|
|
399 |
|
400 |
if(!$('#acfe-wp-custom-fields tbody tr').length && !$('#acfe-acf-custom-fields tbody tr').length){
|
401 |
|
402 |
-
$
|
403 |
|
404 |
}
|
405 |
|
@@ -422,6 +472,34 @@
|
|
422 |
|
423 |
});
|
424 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
});
|
426 |
|
427 |
})(jQuery);
|
183 |
|
184 |
|
185 |
|
186 |
+
};
|
187 |
+
|
188 |
+
acfe.filters = [];
|
189 |
+
|
190 |
+
acfe.disableFilters = function(){
|
191 |
+
|
192 |
+
acfe.filters = [];
|
193 |
+
|
194 |
+
};
|
195 |
+
|
196 |
+
acfe.enableFilter = function(name){
|
197 |
+
|
198 |
+
if(acfe.filters.indexOf(name) === -1)
|
199 |
+
acfe.filters.push(name);
|
200 |
+
|
201 |
+
};
|
202 |
+
|
203 |
+
acfe.disableFilter = function(name){
|
204 |
+
|
205 |
+
for(var i = acfe.filters.length; i--;){
|
206 |
+
|
207 |
+
if(acfe.filters[i] !== name)
|
208 |
+
continue;
|
209 |
+
|
210 |
+
acfe.filters.splice(i, 1);
|
211 |
+
|
212 |
+
}
|
213 |
+
|
214 |
+
};
|
215 |
+
|
216 |
+
acfe.isFilterEnabled = function(name){
|
217 |
+
|
218 |
+
return acfe.filters.indexOf(name) > -1;
|
219 |
+
|
220 |
+
};
|
221 |
+
|
222 |
+
acfe.getFilters = function(){
|
223 |
+
|
224 |
+
return acfe.filters;
|
225 |
+
|
226 |
};
|
227 |
|
228 |
acf.addAction('ready_field', function(field){
|
304 |
|
305 |
acf.addAction('prepare', function(){
|
306 |
|
307 |
+
var $acf_meta = $('#acfe-acf-custom-fields');
|
308 |
+
var $wp_meta = $('#acfe-wp-custom-fields');
|
309 |
+
var $bulk_actions = $('.acfe_dev_bulk_actions');
|
310 |
+
|
311 |
// Move Bulk Button
|
312 |
+
$('#acfe-wp-custom-fields .tablenav.bottom').insertAfter($wp_meta);
|
313 |
+
$('#acfe-acf-custom-fields .tablenav.bottom').insertAfter($acf_meta);
|
314 |
+
|
315 |
+
if(!$acf_meta.is(':visible') && !$wp_meta.is(':visible')){
|
316 |
+
|
317 |
+
$bulk_actions.hide();
|
318 |
+
|
319 |
+
}
|
320 |
|
321 |
// Bulk Delete
|
322 |
$('#acfe_bulk_deleta_meta_submit').click(function(e){
|
374 |
|
375 |
if(!$('#acfe-wp-custom-fields tbody tr').length){
|
376 |
|
377 |
+
$wp_meta.remove();
|
378 |
|
379 |
}
|
380 |
|
381 |
if(!$('#acfe-acf-custom-fields tbody tr').length){
|
382 |
|
383 |
+
$acf_meta.remove();
|
384 |
|
385 |
}
|
386 |
|
387 |
if(!$('#acfe-wp-custom-fields tbody tr').length && !$('#acfe-acf-custom-fields tbody tr').length){
|
388 |
|
389 |
+
$bulk_actions.remove();
|
390 |
|
391 |
}
|
392 |
|
449 |
|
450 |
if(!$('#acfe-wp-custom-fields tbody tr').length && !$('#acfe-acf-custom-fields tbody tr').length){
|
451 |
|
452 |
+
$bulk_actions.remove();
|
453 |
|
454 |
}
|
455 |
|
472 |
|
473 |
});
|
474 |
|
475 |
+
/*
|
476 |
+
* Screen preference for builk actions
|
477 |
+
*/
|
478 |
+
$('.hide-postbox-tog').bind('click.postboxes', function(){
|
479 |
+
|
480 |
+
var $el = $(this),
|
481 |
+
boxId = $el.val();
|
482 |
+
|
483 |
+
if(boxId !== 'acfe-wp-custom-fields' && boxId !== 'acfe-acf-custom-fields')
|
484 |
+
return;
|
485 |
+
|
486 |
+
if($el.prop('checked')){
|
487 |
+
|
488 |
+
if(!$bulk_actions.is(':visible'))
|
489 |
+
$bulk_actions.show();
|
490 |
+
|
491 |
+
}else{
|
492 |
+
|
493 |
+
if((boxId === 'acfe-wp-custom-fields' && !$acf_meta.is(':visible')) || (boxId === 'acfe-acf-custom-fields' && !$wp_meta.is(':visible'))){
|
494 |
+
|
495 |
+
$bulk_actions.hide();
|
496 |
+
|
497 |
+
}
|
498 |
+
|
499 |
+
}
|
500 |
+
|
501 |
+
});
|
502 |
+
|
503 |
});
|
504 |
|
505 |
})(jQuery);
|
includes/admin/settings.php
CHANGED
@@ -288,10 +288,10 @@ function acfe_admin_settings_html(){
|
|
288 |
'description' => 'Show/hide the Options module. Defaults to true'
|
289 |
),
|
290 |
array(
|
291 |
-
'name' => 'acfe/modules/
|
292 |
-
'label' => 'Module:
|
293 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/
|
294 |
-
'description' => 'Show/hide the
|
295 |
),
|
296 |
array(
|
297 |
'name' => 'acfe/field/recaptcha/site_key',
|
288 |
'description' => 'Show/hide the Options module. Defaults to true'
|
289 |
),
|
290 |
array(
|
291 |
+
'name' => 'acfe/modules/ui',
|
292 |
+
'label' => 'Module: UI Enhancements',
|
293 |
+
'value' => '<code>' . (acf_get_setting('acfe/modules/ui', true) ? __('True'): __('False')) . '</code>',
|
294 |
+
'description' => 'Show/hide the UI enhancements module. Defaults to true'
|
295 |
),
|
296 |
array(
|
297 |
'name' => 'acfe/field/recaptcha/site_key',
|
includes/admin/tools/dbt-export.php
CHANGED
@@ -128,7 +128,10 @@ class ACFE_Admin_Tool_Export_DBT extends ACF_Admin_Tool{
|
|
128 |
'/[0-9]+ => array/' => 'array'
|
129 |
);
|
130 |
|
131 |
-
|
|
|
|
|
|
|
132 |
?>
|
133 |
<p><?php _e("The following code can be used to register a block type. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
134 |
|
@@ -139,6 +142,14 @@ class ACFE_Admin_Tool_Export_DBT extends ACF_Admin_Tool{
|
|
139 |
echo "if( function_exists('acf_register_block_type') ):" . "\r\n" . "\r\n";
|
140 |
|
141 |
foreach($this->data as $args){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
|
143 |
// code
|
144 |
$code = var_export($args, true);
|
128 |
'/[0-9]+ => array/' => 'array'
|
129 |
);
|
130 |
|
131 |
+
// Get settings.
|
132 |
+
$l10n = acf_get_setting('l10n');
|
133 |
+
$l10n_textdomain = acf_get_setting('l10n_textdomain');
|
134 |
+
|
135 |
?>
|
136 |
<p><?php _e("The following code can be used to register a block type. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
137 |
|
142 |
echo "if( function_exists('acf_register_block_type') ):" . "\r\n" . "\r\n";
|
143 |
|
144 |
foreach($this->data as $args){
|
145 |
+
|
146 |
+
// Translate settings if textdomain is set.
|
147 |
+
if($l10n && $l10n_textdomain){
|
148 |
+
|
149 |
+
$args['title'] = acf_translate($args['title']);
|
150 |
+
$args['description'] = acf_translate($args['description']);
|
151 |
+
|
152 |
+
}
|
153 |
|
154 |
// code
|
155 |
$code = var_export($args, true);
|
includes/admin/tools/dop-export.php
CHANGED
@@ -126,7 +126,10 @@ class ACFE_Admin_Tool_Export_DOP extends ACF_Admin_Tool{
|
|
126 |
'/[0-9]+ => array/' => 'array'
|
127 |
);
|
128 |
|
129 |
-
|
|
|
|
|
|
|
130 |
?>
|
131 |
<p><?php _e("The following code can be used to register an options page. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
132 |
|
@@ -137,6 +140,16 @@ class ACFE_Admin_Tool_Export_DOP extends ACF_Admin_Tool{
|
|
137 |
echo "if( function_exists('acf_add_options_page') ):" . "\r\n" . "\r\n";
|
138 |
|
139 |
foreach($this->data as $args){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
// code
|
142 |
$code = var_export($args, true);
|
126 |
'/[0-9]+ => array/' => 'array'
|
127 |
);
|
128 |
|
129 |
+
// Get settings.
|
130 |
+
$l10n = acf_get_setting('l10n');
|
131 |
+
$l10n_textdomain = acf_get_setting('l10n_textdomain');
|
132 |
+
|
133 |
?>
|
134 |
<p><?php _e("The following code can be used to register an options page. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
135 |
|
140 |
echo "if( function_exists('acf_add_options_page') ):" . "\r\n" . "\r\n";
|
141 |
|
142 |
foreach($this->data as $args){
|
143 |
+
|
144 |
+
// Translate settings if textdomain is set.
|
145 |
+
if($l10n && $l10n_textdomain){
|
146 |
+
|
147 |
+
$args['page_title'] = acf_translate($args['page_title']);
|
148 |
+
$args['menu_title'] = acf_translate($args['menu_title']);
|
149 |
+
$args['update_button'] = acf_translate($args['update_button']);
|
150 |
+
$args['updated_message'] = acf_translate($args['updated_message']);
|
151 |
+
|
152 |
+
}
|
153 |
|
154 |
// code
|
155 |
$code = var_export($args, true);
|
includes/admin/tools/dpt-export.php
CHANGED
@@ -126,6 +126,9 @@ class ACFE_Admin_Tool_Export_DPT extends ACF_Admin_Tool{
|
|
126 |
'/[0-9]+ => array/' => 'array'
|
127 |
);
|
128 |
|
|
|
|
|
|
|
129 |
|
130 |
?>
|
131 |
<p><?php _e("The following code can be used to register a post type. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
@@ -135,7 +138,25 @@ class ACFE_Admin_Tool_Export_DPT extends ACF_Admin_Tool{
|
|
135 |
<textarea id="acf-export-textarea" readonly="true"><?php
|
136 |
|
137 |
foreach($this->data as $post_type => $args){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
|
|
|
|
|
|
|
|
139 |
// code
|
140 |
$code = var_export($args, true);
|
141 |
|
126 |
'/[0-9]+ => array/' => 'array'
|
127 |
);
|
128 |
|
129 |
+
// Get settings.
|
130 |
+
$l10n = acf_get_setting('l10n');
|
131 |
+
$l10n_textdomain = acf_get_setting('l10n_textdomain');
|
132 |
|
133 |
?>
|
134 |
<p><?php _e("The following code can be used to register a post type. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
138 |
<textarea id="acf-export-textarea" readonly="true"><?php
|
139 |
|
140 |
foreach($this->data as $post_type => $args){
|
141 |
+
|
142 |
+
// Translate settings if textdomain is set.
|
143 |
+
if($l10n && $l10n_textdomain){
|
144 |
+
|
145 |
+
$args['label'] = acf_translate($args['label']);
|
146 |
+
$args['description'] = acf_translate($args['description']);
|
147 |
+
|
148 |
+
if(!empty($args['labels'])){
|
149 |
+
|
150 |
+
foreach($args['labels'] as $key => &$label){
|
151 |
+
|
152 |
+
$args['labels'][$key] = acf_translate($label);
|
153 |
+
|
154 |
+
}
|
155 |
|
156 |
+
}
|
157 |
+
|
158 |
+
}
|
159 |
+
|
160 |
// code
|
161 |
$code = var_export($args, true);
|
162 |
|
includes/admin/tools/dt-export.php
CHANGED
@@ -126,7 +126,10 @@ class ACFE_Admin_Tool_Export_DT extends ACF_Admin_Tool{
|
|
126 |
'/[0-9]+ => array/' => 'array'
|
127 |
);
|
128 |
|
129 |
-
|
|
|
|
|
|
|
130 |
?>
|
131 |
<p><?php _e("The following code can be used to register a taxonomy. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
132 |
|
@@ -135,6 +138,24 @@ class ACFE_Admin_Tool_Export_DT extends ACF_Admin_Tool{
|
|
135 |
<textarea id="acf-export-textarea" readonly="true"><?php
|
136 |
|
137 |
foreach($this->data as $taxonomy => $args){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
|
139 |
$post_types = array();
|
140 |
if(acf_maybe_get($args, 'post_types')){
|
126 |
'/[0-9]+ => array/' => 'array'
|
127 |
);
|
128 |
|
129 |
+
// Get settings.
|
130 |
+
$l10n = acf_get_setting('l10n');
|
131 |
+
$l10n_textdomain = acf_get_setting('l10n_textdomain');
|
132 |
+
|
133 |
?>
|
134 |
<p><?php _e("The following code can be used to register a taxonomy. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
135 |
|
138 |
<textarea id="acf-export-textarea" readonly="true"><?php
|
139 |
|
140 |
foreach($this->data as $taxonomy => $args){
|
141 |
+
|
142 |
+
// Translate settings if textdomain is set.
|
143 |
+
if($l10n && $l10n_textdomain){
|
144 |
+
|
145 |
+
$args['label'] = acf_translate($args['label']);
|
146 |
+
$args['description'] = acf_translate($args['description']);
|
147 |
+
|
148 |
+
if(!empty($args['labels'])){
|
149 |
+
|
150 |
+
foreach($args['labels'] as $key => &$label){
|
151 |
+
|
152 |
+
$args['labels'][$key] = acf_translate($label);
|
153 |
+
|
154 |
+
}
|
155 |
+
|
156 |
+
}
|
157 |
+
|
158 |
+
}
|
159 |
|
160 |
$post_types = array();
|
161 |
if(acf_maybe_get($args, 'post_types')){
|
includes/core/compatibility.php
CHANGED
@@ -9,9 +9,7 @@ class acfe_compatibility{
|
|
9 |
|
10 |
function __construct(){
|
11 |
|
12 |
-
add_action('acf/init',
|
13 |
-
|
14 |
-
add_filter('pll_get_post_types', array($this, 'polylang'), 10, 2);
|
15 |
|
16 |
}
|
17 |
|
@@ -226,40 +224,6 @@ class acfe_compatibility{
|
|
226 |
|
227 |
return 'default';
|
228 |
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* ACF Extended: 0.8.3
|
233 |
-
* Modules: Enable PolyLang Translation for Modules Post Types
|
234 |
-
* https://polylang.pro/doc/filter-reference/
|
235 |
-
*
|
236 |
-
* @param $post_types
|
237 |
-
* @param $is_settings
|
238 |
-
*
|
239 |
-
* @return mixed
|
240 |
-
*/
|
241 |
-
function polylang($post_types, $is_settings){
|
242 |
-
|
243 |
-
if($is_settings){
|
244 |
-
|
245 |
-
unset($post_types['acfe-dbt']);
|
246 |
-
unset($post_types['acfe-dt']);
|
247 |
-
unset($post_types['acfe-dop']);
|
248 |
-
unset($post_types['acfe-dpt']);
|
249 |
-
unset($post_types['acfe-form']);
|
250 |
-
|
251 |
-
}else{
|
252 |
-
|
253 |
-
$post_types['acfe-dbt'] = 'acfe-dbt';
|
254 |
-
$post_types['acfe-dt'] = 'acfe-dt';
|
255 |
-
$post_types['acfe-dop'] = 'acfe-dop';
|
256 |
-
$post_types['acfe-dpt'] = 'acfe-dpt';
|
257 |
-
$post_types['acfe-form'] = 'acfe-form';
|
258 |
-
|
259 |
-
}
|
260 |
-
|
261 |
-
return $post_types;
|
262 |
-
|
263 |
}
|
264 |
|
265 |
}
|
9 |
|
10 |
function __construct(){
|
11 |
|
12 |
+
add_action('acf/init', array($this, 'init'), 98);
|
|
|
|
|
13 |
|
14 |
}
|
15 |
|
224 |
|
225 |
return 'default';
|
226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
}
|
228 |
|
229 |
}
|
includes/core/enqueue.php
CHANGED
@@ -4,7 +4,7 @@ if(!defined('ABSPATH'))
|
|
4 |
exit;
|
5 |
|
6 |
/**
|
7 |
-
* Admin:
|
8 |
*/
|
9 |
add_action('admin_enqueue_scripts', 'acfe_enqueue_admin_scripts');
|
10 |
function acfe_enqueue_admin_scripts(){
|
@@ -18,7 +18,7 @@ function acfe_enqueue_admin_scripts(){
|
|
18 |
wp_enqueue_style('acf-extended', acfe_get_url('assets/acf-extended.css'), false, ACFE_VERSION);
|
19 |
wp_enqueue_style('acf-extended-admin', acfe_get_url('assets/acf-extended-admin.css'), false, ACFE_VERSION);
|
20 |
|
21 |
-
//
|
22 |
if(acf_get_setting('acfe/modules/ui')){
|
23 |
|
24 |
wp_enqueue_style('acf-extended-ui', acfe_get_url('assets/acf-extended-ui.css'), false, ACFE_VERSION);
|
@@ -36,7 +36,7 @@ function acfe_enqueue_admin_scripts(){
|
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
-
* Admin +
|
40 |
*/
|
41 |
add_action('acf/enqueue_scripts', 'acfe_enqueue_scripts');
|
42 |
function acfe_enqueue_scripts(){
|
@@ -58,7 +58,7 @@ function acfe_enqueue_scripts(){
|
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
-
* Admin:
|
62 |
*/
|
63 |
add_action('acf/input/admin_enqueue_scripts', 'acfe_enqueue_admin_input_scripts');
|
64 |
function acfe_enqueue_admin_input_scripts(){
|
4 |
exit;
|
5 |
|
6 |
/**
|
7 |
+
* Admin: Everywhere
|
8 |
*/
|
9 |
add_action('admin_enqueue_scripts', 'acfe_enqueue_admin_scripts');
|
10 |
function acfe_enqueue_admin_scripts(){
|
18 |
wp_enqueue_style('acf-extended', acfe_get_url('assets/acf-extended.css'), false, ACFE_VERSION);
|
19 |
wp_enqueue_style('acf-extended-admin', acfe_get_url('assets/acf-extended-admin.css'), false, ACFE_VERSION);
|
20 |
|
21 |
+
// ACF Extended: UI Enhancements
|
22 |
if(acf_get_setting('acfe/modules/ui')){
|
23 |
|
24 |
wp_enqueue_style('acf-extended-ui', acfe_get_url('assets/acf-extended-ui.css'), false, ACFE_VERSION);
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
+
* Admin + Front: ACF Loaded
|
40 |
*/
|
41 |
add_action('acf/enqueue_scripts', 'acfe_enqueue_scripts');
|
42 |
function acfe_enqueue_scripts(){
|
58 |
}
|
59 |
|
60 |
/**
|
61 |
+
* Admin: ACF is loaded
|
62 |
*/
|
63 |
add_action('acf/input/admin_enqueue_scripts', 'acfe_enqueue_admin_input_scripts');
|
64 |
function acfe_enqueue_admin_input_scripts(){
|
includes/core/helpers.php
CHANGED
@@ -710,6 +710,46 @@ function acfe_form_decrypt_args(){
|
|
710 |
|
711 |
}
|
712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
function acfe_array_insert_before($key, array &$array, $new_key, $new_value){
|
714 |
|
715 |
if(!array_key_exists($key, $array))
|
@@ -750,6 +790,13 @@ function acfe_array_insert_after($key, array &$array, $new_key, $new_value){
|
|
750 |
|
751 |
}
|
752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
753 |
function acfe_add_validation_error($selector = '', $message = ''){
|
754 |
|
755 |
// General error
|
@@ -964,4 +1011,225 @@ function acfe_is_super_dev(){
|
|
964 |
|
965 |
return acf_get_setting('acfe/super_dev', false) || (defined('ACFE_super_dev') && ACFE_super_dev);
|
966 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
967 |
}
|
710 |
|
711 |
}
|
712 |
|
713 |
+
function acfe_form_is_submitted($form_name = false){
|
714 |
+
|
715 |
+
if(!acf_maybe_get_POST('_acf_form'))
|
716 |
+
return false;
|
717 |
+
|
718 |
+
$form = acfe_form_decrypt_args();
|
719 |
+
|
720 |
+
if(empty($form))
|
721 |
+
return false;
|
722 |
+
|
723 |
+
if(!empty($form_name) && acf_maybe_get($form, 'form_name') !== $form_name)
|
724 |
+
return false;
|
725 |
+
|
726 |
+
return true;
|
727 |
+
|
728 |
+
}
|
729 |
+
|
730 |
+
function acfe_form_unique_action_id($form, $type){
|
731 |
+
|
732 |
+
$name = $form['form_name'] . '-' . $type;
|
733 |
+
|
734 |
+
global $acfe_form_uniqid;
|
735 |
+
|
736 |
+
$acfe_form_uniqid = acf_get_array($acfe_form_uniqid);
|
737 |
+
|
738 |
+
if(!isset($acfe_form_uniqid[$type])){
|
739 |
+
|
740 |
+
$acfe_form_uniqid[$type] = 1;
|
741 |
+
|
742 |
+
}
|
743 |
+
|
744 |
+
if($acfe_form_uniqid[$type] > 1)
|
745 |
+
$name = $name . '-' . $acfe_form_uniqid[$type];
|
746 |
+
|
747 |
+
$acfe_form_uniqid[$type]++;
|
748 |
+
|
749 |
+
return $name;
|
750 |
+
|
751 |
+
}
|
752 |
+
|
753 |
function acfe_array_insert_before($key, array &$array, $new_key, $new_value){
|
754 |
|
755 |
if(!array_key_exists($key, $array))
|
790 |
|
791 |
}
|
792 |
|
793 |
+
function acfe_array_move(&$array, $a, $b){
|
794 |
+
|
795 |
+
$out = array_splice($array, $a, 1);
|
796 |
+
array_splice($array, $b, 0, $out);
|
797 |
+
|
798 |
+
}
|
799 |
+
|
800 |
function acfe_add_validation_error($selector = '', $message = ''){
|
801 |
|
802 |
// General error
|
1011 |
|
1012 |
return acf_get_setting('acfe/super_dev', false) || (defined('ACFE_super_dev') && ACFE_super_dev);
|
1013 |
|
1014 |
+
}
|
1015 |
+
|
1016 |
+
function acfe_update_setting($name, $value){
|
1017 |
+
|
1018 |
+
$name = "acfe/{$name}";
|
1019 |
+
|
1020 |
+
return acf_update_setting($name, $value);
|
1021 |
+
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
function acfe_get_setting($name, $value = null){
|
1025 |
+
|
1026 |
+
$_name = $name;
|
1027 |
+
$name = "acfe/{$name}";
|
1028 |
+
|
1029 |
+
// validate name
|
1030 |
+
$name = acf_validate_setting($name);
|
1031 |
+
|
1032 |
+
// check settings
|
1033 |
+
if(acf_has_setting($name)){
|
1034 |
+
|
1035 |
+
$value = acf_raw_setting($name);
|
1036 |
+
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
// ACF filter
|
1040 |
+
$value = apply_filters("acf/settings/{$name}", $value);
|
1041 |
+
|
1042 |
+
// ACFE filter
|
1043 |
+
$value = apply_filters("acfe/settings/{$_name}", $value);
|
1044 |
+
|
1045 |
+
return $value;
|
1046 |
+
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
function acfe_get_locations_array($locations){
|
1050 |
+
|
1051 |
+
$return = array();
|
1052 |
+
$types = acf_get_location_rule_types();
|
1053 |
+
|
1054 |
+
if(!$locations || !$types)
|
1055 |
+
return $return;
|
1056 |
+
|
1057 |
+
$icon_default = 'admin-generic';
|
1058 |
+
|
1059 |
+
$icons = array(
|
1060 |
+
'edit' => array(
|
1061 |
+
'post_type',
|
1062 |
+
'post_template',
|
1063 |
+
'post_status',
|
1064 |
+
'post_format',
|
1065 |
+
'post',
|
1066 |
+
),
|
1067 |
+
'media-default' => array(
|
1068 |
+
'page_template',
|
1069 |
+
'page_type',
|
1070 |
+
'page_parent',
|
1071 |
+
'page',
|
1072 |
+
),
|
1073 |
+
'admin-users' => array(
|
1074 |
+
'current_user',
|
1075 |
+
'user_form',
|
1076 |
+
),
|
1077 |
+
'welcome-widgets-menus' => array(
|
1078 |
+
'widget',
|
1079 |
+
'nav_menu',
|
1080 |
+
'nav_menu_item',
|
1081 |
+
),
|
1082 |
+
'category' => array(
|
1083 |
+
'taxonomy',
|
1084 |
+
'post_category',
|
1085 |
+
'post_taxonomy',
|
1086 |
+
),
|
1087 |
+
'admin-comments' => array(
|
1088 |
+
'comment',
|
1089 |
+
),
|
1090 |
+
'paperclip' => array(
|
1091 |
+
'attachment',
|
1092 |
+
),
|
1093 |
+
'admin-settings' => array(
|
1094 |
+
'options_page',
|
1095 |
+
),
|
1096 |
+
'businessman' => array(
|
1097 |
+
'current_user_role',
|
1098 |
+
'user_role',
|
1099 |
+
),
|
1100 |
+
'admin-appearance' => array(
|
1101 |
+
'acfe_template'
|
1102 |
+
)
|
1103 |
+
);
|
1104 |
+
|
1105 |
+
$rules = array();
|
1106 |
+
|
1107 |
+
foreach($types as $key => $type){
|
1108 |
+
|
1109 |
+
foreach($type as $slug => $name){
|
1110 |
+
|
1111 |
+
$icon = $icon_default;
|
1112 |
+
|
1113 |
+
foreach($icons as $_icon => $icon_slugs){
|
1114 |
+
|
1115 |
+
if(!in_array($slug, $icon_slugs))
|
1116 |
+
continue;
|
1117 |
+
|
1118 |
+
$icon = $_icon;
|
1119 |
+
break;
|
1120 |
+
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
$rules[$slug] = array(
|
1124 |
+
'name' => $slug,
|
1125 |
+
'label' => $name,
|
1126 |
+
'icon' => $icon
|
1127 |
+
);
|
1128 |
+
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
foreach($locations as $group){
|
1134 |
+
|
1135 |
+
if(!acf_maybe_get($rules, $group['param']) || !acf_maybe_get($group, 'value'))
|
1136 |
+
continue;
|
1137 |
+
|
1138 |
+
// init
|
1139 |
+
$rule = $rules[$group['param']];
|
1140 |
+
|
1141 |
+
// vars
|
1142 |
+
$icon = $rule['icon'];
|
1143 |
+
$name = $rule['name'];
|
1144 |
+
$label = $rule['label'];
|
1145 |
+
$operator = $group['operator'] === '==' ? '=' : $group['operator'];
|
1146 |
+
$value = $group['value'];
|
1147 |
+
|
1148 |
+
// Exception for Post/Page/page Parent ID
|
1149 |
+
if(in_array($group['param'], array('post', 'page', 'page_parent'))){
|
1150 |
+
|
1151 |
+
$value = get_the_title((int) $value);
|
1152 |
+
|
1153 |
+
}else{
|
1154 |
+
|
1155 |
+
// Validate value
|
1156 |
+
$values = acf_get_location_rule_values($group);
|
1157 |
+
|
1158 |
+
if(!empty($values) && is_array($values)){
|
1159 |
+
|
1160 |
+
foreach($values as $value_slug => $value_name){
|
1161 |
+
|
1162 |
+
if($value != $value_slug)
|
1163 |
+
continue;
|
1164 |
+
|
1165 |
+
$value = $value_name;
|
1166 |
+
|
1167 |
+
if(is_array($value_name) && isset($value_name[$value])){
|
1168 |
+
|
1169 |
+
$value = $value_name[$value];
|
1170 |
+
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
break;
|
1174 |
+
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
}
|
1178 |
+
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
// html
|
1182 |
+
$title = $label . ' ' . $operator . ' ' . $value;
|
1183 |
+
|
1184 |
+
$atts = array(
|
1185 |
+
'class' => 'acf-js-tooltip dashicons dashicons-' . $icon,
|
1186 |
+
'title' => $title
|
1187 |
+
);
|
1188 |
+
|
1189 |
+
if($operator === '!='){
|
1190 |
+
|
1191 |
+
$atts['style'] = 'color: #ccc;';
|
1192 |
+
|
1193 |
+
}
|
1194 |
+
|
1195 |
+
$html = '<span ' . acf_esc_attr($atts) . '></span>';
|
1196 |
+
|
1197 |
+
$return[] = array(
|
1198 |
+
'html' => $html,
|
1199 |
+
'icon' => $icon,
|
1200 |
+
'title' => $title,
|
1201 |
+
'name' => $name,
|
1202 |
+
'label' => $label,
|
1203 |
+
'operator' => $operator,
|
1204 |
+
'value' => $value,
|
1205 |
+
);
|
1206 |
+
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
return $return;
|
1210 |
+
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
function acfe_render_field_group_locations_html($field_group){
|
1214 |
+
|
1215 |
+
foreach($field_group['location'] as $groups){
|
1216 |
+
|
1217 |
+
$html = acfe_get_locations_array($groups);
|
1218 |
+
|
1219 |
+
if($html){
|
1220 |
+
|
1221 |
+
$array = array();
|
1222 |
+
|
1223 |
+
foreach($html as $location){
|
1224 |
+
|
1225 |
+
$array[] = $location['html'];
|
1226 |
+
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
echo implode(' ', $array);
|
1230 |
+
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
}
|
1234 |
+
|
1235 |
}
|
includes/core/menu.php
CHANGED
@@ -97,7 +97,10 @@ function acfe_admin_settings_submenu_swap(){
|
|
97 |
$submenu['edit.php?post_type=acf-field-group'] = $array;
|
98 |
|
99 |
// Add items left
|
100 |
-
if(!empty($_submenu))
|
|
|
101 |
$submenu['edit.php?post_type=acf-field-group'] = array_merge($array, $_submenu);
|
|
|
|
|
102 |
|
103 |
}
|
97 |
$submenu['edit.php?post_type=acf-field-group'] = $array;
|
98 |
|
99 |
// Add items left
|
100 |
+
if(!empty($_submenu)){
|
101 |
+
|
102 |
$submenu['edit.php?post_type=acf-field-group'] = array_merge($array, $_submenu);
|
103 |
+
|
104 |
+
}
|
105 |
|
106 |
}
|
includes/core/multilang.php
ADDED
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_multilang')):
|
7 |
+
|
8 |
+
class acfe_multilang{
|
9 |
+
|
10 |
+
var $is_wpml = false;
|
11 |
+
var $is_polylang = false;
|
12 |
+
var $is_multilang = false;
|
13 |
+
|
14 |
+
function __construct(){
|
15 |
+
|
16 |
+
// Check setting
|
17 |
+
if(!acf_get_setting('acfe/modules/multilang'))
|
18 |
+
return;
|
19 |
+
|
20 |
+
// WPML
|
21 |
+
if(defined('ICL_SITEPRESS_VERSION')){
|
22 |
+
|
23 |
+
$this->is_wpml = true;
|
24 |
+
$this->is_multilang = true;
|
25 |
+
|
26 |
+
$this->wpml();
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
// PolyLang
|
31 |
+
if(defined('POLYLANG_VERSION') && function_exists('pll_default_language')){
|
32 |
+
|
33 |
+
$this->is_polylang = true;
|
34 |
+
$this->is_multilang = true;
|
35 |
+
|
36 |
+
$this->polylang();
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* WPML
|
44 |
+
* https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/
|
45 |
+
*/
|
46 |
+
function wpml(){
|
47 |
+
|
48 |
+
// ACF Options Post ID
|
49 |
+
add_filter('acf/validate_post_id', array($this, 'set_options_post_id'), 10, 2);
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* PolyLang
|
55 |
+
* https://polylang.pro/doc/filter-reference/
|
56 |
+
* https://polylang.pro/doc/developpers-how-to/
|
57 |
+
* https://polylang.wordpress.com/documentation/documentation-for-developers/general/
|
58 |
+
* https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
|
59 |
+
*/
|
60 |
+
function polylang(){
|
61 |
+
|
62 |
+
// Default/Current Language
|
63 |
+
$dl = pll_default_language('locale');
|
64 |
+
$cl = pll_current_language('locale');
|
65 |
+
|
66 |
+
// Update settings
|
67 |
+
acf_update_setting('default_language', $dl);
|
68 |
+
acf_update_setting('current_language', $cl);
|
69 |
+
|
70 |
+
// Localize data
|
71 |
+
acf_localize_data(array(
|
72 |
+
'language' => $cl
|
73 |
+
));
|
74 |
+
|
75 |
+
// ACF Options Post ID
|
76 |
+
add_filter('acf/validate_post_id', array($this, 'set_options_post_id'), 99, 2);
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
function polylang_get_languages($pluck = 'locale'){
|
81 |
+
|
82 |
+
require_once ABSPATH . 'wp-admin/includes/translation-install.php';
|
83 |
+
|
84 |
+
$languages = include PLL_SETTINGS_INC . '/languages.php';
|
85 |
+
$translations = wp_get_available_translations();
|
86 |
+
|
87 |
+
// Keep only languages with existing WP language pack
|
88 |
+
// Unless the transient has expired and we don't have an internet connection to refresh it
|
89 |
+
if ( ! empty( $translations ) ) {
|
90 |
+
$translations['en_US'] = ''; // Languages packs don't include en_US
|
91 |
+
$languages = array_intersect_key( $languages, $translations );
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Filter the list of predefined languages
|
96 |
+
*
|
97 |
+
* @since 1.7.10
|
98 |
+
* @since 2.3 The languages arrays use associative keys instead of numerical keys
|
99 |
+
* @see settings/languages.php
|
100 |
+
*
|
101 |
+
* @param array $languages
|
102 |
+
*/
|
103 |
+
$languages = apply_filters( 'pll_predefined_languages', $languages );
|
104 |
+
|
105 |
+
// Keep only languages with all necessary informations
|
106 |
+
foreach ( $languages as $k => $lang ) {
|
107 |
+
if ( ! isset( $lang['code'], $lang['locale'], $lang['name'], $lang['dir'], $lang['flag'] ) ) {
|
108 |
+
unset( $languages[ $k ] );
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
if($pluck){
|
113 |
+
|
114 |
+
$languages = wp_list_pluck($languages, $pluck, true);
|
115 |
+
|
116 |
+
}
|
117 |
+
|
118 |
+
return $languages;
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* ACF Options Post ID
|
124 |
+
*/
|
125 |
+
function set_options_post_id($post_id, $original_post_id){
|
126 |
+
|
127 |
+
// ACF already take care of 'options' post ID
|
128 |
+
if($original_post_id === 'options' || $original_post_id === 'option')
|
129 |
+
return $post_id;
|
130 |
+
|
131 |
+
$data = acf_get_post_id_info($post_id);
|
132 |
+
|
133 |
+
// Check if Post ID is an option
|
134 |
+
if($data['type'] !== 'option')
|
135 |
+
return $post_id;
|
136 |
+
|
137 |
+
// Check if Post ID is already localized
|
138 |
+
if($this->is_post_id_localized($post_id))
|
139 |
+
return $post_id;
|
140 |
+
|
141 |
+
$dl = acf_get_setting('default_language');
|
142 |
+
$cl = acf_get_setting('current_language');
|
143 |
+
|
144 |
+
// Add Language
|
145 |
+
if($cl && $cl !== $dl){
|
146 |
+
|
147 |
+
$post_id .= '_' . $cl;
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
return $post_id;
|
152 |
+
|
153 |
+
}
|
154 |
+
|
155 |
+
function is_post_id_localized($post_id){
|
156 |
+
|
157 |
+
// Polylang
|
158 |
+
if($this->is_polylang){
|
159 |
+
|
160 |
+
// Check var'_en_US'
|
161 |
+
preg_match('/_[a-z]{2}_[A-Z]{2}$/', $post_id, $found_locale);
|
162 |
+
|
163 |
+
if(!empty($found_locale)){
|
164 |
+
|
165 |
+
// Remove first '_'
|
166 |
+
$found_locale = substr($found_locale[0], 1);
|
167 |
+
|
168 |
+
// Get Polylang Languages List
|
169 |
+
$languages = $this->polylang_get_languages('locale');
|
170 |
+
|
171 |
+
// Language Locale found in Post ID
|
172 |
+
if(in_array($found_locale, $languages))
|
173 |
+
return true;
|
174 |
+
|
175 |
+
|
176 |
+
}
|
177 |
+
|
178 |
+
// Check var'_en'
|
179 |
+
preg_match('/_[a-z]{2}$/', $post_id, $found_code);
|
180 |
+
|
181 |
+
if(!empty($found_code)){
|
182 |
+
|
183 |
+
// Remove first '_'
|
184 |
+
$found_code = substr($found_code[0], 1);
|
185 |
+
|
186 |
+
// Get Polylang Languages List
|
187 |
+
$languages = $this->polylang_get_languages('code');
|
188 |
+
|
189 |
+
// Language Locale found in Post ID
|
190 |
+
if(in_array($found_code, $languages))
|
191 |
+
return true;
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
// WPML
|
198 |
+
elseif($this->is_wpml){
|
199 |
+
|
200 |
+
// Check var'_en'
|
201 |
+
preg_match('/_[a-z]{2}$/', $post_id, $found_code);
|
202 |
+
|
203 |
+
if(!empty($found_code)){
|
204 |
+
|
205 |
+
// Remove first '_'
|
206 |
+
$found_code = substr($found_code[0], 1);
|
207 |
+
|
208 |
+
// Get WPML Languages List
|
209 |
+
$languages = icl_get_languages_codes();
|
210 |
+
|
211 |
+
// Language Locale found in Post ID
|
212 |
+
if(in_array($found_code, $languages))
|
213 |
+
return true;
|
214 |
+
|
215 |
+
}
|
216 |
+
|
217 |
+
}
|
218 |
+
|
219 |
+
return false;
|
220 |
+
|
221 |
+
}
|
222 |
+
|
223 |
+
}
|
224 |
+
|
225 |
+
acf_new_instance('acfe_multilang');
|
226 |
+
|
227 |
+
endif;
|
228 |
+
|
229 |
+
function acfe_is_multilang(){
|
230 |
+
|
231 |
+
return acf_get_instance('acfe_multilang')->is_multilang;
|
232 |
+
|
233 |
+
}
|
234 |
+
|
235 |
+
function acfe_get_multilang(){
|
236 |
+
|
237 |
+
$data = array(
|
238 |
+
'dl' => acf_get_setting('default_language'),
|
239 |
+
'cl' => acf_get_setting('current_language'),
|
240 |
+
'wpml' => acf_get_instance('acfe_multilang')->is_wpml,
|
241 |
+
'polylang' => acf_get_instance('acfe_multilang')->is_polylang,
|
242 |
+
);
|
243 |
+
|
244 |
+
return $data;
|
245 |
+
|
246 |
+
}
|
247 |
+
|
248 |
+
function acfe_is_polylang(){
|
249 |
+
|
250 |
+
return acf_get_instance('acfe_multilang')->is_polylang;
|
251 |
+
|
252 |
+
}
|
253 |
+
|
254 |
+
function acfe_is_wpml(){
|
255 |
+
|
256 |
+
return acf_get_instance('acfe_multilang')->is_wpml;
|
257 |
+
|
258 |
+
}
|
259 |
+
|
260 |
+
function acfe_get_post_lang($post_id, $field = false){
|
261 |
+
|
262 |
+
// Polylang
|
263 |
+
if(acfe_is_polylang()){
|
264 |
+
|
265 |
+
// Default field
|
266 |
+
if(!$field)
|
267 |
+
$field = 'locale';
|
268 |
+
|
269 |
+
return pll_get_post_language($post_id, $field);
|
270 |
+
|
271 |
+
// WPML
|
272 |
+
}elseif(acfe_is_wpml()){
|
273 |
+
|
274 |
+
$post_lang = apply_filters('wpml_post_language_details', NULL, $post_id);
|
275 |
+
|
276 |
+
// Default field
|
277 |
+
if(!$field)
|
278 |
+
$field = 'slug';
|
279 |
+
|
280 |
+
if($field === 'locale'){
|
281 |
+
|
282 |
+
return $post_lang['locale'];
|
283 |
+
|
284 |
+
}elseif($field === 'slug'){
|
285 |
+
|
286 |
+
return $post_lang['language_code'];
|
287 |
+
|
288 |
+
}elseif($field === 'name'){
|
289 |
+
|
290 |
+
return $post_lang['display_name'];
|
291 |
+
|
292 |
+
}
|
293 |
+
|
294 |
+
return false;
|
295 |
+
|
296 |
+
}
|
297 |
+
|
298 |
+
return false;
|
299 |
+
|
300 |
+
}
|
301 |
+
|
302 |
+
function acfe__(&$string, $name = false, $textdomain = 'acfe'){
|
303 |
+
|
304 |
+
if(!acfe_is_multilang() || empty($string))
|
305 |
+
return __($string, $textdomain);
|
306 |
+
|
307 |
+
if(empty($name))
|
308 |
+
$name = $string;
|
309 |
+
|
310 |
+
// WPML
|
311 |
+
if(acfe_is_wpml()){
|
312 |
+
|
313 |
+
do_action( 'wpml_register_single_string', $textdomain, $name, $string);
|
314 |
+
|
315 |
+
$string = __($string, $textdomain);
|
316 |
+
|
317 |
+
return $string;
|
318 |
+
|
319 |
+
}
|
320 |
+
|
321 |
+
// PolyLang
|
322 |
+
if(acfe_is_polylang()){
|
323 |
+
|
324 |
+
pll_register_string($name, $string, $textdomain);
|
325 |
+
|
326 |
+
$string = pll__($string);
|
327 |
+
|
328 |
+
return $string;
|
329 |
+
|
330 |
+
}
|
331 |
+
|
332 |
+
$string = __($string, $textdomain);
|
333 |
+
|
334 |
+
return $string;
|
335 |
+
|
336 |
+
}
|
337 |
+
|
338 |
+
function acfe__e($string, $name = false, $textdomain = 'acfe'){
|
339 |
+
|
340 |
+
echo acfe__($string, $name, $textdomain);
|
341 |
+
|
342 |
+
}
|
includes/core/settings.php
CHANGED
@@ -37,7 +37,7 @@ class acfe_settings{
|
|
37 |
'active' => true,
|
38 |
),
|
39 |
|
40 |
-
'
|
41 |
'active' => true,
|
42 |
),
|
43 |
|
37 |
'active' => true,
|
38 |
),
|
39 |
|
40 |
+
'ui' => array(
|
41 |
'active' => true,
|
42 |
),
|
43 |
|
includes/field-groups/field-group.php
CHANGED
@@ -56,7 +56,7 @@ function acfe_field_group_fields_add_fields_form($fields, $add = true){
|
|
56 |
|
57 |
acfe_field_group_fields_add_fields_form($layout['sub_fields'], $add);
|
58 |
|
59 |
-
}
|
60 |
}
|
61 |
|
62 |
}
|
@@ -105,6 +105,26 @@ function acfe_field_group_meta_fix_repeater($field){
|
|
105 |
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
/**
|
109 |
* Field Group Options: Data
|
110 |
*/
|
@@ -115,18 +135,6 @@ function acfe_render_field_group_settings(){
|
|
115 |
|
116 |
global $field_group;
|
117 |
|
118 |
-
// Form settings
|
119 |
-
acf_render_field_wrap(array(
|
120 |
-
'label' => __('Advanced settings'),
|
121 |
-
'name' => 'acfe_form',
|
122 |
-
'prefix' => 'acf_field_group',
|
123 |
-
'type' => 'true_false',
|
124 |
-
'ui' => 1,
|
125 |
-
'instructions' => __('Enable advanced fields settings & validation'),
|
126 |
-
'value' => (isset($field_group['acfe_form'])) ? $field_group['acfe_form'] : '',
|
127 |
-
'required' => false,
|
128 |
-
));
|
129 |
-
|
130 |
// Meta
|
131 |
acf_render_field_wrap(array(
|
132 |
'label' => __('Custom meta data'),
|
@@ -141,6 +149,7 @@ function acfe_render_field_group_settings(){
|
|
141 |
'value' => (isset($field_group['acfe_meta'])) ? $field_group['acfe_meta'] : array(),
|
142 |
'sub_fields' => array(
|
143 |
array(
|
|
|
144 |
'label' => __('Key'),
|
145 |
'name' => 'acfe_meta_key',
|
146 |
'key' => 'acfe_meta_key',
|
@@ -157,6 +166,7 @@ function acfe_render_field_group_settings(){
|
|
157 |
),
|
158 |
),
|
159 |
array(
|
|
|
160 |
'label' => __('Value'),
|
161 |
'name' => 'acfe_meta_value',
|
162 |
'key' => 'acfe_meta_value',
|
@@ -202,7 +212,7 @@ function acfe_render_field_group_settings(){
|
|
202 |
acf.postbox.render({
|
203 |
'id': 'acf-field-group-acfe',
|
204 |
'label': 'left'
|
205 |
-
});
|
206 |
}
|
207 |
|
208 |
jQuery(document).ready(function($){
|
@@ -244,7 +254,7 @@ function acfe_render_field_group_submitbox($post){
|
|
244 |
(function($) {
|
245 |
$('.misc-pub-acfe-field-group-key').insertAfter('.misc-pub-post-status');
|
246 |
$('.misc-pub-acfe-field-group-export').insertAfter('.misc-pub-post-status');
|
247 |
-
})(jQuery);
|
248 |
</script>
|
249 |
<?php
|
250 |
|
@@ -333,9 +343,9 @@ function acfe_render_field_group_settings_side(){
|
|
333 |
'prefix' => 'acf_field_group',
|
334 |
'value' => (isset($_field_group['acfe_autosync']) && !empty($_field_group['acfe_autosync'])) ? $_field_group['acfe_autosync'] : array(),
|
335 |
'choices' => array(
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
));
|
340 |
|
341 |
acf_render_field_wrap(array(
|
@@ -587,33 +597,33 @@ function acfc_field_group_default_options($field_group){
|
|
587 |
|
588 |
// Only new field groups
|
589 |
if(!acf_maybe_get($field_group, 'location')){
|
590 |
-
|
591 |
-
|
592 |
$field_group['label_placement'] = 'left';
|
593 |
|
594 |
// AutoSync
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
|
615 |
}
|
616 |
-
|
617 |
|
618 |
|
619 |
return $field_group;
|
@@ -741,7 +751,7 @@ function acfe_field_group_disable_editor(){
|
|
741 |
}
|
742 |
|
743 |
$field_groups = acf_get_field_groups(array(
|
744 |
-
'post_id' => $post_id,
|
745 |
'post_type' => $post_type
|
746 |
));
|
747 |
|
56 |
|
57 |
acfe_field_group_fields_add_fields_form($layout['sub_fields'], $add);
|
58 |
|
59 |
+
}
|
60 |
}
|
61 |
|
62 |
}
|
105 |
|
106 |
}
|
107 |
|
108 |
+
add_action('acf/render_field_group_settings', 'acfe_render_field_group_settings_acfe_form');
|
109 |
+
function acfe_render_field_group_settings_acfe_form($field_group){
|
110 |
+
|
111 |
+
// Form settings
|
112 |
+
acf_render_field_wrap(array(
|
113 |
+
'label' => __('Advanced settings'),
|
114 |
+
'name' => 'acfe_form',
|
115 |
+
'prefix' => 'acf_field_group',
|
116 |
+
'type' => 'true_false',
|
117 |
+
'ui' => 1,
|
118 |
+
'instructions' => __('Enable advanced fields settings & validation'),
|
119 |
+
'value' => (isset($field_group['acfe_form'])) ? $field_group['acfe_form'] : '',
|
120 |
+
'required' => false,
|
121 |
+
'wrapper' => array(
|
122 |
+
'data-after' => 'active'
|
123 |
+
)
|
124 |
+
));
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
/**
|
129 |
* Field Group Options: Data
|
130 |
*/
|
135 |
|
136 |
global $field_group;
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
// Meta
|
139 |
acf_render_field_wrap(array(
|
140 |
'label' => __('Custom meta data'),
|
149 |
'value' => (isset($field_group['acfe_meta'])) ? $field_group['acfe_meta'] : array(),
|
150 |
'sub_fields' => array(
|
151 |
array(
|
152 |
+
'ID' => false,
|
153 |
'label' => __('Key'),
|
154 |
'name' => 'acfe_meta_key',
|
155 |
'key' => 'acfe_meta_key',
|
166 |
),
|
167 |
),
|
168 |
array(
|
169 |
+
'ID' => false,
|
170 |
'label' => __('Value'),
|
171 |
'name' => 'acfe_meta_value',
|
172 |
'key' => 'acfe_meta_value',
|
212 |
acf.postbox.render({
|
213 |
'id': 'acf-field-group-acfe',
|
214 |
'label': 'left'
|
215 |
+
});
|
216 |
}
|
217 |
|
218 |
jQuery(document).ready(function($){
|
254 |
(function($) {
|
255 |
$('.misc-pub-acfe-field-group-key').insertAfter('.misc-pub-post-status');
|
256 |
$('.misc-pub-acfe-field-group-export').insertAfter('.misc-pub-post-status');
|
257 |
+
})(jQuery);
|
258 |
</script>
|
259 |
<?php
|
260 |
|
343 |
'prefix' => 'acf_field_group',
|
344 |
'value' => (isset($_field_group['acfe_autosync']) && !empty($_field_group['acfe_autosync'])) ? $_field_group['acfe_autosync'] : array(),
|
345 |
'choices' => array(
|
346 |
+
'php' => $php_text,
|
347 |
+
'json' => $json_text,
|
348 |
+
)
|
349 |
));
|
350 |
|
351 |
acf_render_field_wrap(array(
|
597 |
|
598 |
// Only new field groups
|
599 |
if(!acf_maybe_get($field_group, 'location')){
|
600 |
+
|
601 |
+
// Default label placement: Left
|
602 |
$field_group['label_placement'] = 'left';
|
603 |
|
604 |
// AutoSync
|
605 |
+
$acfe_autosync = array();
|
606 |
+
|
607 |
+
if(acf_get_setting('acfe/json_found', false)){
|
608 |
+
|
609 |
+
$acfe_autosync[] = 'json';
|
610 |
+
|
611 |
+
}
|
612 |
+
|
613 |
+
if(acf_get_setting('acfe/php_found', false)){
|
614 |
+
|
615 |
+
$acfe_autosync[] = 'php';
|
616 |
+
|
617 |
+
}
|
618 |
+
|
619 |
+
if(!empty($acfe_autosync)){
|
620 |
+
|
621 |
+
$field_group['acfe_autosync'] = $acfe_autosync;
|
622 |
+
|
623 |
+
}
|
624 |
|
625 |
}
|
626 |
+
|
627 |
|
628 |
|
629 |
return $field_group;
|
751 |
}
|
752 |
|
753 |
$field_groups = acf_get_field_groups(array(
|
754 |
+
'post_id' => $post_id,
|
755 |
'post_type' => $post_type
|
756 |
));
|
757 |
|
includes/field-groups/field-groups.php
CHANGED
@@ -145,131 +145,8 @@ function acfe_field_groups_column_html($column, $post_id){
|
|
145 |
elseif($column === 'acfe-locations'){
|
146 |
|
147 |
$field_group = acf_get_field_group($post_id);
|
148 |
-
$choices = acf_get_location_rule_types();
|
149 |
|
150 |
-
|
151 |
-
return;
|
152 |
-
|
153 |
-
$final = array();
|
154 |
-
|
155 |
-
$icon_default = 'admin-generic';
|
156 |
-
|
157 |
-
$icons = array(
|
158 |
-
'edit' => array(
|
159 |
-
'post_type',
|
160 |
-
'post_template',
|
161 |
-
'post_status',
|
162 |
-
'post_format',
|
163 |
-
'post',
|
164 |
-
),
|
165 |
-
'media-default' => array(
|
166 |
-
'page_template',
|
167 |
-
'page_type',
|
168 |
-
'page_parent',
|
169 |
-
'page',
|
170 |
-
),
|
171 |
-
'admin-users' => array(
|
172 |
-
'current_user',
|
173 |
-
'user_form',
|
174 |
-
),
|
175 |
-
'welcome-widgets-menus' => array(
|
176 |
-
'widget',
|
177 |
-
'nav_menu',
|
178 |
-
'nav_menu_item',
|
179 |
-
),
|
180 |
-
'category' => array(
|
181 |
-
'taxonomy',
|
182 |
-
'post_category',
|
183 |
-
'post_taxonomy',
|
184 |
-
),
|
185 |
-
'admin-comments' => array(
|
186 |
-
'comment',
|
187 |
-
),
|
188 |
-
'paperclip' => array(
|
189 |
-
'attachment',
|
190 |
-
),
|
191 |
-
'admin-settings' => array(
|
192 |
-
'options_page',
|
193 |
-
),
|
194 |
-
'businessman' => array(
|
195 |
-
'current_user_role',
|
196 |
-
'user_role',
|
197 |
-
),
|
198 |
-
);
|
199 |
-
|
200 |
-
foreach($choices as $key => $sub_choices){
|
201 |
-
|
202 |
-
foreach($sub_choices as $choice_slug => $choice_name){
|
203 |
-
|
204 |
-
$final_icon = $icon_default;
|
205 |
-
foreach($icons as $icon => $icon_slugs){
|
206 |
-
foreach($icon_slugs as $icon_slug){
|
207 |
-
if($choice_slug != $icon_slug)
|
208 |
-
continue;
|
209 |
-
|
210 |
-
$final_icon = $icon;
|
211 |
-
break(2);
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
$final[$choice_slug] = array(
|
216 |
-
'name' => $choice_name,
|
217 |
-
'icon' => $final_icon
|
218 |
-
);
|
219 |
-
|
220 |
-
}
|
221 |
-
|
222 |
-
}
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
$html = array();
|
227 |
-
foreach($field_group['location'] as $or){
|
228 |
-
|
229 |
-
foreach($or as $and){
|
230 |
-
|
231 |
-
if(!isset($final[$and['param']])|| !isset($and['value']))
|
232 |
-
continue;
|
233 |
-
|
234 |
-
$final_name = $and['value'];
|
235 |
-
$values = acf_get_location_rule_values($and);
|
236 |
-
|
237 |
-
if(!empty($values) && is_array($values)){
|
238 |
-
|
239 |
-
foreach($values as $value_slug => $value_name){
|
240 |
-
|
241 |
-
if($and['value'] != $value_slug)
|
242 |
-
continue;
|
243 |
-
|
244 |
-
if(is_array($value_name) && isset($value_name[$and['value']])){
|
245 |
-
|
246 |
-
$final_name = $value_name[$and['value']];
|
247 |
-
|
248 |
-
}else{
|
249 |
-
|
250 |
-
$final_name = $value_name;
|
251 |
-
|
252 |
-
}
|
253 |
-
|
254 |
-
break;
|
255 |
-
|
256 |
-
}
|
257 |
-
|
258 |
-
}
|
259 |
-
|
260 |
-
$final_name = esc_html($final_name);
|
261 |
-
|
262 |
-
$name = '<span class="acf-js-tooltip dashicons dashicons-' . $final[$and['param']]['icon'] . '" title="' . $final[$and['param']]['name'] . ' = ' . $final_name . '"></span>';
|
263 |
-
if($and['operator'] === '!=')
|
264 |
-
$name = '<span class="acf-js-tooltip dashicons dashicons-' . $final[$and['param']]['icon'] . '" title="' . $final[$and['param']]['name'] . ' != ' . $final_name . '" style="color:#ccc;"></span>';
|
265 |
-
|
266 |
-
$html[] = $name;
|
267 |
-
|
268 |
-
}
|
269 |
-
|
270 |
-
}
|
271 |
-
|
272 |
-
echo implode(' ', $html);
|
273 |
|
274 |
}
|
275 |
|
145 |
elseif($column === 'acfe-locations'){
|
146 |
|
147 |
$field_group = acf_get_field_group($post_id);
|
|
|
148 |
|
149 |
+
acfe_render_field_group_locations_html($field_group);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
}
|
152 |
|
includes/fields-settings/settings.php
CHANGED
@@ -226,6 +226,7 @@ class acfe_field_settings{
|
|
226 |
'layout' => 'table',
|
227 |
'sub_fields' => array(
|
228 |
array(
|
|
|
229 |
'label' => 'Setting',
|
230 |
'name' => 'acfe_settings_setting_type',
|
231 |
'key' => 'acfe_settings_setting_type',
|
@@ -251,6 +252,7 @@ class acfe_field_settings{
|
|
251 |
)
|
252 |
),
|
253 |
array(
|
|
|
254 |
'label' => 'Setting name',
|
255 |
'name' => 'acfe_settings_setting_name',
|
256 |
'key' => 'acfe_settings_setting_name',
|
@@ -276,6 +278,7 @@ class acfe_field_settings{
|
|
276 |
)
|
277 |
),
|
278 |
array(
|
|
|
279 |
'label' => 'Operator / Value',
|
280 |
'name' => 'acfe_settings_setting_operator',
|
281 |
'key' => 'acfe_settings_setting_operator',
|
@@ -302,6 +305,7 @@ class acfe_field_settings{
|
|
302 |
),
|
303 |
),
|
304 |
array(
|
|
|
305 |
'label' => 'Value',
|
306 |
'name' => 'acfe_settings_setting_value',
|
307 |
'key' => 'acfe_settings_setting_value',
|
226 |
'layout' => 'table',
|
227 |
'sub_fields' => array(
|
228 |
array(
|
229 |
+
'ID' => false,
|
230 |
'label' => 'Setting',
|
231 |
'name' => 'acfe_settings_setting_type',
|
232 |
'key' => 'acfe_settings_setting_type',
|
252 |
)
|
253 |
),
|
254 |
array(
|
255 |
+
'ID' => false,
|
256 |
'label' => 'Setting name',
|
257 |
'name' => 'acfe_settings_setting_name',
|
258 |
'key' => 'acfe_settings_setting_name',
|
278 |
)
|
279 |
),
|
280 |
array(
|
281 |
+
'ID' => false,
|
282 |
'label' => 'Operator / Value',
|
283 |
'name' => 'acfe_settings_setting_operator',
|
284 |
'key' => 'acfe_settings_setting_operator',
|
305 |
),
|
306 |
),
|
307 |
array(
|
308 |
+
'ID' => false,
|
309 |
'label' => 'Value',
|
310 |
'name' => 'acfe_settings_setting_value',
|
311 |
'key' => 'acfe_settings_setting_value',
|
includes/fields-settings/validation.php
CHANGED
@@ -24,6 +24,7 @@ class acfe_field_validation{
|
|
24 |
'General' => array(
|
25 |
'value' => 'If value',
|
26 |
'strlen' => 'If value length - strlen(value)',
|
|
|
27 |
),
|
28 |
|
29 |
'Exists' => array(
|
@@ -37,6 +38,16 @@ class acfe_field_validation{
|
|
37 |
'Is' => array(
|
38 |
'is_email' => 'If is email - is_email(value)',
|
39 |
'is_user_logged_in' => 'If is user logged in - is_user_logged_in()',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
),
|
41 |
|
42 |
'Sanitize' => array(
|
@@ -202,6 +213,7 @@ class acfe_field_validation{
|
|
202 |
'layout' => 'table',
|
203 |
'sub_fields' => array(
|
204 |
array(
|
|
|
205 |
'label' => 'Function',
|
206 |
'name' => 'acfe_validate_function',
|
207 |
'key' => 'acfe_validate_function',
|
@@ -219,6 +231,7 @@ class acfe_field_validation{
|
|
219 |
),
|
220 |
),
|
221 |
array(
|
|
|
222 |
'label' => 'Operator / Value',
|
223 |
'name' => 'acfe_validate_operator',
|
224 |
'key' => 'acfe_validate_operator',
|
@@ -235,18 +248,23 @@ class acfe_field_validation{
|
|
235 |
'<' => '<',
|
236 |
'<=' => '<=',
|
237 |
'contains' => 'Contains',
|
238 |
-
'!contains'
|
239 |
'starts' => 'Starts with',
|
240 |
-
'!starts'
|
241 |
'ends' => 'Ends with',
|
242 |
-
'!ends'
|
|
|
|
|
243 |
),
|
244 |
'Values' => array(
|
245 |
'true' => '== true',
|
|
|
246 |
'false' => '== false',
|
|
|
247 |
'null' => '== null',
|
|
|
248 |
'empty' => '== (empty)',
|
249 |
-
'!empty'
|
250 |
)
|
251 |
),
|
252 |
'instructions' => false,
|
@@ -258,6 +276,7 @@ class acfe_field_validation{
|
|
258 |
),
|
259 |
),
|
260 |
array(
|
|
|
261 |
'label' => 'Value',
|
262 |
'name' => 'acfe_validate_match',
|
263 |
'key' => 'acfe_validate_match',
|
@@ -358,6 +377,20 @@ class acfe_field_validation{
|
|
358 |
'value' => '!ends',
|
359 |
)
|
360 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
)
|
362 |
),
|
363 |
)
|
@@ -536,17 +569,37 @@ class acfe_field_validation{
|
|
536 |
$rule_match = true;
|
537 |
}
|
538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
elseif($operator === 'true' && $result === true){
|
540 |
$rule_match = true;
|
541 |
}
|
542 |
|
|
|
|
|
|
|
|
|
543 |
elseif($operator === 'false' && $result === false){
|
544 |
$rule_match = true;
|
545 |
}
|
|
|
|
|
|
|
|
|
546 |
|
547 |
elseif($operator === 'null' && $result === null){
|
548 |
$rule_match = true;
|
549 |
}
|
|
|
|
|
|
|
|
|
550 |
|
551 |
elseif($operator === 'empty' && empty($result)){
|
552 |
$rule_match = true;
|
@@ -603,6 +656,49 @@ class acfe_field_validation{
|
|
603 |
|
604 |
}
|
605 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
/**
|
607 |
* Process Setting
|
608 |
*/
|
24 |
'General' => array(
|
25 |
'value' => 'If value',
|
26 |
'strlen' => 'If value length - strlen(value)',
|
27 |
+
'count' => 'If count value - count(value)',
|
28 |
),
|
29 |
|
30 |
'Exists' => array(
|
38 |
'Is' => array(
|
39 |
'is_email' => 'If is email - is_email(value)',
|
40 |
'is_user_logged_in' => 'If is user logged in - is_user_logged_in()',
|
41 |
+
'is_array' => 'If is array - is_array(value)',
|
42 |
+
'is_string' => 'If is string - is_string(value)',
|
43 |
+
'is_numeric' => 'If is numeric - is_numeric(value)',
|
44 |
+
),
|
45 |
+
|
46 |
+
'Post' => array(
|
47 |
+
'get_post_type' => 'If get post type - get_post_type(value)',
|
48 |
+
'get_post_by_id' => 'If post id exists - get_post_by_id(value)',
|
49 |
+
'get_post_by_slug' => 'If post slug exists - get_post_by_slug(value)',
|
50 |
+
'get_post_by_title' => 'If post title exists - get_post_by_title(value)',
|
51 |
),
|
52 |
|
53 |
'Sanitize' => array(
|
213 |
'layout' => 'table',
|
214 |
'sub_fields' => array(
|
215 |
array(
|
216 |
+
'ID' => false,
|
217 |
'label' => 'Function',
|
218 |
'name' => 'acfe_validate_function',
|
219 |
'key' => 'acfe_validate_function',
|
231 |
),
|
232 |
),
|
233 |
array(
|
234 |
+
'ID' => false,
|
235 |
'label' => 'Operator / Value',
|
236 |
'name' => 'acfe_validate_operator',
|
237 |
'key' => 'acfe_validate_operator',
|
248 |
'<' => '<',
|
249 |
'<=' => '<=',
|
250 |
'contains' => 'Contains',
|
251 |
+
'!contains' => 'Doesn\'t contain',
|
252 |
'starts' => 'Starts with',
|
253 |
+
'!starts' => 'Doesn\'t start with',
|
254 |
'ends' => 'Ends with',
|
255 |
+
'!ends' => 'Doesn\'t end with',
|
256 |
+
'regex' => 'Matches regex',
|
257 |
+
'!regex' => 'Doesn\'t matches regex',
|
258 |
),
|
259 |
'Values' => array(
|
260 |
'true' => '== true',
|
261 |
+
'!true' => '!= true',
|
262 |
'false' => '== false',
|
263 |
+
'!false'=> '!= false',
|
264 |
'null' => '== null',
|
265 |
+
'!null' => '!= null',
|
266 |
'empty' => '== (empty)',
|
267 |
+
'!empty'=> '!= (empty)',
|
268 |
)
|
269 |
),
|
270 |
'instructions' => false,
|
276 |
),
|
277 |
),
|
278 |
array(
|
279 |
+
'ID' => false,
|
280 |
'label' => 'Value',
|
281 |
'name' => 'acfe_validate_match',
|
282 |
'key' => 'acfe_validate_match',
|
377 |
'value' => '!ends',
|
378 |
)
|
379 |
),
|
380 |
+
array(
|
381 |
+
array(
|
382 |
+
'field' => 'acfe_validate_operator',
|
383 |
+
'operator' => '==',
|
384 |
+
'value' => 'regex',
|
385 |
+
)
|
386 |
+
),
|
387 |
+
array(
|
388 |
+
array(
|
389 |
+
'field' => 'acfe_validate_operator',
|
390 |
+
'operator' => '==',
|
391 |
+
'value' => '!regex',
|
392 |
+
)
|
393 |
+
),
|
394 |
)
|
395 |
),
|
396 |
)
|
569 |
$rule_match = true;
|
570 |
}
|
571 |
|
572 |
+
elseif($operator === 'regex' && preg_match('/' . $match . '/', $result)){
|
573 |
+
$rule_match = true;
|
574 |
+
}
|
575 |
+
|
576 |
+
elseif($operator === '!regex' && !preg_match('/' . $match . '/', $result)){
|
577 |
+
$rule_match = true;
|
578 |
+
}
|
579 |
+
|
580 |
elseif($operator === 'true' && $result === true){
|
581 |
$rule_match = true;
|
582 |
}
|
583 |
|
584 |
+
elseif($operator === '!true' && $result !== true){
|
585 |
+
$rule_match = true;
|
586 |
+
}
|
587 |
+
|
588 |
elseif($operator === 'false' && $result === false){
|
589 |
$rule_match = true;
|
590 |
}
|
591 |
+
|
592 |
+
elseif($operator === '!false' && $result !== false){
|
593 |
+
$rule_match = true;
|
594 |
+
}
|
595 |
|
596 |
elseif($operator === 'null' && $result === null){
|
597 |
$rule_match = true;
|
598 |
}
|
599 |
+
|
600 |
+
elseif($operator === '!null' && $result !== null){
|
601 |
+
$rule_match = true;
|
602 |
+
}
|
603 |
|
604 |
elseif($operator === 'empty' && empty($result)){
|
605 |
$rule_match = true;
|
656 |
|
657 |
}
|
658 |
|
659 |
+
function get_post_by_id($value){
|
660 |
+
|
661 |
+
$get_post = get_post($value);
|
662 |
+
|
663 |
+
if(!$get_post || is_wp_error($get_post))
|
664 |
+
return false;
|
665 |
+
|
666 |
+
return true;
|
667 |
+
|
668 |
+
}
|
669 |
+
|
670 |
+
function get_post_by_slug($value){
|
671 |
+
|
672 |
+
$get_posts = get_posts(array(
|
673 |
+
'name' => $value,
|
674 |
+
'post_type' => 'any',
|
675 |
+
'post_status' => 'any',
|
676 |
+
'posts_per_page' => 1
|
677 |
+
));
|
678 |
+
|
679 |
+
if(empty($get_posts))
|
680 |
+
return false;
|
681 |
+
|
682 |
+
return true;
|
683 |
+
|
684 |
+
}
|
685 |
+
|
686 |
+
function get_post_by_title($value){
|
687 |
+
|
688 |
+
$get_posts = get_posts(array(
|
689 |
+
's' => $value,
|
690 |
+
'post_type' => 'any',
|
691 |
+
'post_status' => 'any',
|
692 |
+
'posts_per_page' => 1
|
693 |
+
));
|
694 |
+
|
695 |
+
if(empty($get_posts))
|
696 |
+
return false;
|
697 |
+
|
698 |
+
return true;
|
699 |
+
|
700 |
+
}
|
701 |
+
|
702 |
/**
|
703 |
* Process Setting
|
704 |
*/
|
includes/fields/field-flexible-content.php
CHANGED
@@ -183,6 +183,8 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
183 |
$this->add_field_filter('acfe/field_wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
184 |
$this->add_field_action('acf/render_field', array($this, 'render_field'), 9);
|
185 |
|
|
|
|
|
186 |
// General Filters
|
187 |
$this->add_filter('acfe/flexible/layouts/icons', array($this, 'add_layout_icons'), 10, 3);
|
188 |
$this->add_filter('acfe/flexible/layouts/div', array($this, 'add_layout_div'), 10, 3);
|
@@ -202,7 +204,6 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
202 |
*/
|
203 |
function render_field_settings($field){
|
204 |
|
205 |
-
|
206 |
// Advanced settings
|
207 |
acf_render_field_setting($field, array(
|
208 |
'label' => __('Advanced Flexible Content'),
|
@@ -551,6 +552,29 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
551 |
)
|
552 |
)
|
553 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
|
555 |
// Layouts: Close Button
|
556 |
acf_render_field_setting($field, array(
|
@@ -1101,6 +1125,7 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
1101 |
'acfe_flexible_title_edition' => 0,
|
1102 |
'acfe_flexible_clone' => 0,
|
1103 |
'acfe_flexible_copy_paste' => 0,
|
|
|
1104 |
'acfe_flexible_close_button' => 0,
|
1105 |
'acfe_flexible_remove_add_button' => 0,
|
1106 |
'acfe_flexible_remove_delete_button' => 0,
|
@@ -1271,9 +1296,10 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
1271 |
// settings
|
1272 |
$has_settings = acf_maybe_get($field, 'acfe_flexible_layouts_settings');
|
1273 |
$has_title_edition = acf_maybe_get($field, 'acfe_flexible_title_edition');
|
|
|
1274 |
|
1275 |
// check settings
|
1276 |
-
if(!$has_settings && !$has_title_edition)
|
1277 |
return $fields;
|
1278 |
|
1279 |
foreach($field['layouts'] as $layout_key => $layout){
|
@@ -1341,6 +1367,26 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
1341 |
|
1342 |
}
|
1343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1344 |
}
|
1345 |
|
1346 |
return $fields;
|
@@ -1416,6 +1462,13 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
1416 |
|
1417 |
}
|
1418 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1419 |
// Layouts: State
|
1420 |
if(!$field['acfe_flexible_modal_edition']){
|
1421 |
|
@@ -1768,6 +1821,9 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
1768 |
|
1769 |
// Title Edition
|
1770 |
$this->render_layout_title_edition($layout, $sub_fields, $value, $field, $prefix);
|
|
|
|
|
|
|
1771 |
|
1772 |
// Icons
|
1773 |
$this->render_layout_icons($layout, $field);
|
@@ -1869,6 +1925,76 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
1869 |
|
1870 |
}
|
1871 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1872 |
/**
|
1873 |
* Render Layout Icons
|
1874 |
*/
|
@@ -1916,7 +2042,7 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
1916 |
'title' => __('Edit layout', 'acfe'),
|
1917 |
);
|
1918 |
|
1919 |
-
if(!$field['acfe_flexible_modal_edition'] &&
|
1920 |
|
1921 |
$placeholder['class'] .= ' acf-hidden';
|
1922 |
|
@@ -2195,7 +2321,7 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
2195 |
function add_layout_div($div, $layout, $field){
|
2196 |
|
2197 |
// Class
|
2198 |
-
if($field['acfe_flexible_layouts_state'] === 'collapse' || $field['
|
2199 |
|
2200 |
$div['class'] .= ' -collapsed';
|
2201 |
|
@@ -2259,6 +2385,18 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
2259 |
$icons = array_merge($new_icons, $icons);
|
2260 |
|
2261 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2262 |
|
2263 |
// Remove: Action filter
|
2264 |
$remove_actions = false;
|
@@ -2360,6 +2498,51 @@ class acfe_field_flexible_content extends acf_field_flexible_content{
|
|
2360 |
|
2361 |
}
|
2362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2363 |
}
|
2364 |
|
2365 |
acf_register_field_type('acfe_field_flexible_content');
|
183 |
$this->add_field_filter('acfe/field_wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
184 |
$this->add_field_action('acf/render_field', array($this, 'render_field'), 9);
|
185 |
|
186 |
+
$this->add_field_filter('acf/load_value', array($this, 'load_value_toggle'), 10, 3);
|
187 |
+
|
188 |
// General Filters
|
189 |
$this->add_filter('acfe/flexible/layouts/icons', array($this, 'add_layout_icons'), 10, 3);
|
190 |
$this->add_filter('acfe/flexible/layouts/div', array($this, 'add_layout_div'), 10, 3);
|
204 |
*/
|
205 |
function render_field_settings($field){
|
206 |
|
|
|
207 |
// Advanced settings
|
208 |
acf_render_field_setting($field, array(
|
209 |
'label' => __('Advanced Flexible Content'),
|
552 |
)
|
553 |
)
|
554 |
));
|
555 |
+
|
556 |
+
// Layouts: Toggle
|
557 |
+
acf_render_field_setting($field, array(
|
558 |
+
'label' => __('Layouts: Toggle'),
|
559 |
+
'name' => 'acfe_flexible_toggle',
|
560 |
+
'key' => 'acfe_flexible_toggle',
|
561 |
+
'instructions' => __('Allow toggle layouts function'),
|
562 |
+
'type' => 'true_false',
|
563 |
+
'message' => '',
|
564 |
+
'default_value' => false,
|
565 |
+
'ui' => true,
|
566 |
+
'ui_on_text' => '',
|
567 |
+
'ui_off_text' => '',
|
568 |
+
'conditional_logic' => array(
|
569 |
+
array(
|
570 |
+
array(
|
571 |
+
'field' => 'acfe_flexible_advanced',
|
572 |
+
'operator' => '==',
|
573 |
+
'value' => '1',
|
574 |
+
),
|
575 |
+
)
|
576 |
+
)
|
577 |
+
));
|
578 |
|
579 |
// Layouts: Close Button
|
580 |
acf_render_field_setting($field, array(
|
1125 |
'acfe_flexible_title_edition' => 0,
|
1126 |
'acfe_flexible_clone' => 0,
|
1127 |
'acfe_flexible_copy_paste' => 0,
|
1128 |
+
'acfe_flexible_toggle' => 0,
|
1129 |
'acfe_flexible_close_button' => 0,
|
1130 |
'acfe_flexible_remove_add_button' => 0,
|
1131 |
'acfe_flexible_remove_delete_button' => 0,
|
1296 |
// settings
|
1297 |
$has_settings = acf_maybe_get($field, 'acfe_flexible_layouts_settings');
|
1298 |
$has_title_edition = acf_maybe_get($field, 'acfe_flexible_title_edition');
|
1299 |
+
$has_toggle = acf_maybe_get($field, 'acfe_flexible_toggle');
|
1300 |
|
1301 |
// check settings
|
1302 |
+
if(!$has_settings && !$has_title_edition && !$has_toggle)
|
1303 |
return $fields;
|
1304 |
|
1305 |
foreach($field['layouts'] as $layout_key => $layout){
|
1367 |
|
1368 |
}
|
1369 |
|
1370 |
+
// Toggle
|
1371 |
+
if($has_toggle){
|
1372 |
+
|
1373 |
+
acf_add_local_field(array(
|
1374 |
+
'label' => false,
|
1375 |
+
'key' => 'field_' . $layout['key'] . '_toggle',
|
1376 |
+
'name' => 'acfe_flexible_toggle',
|
1377 |
+
'type' => 'acfe_hidden',
|
1378 |
+
'required' => false,
|
1379 |
+
'default_value' => false,
|
1380 |
+
'parent_layout' => $layout['key'],
|
1381 |
+
'parent' => $field['key']
|
1382 |
+
));
|
1383 |
+
|
1384 |
+
$toggle = acf_get_field('field_' . $layout['key'] . '_toggle');
|
1385 |
+
|
1386 |
+
array_unshift($fields, $toggle);
|
1387 |
+
|
1388 |
+
}
|
1389 |
+
|
1390 |
}
|
1391 |
|
1392 |
return $fields;
|
1462 |
|
1463 |
}
|
1464 |
|
1465 |
+
// Layouts: Toggle
|
1466 |
+
if($field['acfe_flexible_toggle']){
|
1467 |
+
|
1468 |
+
$wrapper['data-acfe-flexible-toggle'] = 1;
|
1469 |
+
|
1470 |
+
}
|
1471 |
+
|
1472 |
// Layouts: State
|
1473 |
if(!$field['acfe_flexible_modal_edition']){
|
1474 |
|
1821 |
|
1822 |
// Title Edition
|
1823 |
$this->render_layout_title_edition($layout, $sub_fields, $value, $field, $prefix);
|
1824 |
+
|
1825 |
+
// Toggle
|
1826 |
+
$this->render_layout_toggle($layout, $sub_fields, $value, $field, $prefix);
|
1827 |
|
1828 |
// Icons
|
1829 |
$this->render_layout_icons($layout, $field);
|
1925 |
|
1926 |
}
|
1927 |
|
1928 |
+
/**
|
1929 |
+
* Render Toggle
|
1930 |
+
*/
|
1931 |
+
function render_layout_toggle($layout, &$sub_fields, $value, $field, $prefix){
|
1932 |
+
|
1933 |
+
if(!$field['acfe_flexible_toggle'])
|
1934 |
+
return false;
|
1935 |
+
|
1936 |
+
if(empty($sub_fields))
|
1937 |
+
return false;
|
1938 |
+
|
1939 |
+
$toggle_key = false;
|
1940 |
+
|
1941 |
+
foreach($sub_fields as $sub_key => $sub_field){
|
1942 |
+
|
1943 |
+
if($sub_field['name'] !== 'acfe_flexible_toggle')
|
1944 |
+
continue;
|
1945 |
+
|
1946 |
+
// Remove other potential duplicate
|
1947 |
+
if($toggle_key !== false){
|
1948 |
+
|
1949 |
+
unset($sub_fields[$sub_key]);
|
1950 |
+
|
1951 |
+
continue;
|
1952 |
+
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
$toggle_key = $sub_key;
|
1956 |
+
|
1957 |
+
}
|
1958 |
+
|
1959 |
+
if($toggle_key === false)
|
1960 |
+
return false;
|
1961 |
+
|
1962 |
+
// Extract
|
1963 |
+
$toggle = acf_extract_var($sub_fields, $toggle_key);
|
1964 |
+
|
1965 |
+
// Reset keys
|
1966 |
+
$sub_fields = array_values($sub_fields);
|
1967 |
+
|
1968 |
+
// add value
|
1969 |
+
if( isset($value[ $toggle['key'] ]) ) {
|
1970 |
+
|
1971 |
+
// this is a normal value
|
1972 |
+
$toggle['value'] = $value[ $toggle['key'] ];
|
1973 |
+
|
1974 |
+
}
|
1975 |
+
|
1976 |
+
// update prefix to allow for nested values
|
1977 |
+
$toggle['prefix'] = $prefix;
|
1978 |
+
|
1979 |
+
$toggle['class'] = 'acfe-flexible-layout-toggle';
|
1980 |
+
|
1981 |
+
$toggle = acf_validate_field($toggle);
|
1982 |
+
$toggle = acf_prepare_field($toggle);
|
1983 |
+
|
1984 |
+
$input_attrs = array();
|
1985 |
+
foreach(array('type', 'id', 'class', 'name', 'value') as $k){
|
1986 |
+
|
1987 |
+
if(isset($toggle[ $k ])){
|
1988 |
+
$input_attrs[ $k ] = $toggle[ $k ];
|
1989 |
+
}
|
1990 |
+
|
1991 |
+
}
|
1992 |
+
|
1993 |
+
// render input
|
1994 |
+
echo acf_get_hidden_input(acf_filter_attrs($input_attrs));
|
1995 |
+
|
1996 |
+
}
|
1997 |
+
|
1998 |
/**
|
1999 |
* Render Layout Icons
|
2000 |
*/
|
2042 |
'title' => __('Edit layout', 'acfe'),
|
2043 |
);
|
2044 |
|
2045 |
+
if(!$field['acfe_flexible_modal_edition'] && $field['acfe_flexible_layouts_state'] !== 'collapse'){
|
2046 |
|
2047 |
$placeholder['class'] .= ' acf-hidden';
|
2048 |
|
2321 |
function add_layout_div($div, $layout, $field){
|
2322 |
|
2323 |
// Class
|
2324 |
+
if($field['acfe_flexible_layouts_state'] === 'collapse' || $field['acfe_flexible_modal_edition']){
|
2325 |
|
2326 |
$div['class'] .= ' -collapsed';
|
2327 |
|
2385 |
$icons = array_merge($new_icons, $icons);
|
2386 |
|
2387 |
}
|
2388 |
+
|
2389 |
+
// Toggle
|
2390 |
+
if($field['acfe_flexible_toggle']){
|
2391 |
+
|
2392 |
+
// Clone
|
2393 |
+
$new_icons = array(
|
2394 |
+
'toggle' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-hidden" href="#" title="Toggle layout" data-acfe-flexible-control-toggle="' . $layout['name'] . '"></a>'
|
2395 |
+
);
|
2396 |
+
|
2397 |
+
$icons = array_merge($new_icons, $icons);
|
2398 |
+
|
2399 |
+
}
|
2400 |
|
2401 |
// Remove: Action filter
|
2402 |
$remove_actions = false;
|
2498 |
|
2499 |
}
|
2500 |
|
2501 |
+
/**
|
2502 |
+
* Load Value Toggle
|
2503 |
+
*/
|
2504 |
+
function load_value_toggle($value, $post_id, $field){
|
2505 |
+
|
2506 |
+
// Bail early if admin
|
2507 |
+
if(is_admin() && !wp_doing_ajax())
|
2508 |
+
return $value;
|
2509 |
+
|
2510 |
+
if(!acf_maybe_get($field, 'acfe_flexible_toggle'))
|
2511 |
+
return $value;
|
2512 |
+
|
2513 |
+
if(empty($field['layouts']))
|
2514 |
+
return $value;
|
2515 |
+
|
2516 |
+
$models = array();
|
2517 |
+
|
2518 |
+
foreach($field['layouts'] as $layout_key => $layout){
|
2519 |
+
|
2520 |
+
$models[$layout['name']] = array(
|
2521 |
+
'key' => $layout['key'],
|
2522 |
+
'name' => $layout['name'],
|
2523 |
+
'toggle' => 'field_' . $layout['key'] . '_toggle'
|
2524 |
+
);
|
2525 |
+
|
2526 |
+
}
|
2527 |
+
|
2528 |
+
$value = acf_get_array($value);
|
2529 |
+
|
2530 |
+
foreach($value as $k => $layout){
|
2531 |
+
|
2532 |
+
if(!isset($models[$layout['acf_fc_layout']]))
|
2533 |
+
continue;
|
2534 |
+
|
2535 |
+
if(!acf_maybe_get($layout, $models[$layout['acf_fc_layout']]['toggle']))
|
2536 |
+
continue;
|
2537 |
+
|
2538 |
+
unset($value[$k]);
|
2539 |
+
|
2540 |
+
}
|
2541 |
+
|
2542 |
+
return $value;
|
2543 |
+
|
2544 |
+
}
|
2545 |
+
|
2546 |
}
|
2547 |
|
2548 |
acf_register_field_type('acfe_field_flexible_content');
|
includes/fields/field-group.php
CHANGED
@@ -35,15 +35,6 @@ function acfe_field_group_settings($field){
|
|
35 |
'message' => '',
|
36 |
'default_value' => false,
|
37 |
'ui' => true,
|
38 |
-
'conditional_logic' => array(
|
39 |
-
array(
|
40 |
-
array(
|
41 |
-
'field' => 'display',
|
42 |
-
'operator' => '==',
|
43 |
-
'value' => 'group',
|
44 |
-
),
|
45 |
-
)
|
46 |
-
)
|
47 |
));
|
48 |
|
49 |
acf_render_field_setting($field, array(
|
@@ -57,11 +48,6 @@ function acfe_field_group_settings($field){
|
|
57 |
'ui' => true,
|
58 |
'conditional_logic' => array(
|
59 |
array(
|
60 |
-
array(
|
61 |
-
'field' => 'display',
|
62 |
-
'operator' => '==',
|
63 |
-
'value' => 'group',
|
64 |
-
),
|
65 |
array(
|
66 |
'field' => 'acfe_group_modal',
|
67 |
'operator' => '==',
|
@@ -80,11 +66,6 @@ function acfe_field_group_settings($field){
|
|
80 |
'placeholder' => __('Edit', 'acf'),
|
81 |
'conditional_logic' => array(
|
82 |
array(
|
83 |
-
array(
|
84 |
-
'field' => 'display',
|
85 |
-
'operator' => '==',
|
86 |
-
'value' => 'group',
|
87 |
-
),
|
88 |
array(
|
89 |
'field' => 'acfe_group_modal',
|
90 |
'operator' => '==',
|
@@ -109,11 +90,6 @@ function acfe_field_group_settings($field){
|
|
109 |
'default_value' => 'large',
|
110 |
'conditional_logic' => array(
|
111 |
array(
|
112 |
-
array(
|
113 |
-
'field' => 'display',
|
114 |
-
'operator' => '==',
|
115 |
-
'value' => 'group',
|
116 |
-
),
|
117 |
array(
|
118 |
'field' => 'acfe_group_modal',
|
119 |
'operator' => '==',
|
35 |
'message' => '',
|
36 |
'default_value' => false,
|
37 |
'ui' => true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
));
|
39 |
|
40 |
acf_render_field_setting($field, array(
|
48 |
'ui' => true,
|
49 |
'conditional_logic' => array(
|
50 |
array(
|
|
|
|
|
|
|
|
|
|
|
51 |
array(
|
52 |
'field' => 'acfe_group_modal',
|
53 |
'operator' => '==',
|
66 |
'placeholder' => __('Edit', 'acf'),
|
67 |
'conditional_logic' => array(
|
68 |
array(
|
|
|
|
|
|
|
|
|
|
|
69 |
array(
|
70 |
'field' => 'acfe_group_modal',
|
71 |
'operator' => '==',
|
90 |
'default_value' => 'large',
|
91 |
'conditional_logic' => array(
|
92 |
array(
|
|
|
|
|
|
|
|
|
|
|
93 |
array(
|
94 |
'field' => 'acfe_group_modal',
|
95 |
'operator' => '==',
|
includes/fields/field-image.php
CHANGED
@@ -74,11 +74,36 @@ function acfe_field_image_uploader_type($field){
|
|
74 |
add_filter('acf/update_value/type=image', 'acfe_thumbnail_update', 10, 3);
|
75 |
function acfe_thumbnail_update($value, $post_id, $field){
|
76 |
|
77 |
-
if(!
|
|
|
|
|
|
|
|
|
|
|
78 |
return $value;
|
79 |
|
80 |
update_post_meta($post_id, '_thumbnail_id', $value);
|
81 |
|
82 |
return $value;
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
74 |
add_filter('acf/update_value/type=image', 'acfe_thumbnail_update', 10, 3);
|
75 |
function acfe_thumbnail_update($value, $post_id, $field){
|
76 |
|
77 |
+
if(!acf_maybe_get($field, 'acfe_thumbnail'))
|
78 |
+
return $value;
|
79 |
+
|
80 |
+
$data = acf_get_post_id_info($post_id);
|
81 |
+
|
82 |
+
if($data['type'] !== 'post')
|
83 |
return $value;
|
84 |
|
85 |
update_post_meta($post_id, '_thumbnail_id', $value);
|
86 |
|
87 |
return $value;
|
88 |
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Field Load Update
|
93 |
+
*/
|
94 |
+
add_filter('acf/load_value/type=image', 'acfe_thumbnail_load', 10, 3);
|
95 |
+
function acfe_thumbnail_load($value, $post_id, $field){
|
96 |
+
|
97 |
+
if(!acf_maybe_get($field, 'acfe_thumbnail'))
|
98 |
+
return $value;
|
99 |
+
|
100 |
+
$data = acf_get_post_id_info($post_id);
|
101 |
+
|
102 |
+
if($data['type'] !== 'post')
|
103 |
+
return $value;
|
104 |
+
|
105 |
+
$value = get_post_meta($post_id, '_thumbnail_id', true);
|
106 |
+
|
107 |
+
return $value;
|
108 |
+
|
109 |
}
|
includes/fields/field-post-object.php
CHANGED
@@ -3,128 +3,211 @@
|
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
-
|
7 |
-
function acfe_field_post_object_settings($field){
|
8 |
-
|
9 |
-
// other_choice
|
10 |
-
acf_render_field_setting($field, array(
|
11 |
-
'label' => __('Allow Custom','acf'),
|
12 |
-
'instructions' => '',
|
13 |
-
'name' => 'allow_custom',
|
14 |
-
'type' => 'true_false',
|
15 |
-
'ui' => 1,
|
16 |
-
'message' => __("Allow 'custom' values to be added", 'acf'),
|
17 |
-
));
|
18 |
-
|
19 |
-
// save other_choice
|
20 |
-
acf_render_field_setting($field, array(
|
21 |
-
'label' => __('Save Custom','acf'),
|
22 |
-
'instructions' => '',
|
23 |
-
'name' => 'save_custom',
|
24 |
-
'type' => 'true_false',
|
25 |
-
'ui' => 1,
|
26 |
-
'message' => __("Save 'custom' values as new post", 'acf'),
|
27 |
-
'conditions' => array(
|
28 |
-
'field' => 'allow_custom',
|
29 |
-
'operator' => '==',
|
30 |
-
'value' => 1
|
31 |
-
)
|
32 |
-
));
|
33 |
-
|
34 |
-
// save post_type
|
35 |
-
acf_render_field_setting($field, array(
|
36 |
-
'label' => __('New Post Arguments','acf'),
|
37 |
-
'instructions' => '',
|
38 |
-
'name' => 'save_post_type',
|
39 |
-
'type' => 'acfe_post_types',
|
40 |
-
'field_type' => 'select',
|
41 |
-
'conditions' => array(
|
42 |
-
'field' => 'save_custom',
|
43 |
-
'operator' => '==',
|
44 |
-
'value' => 1
|
45 |
-
)
|
46 |
-
));
|
47 |
-
|
48 |
-
// save post_status
|
49 |
-
acf_render_field_setting($field, array(
|
50 |
-
'label' => '',
|
51 |
-
'instructions' => '',
|
52 |
-
'name' => 'save_post_status',
|
53 |
-
'type' => 'acfe_post_statuses',
|
54 |
-
'field_type' => 'select',
|
55 |
-
'conditions' => array(
|
56 |
-
'field' => 'save_custom',
|
57 |
-
'operator' => '==',
|
58 |
-
'value' => 1
|
59 |
-
),
|
60 |
-
'_append' => 'save_post_type'
|
61 |
-
));
|
62 |
-
|
63 |
-
}
|
64 |
|
65 |
-
|
66 |
-
function acfe_field_post_object_wrapper($wrapper, $field){
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
}
|
73 |
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
-
|
82 |
-
if(empty(acf_maybe_get($field, 'allow_custom')) || empty(acf_maybe_get($field, 'save_custom')))
|
83 |
-
return $value;
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
|
93 |
-
|
94 |
-
$value_post_type = $field['save_post_type'];
|
95 |
|
96 |
-
|
97 |
-
$
|
|
|
98 |
|
99 |
-
|
|
|
|
|
100 |
|
101 |
-
|
102 |
-
if(!empty($get_post))
|
103 |
-
return $get_post->ID;
|
104 |
|
105 |
-
|
106 |
-
$args = array(
|
107 |
-
'post_title' => $value,
|
108 |
-
'post_type' => $value_post_type,
|
109 |
-
'post_status' => $value_post_status,
|
110 |
-
);
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
-
|
118 |
-
|
119 |
|
120 |
-
if(empty($_post_id) || is_wp_error($_post_id))
|
121 |
return $value;
|
|
|
|
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
return $_post_id;
|
129 |
-
|
130 |
-
}
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
+
if(!class_exists('acfe_field_post_object')):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
+
class acfe_field_post_object{
|
|
|
9 |
|
10 |
+
function __construct(){
|
11 |
|
12 |
+
// Actions
|
13 |
+
add_action('acf/render_field_settings/type=post_object', array($this, 'field_settings'));
|
14 |
+
|
15 |
+
// Filters
|
16 |
+
add_filter('acfe/field_wrapper_attributes/type=post_object', array($this, 'field_wrapper'), 10, 2);
|
17 |
+
add_filter('acf/update_value/type=post_object', array($this, 'update_value'), 5, 3);
|
18 |
|
19 |
}
|
20 |
|
21 |
+
function field_settings($field){
|
22 |
+
|
23 |
+
// save custom value
|
24 |
+
acf_render_field_setting($field, array(
|
25 |
+
'label' => __('Allow & Save Custom value','acf'),
|
26 |
+
'instructions' => '',
|
27 |
+
'name' => 'save_custom',
|
28 |
+
'type' => 'true_false',
|
29 |
+
'ui' => 1,
|
30 |
+
'message' => __("Save 'custom' values as new post", 'acf'),
|
31 |
+
));
|
32 |
+
|
33 |
+
// save post_type
|
34 |
+
acf_render_field_setting($field, array(
|
35 |
+
'label' => __('New Post Arguments','acf'),
|
36 |
+
'instructions' => '',
|
37 |
+
'name' => 'save_post_type',
|
38 |
+
'type' => 'acfe_post_types',
|
39 |
+
'field_type' => 'select',
|
40 |
+
'conditional_logic' => array(
|
41 |
+
'field' => 'save_custom',
|
42 |
+
'operator' => '==',
|
43 |
+
'value' => 1
|
44 |
+
)
|
45 |
+
));
|
46 |
+
|
47 |
+
// save post_status
|
48 |
+
acf_render_field_setting($field, array(
|
49 |
+
'label' => '',
|
50 |
+
'instructions' => '',
|
51 |
+
'name' => 'save_post_status',
|
52 |
+
'type' => 'acfe_post_statuses',
|
53 |
+
'field_type' => 'select',
|
54 |
+
'conditional_logic' => array(
|
55 |
+
'field' => 'save_custom',
|
56 |
+
'operator' => '==',
|
57 |
+
'value' => 1
|
58 |
+
),
|
59 |
+
'_append' => 'save_post_type'
|
60 |
+
));
|
61 |
+
|
62 |
+
ob_start();
|
63 |
+
?>
|
64 |
+
You can change the New Post creation arguments using the following hook:<br /><br />
|
65 |
+
<pre>
|
66 |
+
add_filter('acfe/fields/post_object/custom_save_args/name=my_post_object', 'my_acf_post_object_new_post_args', 10, 4);
|
67 |
+
function my_acf_post_object_new_post_args($args, $title, $post_id, $field){
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @array $args New Post arguments
|
71 |
+
* @string $title Post title
|
72 |
+
* @bool/string $post_id Current Post ID
|
73 |
+
* @array $field Field array
|
74 |
+
*/
|
75 |
+
|
76 |
+
// Add custom Post Content
|
77 |
+
// See wp_insert_post(): https://developer.wordpress.org/reference/functions/wp_insert_post/
|
78 |
+
$args['post_content'] = 'My post content';
|
79 |
+
|
80 |
+
// Return false to stop post creation
|
81 |
+
// return false;
|
82 |
+
|
83 |
+
// Return
|
84 |
+
return $args;
|
85 |
+
|
86 |
}
|
87 |
+
</pre>
|
88 |
+
<br />
|
89 |
+
You can trigger a custom action after the New Post creation using the following hook:<br /><br />
|
90 |
+
<pre>
|
91 |
+
add_action('acfe/fields/post_object/custom_save/name=my_post_object', 'my_acf_post_object_new_post_action', 10, 4);
|
92 |
+
function my_acf_post_object_new_post_action($new_post_id, $title, $post_id, $field){
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @bool $new_post_id Newly created Post ID
|
96 |
+
* @string $title Post title
|
97 |
+
* @bool/string $post_id Current Post ID
|
98 |
+
* @array $field Field array
|
99 |
+
*/
|
100 |
+
|
101 |
+
// Do something...
|
102 |
+
// wp_mail();
|
103 |
|
104 |
+
}
|
105 |
+
</pre>
|
106 |
+
<?php
|
107 |
+
|
108 |
+
$message = ob_get_clean();
|
109 |
+
|
110 |
+
// ajax instructions
|
111 |
+
acf_render_field_setting($field, array(
|
112 |
+
'label' => __('New Post Instructions','acf'),
|
113 |
+
'instructions' => '',
|
114 |
+
'type' => 'message',
|
115 |
+
'name' => 'instructions',
|
116 |
+
'message' => $message,
|
117 |
+
'new_lines' => false,
|
118 |
+
'conditional_logic' => array(
|
119 |
+
array(
|
120 |
+
array(
|
121 |
+
'field' => 'save_custom',
|
122 |
+
'operator' => '==',
|
123 |
+
'value' => 1,
|
124 |
+
)
|
125 |
+
)
|
126 |
+
)
|
127 |
+
));
|
128 |
+
|
129 |
+
}
|
130 |
|
131 |
+
function field_wrapper($wrapper, $field){
|
|
|
|
|
132 |
|
133 |
+
if(acf_maybe_get($field, 'save_custom')){
|
134 |
+
|
135 |
+
$wrapper['data-acfe-allow-custom'] = 1;
|
136 |
+
|
137 |
+
}
|
138 |
|
139 |
+
return $wrapper;
|
140 |
+
|
141 |
+
}
|
142 |
|
143 |
+
function update_value($value, $post_id, $field){
|
|
|
144 |
|
145 |
+
// Save custom value
|
146 |
+
if(empty($value) || !acf_maybe_get($field, 'save_custom'))
|
147 |
+
return $value;
|
148 |
|
149 |
+
// New Post Args
|
150 |
+
$post_type = acf_maybe_get($field, 'save_post_type', 'post');
|
151 |
+
$post_status = acf_maybe_get($field, 'save_post_status', 'publish');
|
152 |
|
153 |
+
$is_array = is_array($value) ? true : false;
|
|
|
|
|
154 |
|
155 |
+
$value = acf_array($value);
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
+
foreach($value as $k => $v){
|
158 |
+
|
159 |
+
if(is_numeric($v))
|
160 |
+
continue;
|
161 |
+
|
162 |
+
$title = $v;
|
163 |
+
|
164 |
+
// Create new post
|
165 |
+
$args = array(
|
166 |
+
'post_title' => $title,
|
167 |
+
'post_type' => $post_type,
|
168 |
+
'post_status' => $post_status,
|
169 |
+
);
|
170 |
+
|
171 |
+
// Allow filters
|
172 |
+
$args = apply_filters('acfe/fields/post_object/custom_save_args', $args, $title, $post_id, $field);
|
173 |
+
$args = apply_filters('acfe/fields/post_object/custom_save_args/name=' . $field['name'], $args, $title, $post_id, $field);
|
174 |
+
$args = apply_filters('acfe/fields/post_object/custom_save_args/key=' . $field['key'], $args, $title, $post_id, $field);
|
175 |
+
|
176 |
+
if($args === false){
|
177 |
+
|
178 |
+
unset($value[$k]);
|
179 |
+
continue;
|
180 |
+
|
181 |
+
}
|
182 |
+
|
183 |
+
// Insert post
|
184 |
+
$_post_id = wp_insert_post($args);
|
185 |
+
|
186 |
+
if(empty($_post_id) || is_wp_error($_post_id)){
|
187 |
+
|
188 |
+
unset($value[$k]);
|
189 |
+
continue;
|
190 |
+
|
191 |
+
}
|
192 |
+
|
193 |
+
// Allow actions after insert
|
194 |
+
do_action('acfe/fields/post_object/custom_save', $_post_id, $title, $post_id, $field);
|
195 |
+
do_action('acfe/fields/post_object/custom_save/name=' . $field['name'], $_post_id, $title, $post_id, $field);
|
196 |
+
do_action('acfe/fields/post_object/custom_save/key=' . $field['key'], $_post_id, $title, $post_id, $field);
|
197 |
+
|
198 |
+
$value[$k] = $_post_id;
|
199 |
+
|
200 |
+
}
|
201 |
|
202 |
+
if(!$is_array)
|
203 |
+
$value = acf_unarray($value);
|
204 |
|
|
|
205 |
return $value;
|
206 |
+
|
207 |
+
}
|
208 |
|
209 |
+
}
|
210 |
+
|
211 |
+
new acfe_field_post_object();
|
212 |
+
|
213 |
+
endif;
|
|
|
|
|
|
includes/fields/field-taxonomy-terms.php
CHANGED
@@ -48,26 +48,6 @@ class acfe_field_taxonomy_terms extends acf_field{
|
|
48 |
|
49 |
}
|
50 |
|
51 |
-
function ajax_query(){
|
52 |
-
|
53 |
-
// validate
|
54 |
-
if(!acf_verify_ajax())
|
55 |
-
die();
|
56 |
-
|
57 |
-
// get choices
|
58 |
-
$response = $this->get_ajax_query($_POST);
|
59 |
-
|
60 |
-
// return
|
61 |
-
acf_send_ajax_results($response);
|
62 |
-
|
63 |
-
}
|
64 |
-
|
65 |
-
function get_ajax_query($options = array()){
|
66 |
-
|
67 |
-
//acf_log($options);
|
68 |
-
|
69 |
-
}
|
70 |
-
|
71 |
function ajax_query_allowed_terms(){
|
72 |
|
73 |
// validate
|
@@ -94,10 +74,10 @@ class acfe_field_taxonomy_terms extends acf_field{
|
|
94 |
'level' => false,
|
95 |
));
|
96 |
|
97 |
-
//
|
98 |
-
$
|
99 |
-
|
100 |
-
|
101 |
|
102 |
if($options['level'] >= 1){
|
103 |
|
@@ -201,195 +181,362 @@ class acfe_field_taxonomy_terms extends acf_field{
|
|
201 |
|
202 |
}
|
203 |
|
204 |
-
function
|
205 |
|
206 |
// Allow Terms
|
207 |
$choices = array();
|
208 |
|
|
|
209 |
$taxonomies = acf_get_taxonomy_labels(acf_get_array($field['taxonomy']));
|
210 |
|
211 |
-
$
|
212 |
-
'taxonomy' => array_keys($taxonomies),
|
213 |
-
'hide_empty' => false,
|
214 |
-
));
|
215 |
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
$level = acfe_get_term_level($_term->term_id, $_term->taxonomy);
|
221 |
$_term->level = $level;
|
222 |
-
|
223 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
-
|
226 |
|
227 |
-
|
|
|
|
|
228 |
|
229 |
-
foreach($field['allow_terms'] as $id){
|
230 |
-
|
231 |
-
// All terms
|
232 |
-
if(acfe_starts_with($id, 'all_')){
|
233 |
-
|
234 |
-
$taxonomy = substr($id, 4);
|
235 |
-
|
236 |
-
$level = false;
|
237 |
-
|
238 |
-
if(stripos($taxonomy, '|') !== false){
|
239 |
-
|
240 |
-
$level = explode('|', $taxonomy);
|
241 |
-
$taxonomy = $level[0];
|
242 |
-
$level = $level[1];
|
243 |
-
|
244 |
-
}
|
245 |
-
|
246 |
-
if(!empty($field['taxonomy']) && !in_array($taxonomy, acf_array($field['taxonomy'])))
|
247 |
-
continue;
|
248 |
-
|
249 |
-
$keep = array();
|
250 |
-
|
251 |
-
if($level){
|
252 |
-
|
253 |
-
foreach($all_terms as $all_term){
|
254 |
-
|
255 |
-
if((int) $all_term->level !== (int) $level || $all_term->taxonomy !== $taxonomy)
|
256 |
-
continue;
|
257 |
-
|
258 |
-
$keep[] = $all_term->term_id;
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
}else{
|
263 |
-
|
264 |
-
foreach($all_terms as $all_term){
|
265 |
-
|
266 |
-
if($all_term->taxonomy !== $taxonomy)
|
267 |
-
continue;
|
268 |
-
|
269 |
-
$keep[] = $all_term->term_id;
|
270 |
-
|
271 |
-
}
|
272 |
-
|
273 |
-
}
|
274 |
-
|
275 |
-
$terms = array_merge($terms, acf_array($keep));
|
276 |
-
|
277 |
}
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
if(!empty($field['taxonomy']) && !in_array($taxonomy, acf_array($field['taxonomy'])))
|
287 |
-
continue;
|
288 |
-
|
289 |
-
$keep = array();
|
290 |
-
|
291 |
foreach($all_terms as $all_term){
|
292 |
-
|
293 |
-
if((int) $all_term->
|
294 |
continue;
|
295 |
-
|
296 |
-
$keep[] = $all_term
|
297 |
-
|
298 |
}
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
|
304 |
-
|
305 |
-
|
306 |
|
307 |
-
|
308 |
-
$taxonomy = $term->taxonomy;
|
309 |
-
|
310 |
-
if(!empty($field['taxonomy']) && !in_array($taxonomy, acf_array($field['taxonomy'])))
|
311 |
-
continue;
|
312 |
-
|
313 |
-
$keep = array();
|
314 |
-
$keep[] = $term->term_id;
|
315 |
-
|
316 |
-
$terms = array_merge($terms, acf_array($keep));
|
317 |
|
|
|
|
|
318 |
}
|
319 |
-
|
|
|
|
|
320 |
}
|
321 |
-
|
322 |
-
|
|
|
323 |
|
324 |
-
|
325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
|
327 |
-
|
|
|
|
|
|
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
}
|
330 |
|
331 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
|
339 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
|
341 |
}
|
342 |
|
343 |
}
|
344 |
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
|
347 |
}
|
348 |
|
349 |
function prepare_field($field){
|
350 |
|
351 |
-
//
|
352 |
-
$
|
353 |
-
|
354 |
-
// Allow Custom
|
355 |
-
if(acf_maybe_get($field, 'allow_custom')){
|
356 |
-
|
357 |
-
if($value = acf_maybe_get($field, 'value')){
|
358 |
-
|
359 |
-
$value = acf_get_array($value);
|
360 |
-
|
361 |
-
foreach($value as $v){
|
362 |
-
|
363 |
-
$found = false;
|
364 |
-
|
365 |
-
foreach($field['choices'] as $taxonomy => $term){
|
366 |
-
|
367 |
-
if(isset($term[$v])){
|
368 |
-
|
369 |
-
$found = true;
|
370 |
-
break;
|
371 |
-
|
372 |
-
}
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
if(!$found)
|
377 |
-
$field['choices'][$v] = $v;
|
378 |
-
|
379 |
-
}
|
380 |
-
|
381 |
-
}
|
382 |
-
|
383 |
-
}
|
384 |
|
385 |
-
//
|
386 |
-
$field['
|
387 |
|
388 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
|
390 |
$field['ajax_action'] = 'acf/fields/acfe_taxonomy_terms/query';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
|
392 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
|
394 |
return $field;
|
395 |
|
48 |
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
function ajax_query_allowed_terms(){
|
52 |
|
53 |
// validate
|
74 |
'level' => false,
|
75 |
));
|
76 |
|
77 |
+
// Get grouped terms
|
78 |
+
$terms = acf_get_grouped_terms(array(
|
79 |
+
'taxonomy' => $options['taxonomies']
|
80 |
+
));
|
81 |
|
82 |
if($options['level'] >= 1){
|
83 |
|
181 |
|
182 |
}
|
183 |
|
184 |
+
function get_terms($field, $args = array()){
|
185 |
|
186 |
// Allow Terms
|
187 |
$choices = array();
|
188 |
|
189 |
+
// Get allowed taxonomies
|
190 |
$taxonomies = acf_get_taxonomy_labels(acf_get_array($field['taxonomy']));
|
191 |
|
192 |
+
$args['taxonomy'] = array_keys($taxonomies);
|
|
|
|
|
|
|
193 |
|
194 |
+
// Get terms
|
195 |
+
$all_terms = acf_get_terms($args);
|
196 |
+
|
197 |
+
if(empty($all_terms))
|
198 |
+
return $choices;
|
199 |
+
|
200 |
+
$choices = $this->filter_terms($all_terms, $field);
|
201 |
+
|
202 |
+
return $choices;
|
203 |
+
|
204 |
+
}
|
205 |
+
|
206 |
+
function filter_terms($all_terms, $field){
|
207 |
+
|
208 |
+
if(empty($field['taxonomy']) && empty($field['allow_terms'])){
|
209 |
+
|
210 |
+
$terms = wp_list_pluck($all_terms, 'term_id');
|
211 |
+
|
212 |
+
$terms = array_unique($terms);
|
213 |
+
|
214 |
+
$choices = $this->convert_terms_to_choices($terms);
|
215 |
+
|
216 |
+
return $choices;
|
217 |
|
218 |
+
}
|
219 |
+
|
220 |
+
$terms = array();
|
221 |
+
|
222 |
+
// Filter taxonomy terms
|
223 |
+
if(!empty($field['taxonomy'])){
|
224 |
+
|
225 |
+
$allowed_tax_terms = array();
|
226 |
+
|
227 |
+
foreach($all_terms as $term){
|
228 |
|
229 |
+
if(!in_array($term->taxonomy, $field['taxonomy']))
|
230 |
+
continue;
|
231 |
+
|
232 |
+
$allowed_tax_terms[] = $term;
|
233 |
+
|
234 |
+
}
|
235 |
+
|
236 |
+
$all_terms = $allowed_tax_terms;
|
237 |
+
|
238 |
+
}
|
239 |
+
|
240 |
+
if(empty($field['allow_terms'])){
|
241 |
+
|
242 |
+
$terms = $all_terms;
|
243 |
+
|
244 |
+
// Filter allowed terms
|
245 |
+
}else{
|
246 |
+
|
247 |
+
// Add term level
|
248 |
+
foreach($all_terms as $term_id => &$_term){
|
249 |
+
|
250 |
$level = acfe_get_term_level($_term->term_id, $_term->taxonomy);
|
251 |
$_term->level = $level;
|
252 |
+
|
253 |
}
|
254 |
+
|
255 |
+
foreach($field['allow_terms'] as $id){
|
256 |
+
|
257 |
+
// All terms
|
258 |
+
if(acfe_starts_with($id, 'all_')){
|
259 |
+
|
260 |
+
$taxonomy = substr($id, 4);
|
261 |
+
|
262 |
+
$level = false;
|
263 |
|
264 |
+
if(stripos($taxonomy, '|') !== false){
|
265 |
|
266 |
+
$level = explode('|', $taxonomy);
|
267 |
+
$taxonomy = $level[0];
|
268 |
+
$level = $level[1];
|
269 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
271 |
+
|
272 |
+
if(!empty($field['taxonomy']) && !in_array($taxonomy, acf_array($field['taxonomy'])))
|
273 |
+
continue;
|
274 |
+
|
275 |
+
$keep = array();
|
276 |
+
|
277 |
+
if($level){
|
278 |
+
|
|
|
|
|
|
|
|
|
|
|
279 |
foreach($all_terms as $all_term){
|
280 |
+
|
281 |
+
if((int) $all_term->level !== (int) $level || $all_term->taxonomy !== $taxonomy)
|
282 |
continue;
|
283 |
+
|
284 |
+
$keep[] = $all_term;
|
285 |
+
|
286 |
}
|
287 |
+
|
288 |
+
}else{
|
289 |
+
|
290 |
+
foreach($all_terms as $all_term){
|
291 |
|
292 |
+
if($all_term->taxonomy !== $taxonomy)
|
293 |
+
continue;
|
294 |
|
295 |
+
$keep[] = $all_term;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
+
}
|
298 |
+
|
299 |
}
|
300 |
+
|
301 |
+
$terms = array_merge($terms, acf_array($keep));
|
302 |
+
|
303 |
}
|
304 |
+
|
305 |
+
// Terms childs
|
306 |
+
elseif(acfe_ends_with($id, '_childs')){
|
307 |
|
308 |
+
$term_id = substr($id, 0, -7);
|
309 |
+
$term = get_term($term_id);
|
310 |
+
$taxonomy = $term->taxonomy;
|
311 |
+
|
312 |
+
if(!empty($field['taxonomy']) && !in_array($taxonomy, acf_array($field['taxonomy'])))
|
313 |
+
continue;
|
314 |
+
|
315 |
+
$keep = array();
|
316 |
+
|
317 |
+
foreach($all_terms as $all_term){
|
318 |
|
319 |
+
if((int) $all_term->parent !== (int) $term_id || $all_term->taxonomy !== $taxonomy)
|
320 |
+
continue;
|
321 |
+
|
322 |
+
$keep[] = $all_term;
|
323 |
|
324 |
+
}
|
325 |
+
|
326 |
+
$terms = array_merge($terms, acf_array($keep));
|
327 |
+
|
328 |
+
}
|
329 |
+
|
330 |
+
// Term
|
331 |
+
else{
|
332 |
+
|
333 |
+
$term = get_term($id);
|
334 |
+
$taxonomy = $term->taxonomy;
|
335 |
+
|
336 |
+
if(!empty($field['taxonomy']) && !in_array($taxonomy, acf_array($field['taxonomy'])))
|
337 |
+
continue;
|
338 |
+
|
339 |
+
$keep = array();
|
340 |
+
$keep[] = $term;
|
341 |
+
|
342 |
+
$terms = array_merge($terms, acf_array($keep));
|
343 |
+
|
344 |
+
}
|
345 |
+
|
346 |
}
|
347 |
|
348 |
+
}
|
349 |
+
|
350 |
+
$terms = wp_list_pluck($terms, 'term_id');
|
351 |
+
|
352 |
+
$terms = array_unique($terms);
|
353 |
+
|
354 |
+
$choices = $this->convert_terms_to_choices($terms);
|
355 |
+
|
356 |
+
return $choices;
|
357 |
+
|
358 |
+
}
|
359 |
+
|
360 |
+
function convert_terms_to_choices($terms = array()){
|
361 |
+
|
362 |
+
$choices = array();
|
363 |
+
|
364 |
+
if(!empty($terms)){
|
365 |
|
366 |
+
$terms = acf_get_grouped_terms(array(
|
367 |
+
'include' => $terms
|
368 |
+
));
|
369 |
+
|
370 |
+
$choices = acf_get_choices_from_grouped_terms($terms, 'name');
|
371 |
+
|
372 |
+
}
|
373 |
+
|
374 |
+
return $choices;
|
375 |
+
|
376 |
+
}
|
377 |
+
|
378 |
+
function ajax_query(){
|
379 |
+
|
380 |
+
// validate
|
381 |
+
if(!acf_verify_ajax())
|
382 |
+
die();
|
383 |
+
|
384 |
+
// get choices
|
385 |
+
$response = $this->get_ajax_query($_POST);
|
386 |
+
|
387 |
+
// return
|
388 |
+
acf_send_ajax_results($response);
|
389 |
+
|
390 |
+
}
|
391 |
+
|
392 |
+
function get_ajax_query($options = array()){
|
393 |
+
|
394 |
+
// defaults
|
395 |
+
$options = acf_parse_args($options, array(
|
396 |
+
'post_id' => 0,
|
397 |
+
's' => '',
|
398 |
+
'field_key' => '',
|
399 |
+
'paged' => 0
|
400 |
+
));
|
401 |
+
|
402 |
+
// load field
|
403 |
+
$field = acf_get_field($options['field_key']);
|
404 |
+
|
405 |
+
if(!$field)
|
406 |
+
return false;
|
407 |
+
|
408 |
+
// Args
|
409 |
+
$args = array();
|
410 |
+
|
411 |
+
// vars
|
412 |
+
$results = array();
|
413 |
+
|
414 |
+
// search
|
415 |
+
if($options['s'] !== '') {
|
416 |
+
|
417 |
+
// strip slashes (search may be integer)
|
418 |
+
$s = wp_unslash(strval($options['s']));
|
419 |
+
|
420 |
+
// update vars
|
421 |
+
$args['search'] = $s;
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
$terms = $this->get_terms($field, $args);
|
426 |
+
|
427 |
+
if(!empty($terms)){
|
428 |
+
|
429 |
+
foreach($terms as $taxonomy => $term){
|
430 |
+
|
431 |
+
$data = array(
|
432 |
+
'text' => $taxonomy,
|
433 |
+
'children' => array()
|
434 |
+
);
|
435 |
|
436 |
+
foreach($term as $term_id => $term_name){
|
437 |
+
|
438 |
+
$data['children'][] = array(
|
439 |
+
'id' => $term_id,
|
440 |
+
'text' => $term_name
|
441 |
+
);
|
442 |
+
|
443 |
+
}
|
444 |
+
|
445 |
+
$results[] = $data;
|
446 |
|
447 |
}
|
448 |
|
449 |
}
|
450 |
|
451 |
+
// vars
|
452 |
+
$response = array(
|
453 |
+
'results' => $results
|
454 |
+
);
|
455 |
+
|
456 |
+
// return
|
457 |
+
return $response;
|
458 |
|
459 |
}
|
460 |
|
461 |
function prepare_field($field){
|
462 |
|
463 |
+
// Value
|
464 |
+
$value = acf_maybe_get($field, 'value');
|
465 |
+
$value = acf_get_array($value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
|
467 |
+
// Choices
|
468 |
+
$field['choices'] = array();
|
469 |
|
470 |
+
// Allow custom
|
471 |
+
$allow_custom = acf_maybe_get($field, 'allow_custom');
|
472 |
+
|
473 |
+
// Field Type
|
474 |
+
$field['type'] = $field['field_type'];
|
475 |
+
|
476 |
+
// Normal choices
|
477 |
+
if($field['type'] !== 'select' || !$field['ui'] || !$field['ajax']){
|
478 |
+
|
479 |
+
$field['choices'] = $this->get_terms($field);
|
480 |
+
|
481 |
+
// Ajax choices
|
482 |
+
}else{
|
483 |
|
484 |
$field['ajax_action'] = 'acf/fields/acfe_taxonomy_terms/query';
|
485 |
+
|
486 |
+
$all_terms = array();
|
487 |
+
$terms = array_unique($value);
|
488 |
+
|
489 |
+
foreach($terms as $term_id){
|
490 |
+
|
491 |
+
$term = get_term($term_id);
|
492 |
+
|
493 |
+
if(!is_a($term, 'WP_Term'))
|
494 |
+
continue;
|
495 |
+
|
496 |
+
$all_terms[] = $term;
|
497 |
+
|
498 |
+
}
|
499 |
+
|
500 |
+
if(!empty($all_terms)){
|
501 |
+
|
502 |
+
$terms = $this->filter_terms($all_terms, $field);
|
503 |
+
|
504 |
+
foreach($terms as $taxonomy => $term){
|
505 |
+
foreach($term as $term_id => $term_name){
|
506 |
+
|
507 |
+
$field['choices'][$term_id] = $term_name;
|
508 |
+
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
}
|
513 |
|
514 |
}
|
515 |
+
|
516 |
+
// Allow Custom
|
517 |
+
if($allow_custom){
|
518 |
+
|
519 |
+
foreach($value as $v){
|
520 |
+
|
521 |
+
$found = false;
|
522 |
+
|
523 |
+
foreach($field['choices'] as $taxonomy => $term){
|
524 |
+
|
525 |
+
if(isset($term[$v])){
|
526 |
+
|
527 |
+
$found = true;
|
528 |
+
break;
|
529 |
+
|
530 |
+
}
|
531 |
+
|
532 |
+
}
|
533 |
+
|
534 |
+
if(!$found)
|
535 |
+
$field['choices'][$v] = $v;
|
536 |
+
|
537 |
+
}
|
538 |
+
|
539 |
+
}
|
540 |
|
541 |
return $field;
|
542 |
|
includes/locations/post-type-archive.php
CHANGED
@@ -1,173 +1,197 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
if(!class_exists('acfe_location_post_type_archive')):
|
7 |
-
|
8 |
-
class acfe_location_post_type_archive{
|
9 |
-
|
10 |
-
public $post_type = '';
|
11 |
-
public $post_types = array();
|
12 |
-
|
13 |
-
function __construct(){
|
14 |
-
|
15 |
-
add_action('init', array($this, 'init'), 99);
|
16 |
-
add_action('current_screen', array($this, 'current_screen'));
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
add_filter('acf/
|
21 |
-
|
22 |
-
add_filter('acf/location/
|
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 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
$
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
endif;
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_location_post_type_archive')):
|
7 |
+
|
8 |
+
class acfe_location_post_type_archive{
|
9 |
+
|
10 |
+
public $post_type = '';
|
11 |
+
public $post_types = array();
|
12 |
+
|
13 |
+
function __construct(){
|
14 |
+
|
15 |
+
add_action('init', array($this, 'init'), 99);
|
16 |
+
add_action('current_screen', array($this, 'current_screen'));
|
17 |
+
|
18 |
+
add_action('admin_bar_menu', array($this, 'admin_bar'), 90);
|
19 |
+
|
20 |
+
add_filter('acf/get_options_pages', array($this, 'get_options_pages'));
|
21 |
+
|
22 |
+
add_filter('acf/location/rule_types', array($this, 'location_types'));
|
23 |
+
add_filter('acf/location/rule_values/post_type_archive', array($this, 'location_values'));
|
24 |
+
add_filter('acf/location/rule_match/post_type_archive', array($this, 'location_match'), 10, 3);
|
25 |
+
|
26 |
+
}
|
27 |
+
|
28 |
+
function init(){
|
29 |
+
|
30 |
+
$post_types = acfe_get_post_type_objects(array(
|
31 |
+
'acfe_admin_archive' => true
|
32 |
+
));
|
33 |
+
|
34 |
+
if(empty($post_types))
|
35 |
+
return;
|
36 |
+
|
37 |
+
foreach($post_types as $name => $object){
|
38 |
+
|
39 |
+
$parent_slug = 'edit.php?post_type=' . $name;
|
40 |
+
|
41 |
+
// Post Type: Post
|
42 |
+
if($name === 'post')
|
43 |
+
$parent_slug = 'edit.php';
|
44 |
+
|
45 |
+
acf_add_options_page(array(
|
46 |
+
'page_title' => $object->label . ' ' . __('Archive'),
|
47 |
+
'menu_title' => __('Archive'),
|
48 |
+
'menu_slug' => $name . '-archive',
|
49 |
+
'post_id' => $name . '_archive',
|
50 |
+
'capability' => acf_get_setting('capability'),
|
51 |
+
'redirect' => false,
|
52 |
+
'parent_slug' => $parent_slug,
|
53 |
+
'updated_message' => $object->label . ' Archive Saved.',
|
54 |
+
'acfe_post_type_archive' => true
|
55 |
+
));
|
56 |
+
|
57 |
+
$this->post_types[] = $name;
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
function current_screen($screen){
|
64 |
+
|
65 |
+
foreach($this->post_types as $post_type){
|
66 |
+
|
67 |
+
if(!acf_is_screen("{$post_type}_page_{$post_type}-archive"))
|
68 |
+
continue;
|
69 |
+
|
70 |
+
$post_type_obj = get_post_type_object($post_type);
|
71 |
+
|
72 |
+
if(!isset($post_type_obj->has_archive) || empty($post_type_obj->has_archive))
|
73 |
+
break;
|
74 |
+
|
75 |
+
$this->post_type = $post_type;
|
76 |
+
|
77 |
+
add_action('admin_footer', array($this, 'admin_footer'));
|
78 |
+
|
79 |
+
break;
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
function admin_footer(){
|
86 |
+
|
87 |
+
?>
|
88 |
+
<div id="tmpl-acf-after-title">
|
89 |
+
<div style="margin-top:7px;">
|
90 |
+
<strong><?php _e('Permalink:'); ?></strong> <span><a href="<?php echo get_post_type_archive_link($this->post_type); ?>" target="_blank"><?php echo get_post_type_archive_link($this->post_type); ?></a></span>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
<script type="text/javascript">
|
94 |
+
(function($){
|
95 |
+
|
96 |
+
// add after title
|
97 |
+
$('.acf-settings-wrap > h1').after($('#tmpl-acf-after-title'));
|
98 |
+
|
99 |
+
})(jQuery);
|
100 |
+
</script>
|
101 |
+
<?php
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
function admin_bar($wp_admin_bar){
|
106 |
+
|
107 |
+
if(is_admin() || !is_post_type_archive())
|
108 |
+
return;
|
109 |
+
|
110 |
+
$post_type_obj = get_post_type_object(get_post_type());
|
111 |
+
|
112 |
+
if(!isset($post_type_obj->has_archive) || empty($post_type_obj->has_archive))
|
113 |
+
return;
|
114 |
+
|
115 |
+
$wp_admin_bar->add_node(array(
|
116 |
+
'id' => 'edit',
|
117 |
+
'title' => 'Edit ' . $post_type_obj->label . ' ' . __('Archive'),
|
118 |
+
'parent' => false,
|
119 |
+
'href' => add_query_arg(array('post_type' => $post_type_obj->name, 'page' => $post_type_obj->name . '-archive'), admin_url('edit.php')),
|
120 |
+
'meta' => array('class' => 'ab-item')
|
121 |
+
));
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
function get_options_pages($pages){
|
126 |
+
|
127 |
+
// Bail early if screen is not Field Group configuration & Ajax Calls
|
128 |
+
if(!acfe_is_admin_screen() && !wp_doing_ajax())
|
129 |
+
return $pages;
|
130 |
+
|
131 |
+
foreach($pages as $page => $args){
|
132 |
+
|
133 |
+
if(!acf_maybe_get($args, 'acfe_post_type_archive'))
|
134 |
+
continue;
|
135 |
+
|
136 |
+
// Unset option page
|
137 |
+
unset($pages[$page]);
|
138 |
+
|
139 |
+
}
|
140 |
+
|
141 |
+
return $pages;
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
function location_types($choices){
|
146 |
+
|
147 |
+
$name = __('Post', 'acf');
|
148 |
+
|
149 |
+
$choices[$name] = acfe_array_insert_after('post_type', $choices[$name], 'post_type_archive', __('Post Type Archive'));
|
150 |
+
|
151 |
+
return $choices;
|
152 |
+
|
153 |
+
}
|
154 |
+
|
155 |
+
function location_values($choices){
|
156 |
+
|
157 |
+
$post_types = acf_get_post_types(array(
|
158 |
+
'acfe_admin_archive' => true
|
159 |
+
));
|
160 |
+
|
161 |
+
$pretty_post_types = array();
|
162 |
+
|
163 |
+
if(!empty($post_types)){
|
164 |
+
|
165 |
+
$pretty_post_types = acf_get_pretty_post_types($post_types);
|
166 |
+
|
167 |
+
}
|
168 |
+
|
169 |
+
$choices = array('all' => __('All', 'acf'));
|
170 |
+
$choices = array_merge($choices, $pretty_post_types);
|
171 |
+
|
172 |
+
return $choices;
|
173 |
+
|
174 |
+
}
|
175 |
+
|
176 |
+
function location_match($match, $rule, $screen){
|
177 |
+
|
178 |
+
if(!acf_maybe_get($screen, 'options_page') || !acf_maybe_get($rule, 'value'))
|
179 |
+
return $match;
|
180 |
+
|
181 |
+
$match = ($screen['options_page'] === $rule['value'] . '-archive');
|
182 |
+
|
183 |
+
if($rule['value'] === 'all')
|
184 |
+
$match = true;
|
185 |
+
|
186 |
+
if($rule['operator'] === '!=')
|
187 |
+
$match = !$match;
|
188 |
+
|
189 |
+
return $match;
|
190 |
+
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
new acfe_location_post_type_archive();
|
196 |
+
|
197 |
endif;
|
includes/modules/dev.php
CHANGED
@@ -339,8 +339,18 @@ class acfe_dev{
|
|
339 |
|
340 |
$return = '';
|
341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
// Serialized
|
343 |
-
|
344 |
|
345 |
$return = '<pre style="max-height:200px; overflow:auto; white-space: pre;">' . print_r(maybe_unserialize($value), true) . '</pre>';
|
346 |
$return .= '<pre style="max-height:200px; overflow:auto; white-space: pre; margin-top:10px;">' . print_r($value, true) . '</pre>';
|
@@ -365,16 +375,7 @@ class acfe_dev{
|
|
365 |
// String
|
366 |
else{
|
367 |
|
368 |
-
$
|
369 |
-
|
370 |
-
if(empty($value)){
|
371 |
-
|
372 |
-
$css = 'color:#aaa;';
|
373 |
-
$value = '(' . __('empty', 'acf') . ')';
|
374 |
-
|
375 |
-
}
|
376 |
-
|
377 |
-
$return = '<pre style="max-height:200px; overflow:auto; white-space: pre; ' . $css . '">' . print_r($value, true) . '</pre>';
|
378 |
|
379 |
}
|
380 |
|
@@ -504,36 +505,63 @@ class acfe_dev{
|
|
504 |
$field_type_display = false;
|
505 |
$field_group_display = false;
|
506 |
|
|
|
|
|
507 |
// Value = field_abcde123456?
|
508 |
-
if(acf_is_field_key($
|
509 |
|
510 |
-
$field = acf_get_field($
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
|
512 |
-
|
513 |
-
$field_type_display = '<em>Undefined</em>';
|
514 |
|
515 |
-
|
516 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
|
518 |
-
|
519 |
-
|
|
|
|
|
520 |
|
521 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
|
523 |
-
|
524 |
|
525 |
-
|
526 |
|
527 |
-
|
528 |
|
529 |
-
|
530 |
|
531 |
-
|
532 |
|
533 |
-
|
534 |
|
535 |
-
|
536 |
|
|
|
|
|
537 |
}
|
538 |
|
539 |
}
|
339 |
|
340 |
$return = '';
|
341 |
|
342 |
+
// Empty
|
343 |
+
if(empty($value) && !is_numeric($value)){
|
344 |
+
|
345 |
+
$css = 'color:#aaa;';
|
346 |
+
$value = '(' . __('empty', 'acf') . ')';
|
347 |
+
|
348 |
+
$return = '<pre style="max-height:200px; overflow:auto; white-space: pre; ' . $css . '">' . print_r($value, true) . '</pre>';
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
// Serialized
|
353 |
+
elseif(is_serialized($value)){
|
354 |
|
355 |
$return = '<pre style="max-height:200px; overflow:auto; white-space: pre;">' . print_r(maybe_unserialize($value), true) . '</pre>';
|
356 |
$return .= '<pre style="max-height:200px; overflow:auto; white-space: pre; margin-top:10px;">' . print_r($value, true) . '</pre>';
|
375 |
// String
|
376 |
else{
|
377 |
|
378 |
+
$return = '<pre style="max-height:200px; overflow:auto; white-space: pre;">' . print_r($value, true) . '</pre>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
|
380 |
}
|
381 |
|
505 |
$field_type_display = false;
|
506 |
$field_group_display = false;
|
507 |
|
508 |
+
$field_key = $wp_meta["_$key"]['value'];
|
509 |
+
|
510 |
// Value = field_abcde123456?
|
511 |
+
if(acf_is_field_key($field_key)){
|
512 |
|
513 |
+
$field = acf_get_field($field_key);
|
514 |
+
|
515 |
+
if(!$field){
|
516 |
+
|
517 |
+
$field_type_display = '<em>Undefined</em>';
|
518 |
+
$field_group_display = '<em>Undefined</em>';
|
519 |
+
|
520 |
+
// Check clone: field_123456abcdef_field_123456abcfed
|
521 |
+
$count = substr_count($field_key, 'field_');
|
522 |
+
|
523 |
+
if($count === 2){
|
524 |
|
525 |
+
$keys = explode('field_', $field_key);
|
|
|
526 |
|
527 |
+
$field_1 = 'field_' . substr($keys[1], 0, -1);
|
528 |
+
$field_2 = 'field_' . $keys[2];
|
529 |
+
|
530 |
+
$field = acf_get_field($field_2);
|
531 |
+
|
532 |
+
}
|
533 |
+
|
534 |
+
}
|
535 |
|
536 |
+
if($field){
|
537 |
+
|
538 |
+
$field_type = acf_get_field_type($field['type']);
|
539 |
+
$field_type_display = '<em>Undefined</em>';
|
540 |
|
541 |
+
if(isset($field_type->label))
|
542 |
+
$field_type_display = $field_type->label;
|
543 |
+
|
544 |
+
$field_group = acfe_get_field_group_from_field($field);
|
545 |
+
$field_group_display = '<em>Undefined</em>';
|
546 |
+
|
547 |
+
if($field_group){
|
548 |
|
549 |
+
$field_group_display = $field_group['title'];
|
550 |
|
551 |
+
if(!empty($field_group['ID'])){
|
552 |
|
553 |
+
$post_status = get_post_status($field_group['ID']);
|
554 |
|
555 |
+
if($post_status === 'publish' || $post_status === 'acf-disabled'){
|
556 |
|
557 |
+
$field_group_display = '<a href="' . admin_url('post.php?post=' . $field_group['ID'] . '&action=edit') . '">' . $field_group['title'] . '</a>';
|
558 |
|
559 |
+
}
|
560 |
|
561 |
+
}
|
562 |
|
563 |
+
}
|
564 |
+
|
565 |
}
|
566 |
|
567 |
}
|
includes/modules/dynamic-block-type.php
CHANGED
@@ -33,7 +33,7 @@ function acfe_dbt_register(){
|
|
33 |
'hierarchical' => false,
|
34 |
'public' => false,
|
35 |
'show_ui' => true,
|
36 |
-
'show_in_menu' =>
|
37 |
'menu_icon' => 'dashicons-layout',
|
38 |
'show_in_admin_bar' => false,
|
39 |
'show_in_nav_menus' => false,
|
@@ -60,37 +60,6 @@ function acfe_dbt_register(){
|
|
60 |
|
61 |
}
|
62 |
|
63 |
-
/**
|
64 |
-
* Dynamic Block Type Menu
|
65 |
-
*/
|
66 |
-
add_action('admin_menu', 'acfe_dbt_menu');
|
67 |
-
function acfe_dbt_menu(){
|
68 |
-
|
69 |
-
if(!acf_get_setting('show_admin'))
|
70 |
-
return;
|
71 |
-
|
72 |
-
add_submenu_page('edit.php?post_type=acf-field-group', __('Block Types'), __('Block Types'), acf_get_setting('capability'), 'edit.php?post_type=acfe-dbt');
|
73 |
-
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Dynamic Block Type Menu: Parent Highlight
|
78 |
-
*/
|
79 |
-
add_filter('parent_file', 'acfe_dbt_menu_parent_highlight');
|
80 |
-
function acfe_dbt_menu_parent_highlight($parent_file){
|
81 |
-
|
82 |
-
global $pagenow;
|
83 |
-
if($pagenow !== 'post.php' && $pagenow !== 'post-new.php')
|
84 |
-
return $parent_file;
|
85 |
-
|
86 |
-
$post_type = get_post_type();
|
87 |
-
if($post_type !== 'acfe-dbt')
|
88 |
-
return $parent_file;
|
89 |
-
|
90 |
-
return 'edit.php?post_type=acf-field-group';
|
91 |
-
|
92 |
-
}
|
93 |
-
|
94 |
/**
|
95 |
* Dynamic Block Type Menu: Submenu Highlight
|
96 |
*/
|
@@ -98,6 +67,7 @@ add_filter('submenu_file', 'acfe_dbt_menu_sub_highlight');
|
|
98 |
function acfe_dbt_menu_sub_highlight($submenu_file){
|
99 |
|
100 |
global $pagenow;
|
|
|
101 |
if($pagenow !== 'post-new.php')
|
102 |
return $submenu_file;
|
103 |
|
@@ -122,10 +92,30 @@ function acfe_dbt_registers(){
|
|
122 |
if(empty($dynamic_block_types))
|
123 |
return;
|
124 |
|
125 |
-
foreach($dynamic_block_types as $name => $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
// Register: Execute
|
128 |
-
acf_register_block_type($
|
129 |
|
130 |
}
|
131 |
|
33 |
'hierarchical' => false,
|
34 |
'public' => false,
|
35 |
'show_ui' => true,
|
36 |
+
'show_in_menu' => 'edit.php?post_type=acf-field-group',
|
37 |
'menu_icon' => 'dashicons-layout',
|
38 |
'show_in_admin_bar' => false,
|
39 |
'show_in_nav_menus' => false,
|
60 |
|
61 |
}
|
62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* Dynamic Block Type Menu: Submenu Highlight
|
65 |
*/
|
67 |
function acfe_dbt_menu_sub_highlight($submenu_file){
|
68 |
|
69 |
global $pagenow;
|
70 |
+
|
71 |
if($pagenow !== 'post-new.php')
|
72 |
return $submenu_file;
|
73 |
|
92 |
if(empty($dynamic_block_types))
|
93 |
return;
|
94 |
|
95 |
+
foreach($dynamic_block_types as $name => $args){
|
96 |
+
|
97 |
+
if(acf_has_block_type('acf/' . $name))
|
98 |
+
continue;
|
99 |
+
|
100 |
+
// Textdomain
|
101 |
+
$textdomain = 'ACF Extended: Block Types';
|
102 |
+
|
103 |
+
// Title
|
104 |
+
if(isset($args['title'])){
|
105 |
+
|
106 |
+
acfe__($args['title'], 'Title', $textdomain);
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
// Description
|
111 |
+
if(isset($args['description'])){
|
112 |
+
|
113 |
+
acfe__($args['description'], 'Description', $textdomain);
|
114 |
+
|
115 |
+
}
|
116 |
|
117 |
// Register: Execute
|
118 |
+
acf_register_block_type($args);
|
119 |
|
120 |
}
|
121 |
|
includes/modules/dynamic-options-page.php
CHANGED
@@ -27,7 +27,7 @@ function acfe_dop_register(){
|
|
27 |
'hierarchical' => true,
|
28 |
'public' => false,
|
29 |
'show_ui' => true,
|
30 |
-
'show_in_menu' =>
|
31 |
'menu_icon' => 'dashicons-layout',
|
32 |
'show_in_admin_bar' => false,
|
33 |
'show_in_nav_menus' => false,
|
@@ -54,37 +54,6 @@ function acfe_dop_register(){
|
|
54 |
|
55 |
}
|
56 |
|
57 |
-
/**
|
58 |
-
* Dynamic Options Page Menu
|
59 |
-
*/
|
60 |
-
add_action('admin_menu', 'acfe_dop_menu');
|
61 |
-
function acfe_dop_menu(){
|
62 |
-
|
63 |
-
if(!acf_get_setting('show_admin'))
|
64 |
-
return;
|
65 |
-
|
66 |
-
add_submenu_page('edit.php?post_type=acf-field-group', __('Options'), __('Options'), acf_get_setting('capability'), 'edit.php?post_type=acfe-dop');
|
67 |
-
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Dynamic Options Page Menu: Parent Highlight
|
72 |
-
*/
|
73 |
-
add_filter('parent_file', 'acfe_dop_menu_parent_highlight');
|
74 |
-
function acfe_dop_menu_parent_highlight($parent_file){
|
75 |
-
|
76 |
-
global $pagenow;
|
77 |
-
if($pagenow !== 'post.php' && $pagenow !== 'post-new.php')
|
78 |
-
return $parent_file;
|
79 |
-
|
80 |
-
$post_type = get_post_type();
|
81 |
-
if($post_type !== 'acfe-dop')
|
82 |
-
return $parent_file;
|
83 |
-
|
84 |
-
return 'edit.php?post_type=acf-field-group';
|
85 |
-
|
86 |
-
}
|
87 |
-
|
88 |
/**
|
89 |
* Dynamic Options Page Menu: Submenu Highlight
|
90 |
*/
|
@@ -92,6 +61,7 @@ add_filter('submenu_file', 'acfe_dop_menu_sub_highlight');
|
|
92 |
function acfe_dop_menu_sub_highlight($submenu_file){
|
93 |
|
94 |
global $pagenow;
|
|
|
95 |
if($pagenow !== 'post-new.php')
|
96 |
return $submenu_file;
|
97 |
|
@@ -103,7 +73,6 @@ function acfe_dop_menu_sub_highlight($submenu_file){
|
|
103 |
|
104 |
}
|
105 |
|
106 |
-
|
107 |
/**
|
108 |
* ACF Register Options Pages
|
109 |
*/
|
@@ -115,32 +84,66 @@ function acfe_dop_registers(){
|
|
115 |
if(empty($dynamic_options_pages))
|
116 |
return;
|
117 |
|
|
|
118 |
$options_sub_pages = array();
|
119 |
|
120 |
-
foreach($dynamic_options_pages as $name => $
|
121 |
|
122 |
-
//
|
123 |
-
if(
|
124 |
|
125 |
-
$options_sub_pages[$name] = $
|
126 |
continue;
|
127 |
|
128 |
}
|
129 |
|
130 |
-
//
|
131 |
-
|
132 |
|
133 |
}
|
134 |
|
135 |
-
//
|
136 |
-
|
|
|
|
|
|
|
|
|
137 |
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
}
|
146 |
|
27 |
'hierarchical' => true,
|
28 |
'public' => false,
|
29 |
'show_ui' => true,
|
30 |
+
'show_in_menu' => 'edit.php?post_type=acf-field-group',
|
31 |
'menu_icon' => 'dashicons-layout',
|
32 |
'show_in_admin_bar' => false,
|
33 |
'show_in_nav_menus' => false,
|
54 |
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
* Dynamic Options Page Menu: Submenu Highlight
|
59 |
*/
|
61 |
function acfe_dop_menu_sub_highlight($submenu_file){
|
62 |
|
63 |
global $pagenow;
|
64 |
+
|
65 |
if($pagenow !== 'post-new.php')
|
66 |
return $submenu_file;
|
67 |
|
73 |
|
74 |
}
|
75 |
|
|
|
76 |
/**
|
77 |
* ACF Register Options Pages
|
78 |
*/
|
84 |
if(empty($dynamic_options_pages))
|
85 |
return;
|
86 |
|
87 |
+
$options_top_pages = array();
|
88 |
$options_sub_pages = array();
|
89 |
|
90 |
+
foreach($dynamic_options_pages as $name => $args){
|
91 |
|
92 |
+
// Sub pages
|
93 |
+
if(acf_maybe_get($args, 'parent_slug')){
|
94 |
|
95 |
+
$options_sub_pages[$name] = $args;
|
96 |
continue;
|
97 |
|
98 |
}
|
99 |
|
100 |
+
// Top pages
|
101 |
+
$options_top_pages[$name] = $args;
|
102 |
|
103 |
}
|
104 |
|
105 |
+
// Merge
|
106 |
+
$options_pages = array_merge($options_top_pages, $options_sub_pages);
|
107 |
+
|
108 |
+
// Bail early if empty
|
109 |
+
if(empty($options_pages))
|
110 |
+
return;
|
111 |
|
112 |
+
foreach($options_pages as $name => $args){
|
113 |
+
|
114 |
+
// Textdomain
|
115 |
+
$textdomain = 'ACF Extended: Options Pages';
|
116 |
+
|
117 |
+
// Page Title
|
118 |
+
if(isset($args['page_title'])){
|
119 |
+
|
120 |
+
acfe__($args['page_title'], 'Menu_title', $textdomain);
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
+
// Menu Title
|
125 |
+
if(isset($args['menu_title'])){
|
126 |
+
|
127 |
+
acfe__($args['menu_title'], 'Menu_title', $textdomain);
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
// Update button
|
132 |
+
if(isset($args['update_button'])){
|
133 |
+
|
134 |
+
acfe__($args['update_button'], 'Update_button', $textdomain);
|
135 |
+
|
136 |
+
}
|
137 |
+
|
138 |
+
// Updated message
|
139 |
+
if(isset($args['updated_message'])){
|
140 |
+
|
141 |
+
acfe__($args['updated_message'], 'Updated_message', $textdomain);
|
142 |
+
|
143 |
+
}
|
144 |
+
|
145 |
+
// Register: Execute
|
146 |
+
acf_add_options_page($args);
|
147 |
|
148 |
}
|
149 |
|
includes/modules/dynamic-post-type.php
CHANGED
@@ -65,10 +65,41 @@ function acfe_dpt_registers(){
|
|
65 |
if(empty($dynamic_post_types))
|
66 |
return;
|
67 |
|
68 |
-
foreach($dynamic_post_types as $name => $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
// Register: Execute
|
71 |
-
register_post_type($name, $
|
72 |
|
73 |
}
|
74 |
|
@@ -2254,7 +2285,7 @@ etc...',
|
|
2254 |
'label' => 'Template',
|
2255 |
'name' => 'acfe_dpt_single_template',
|
2256 |
'type' => 'text',
|
2257 |
-
'instructions' => 'ACF Extended: Which template file to load for the
|
2258 |
'required' => 0,
|
2259 |
'conditional_logic' => 0,
|
2260 |
'wrapper' => array(
|
65 |
if(empty($dynamic_post_types))
|
66 |
return;
|
67 |
|
68 |
+
foreach($dynamic_post_types as $name => $args){
|
69 |
+
|
70 |
+
if(post_type_exists($name))
|
71 |
+
continue;
|
72 |
+
|
73 |
+
// Textdomain
|
74 |
+
$textdomain = 'ACF Extended: Post Types';
|
75 |
+
|
76 |
+
// Label
|
77 |
+
if(isset($args['label'])){
|
78 |
+
|
79 |
+
acfe__($args['label'], 'Label', $textdomain);
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
// Description
|
84 |
+
if(isset($args['description'])){
|
85 |
+
|
86 |
+
acfe__($args['description'], 'Description', $textdomain);
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
// Labels
|
91 |
+
if(isset($args['labels'])){
|
92 |
+
|
93 |
+
foreach($args['labels'] as $label_name => &$label_text){
|
94 |
+
|
95 |
+
acfe__($label_text, ucfirst($label_name), $textdomain);
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
}
|
100 |
|
101 |
// Register: Execute
|
102 |
+
register_post_type($name, $args);
|
103 |
|
104 |
}
|
105 |
|
2285 |
'label' => 'Template',
|
2286 |
'name' => 'acfe_dpt_single_template',
|
2287 |
'type' => 'text',
|
2288 |
+
'instructions' => 'ACF Extended: Which template file to load for the single query. More informations on <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">Template hierarchy</a>',
|
2289 |
'required' => 0,
|
2290 |
'conditional_logic' => 0,
|
2291 |
'wrapper' => array(
|
includes/modules/dynamic-taxonomy.php
CHANGED
@@ -65,13 +65,44 @@ function acfe_dt_registers(){
|
|
65 |
if(empty($dynamic_taxonomies))
|
66 |
return;
|
67 |
|
68 |
-
foreach($dynamic_taxonomies as $name => $
|
|
|
|
|
|
|
69 |
|
70 |
// Extract 'post_types' from 'register_args'
|
71 |
-
$post_types = acf_extract_var($
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
// Register: Execute
|
74 |
-
register_taxonomy($name, $post_types, $
|
75 |
|
76 |
// Filter Admin: Posts Per Page
|
77 |
add_filter('edit_' . $name . '_per_page', 'acfe_dt_filter_admin_ppp');
|
65 |
if(empty($dynamic_taxonomies))
|
66 |
return;
|
67 |
|
68 |
+
foreach($dynamic_taxonomies as $name => $args){
|
69 |
+
|
70 |
+
if(taxonomy_exists($name))
|
71 |
+
continue;
|
72 |
|
73 |
// Extract 'post_types' from 'register_args'
|
74 |
+
$post_types = acf_extract_var($args, 'post_types', array());
|
75 |
+
|
76 |
+
// Textdomain
|
77 |
+
$textdomain = 'ACF Extended: Taxonomies';
|
78 |
+
|
79 |
+
// Label
|
80 |
+
if(isset($args['label'])){
|
81 |
+
|
82 |
+
acfe__($args['label'], 'Label', $textdomain);
|
83 |
+
|
84 |
+
}
|
85 |
+
|
86 |
+
// Description
|
87 |
+
if(isset($args['description'])){
|
88 |
+
|
89 |
+
acfe__($args['description'], 'Description', $textdomain);
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
// Labels
|
94 |
+
if(isset($args['labels'])){
|
95 |
+
|
96 |
+
foreach($args['labels'] as $label_name => &$label_text){
|
97 |
+
|
98 |
+
acfe__($label_text, ucfirst($label_name), $textdomain);
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
|
104 |
// Register: Execute
|
105 |
+
register_taxonomy($name, $post_types, $args);
|
106 |
|
107 |
// Filter Admin: Posts Per Page
|
108 |
add_filter('edit_' . $name . '_per_page', 'acfe_dt_filter_admin_ppp');
|
includes/modules/form/actions/custom.php
CHANGED
@@ -8,8 +8,9 @@ if(!class_exists('acfe_form_custom')):
|
|
8 |
class acfe_form_custom{
|
9 |
|
10 |
function __construct(){
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
add_action('acf/render_field/name=acfe_form_custom_action_advanced_load', array($this, 'advanced_load'));
|
15 |
add_action('acf/render_field/name=acfe_form_custom_action_advanced_validation', array($this, 'advanced_validation'));
|
@@ -17,7 +18,30 @@ class acfe_form_custom{
|
|
17 |
|
18 |
}
|
19 |
|
20 |
-
function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
if(!$valid)
|
23 |
return $valid;
|
8 |
class acfe_form_custom{
|
9 |
|
10 |
function __construct(){
|
11 |
+
|
12 |
+
add_action('acfe/form/make/custom', array($this, 'make'), 10, 3);
|
13 |
+
add_filter('acf/validate_value/name=acfe_form_custom_action', array($this, 'validate_action'), 10, 4);
|
14 |
|
15 |
add_action('acf/render_field/name=acfe_form_custom_action_advanced_load', array($this, 'advanced_load'));
|
16 |
add_action('acf/render_field/name=acfe_form_custom_action_advanced_validation', array($this, 'advanced_validation'));
|
18 |
|
19 |
}
|
20 |
|
21 |
+
function make($form, $current_post_id, $action){
|
22 |
+
|
23 |
+
// Form
|
24 |
+
$form_name = acf_maybe_get($form, 'form_name');
|
25 |
+
$form_id = acf_maybe_get($form, 'form_id');
|
26 |
+
|
27 |
+
// Custom Action Name
|
28 |
+
$action = get_sub_field('acfe_form_custom_action');
|
29 |
+
|
30 |
+
// Prepare
|
31 |
+
$prepare = true;
|
32 |
+
$prepare = apply_filters('acfe/form/prepare/' . $action, $prepare, $form, $current_post_id, '');
|
33 |
+
$prepare = apply_filters('acfe/form/prepare/' . $action . '/form=' . $form_name, $prepare, $form, $current_post_id, '');
|
34 |
+
|
35 |
+
if($prepare === false)
|
36 |
+
return;
|
37 |
+
|
38 |
+
// Submit
|
39 |
+
do_action('acfe/form/submit/' . $action, $form, $current_post_id, '');
|
40 |
+
do_action('acfe/form/submit/' . $action . '/form=' . $form_name, $form, $current_post_id, '');
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
function validate_action($valid, $value, $field, $input){
|
45 |
|
46 |
if(!$valid)
|
47 |
return $valid;
|
includes/modules/form/actions/email.php
CHANGED
@@ -9,8 +9,8 @@ class acfe_form_email{
|
|
9 |
|
10 |
function __construct(){
|
11 |
|
12 |
-
add_action('acfe/form/
|
13 |
-
add_action('acfe/form/submit/email', array($this, 'submit'),
|
14 |
|
15 |
add_filter('acf/prepare_field/name=acfe_form_email_file', array(acfe()->acfe_form, 'map_fields_deep'));
|
16 |
|
@@ -19,11 +19,22 @@ class acfe_form_email{
|
|
19 |
|
20 |
}
|
21 |
|
22 |
-
function
|
23 |
|
24 |
// Form
|
25 |
$form_name = acf_maybe_get($form, 'form_name');
|
26 |
$form_id = acf_maybe_get($form, 'form_id');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
// Fields
|
29 |
$from = get_sub_field('acfe_form_email_from');
|
@@ -143,7 +154,7 @@ class acfe_form_email{
|
|
143 |
}
|
144 |
|
145 |
// Bail early if no args
|
146 |
-
if(
|
147 |
return;
|
148 |
|
149 |
// Check if Headers changed
|
@@ -189,7 +200,7 @@ class acfe_form_email{
|
|
189 |
}
|
190 |
|
191 |
}
|
192 |
-
|
193 |
wp_mail($args['to'], $args['subject'], $args['content'], $args['headers'], $args['attachments']);
|
194 |
|
195 |
do_action('acfe/form/submit/email', $args, $form, $action);
|
@@ -212,26 +223,22 @@ class acfe_form_email{
|
|
212 |
}
|
213 |
|
214 |
function submit($args, $form, $action){
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
}
|
233 |
-
|
234 |
-
}
|
235 |
|
236 |
}
|
237 |
|
9 |
|
10 |
function __construct(){
|
11 |
|
12 |
+
add_action('acfe/form/make/email', array($this, 'make'), 10, 3);
|
13 |
+
add_action('acfe/form/submit/email', array($this, 'submit'), 10, 3);
|
14 |
|
15 |
add_filter('acf/prepare_field/name=acfe_form_email_file', array(acfe()->acfe_form, 'map_fields_deep'));
|
16 |
|
19 |
|
20 |
}
|
21 |
|
22 |
+
function make($form, $current_post_id, $action){
|
23 |
|
24 |
// Form
|
25 |
$form_name = acf_maybe_get($form, 'form_name');
|
26 |
$form_id = acf_maybe_get($form, 'form_id');
|
27 |
+
|
28 |
+
// Prepare
|
29 |
+
$prepare = true;
|
30 |
+
$prepare = apply_filters('acfe/form/prepare/email', $prepare, $form, $current_post_id, $action);
|
31 |
+
$prepare = apply_filters('acfe/form/prepare/email/form=' . $form_name, $prepare, $form, $current_post_id, $action);
|
32 |
+
|
33 |
+
if(!empty($action))
|
34 |
+
$prepare = apply_filters('acfe/form/prepare/email/action=' . $action, $prepare, $form, $current_post_id, $action);
|
35 |
+
|
36 |
+
if($prepare === false)
|
37 |
+
return;
|
38 |
|
39 |
// Fields
|
40 |
$from = get_sub_field('acfe_form_email_from');
|
154 |
}
|
155 |
|
156 |
// Bail early if no args
|
157 |
+
if($args === false)
|
158 |
return;
|
159 |
|
160 |
// Check if Headers changed
|
200 |
}
|
201 |
|
202 |
}
|
203 |
+
|
204 |
wp_mail($args['to'], $args['subject'], $args['content'], $args['headers'], $args['attachments']);
|
205 |
|
206 |
do_action('acfe/form/submit/email', $args, $form, $action);
|
223 |
}
|
224 |
|
225 |
function submit($args, $form, $action){
|
226 |
+
|
227 |
+
// Form name
|
228 |
+
$form_name = acf_maybe_get($form, 'form_name');
|
229 |
+
|
230 |
+
$args = apply_filters('acfe/form/query_var/email', $args, $form, $action);
|
231 |
+
$args = apply_filters('acfe/form/query_var/email/form=' . $form_name, $args, $form, $action);
|
232 |
+
$args = apply_filters('acfe/form/query_var/email/action=' . $action, $args, $form, $action);
|
233 |
+
|
234 |
+
// Query var
|
235 |
+
$query_var = acfe_form_unique_action_id($form, 'email');
|
236 |
+
|
237 |
+
if(!empty($action))
|
238 |
+
$query_var = $action;
|
239 |
+
|
240 |
+
// Set Query Var
|
241 |
+
set_query_var($query_var, $args);
|
|
|
|
|
|
|
|
|
242 |
|
243 |
}
|
244 |
|
includes/modules/form/actions/post.php
CHANGED
@@ -12,9 +12,9 @@ class acfe_form_post{
|
|
12 |
/*
|
13 |
* Form
|
14 |
*/
|
15 |
-
add_filter('acfe/form/load/post', array($this, 'load'),
|
16 |
-
add_action('acfe/form/
|
17 |
-
add_action('acfe/form/submit/post', array($this, 'submit'),
|
18 |
|
19 |
/*
|
20 |
* Admin
|
@@ -239,12 +239,23 @@ class acfe_form_post{
|
|
239 |
|
240 |
}
|
241 |
|
242 |
-
function
|
243 |
|
244 |
// Form
|
245 |
$form_name = acf_maybe_get($form, 'form_name');
|
246 |
$form_id = acf_maybe_get($form, 'form_id');
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
// Action
|
249 |
$post_action = get_sub_field('acfe_form_post_action');
|
250 |
|
@@ -569,62 +580,58 @@ class acfe_form_post{
|
|
569 |
}
|
570 |
|
571 |
function submit($_post_id, $post_action, $args, $form, $action){
|
572 |
-
|
573 |
-
if(!empty($action)){
|
574 |
-
|
575 |
-
// Custom Query Var
|
576 |
-
$custom_query_var = get_sub_field('acfe_form_custom_query_var');
|
577 |
-
|
578 |
-
if(!empty($custom_query_var)){
|
579 |
-
|
580 |
-
// Form name
|
581 |
-
$form_name = acf_maybe_get($form, 'form_name');
|
582 |
-
|
583 |
-
// Get post array
|
584 |
-
$post_object = get_post($_post_id, 'ARRAY_A');
|
585 |
-
|
586 |
-
$post_object['permalink'] = get_permalink($_post_id);
|
587 |
-
$post_object['admin_url'] = admin_url('post.php?post=' . $_post_id . '&action=edit');
|
588 |
-
|
589 |
-
// Retrieve Post Author data
|
590 |
-
$post_author = $post_object['post_author'];
|
591 |
-
$user_object = get_user_by('ID', $post_author);
|
592 |
|
593 |
-
|
594 |
-
|
595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
|
597 |
-
|
598 |
|
599 |
-
|
600 |
|
601 |
-
|
602 |
|
603 |
-
|
604 |
-
|
605 |
|
606 |
-
|
607 |
|
608 |
-
|
609 |
|
610 |
-
|
611 |
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
}
|
618 |
-
|
619 |
-
$post_object = apply_filters('acfe/form/query_var/post', $post_object, $_post_id, $post_action, $args, $form, $action);
|
620 |
-
$post_object = apply_filters('acfe/form/query_var/post/form=' . $form_name, $post_object, $_post_id, $post_action, $args, $form, $action);
|
621 |
-
$post_object = apply_filters('acfe/form/query_var/post/action=' . $action, $post_object, $_post_id, $post_action, $args, $form, $action);
|
622 |
-
|
623 |
-
set_query_var($action, $post_object);
|
624 |
-
|
625 |
-
}
|
626 |
|
627 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
|
629 |
// Meta save
|
630 |
$save_meta = get_sub_field('acfe_form_post_save_meta');
|
12 |
/*
|
13 |
* Form
|
14 |
*/
|
15 |
+
add_filter('acfe/form/load/post', array($this, 'load'), 10, 3);
|
16 |
+
add_action('acfe/form/make/post', array($this, 'make'), 10, 3);
|
17 |
+
add_action('acfe/form/submit/post', array($this, 'submit'), 10, 5);
|
18 |
|
19 |
/*
|
20 |
* Admin
|
239 |
|
240 |
}
|
241 |
|
242 |
+
function make($form, $current_post_id, $action){
|
243 |
|
244 |
// Form
|
245 |
$form_name = acf_maybe_get($form, 'form_name');
|
246 |
$form_id = acf_maybe_get($form, 'form_id');
|
247 |
|
248 |
+
// Prepare
|
249 |
+
$prepare = true;
|
250 |
+
$prepare = apply_filters('acfe/form/prepare/post', $prepare, $form, $current_post_id, $action);
|
251 |
+
$prepare = apply_filters('acfe/form/prepare/post/form=' . $form_name, $prepare, $form, $current_post_id, $action);
|
252 |
+
|
253 |
+
if(!empty($action))
|
254 |
+
$prepare = apply_filters('acfe/form/prepare/post/action=' . $action, $prepare, $form, $current_post_id, $action);
|
255 |
+
|
256 |
+
if($prepare === false)
|
257 |
+
return;
|
258 |
+
|
259 |
// Action
|
260 |
$post_action = get_sub_field('acfe_form_post_action');
|
261 |
|
580 |
}
|
581 |
|
582 |
function submit($_post_id, $post_action, $args, $form, $action){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
583 |
|
584 |
+
// Form name
|
585 |
+
$form_name = acf_maybe_get($form, 'form_name');
|
586 |
+
|
587 |
+
// Get post array
|
588 |
+
$post_object = get_post($_post_id, 'ARRAY_A');
|
589 |
+
|
590 |
+
$post_object['permalink'] = get_permalink($_post_id);
|
591 |
+
$post_object['admin_url'] = admin_url('post.php?post=' . $_post_id . '&action=edit');
|
592 |
+
|
593 |
+
// Retrieve Post Author data
|
594 |
+
$post_author = $post_object['post_author'];
|
595 |
+
$user_object = get_user_by('ID', $post_author);
|
596 |
+
|
597 |
+
if(isset($user_object->data)){
|
598 |
+
|
599 |
+
$user = json_decode(json_encode($user_object->data), true);
|
600 |
|
601 |
+
$user_object_meta = get_user_meta($user['ID']);
|
602 |
|
603 |
+
$user_meta = array();
|
604 |
|
605 |
+
foreach($user_object_meta as $k => $v){
|
606 |
|
607 |
+
if(!isset($v[0]))
|
608 |
+
continue;
|
609 |
|
610 |
+
$user_meta[$k] = $v[0];
|
611 |
|
612 |
+
}
|
613 |
|
614 |
+
$user_array = array_merge($user, $user_meta);
|
615 |
|
616 |
+
$user_array['permalink'] = get_author_posts_url($post_author);
|
617 |
+
$user_array['admin_url'] = admin_url('user-edit.php?user_id=' . $post_author);
|
618 |
+
|
619 |
+
$post_object['post_author_data'] = $user_array;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
|
621 |
}
|
622 |
+
|
623 |
+
$post_object = apply_filters('acfe/form/query_var/post', $post_object, $_post_id, $post_action, $args, $form, $action);
|
624 |
+
$post_object = apply_filters('acfe/form/query_var/post/form=' . $form_name, $post_object, $_post_id, $post_action, $args, $form, $action);
|
625 |
+
$post_object = apply_filters('acfe/form/query_var/post/action=' . $action, $post_object, $_post_id, $post_action, $args, $form, $action);
|
626 |
+
|
627 |
+
// Query var
|
628 |
+
$query_var = acfe_form_unique_action_id($form, 'post');
|
629 |
+
|
630 |
+
if(!empty($action))
|
631 |
+
$query_var = $action;
|
632 |
+
|
633 |
+
// Set Query Var
|
634 |
+
set_query_var($query_var, $post_object);
|
635 |
|
636 |
// Meta save
|
637 |
$save_meta = get_sub_field('acfe_form_post_save_meta');
|
includes/modules/form/actions/term.php
CHANGED
@@ -12,9 +12,9 @@ class acfe_form_term{
|
|
12 |
/*
|
13 |
* Form
|
14 |
*/
|
15 |
-
add_filter('acfe/form/load/term', array($this, 'load'),
|
16 |
-
add_action('acfe/form/
|
17 |
-
add_action('acfe/form/submit/term', array($this, 'submit'),
|
18 |
|
19 |
/*
|
20 |
* Admin
|
@@ -166,11 +166,22 @@ class acfe_form_term{
|
|
166 |
|
167 |
}
|
168 |
|
169 |
-
function
|
170 |
|
171 |
// Form
|
172 |
$form_name = acf_maybe_get($form, 'form_name');
|
173 |
$form_id = acf_maybe_get($form, 'form_id');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
// Action
|
176 |
$term_action = get_sub_field('acfe_form_term_action');
|
@@ -334,32 +345,28 @@ class acfe_form_term{
|
|
334 |
}
|
335 |
|
336 |
function submit($_term_id, $term_action, $args, $form, $action){
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
}
|
361 |
-
|
362 |
-
}
|
363 |
|
364 |
// Meta save
|
365 |
$save_meta = get_sub_field('acfe_form_term_save_meta');
|
12 |
/*
|
13 |
* Form
|
14 |
*/
|
15 |
+
add_filter('acfe/form/load/term', array($this, 'load'), 10, 3);
|
16 |
+
add_action('acfe/form/make/term', array($this, 'make'), 10, 3);
|
17 |
+
add_action('acfe/form/submit/term', array($this, 'submit'), 10, 5);
|
18 |
|
19 |
/*
|
20 |
* Admin
|
166 |
|
167 |
}
|
168 |
|
169 |
+
function make($form, $current_post_id, $action){
|
170 |
|
171 |
// Form
|
172 |
$form_name = acf_maybe_get($form, 'form_name');
|
173 |
$form_id = acf_maybe_get($form, 'form_id');
|
174 |
+
|
175 |
+
// Prepare
|
176 |
+
$prepare = true;
|
177 |
+
$prepare = apply_filters('acfe/form/prepare/term', $prepare, $form, $current_post_id, $action);
|
178 |
+
$prepare = apply_filters('acfe/form/prepare/term/form=' . $form_name, $prepare, $form, $current_post_id, $action);
|
179 |
+
|
180 |
+
if(!empty($action))
|
181 |
+
$prepare = apply_filters('acfe/form/prepare/term/action=' . $action, $prepare, $form, $current_post_id, $action);
|
182 |
+
|
183 |
+
if($prepare === false)
|
184 |
+
return;
|
185 |
|
186 |
// Action
|
187 |
$term_action = get_sub_field('acfe_form_term_action');
|
345 |
}
|
346 |
|
347 |
function submit($_term_id, $term_action, $args, $form, $action){
|
348 |
+
|
349 |
+
// Form name
|
350 |
+
$form_name = acf_maybe_get($form, 'form_name');
|
351 |
+
|
352 |
+
// Get term array
|
353 |
+
$term_object = get_term($_term_id, $args['taxonomy'], 'ARRAY_A');
|
354 |
+
|
355 |
+
$term_object['permalink'] = get_term_link($_term_id, $term_object['taxonomy']);
|
356 |
+
$term_object['admin_url'] = admin_url('term.php?tag_ID=' . $_term_id . '&taxonomy=' . $term_object['taxonomy']);
|
357 |
+
|
358 |
+
$term_object = apply_filters('acfe/form/query_var/term', $term_object, $_term_id, $term_action, $args, $form, $action);
|
359 |
+
$term_object = apply_filters('acfe/form/query_var/term/form=' . $form_name, $term_object, $_term_id, $term_action, $args, $form, $action);
|
360 |
+
$term_object = apply_filters('acfe/form/query_var/term/action=' . $action, $term_object, $_term_id, $term_action, $args, $form, $action);
|
361 |
+
|
362 |
+
// Query var
|
363 |
+
$query_var = acfe_form_unique_action_id($form, 'term');
|
364 |
+
|
365 |
+
if(!empty($action))
|
366 |
+
$query_var = $action;
|
367 |
+
|
368 |
+
// Set Query Var
|
369 |
+
set_query_var($query_var, $term_object);
|
|
|
|
|
|
|
|
|
370 |
|
371 |
// Meta save
|
372 |
$save_meta = get_sub_field('acfe_form_term_save_meta');
|
includes/modules/form/actions/user.php
CHANGED
@@ -12,10 +12,10 @@ class acfe_form_user{
|
|
12 |
/*
|
13 |
* Form
|
14 |
*/
|
15 |
-
add_filter('acfe/form/load/user', array($this, 'load'),
|
16 |
-
add_action('acfe/form/validation/user', array($this, 'validation'),
|
17 |
-
add_action('acfe/form/
|
18 |
-
add_action('acfe/form/submit/user', array($this, 'submit'),
|
19 |
|
20 |
/*
|
21 |
* Admin
|
@@ -388,11 +388,22 @@ class acfe_form_user{
|
|
388 |
|
389 |
}
|
390 |
|
391 |
-
function
|
392 |
|
393 |
// Form
|
394 |
$form_name = acf_maybe_get($form, 'form_name');
|
395 |
$form_id = acf_maybe_get($form, 'form_id');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
|
397 |
// Action
|
398 |
$user_action = get_sub_field('acfe_form_user_action');
|
@@ -780,60 +791,56 @@ class acfe_form_user{
|
|
780 |
}
|
781 |
|
782 |
function submit($_user_id, $user_action, $args, $form, $action){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
783 |
|
784 |
-
|
785 |
|
786 |
-
|
787 |
-
$custom_query_var = get_sub_field('acfe_form_custom_query_var');
|
788 |
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
$
|
793 |
-
|
794 |
-
// Get user array
|
795 |
-
$user_object = get_user_by('ID', $_user_id);
|
796 |
-
|
797 |
-
if(isset($user_object->data)){
|
798 |
-
|
799 |
-
// return array
|
800 |
-
$user = json_decode(json_encode($user_object->data), true);
|
801 |
-
|
802 |
-
$user_object_meta = get_user_meta($user['ID']);
|
803 |
-
|
804 |
-
$user_meta = array();
|
805 |
-
|
806 |
-
foreach($user_object_meta as $k => $v){
|
807 |
-
|
808 |
-
if(!isset($v[0]))
|
809 |
-
continue;
|
810 |
-
|
811 |
-
$user_meta[$k] = $v[0];
|
812 |
-
|
813 |
-
}
|
814 |
-
|
815 |
-
$user_array = array_merge($user, $user_meta);
|
816 |
-
|
817 |
-
$user_array['permalink'] = get_author_posts_url($_user_id);
|
818 |
-
$user_array['admin_url'] = admin_url('user-edit.php?user_id=' . $_user_id);
|
819 |
-
|
820 |
-
// Replace the hash password with the real password
|
821 |
-
if(acf_maybe_get($args, 'user_pass')){
|
822 |
-
|
823 |
-
$user_array['user_pass'] = $args['user_pass'];
|
824 |
-
|
825 |
-
}
|
826 |
-
|
827 |
-
$user_array = apply_filters('acfe/form/query_var/user', $user_array, $_user_id, $user_action, $args, $form, $action);
|
828 |
-
$user_array = apply_filters('acfe/form/query_var/user/form=' . $form_name, $user_array, $_user_id, $user_action, $args, $form, $action);
|
829 |
-
$user_array = apply_filters('acfe/form/query_var/user/action=' . $action, $user_array, $_user_id, $user_action, $args, $form, $action);
|
830 |
-
|
831 |
-
set_query_var($action, $user_array);
|
832 |
-
|
833 |
-
}
|
834 |
|
835 |
}
|
836 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
837 |
}
|
838 |
|
839 |
// Meta save
|
12 |
/*
|
13 |
* Form
|
14 |
*/
|
15 |
+
add_filter('acfe/form/load/user', array($this, 'load'), 10, 3);
|
16 |
+
add_action('acfe/form/validation/user', array($this, 'validation'), 10, 3);
|
17 |
+
add_action('acfe/form/make/user', array($this, 'make'), 10, 3);
|
18 |
+
add_action('acfe/form/submit/user', array($this, 'submit'), 10, 5);
|
19 |
|
20 |
/*
|
21 |
* Admin
|
388 |
|
389 |
}
|
390 |
|
391 |
+
function make($form, $current_post_id, $action){
|
392 |
|
393 |
// Form
|
394 |
$form_name = acf_maybe_get($form, 'form_name');
|
395 |
$form_id = acf_maybe_get($form, 'form_id');
|
396 |
+
|
397 |
+
// Prepare
|
398 |
+
$prepare = true;
|
399 |
+
$prepare = apply_filters('acfe/form/prepare/user', $prepare, $form, $current_post_id, $action);
|
400 |
+
$prepare = apply_filters('acfe/form/prepare/user/form=' . $form_name, $prepare, $form, $current_post_id, $action);
|
401 |
+
|
402 |
+
if(!empty($action))
|
403 |
+
$prepare = apply_filters('acfe/form/prepare/user/action=' . $action, $prepare, $form, $current_post_id, $action);
|
404 |
+
|
405 |
+
if($prepare === false)
|
406 |
+
return;
|
407 |
|
408 |
// Action
|
409 |
$user_action = get_sub_field('acfe_form_user_action');
|
791 |
}
|
792 |
|
793 |
function submit($_user_id, $user_action, $args, $form, $action){
|
794 |
+
|
795 |
+
// Form name
|
796 |
+
$form_name = acf_maybe_get($form, 'form_name');
|
797 |
+
|
798 |
+
// Get user array
|
799 |
+
$user_object = get_user_by('ID', $_user_id);
|
800 |
+
|
801 |
+
if(isset($user_object->data)){
|
802 |
+
|
803 |
+
// return array
|
804 |
+
$user = json_decode(json_encode($user_object->data), true);
|
805 |
+
|
806 |
+
$user_object_meta = get_user_meta($user['ID']);
|
807 |
|
808 |
+
$user_meta = array();
|
809 |
|
810 |
+
foreach($user_object_meta as $k => $v){
|
|
|
811 |
|
812 |
+
if(!isset($v[0]))
|
813 |
+
continue;
|
814 |
+
|
815 |
+
$user_meta[$k] = $v[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
816 |
|
817 |
}
|
818 |
|
819 |
+
$user_array = array_merge($user, $user_meta);
|
820 |
+
|
821 |
+
$user_array['permalink'] = get_author_posts_url($_user_id);
|
822 |
+
$user_array['admin_url'] = admin_url('user-edit.php?user_id=' . $_user_id);
|
823 |
+
|
824 |
+
// Replace the hash password with the real password
|
825 |
+
if(acf_maybe_get($args, 'user_pass')){
|
826 |
+
|
827 |
+
$user_array['user_pass'] = $args['user_pass'];
|
828 |
+
|
829 |
+
}
|
830 |
+
|
831 |
+
$user_array = apply_filters('acfe/form/query_var/user', $user_array, $_user_id, $user_action, $args, $form, $action);
|
832 |
+
$user_array = apply_filters('acfe/form/query_var/user/form=' . $form_name, $user_array, $_user_id, $user_action, $args, $form, $action);
|
833 |
+
$user_array = apply_filters('acfe/form/query_var/user/action=' . $action, $user_array, $_user_id, $user_action, $args, $form, $action);
|
834 |
+
|
835 |
+
// Query var
|
836 |
+
$query_var = acfe_form_unique_action_id($form, 'user');
|
837 |
+
|
838 |
+
if(!empty($action))
|
839 |
+
$query_var = $action;
|
840 |
+
|
841 |
+
// Set Query Var
|
842 |
+
set_query_var($query_var, $user_array);
|
843 |
+
|
844 |
}
|
845 |
|
846 |
// Meta save
|
includes/modules/form/admin.php
CHANGED
@@ -25,7 +25,6 @@ class acfe_form{
|
|
25 |
|
26 |
// Admin
|
27 |
add_action('init', array($this, 'init'));
|
28 |
-
add_action('admin_menu', array($this, 'admin_menu'));
|
29 |
add_action('current_screen', array($this, 'current_screen'));
|
30 |
add_filter('post_row_actions', array($this, 'row_actions'), 10, 2);
|
31 |
|
@@ -52,7 +51,8 @@ class acfe_form{
|
|
52 |
|
53 |
add_action('acf/render_field/name=acfe_form_validation_advanced_field_validation', array($this, 'doc_validation_field'));
|
54 |
add_action('acf/render_field/name=acfe_form_validation_advanced_form_validation', array($this, 'doc_validation_form'));
|
55 |
-
add_action('acf/render_field/name=
|
|
|
56 |
|
57 |
add_action('acf/render_field/name=acfe_form_cheatsheet_field', array($this, 'doc_field'));
|
58 |
add_action('acf/render_field/name=acfe_form_cheatsheet_fields', array($this, 'doc_fields'));
|
@@ -96,7 +96,7 @@ class acfe_form{
|
|
96 |
'hierarchical' => false,
|
97 |
'public' => false,
|
98 |
'show_ui' => true,
|
99 |
-
'show_in_menu' =>
|
100 |
'menu_icon' => 'dashicons-feedback',
|
101 |
'show_in_admin_bar' => false,
|
102 |
'show_in_nav_menus' => false,
|
@@ -123,15 +123,6 @@ class acfe_form{
|
|
123 |
|
124 |
}
|
125 |
|
126 |
-
function admin_menu(){
|
127 |
-
|
128 |
-
if(!acf_get_setting('show_admin'))
|
129 |
-
return;
|
130 |
-
|
131 |
-
add_submenu_page('edit.php?post_type=acf-field-group', __('Forms', 'acf'), __('Forms', 'acf'), acf_get_setting('capability'), 'edit.php?post_type=' . $this->post_type);
|
132 |
-
|
133 |
-
}
|
134 |
-
|
135 |
function current_screen(){
|
136 |
|
137 |
global $typenow;
|
@@ -188,7 +179,6 @@ class acfe_form{
|
|
188 |
continue;
|
189 |
|
190 |
$alias = get_sub_field('acfe_form_custom_alias');
|
191 |
-
$query_var = get_sub_field('acfe_form_custom_query_var');
|
192 |
|
193 |
$action_label = '';
|
194 |
$action_type = '';
|
@@ -253,8 +243,11 @@ class acfe_form{
|
|
253 |
|
254 |
}
|
255 |
|
256 |
-
if(empty($alias)
|
257 |
-
|
|
|
|
|
|
|
258 |
|
259 |
$this->query_vars[] = array(
|
260 |
'action' => $action,
|
@@ -271,8 +264,15 @@ class acfe_form{
|
|
271 |
}
|
272 |
|
273 |
function load_post_new(){
|
274 |
-
|
275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
|
277 |
}
|
278 |
|
@@ -284,16 +284,6 @@ class acfe_form{
|
|
284 |
// Metaboxes
|
285 |
remove_meta_box('slugdiv', $this->post_type, 'normal');
|
286 |
|
287 |
-
// Menu
|
288 |
-
add_filter('parent_file', function(){
|
289 |
-
return 'edit.php?post_type=acf-field-group';
|
290 |
-
});
|
291 |
-
|
292 |
-
// Submenu
|
293 |
-
add_filter('submenu_file', function(){
|
294 |
-
return 'edit.php?post_type=' . $this->post_type;
|
295 |
-
});
|
296 |
-
|
297 |
// Footer
|
298 |
add_action('admin_footer', array($this, 'load_footer'));
|
299 |
|
@@ -493,6 +483,7 @@ class acfe_form{
|
|
493 |
$form_name = get_field('acfe_form_name', $form_id);
|
494 |
|
495 |
?>
|
|
|
496 |
<div class="acf-field">
|
497 |
|
498 |
<div class="acf-label">
|
@@ -1786,7 +1777,7 @@ function my_form_validation($form, $post_id){
|
|
1786 |
|
1787 |
}
|
1788 |
|
1789 |
-
function
|
1790 |
|
1791 |
$form_name = 'my_form';
|
1792 |
|
@@ -1833,6 +1824,31 @@ function my_form_submit($form, $post_id){
|
|
1833 |
|
1834 |
}
|
1835 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1836 |
function doc_field($field){
|
1837 |
?>
|
1838 |
<table class="acf-table">
|
@@ -1929,20 +1945,218 @@ function my_form_submit($form, $post_id){
|
|
1929 |
<table class="acf-table">
|
1930 |
<tbody>
|
1931 |
<tr class="acf-row">
|
1932 |
-
<td width="35%"><code>{query_var:
|
1933 |
<td>128</td>
|
1934 |
</tr>
|
1935 |
<tr class="acf-row">
|
1936 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1937 |
<td>Title</td>
|
1938 |
</tr>
|
1939 |
<tr class="acf-row">
|
1940 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
1941 |
<td><?php echo home_url('my-post'); ?></td>
|
1942 |
</tr>
|
1943 |
<tr class="acf-row">
|
1944 |
-
<td width="35%"><code>{query_var:
|
1945 |
-
<td
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1946 |
</tr>
|
1947 |
</tbody>
|
1948 |
</table>
|
@@ -1952,20 +2166,56 @@ function my_form_submit($form, $post_id){
|
|
1952 |
<table class="acf-table">
|
1953 |
<tbody>
|
1954 |
<tr class="acf-row">
|
1955 |
-
<td width="35%"><code>{query_var:
|
1956 |
<td>23</td>
|
1957 |
</tr>
|
1958 |
<tr class="acf-row">
|
1959 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
1960 |
<td>Term</td>
|
1961 |
</tr>
|
1962 |
<tr class="acf-row">
|
1963 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
1964 |
<td><?php echo home_url('taxonomy/term'); ?></td>
|
1965 |
</tr>
|
1966 |
<tr class="acf-row">
|
1967 |
-
<td width="35%"><code>{query_var:
|
1968 |
-
<td
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1969 |
</tr>
|
1970 |
</tbody>
|
1971 |
</table>
|
@@ -1975,44 +2225,156 @@ function my_form_submit($form, $post_id){
|
|
1975 |
<table class="acf-table">
|
1976 |
<tbody>
|
1977 |
<tr class="acf-row">
|
1978 |
-
<td width="35%"><code>{query_var:
|
1979 |
<td>1</td>
|
1980 |
</tr>
|
1981 |
<tr class="acf-row">
|
1982 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1983 |
<td>user@domain.com</td>
|
1984 |
</tr>
|
1985 |
<tr class="acf-row">
|
1986 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1987 |
<td>John Doe</td>
|
1988 |
</tr>
|
1989 |
<tr class="acf-row">
|
1990 |
-
<td width="35%"><code>{query_var:
|
1991 |
-
<td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1992 |
</tr>
|
1993 |
</tbody>
|
1994 |
</table>
|
1995 |
|
1996 |
<br />
|
1997 |
-
|
1998 |
<table class="acf-table">
|
1999 |
<tbody>
|
2000 |
<tr class="acf-row">
|
2001 |
-
<td width="35%"><code>{query_var:
|
2002 |
<td>Website <email@domain.com></td>
|
2003 |
</tr>
|
2004 |
<tr class="acf-row">
|
2005 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
2006 |
<td>email@domain.com</td>
|
2007 |
</tr>
|
2008 |
<tr class="acf-row">
|
2009 |
-
<td width="35%"><code>{query_var:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010 |
<td>Subject</td>
|
2011 |
</tr>
|
2012 |
<tr class="acf-row">
|
2013 |
-
<td width="35%"><code>{query_var:
|
2014 |
<td>Content</td>
|
2015 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016 |
</tbody>
|
2017 |
</table>
|
2018 |
<?php
|
@@ -2051,6 +2413,116 @@ function my_form_submit($form, $post_id){
|
|
2051 |
<td width="35%"><code>{current:post:post_author}</code></td>
|
2052 |
<td>1</td>
|
2053 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2054 |
<tr class="acf-row">
|
2055 |
<td width="35%"><code>{current:post:post_date}</code></td>
|
2056 |
<td>2020-03-01 20:07:48</td>
|
@@ -2675,6 +3147,45 @@ function acfe_form_map_current($content, $post_id = 0, $form = array()){
|
|
2675 |
|
2676 |
}
|
2677 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2678 |
// other
|
2679 |
else{
|
2680 |
|
@@ -3224,6 +3735,8 @@ function acfe_form_map_fields($content){
|
|
3224 |
|
3225 |
}
|
3226 |
|
|
|
|
|
3227 |
// Replace
|
3228 |
$content = str_replace('{fields}', $content_html, $content);
|
3229 |
|
25 |
|
26 |
// Admin
|
27 |
add_action('init', array($this, 'init'));
|
|
|
28 |
add_action('current_screen', array($this, 'current_screen'));
|
29 |
add_filter('post_row_actions', array($this, 'row_actions'), 10, 2);
|
30 |
|
51 |
|
52 |
add_action('acf/render_field/name=acfe_form_validation_advanced_field_validation', array($this, 'doc_validation_field'));
|
53 |
add_action('acf/render_field/name=acfe_form_validation_advanced_form_validation', array($this, 'doc_validation_form'));
|
54 |
+
add_action('acf/render_field/name=acfe_form_submission_advanced_submission_php', array($this, 'doc_submission_php'));
|
55 |
+
add_action('acf/render_field/name=acfe_form_submission_advanced_submission_js', array($this, 'doc_submission_js'));
|
56 |
|
57 |
add_action('acf/render_field/name=acfe_form_cheatsheet_field', array($this, 'doc_field'));
|
58 |
add_action('acf/render_field/name=acfe_form_cheatsheet_fields', array($this, 'doc_fields'));
|
96 |
'hierarchical' => false,
|
97 |
'public' => false,
|
98 |
'show_ui' => true,
|
99 |
+
'show_in_menu' => 'edit.php?post_type=acf-field-group',
|
100 |
'menu_icon' => 'dashicons-feedback',
|
101 |
'show_in_admin_bar' => false,
|
102 |
'show_in_nav_menus' => false,
|
123 |
|
124 |
}
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
function current_screen(){
|
127 |
|
128 |
global $typenow;
|
179 |
continue;
|
180 |
|
181 |
$alias = get_sub_field('acfe_form_custom_alias');
|
|
|
182 |
|
183 |
$action_label = '';
|
184 |
$action_type = '';
|
243 |
|
244 |
}
|
245 |
|
246 |
+
if(empty($alias)){
|
247 |
+
|
248 |
+
$alias = acfe_form_unique_action_id(array('form_name' => get_field('acfe_form_name', $form_id)), $action);
|
249 |
+
|
250 |
+
}
|
251 |
|
252 |
$this->query_vars[] = array(
|
253 |
'action' => $action,
|
264 |
}
|
265 |
|
266 |
function load_post_new(){
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Submenu Highlight
|
270 |
+
*/
|
271 |
+
add_filter('submenu_file', function(){
|
272 |
+
|
273 |
+
return 'edit.php?post_type=acfe-form';
|
274 |
+
|
275 |
+
});
|
276 |
|
277 |
}
|
278 |
|
284 |
// Metaboxes
|
285 |
remove_meta_box('slugdiv', $this->post_type, 'normal');
|
286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
// Footer
|
288 |
add_action('admin_footer', array($this, 'load_footer'));
|
289 |
|
483 |
$form_name = get_field('acfe_form_name', $form_id);
|
484 |
|
485 |
?>
|
486 |
+
|
487 |
<div class="acf-field">
|
488 |
|
489 |
<div class="acf-label">
|
1777 |
|
1778 |
}
|
1779 |
|
1780 |
+
function doc_submission_php($field){
|
1781 |
|
1782 |
$form_name = 'my_form';
|
1783 |
|
1824 |
|
1825 |
}
|
1826 |
|
1827 |
+
function doc_submission_js($field){
|
1828 |
+
|
1829 |
+
$form_name = 'my_form';
|
1830 |
+
|
1831 |
+
if(acf_maybe_get($field, 'value'))
|
1832 |
+
$form_name = get_field('acfe_form_name', $field['value']);
|
1833 |
+
|
1834 |
+
?>You may use the following hooks:<br /><br />
|
1835 |
+
|
1836 |
+
<pre>
|
1837 |
+
acf.addAction('acfe/form/submit/success');
|
1838 |
+
acf.addAction('acfe/form/submit/success/id=<?php echo get_the_ID(); ?>');
|
1839 |
+
acf.addAction('acfe/form/submit/success/name=<?php echo $form_name; ?>');</pre>
|
1840 |
+
|
1841 |
+
<br />
|
1842 |
+
|
1843 |
+
<pre>acf.addAction('acfe/form/submit/success/name=<?php echo $form_name; ?>', function(){
|
1844 |
+
|
1845 |
+
// Do something...
|
1846 |
+
|
1847 |
+
});</pre>
|
1848 |
+
<?php
|
1849 |
+
|
1850 |
+
}
|
1851 |
+
|
1852 |
function doc_field($field){
|
1853 |
?>
|
1854 |
<table class="acf-table">
|
1945 |
<table class="acf-table">
|
1946 |
<tbody>
|
1947 |
<tr class="acf-row">
|
1948 |
+
<td width="35%"><code>{query_var:post:ID}</code></td>
|
1949 |
<td>128</td>
|
1950 |
</tr>
|
1951 |
<tr class="acf-row">
|
1952 |
+
<td width="35%"><code>{query_var:post:post_author}</code></td>
|
1953 |
+
<td>1</td>
|
1954 |
+
</tr>
|
1955 |
+
|
1956 |
+
<tr class="acf-row">
|
1957 |
+
<td width="35%"><code>{query_var:post:post_author_data:ID}</code></td>
|
1958 |
+
<td>1</td>
|
1959 |
+
</tr>
|
1960 |
+
<tr class="acf-row">
|
1961 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_login}</code></td>
|
1962 |
+
<td>login</td>
|
1963 |
+
</tr>
|
1964 |
+
<tr class="acf-row">
|
1965 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_pass}</code></td>
|
1966 |
+
<td>password_hash</td>
|
1967 |
+
</tr>
|
1968 |
+
<tr class="acf-row">
|
1969 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_nicename}</code></td>
|
1970 |
+
<td>nicename</td>
|
1971 |
+
</tr>
|
1972 |
+
<tr class="acf-row">
|
1973 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_email}</code></td>
|
1974 |
+
<td>user@domain.com</td>
|
1975 |
+
</tr>
|
1976 |
+
<tr class="acf-row">
|
1977 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_url}</code></td>
|
1978 |
+
<td>https://www.website.com</td>
|
1979 |
+
</tr>
|
1980 |
+
<tr class="acf-row">
|
1981 |
+
<td width="35%"><code>{query_var:post:post_author_data:permalink}</code></td>
|
1982 |
+
<td><?php echo home_url('author/johndoe'); ?></td>
|
1983 |
+
</tr>
|
1984 |
+
<tr class="acf-row">
|
1985 |
+
<td width="35%"><code>{query_var:post:post_author_data:admin_url}</code></td>
|
1986 |
+
<td><?php echo admin_url('user-edit.php?user_id=1'); ?></td>
|
1987 |
+
</tr>
|
1988 |
+
<tr class="acf-row">
|
1989 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_registered}</code></td>
|
1990 |
+
<td>2020-02-22 22:10:02</td>
|
1991 |
+
</tr>
|
1992 |
+
<tr class="acf-row">
|
1993 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_activation_key}</code></td>
|
1994 |
+
<td></td>
|
1995 |
+
</tr>
|
1996 |
+
<tr class="acf-row">
|
1997 |
+
<td width="35%"><code>{query_var:post:post_author_data:user_status}</code></td>
|
1998 |
+
<td>0</td>
|
1999 |
+
</tr>
|
2000 |
+
<tr class="acf-row">
|
2001 |
+
<td width="35%"><code>{query_var:post:post_author_data:display_name}</code></td>
|
2002 |
+
<td>John Doe</td>
|
2003 |
+
</tr>
|
2004 |
+
<tr class="acf-row">
|
2005 |
+
<td width="35%"><code>{query_var:post:post_author_data:nickname}</code></td>
|
2006 |
+
<td>JohnDoe</td>
|
2007 |
+
</tr>
|
2008 |
+
<tr class="acf-row">
|
2009 |
+
<td width="35%"><code>{query_var:post:post_author_data:first_name}</code></td>
|
2010 |
+
<td>John</td>
|
2011 |
+
</tr>
|
2012 |
+
<tr class="acf-row">
|
2013 |
+
<td width="35%"><code>{query_var:post:post_author_data:last_name}</code></td>
|
2014 |
+
<td>Doe</td>
|
2015 |
+
</tr>
|
2016 |
+
<tr class="acf-row">
|
2017 |
+
<td width="35%"><code>{query_var:post:post_author_data:description}</code></td>
|
2018 |
+
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
|
2019 |
+
</tr>
|
2020 |
+
<tr class="acf-row">
|
2021 |
+
<td width="35%"><code>{query_var:post:post_author_data:rich_editing}</code></td>
|
2022 |
+
<td>true</td>
|
2023 |
+
</tr>
|
2024 |
+
<tr class="acf-row">
|
2025 |
+
<td width="35%"><code>{query_var:post:post_author_data:syntax_highlighting}</code></td>
|
2026 |
+
<td>true</td>
|
2027 |
+
</tr>
|
2028 |
+
<tr class="acf-row">
|
2029 |
+
<td width="35%"><code>{query_var:post:post_author_data:comment_shortcuts}</code></td>
|
2030 |
+
<td>false</td>
|
2031 |
+
</tr>
|
2032 |
+
<tr class="acf-row">
|
2033 |
+
<td width="35%"><code>{query_var:post:post_author_data:admin_color}</code></td>
|
2034 |
+
<td>fresh</td>
|
2035 |
+
</tr>
|
2036 |
+
<tr class="acf-row">
|
2037 |
+
<td width="35%"><code>{query_var:post:post_author_data:use_ssl}</code></td>
|
2038 |
+
<td>1</td>
|
2039 |
+
</tr>
|
2040 |
+
<tr class="acf-row">
|
2041 |
+
<td width="35%"><code>{query_var:post:post_author_data:show_admin_bar_front}</code></td>
|
2042 |
+
<td>true</td>
|
2043 |
+
</tr>
|
2044 |
+
<tr class="acf-row">
|
2045 |
+
<td width="35%"><code>{query_var:post:post_author_data:locale}</code></td>
|
2046 |
+
<td></td>
|
2047 |
+
</tr>
|
2048 |
+
<tr class="acf-row">
|
2049 |
+
<td width="35%"><code>{query_var:post:post_author_data:wp_capabilities}</code></td>
|
2050 |
+
<td>a:1:{s:13:"administrator";b:1;}</td>
|
2051 |
+
</tr>
|
2052 |
+
<tr class="acf-row">
|
2053 |
+
<td width="35%"><code>{query_var:post:post_author_data:wp_user_level}</code></td>
|
2054 |
+
<td>10</td>
|
2055 |
+
</tr>
|
2056 |
+
<tr class="acf-row">
|
2057 |
+
<td width="35%"><code>{query_var:post:post_author_data:dismissed_wp_pointers}</code></td>
|
2058 |
+
<td></td>
|
2059 |
+
</tr>
|
2060 |
+
<tr class="acf-row">
|
2061 |
+
<td width="35%"><code>{query_var:post:post_author_data:show_welcome_panel}</code></td>
|
2062 |
+
<td>1</td>
|
2063 |
+
</tr>
|
2064 |
+
|
2065 |
+
<tr class="acf-row">
|
2066 |
+
<td width="35%"><code>{query_var:post:post_date}</code></td>
|
2067 |
+
<td>2020-03-01 20:07:48</td>
|
2068 |
+
</tr>
|
2069 |
+
<tr class="acf-row">
|
2070 |
+
<td width="35%"><code>{query_var:post:post_date_gmt}</code></td>
|
2071 |
+
<td>2020-03-01 19:07:48</td>
|
2072 |
+
</tr>
|
2073 |
+
<tr class="acf-row">
|
2074 |
+
<td width="35%"><code>{query_var:post:post_content}</code></td>
|
2075 |
+
<td>Content</td>
|
2076 |
+
</tr>
|
2077 |
+
<tr class="acf-row">
|
2078 |
+
<td width="35%"><code>{query_var:post:post_title}</code></td>
|
2079 |
<td>Title</td>
|
2080 |
</tr>
|
2081 |
<tr class="acf-row">
|
2082 |
+
<td width="35%"><code>{query_var:post:post_excerpt}</code></td>
|
2083 |
+
<td>Excerpt</td>
|
2084 |
+
</tr>
|
2085 |
+
<tr class="acf-row">
|
2086 |
+
<td width="35%"><code>{query_var:post:permalink}</code></td>
|
2087 |
<td><?php echo home_url('my-post'); ?></td>
|
2088 |
</tr>
|
2089 |
<tr class="acf-row">
|
2090 |
+
<td width="35%"><code>{query_var:post:admin_url}</code></td>
|
2091 |
+
<td><?php echo admin_url('post.php?post=128&action=edit'); ?></td>
|
2092 |
+
</tr>
|
2093 |
+
<tr class="acf-row">
|
2094 |
+
<td width="35%"><code>{query_var:post:post_status}</code></td>
|
2095 |
+
<td>publish</td>
|
2096 |
+
</tr>
|
2097 |
+
<tr class="acf-row">
|
2098 |
+
<td width="35%"><code>{query_var:post:comment_status}</code></td>
|
2099 |
+
<td>closed</td>
|
2100 |
+
</tr>
|
2101 |
+
<tr class="acf-row">
|
2102 |
+
<td width="35%"><code>{query_var:post:ping_status}</code></td>
|
2103 |
+
<td>closed</td>
|
2104 |
+
</tr>
|
2105 |
+
<tr class="acf-row">
|
2106 |
+
<td width="35%"><code>{query_var:post:post_password}</code></td>
|
2107 |
+
<td>password</td>
|
2108 |
+
</tr>
|
2109 |
+
<tr class="acf-row">
|
2110 |
+
<td width="35%"><code>{query_var:post:post_name}</code></td>
|
2111 |
+
<td>name</td>
|
2112 |
+
</tr>
|
2113 |
+
<tr class="acf-row">
|
2114 |
+
<td width="35%"><code>{query_var:post:to_ping}</code></td>
|
2115 |
+
<td></td>
|
2116 |
+
</tr>
|
2117 |
+
<tr class="acf-row">
|
2118 |
+
<td width="35%"><code>{query_var:post:pinged}</code></td>
|
2119 |
+
<td></td>
|
2120 |
+
</tr>
|
2121 |
+
<tr class="acf-row">
|
2122 |
+
<td width="35%"><code>{query_var:post:post_modified}</code></td>
|
2123 |
+
<td>2020-03-01 20:07:48</td>
|
2124 |
+
</tr>
|
2125 |
+
<tr class="acf-row">
|
2126 |
+
<td width="35%"><code>{query_var:post:post_modified_gmt}</code></td>
|
2127 |
+
<td>2020-03-01 19:07:48</td>
|
2128 |
+
</tr>
|
2129 |
+
<tr class="acf-row">
|
2130 |
+
<td width="35%"><code>{query_var:post:post_content_filtered}</code></td>
|
2131 |
+
<td></td>
|
2132 |
+
</tr>
|
2133 |
+
<tr class="acf-row">
|
2134 |
+
<td width="35%"><code>{query_var:post:post_parent}</code></td>
|
2135 |
+
<td>0</td>
|
2136 |
+
</tr>
|
2137 |
+
<tr class="acf-row">
|
2138 |
+
<td width="35%"><code>{query_var:post:guid}</code></td>
|
2139 |
+
<td><?php echo home_url('?page_id=128'); ?></td>
|
2140 |
+
</tr>
|
2141 |
+
<tr class="acf-row">
|
2142 |
+
<td width="35%"><code>{query_var:post:menu_order}</code></td>
|
2143 |
+
<td>0</td>
|
2144 |
+
</tr>
|
2145 |
+
<tr class="acf-row">
|
2146 |
+
<td width="35%"><code>{query_var:post:post_type}</code></td>
|
2147 |
+
<td>page</td>
|
2148 |
+
</tr>
|
2149 |
+
<tr class="acf-row">
|
2150 |
+
<td width="35%"><code>{query_var:post:post_mime_type}</code></td>
|
2151 |
+
<td></td>
|
2152 |
+
</tr>
|
2153 |
+
<tr class="acf-row">
|
2154 |
+
<td width="35%"><code>{query_var:post:comment_count}</code></td>
|
2155 |
+
<td>0</td>
|
2156 |
+
</tr>
|
2157 |
+
<tr class="acf-row">
|
2158 |
+
<td width="35%"><code>{query_var:post:filter}</code></td>
|
2159 |
+
<td>raw</td>
|
2160 |
</tr>
|
2161 |
</tbody>
|
2162 |
</table>
|
2166 |
<table class="acf-table">
|
2167 |
<tbody>
|
2168 |
<tr class="acf-row">
|
2169 |
+
<td width="35%"><code>{query_var:term:ID}</code></td>
|
2170 |
<td>23</td>
|
2171 |
</tr>
|
2172 |
<tr class="acf-row">
|
2173 |
+
<td width="35%"><code>{query_var:term:term_id}</code></td>
|
2174 |
+
<td>23</td>
|
2175 |
+
</tr>
|
2176 |
+
<tr class="acf-row">
|
2177 |
+
<td width="35%"><code>{query_var:term:name}</code></td>
|
2178 |
<td>Term</td>
|
2179 |
</tr>
|
2180 |
<tr class="acf-row">
|
2181 |
+
<td width="35%"><code>{query_var:term:slug}</code></td>
|
2182 |
+
<td>term</td>
|
2183 |
+
</tr>
|
2184 |
+
<tr class="acf-row">
|
2185 |
+
<td width="35%"><code>{query_var:term:permalink}</code></td>
|
2186 |
<td><?php echo home_url('taxonomy/term'); ?></td>
|
2187 |
</tr>
|
2188 |
<tr class="acf-row">
|
2189 |
+
<td width="35%"><code>{query_var:term:admin_url}</code></td>
|
2190 |
+
<td><?php echo admin_url('term.php?tag_ID=23'); ?></td>
|
2191 |
+
</tr>
|
2192 |
+
<tr class="acf-row">
|
2193 |
+
<td width="35%"><code>{query_var:term:term_group}</code></td>
|
2194 |
+
<td>0</td>
|
2195 |
+
</tr>
|
2196 |
+
<tr class="acf-row">
|
2197 |
+
<td width="35%"><code>{query_var:term:term_taxonomy_id}</code></td>
|
2198 |
+
<td>23</td>
|
2199 |
+
</tr>
|
2200 |
+
<tr class="acf-row">
|
2201 |
+
<td width="35%"><code>{query_var:term:taxonomy}</code></td>
|
2202 |
+
<td>taxonomy</td>
|
2203 |
+
</tr>
|
2204 |
+
<tr class="acf-row">
|
2205 |
+
<td width="35%"><code>{query_var:term:description}</code></td>
|
2206 |
+
<td>Content</td>
|
2207 |
+
</tr>
|
2208 |
+
<tr class="acf-row">
|
2209 |
+
<td width="35%"><code>{query_var:term:parent}</code></td>
|
2210 |
+
<td>0</td>
|
2211 |
+
</tr>
|
2212 |
+
<tr class="acf-row">
|
2213 |
+
<td width="35%"><code>{query_var:term:count}</code></td>
|
2214 |
+
<td>0</td>
|
2215 |
+
</tr>
|
2216 |
+
<tr class="acf-row">
|
2217 |
+
<td width="35%"><code>{query_var:term:filter}</code></td>
|
2218 |
+
<td>raw</td>
|
2219 |
</tr>
|
2220 |
</tbody>
|
2221 |
</table>
|
2225 |
<table class="acf-table">
|
2226 |
<tbody>
|
2227 |
<tr class="acf-row">
|
2228 |
+
<td width="35%"><code>{query_var:user:ID}</code></td>
|
2229 |
<td>1</td>
|
2230 |
</tr>
|
2231 |
<tr class="acf-row">
|
2232 |
+
<td width="35%"><code>{query_var:user:user_login}</code></td>
|
2233 |
+
<td>login</td>
|
2234 |
+
</tr>
|
2235 |
+
<tr class="acf-row">
|
2236 |
+
<td width="35%"><code>{query_var:user:user_pass}</code></td>
|
2237 |
+
<td>password_hash</td>
|
2238 |
+
</tr>
|
2239 |
+
<tr class="acf-row">
|
2240 |
+
<td width="35%"><code>{query_var:user:user_nicename}</code></td>
|
2241 |
+
<td>nicename</td>
|
2242 |
+
</tr>
|
2243 |
+
<tr class="acf-row">
|
2244 |
+
<td width="35%"><code>{query_var:user:user_email}</code></td>
|
2245 |
<td>user@domain.com</td>
|
2246 |
</tr>
|
2247 |
<tr class="acf-row">
|
2248 |
+
<td width="35%"><code>{query_var:user:user_url}</code></td>
|
2249 |
+
<td>https://www.website.com</td>
|
2250 |
+
</tr>
|
2251 |
+
<tr class="acf-row">
|
2252 |
+
<td width="35%"><code>{query_var:user:permalink}</code></td>
|
2253 |
+
<td><?php echo home_url('author/johndoe'); ?></td>
|
2254 |
+
</tr>
|
2255 |
+
<tr class="acf-row">
|
2256 |
+
<td width="35%"><code>{query_var:user:admin_url}</code></td>
|
2257 |
+
<td><?php echo admin_url('user-edit.php?user_id=1'); ?></td>
|
2258 |
+
</tr>
|
2259 |
+
<tr class="acf-row">
|
2260 |
+
<td width="35%"><code>{query_var:user:user_registered}</code></td>
|
2261 |
+
<td>2020-02-22 22:10:02</td>
|
2262 |
+
</tr>
|
2263 |
+
<tr class="acf-row">
|
2264 |
+
<td width="35%"><code>{query_var:user:user_activation_key}</code></td>
|
2265 |
+
<td></td>
|
2266 |
+
</tr>
|
2267 |
+
<tr class="acf-row">
|
2268 |
+
<td width="35%"><code>{query_var:user:user_status}</code></td>
|
2269 |
+
<td>0</td>
|
2270 |
+
</tr>
|
2271 |
+
<tr class="acf-row">
|
2272 |
+
<td width="35%"><code>{query_var:user:display_name}</code></td>
|
2273 |
<td>John Doe</td>
|
2274 |
</tr>
|
2275 |
<tr class="acf-row">
|
2276 |
+
<td width="35%"><code>{query_var:user:nickname}</code></td>
|
2277 |
+
<td>JohnDoe</td>
|
2278 |
+
</tr>
|
2279 |
+
<tr class="acf-row">
|
2280 |
+
<td width="35%"><code>{query_var:user:first_name}</code></td>
|
2281 |
+
<td>John</td>
|
2282 |
+
</tr>
|
2283 |
+
<tr class="acf-row">
|
2284 |
+
<td width="35%"><code>{query_var:user:last_name}</code></td>
|
2285 |
+
<td>Doe</td>
|
2286 |
+
</tr>
|
2287 |
+
<tr class="acf-row">
|
2288 |
+
<td width="35%"><code>{query_var:user:description}</code></td>
|
2289 |
+
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
|
2290 |
+
</tr>
|
2291 |
+
<tr class="acf-row">
|
2292 |
+
<td width="35%"><code>{query_var:user:rich_editing}</code></td>
|
2293 |
+
<td>true</td>
|
2294 |
+
</tr>
|
2295 |
+
<tr class="acf-row">
|
2296 |
+
<td width="35%"><code>{query_var:user:syntax_highlighting}</code></td>
|
2297 |
+
<td>true</td>
|
2298 |
+
</tr>
|
2299 |
+
<tr class="acf-row">
|
2300 |
+
<td width="35%"><code>{query_var:user:comment_shortcuts}</code></td>
|
2301 |
+
<td>false</td>
|
2302 |
+
</tr>
|
2303 |
+
<tr class="acf-row">
|
2304 |
+
<td width="35%"><code>{query_var:user:admin_color}</code></td>
|
2305 |
+
<td>fresh</td>
|
2306 |
+
</tr>
|
2307 |
+
<tr class="acf-row">
|
2308 |
+
<td width="35%"><code>{query_var:user:use_ssl}</code></td>
|
2309 |
+
<td>1</td>
|
2310 |
+
</tr>
|
2311 |
+
<tr class="acf-row">
|
2312 |
+
<td width="35%"><code>{query_var:user:show_admin_bar_front}</code></td>
|
2313 |
+
<td>true</td>
|
2314 |
+
</tr>
|
2315 |
+
<tr class="acf-row">
|
2316 |
+
<td width="35%"><code>{query_var:user:locale}</code></td>
|
2317 |
+
<td></td>
|
2318 |
+
</tr>
|
2319 |
+
<tr class="acf-row">
|
2320 |
+
<td width="35%"><code>{query_var:user:wp_capabilities}</code></td>
|
2321 |
+
<td>a:1:{s:13:"administrator";b:1;}</td>
|
2322 |
+
</tr>
|
2323 |
+
<tr class="acf-row">
|
2324 |
+
<td width="35%"><code>{query_var:user:wp_user_level}</code></td>
|
2325 |
+
<td>10</td>
|
2326 |
+
</tr>
|
2327 |
+
<tr class="acf-row">
|
2328 |
+
<td width="35%"><code>{query_var:user:dismissed_wp_pointers}</code></td>
|
2329 |
+
<td></td>
|
2330 |
+
</tr>
|
2331 |
+
<tr class="acf-row">
|
2332 |
+
<td width="35%"><code>{query_var:user:show_welcome_panel}</code></td>
|
2333 |
+
<td>1</td>
|
2334 |
</tr>
|
2335 |
</tbody>
|
2336 |
</table>
|
2337 |
|
2338 |
<br />
|
2339 |
+
|
2340 |
<table class="acf-table">
|
2341 |
<tbody>
|
2342 |
<tr class="acf-row">
|
2343 |
+
<td width="35%"><code>{query_var:email:from}</code></td>
|
2344 |
<td>Website <email@domain.com></td>
|
2345 |
</tr>
|
2346 |
<tr class="acf-row">
|
2347 |
+
<td width="35%"><code>{query_var:email:to}</code></td>
|
2348 |
+
<td>email@domain.com</td>
|
2349 |
+
</tr>
|
2350 |
+
<tr class="acf-row">
|
2351 |
+
<td width="35%"><code>{query_var:email:reply_to}</code></td>
|
2352 |
<td>email@domain.com</td>
|
2353 |
</tr>
|
2354 |
<tr class="acf-row">
|
2355 |
+
<td width="35%"><code>{query_var:email:cc}</code></td>
|
2356 |
+
<td>email@domain.com</td>
|
2357 |
+
</tr>
|
2358 |
+
<tr class="acf-row">
|
2359 |
+
<td width="35%"><code>{query_var:email:bcc}</code></td>
|
2360 |
+
<td>email@domain.com</td>
|
2361 |
+
</tr>
|
2362 |
+
<tr class="acf-row">
|
2363 |
+
<td width="35%"><code>{query_var:email:subject}</code></td>
|
2364 |
<td>Subject</td>
|
2365 |
</tr>
|
2366 |
<tr class="acf-row">
|
2367 |
+
<td width="35%"><code>{query_var:email:content}</code></td>
|
2368 |
<td>Content</td>
|
2369 |
</tr>
|
2370 |
+
<tr class="acf-row">
|
2371 |
+
<td width="35%"><code>{query_var:email:headers}</code></td>
|
2372 |
+
<td>Array</td>
|
2373 |
+
</tr>
|
2374 |
+
<tr class="acf-row">
|
2375 |
+
<td width="35%"><code>{query_var:email:attachments}</code></td>
|
2376 |
+
<td>Array</td>
|
2377 |
+
</tr>
|
2378 |
</tbody>
|
2379 |
</table>
|
2380 |
<?php
|
2413 |
<td width="35%"><code>{current:post:post_author}</code></td>
|
2414 |
<td>1</td>
|
2415 |
</tr>
|
2416 |
+
|
2417 |
+
<tr class="acf-row">
|
2418 |
+
<td width="35%"><code>{current:post:post_author_data:ID}</code></td>
|
2419 |
+
<td>1</td>
|
2420 |
+
</tr>
|
2421 |
+
<tr class="acf-row">
|
2422 |
+
<td width="35%"><code>{current:post:post_author_data:user_login}</code></td>
|
2423 |
+
<td>login</td>
|
2424 |
+
</tr>
|
2425 |
+
<tr class="acf-row">
|
2426 |
+
<td width="35%"><code>{current:post:post_author_data:user_pass}</code></td>
|
2427 |
+
<td>password_hash</td>
|
2428 |
+
</tr>
|
2429 |
+
<tr class="acf-row">
|
2430 |
+
<td width="35%"><code>{current:post:post_author_data:user_nicename}</code></td>
|
2431 |
+
<td>nicename</td>
|
2432 |
+
</tr>
|
2433 |
+
<tr class="acf-row">
|
2434 |
+
<td width="35%"><code>{current:post:post_author_data:user_email}</code></td>
|
2435 |
+
<td>user@domain.com</td>
|
2436 |
+
</tr>
|
2437 |
+
<tr class="acf-row">
|
2438 |
+
<td width="35%"><code>{current:post:post_author_data:user_url}</code></td>
|
2439 |
+
<td>https://www.website.com</td>
|
2440 |
+
</tr>
|
2441 |
+
<tr class="acf-row">
|
2442 |
+
<td width="35%"><code>{current:post:post_author_data:permalink}</code></td>
|
2443 |
+
<td><?php echo home_url('author/johndoe'); ?></td>
|
2444 |
+
</tr>
|
2445 |
+
<tr class="acf-row">
|
2446 |
+
<td width="35%"><code>{current:post:post_author_data:admin_url}</code></td>
|
2447 |
+
<td><?php echo admin_url('user-edit.php?user_id=1'); ?></td>
|
2448 |
+
</tr>
|
2449 |
+
<tr class="acf-row">
|
2450 |
+
<td width="35%"><code>{current:post:post_author_data:user_registered}</code></td>
|
2451 |
+
<td>2020-02-22 22:10:02</td>
|
2452 |
+
</tr>
|
2453 |
+
<tr class="acf-row">
|
2454 |
+
<td width="35%"><code>{current:post:post_author_data:user_activation_key}</code></td>
|
2455 |
+
<td></td>
|
2456 |
+
</tr>
|
2457 |
+
<tr class="acf-row">
|
2458 |
+
<td width="35%"><code>{current:post:post_author_data:user_status}</code></td>
|
2459 |
+
<td>0</td>
|
2460 |
+
</tr>
|
2461 |
+
<tr class="acf-row">
|
2462 |
+
<td width="35%"><code>{current:post:post_author_data:display_name}</code></td>
|
2463 |
+
<td>John Doe</td>
|
2464 |
+
</tr>
|
2465 |
+
<tr class="acf-row">
|
2466 |
+
<td width="35%"><code>{current:post:post_author_data:nickname}</code></td>
|
2467 |
+
<td>JohnDoe</td>
|
2468 |
+
</tr>
|
2469 |
+
<tr class="acf-row">
|
2470 |
+
<td width="35%"><code>{current:post:post_author_data:first_name}</code></td>
|
2471 |
+
<td>John</td>
|
2472 |
+
</tr>
|
2473 |
+
<tr class="acf-row">
|
2474 |
+
<td width="35%"><code>{current:post:post_author_data:last_name}</code></td>
|
2475 |
+
<td>Doe</td>
|
2476 |
+
</tr>
|
2477 |
+
<tr class="acf-row">
|
2478 |
+
<td width="35%"><code>{current:post:post_author_data:description}</code></td>
|
2479 |
+
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
|
2480 |
+
</tr>
|
2481 |
+
<tr class="acf-row">
|
2482 |
+
<td width="35%"><code>{current:post:post_author_data:rich_editing}</code></td>
|
2483 |
+
<td>true</td>
|
2484 |
+
</tr>
|
2485 |
+
<tr class="acf-row">
|
2486 |
+
<td width="35%"><code>{current:post:post_author_data:syntax_highlighting}</code></td>
|
2487 |
+
<td>true</td>
|
2488 |
+
</tr>
|
2489 |
+
<tr class="acf-row">
|
2490 |
+
<td width="35%"><code>{current:post:post_author_data:comment_shortcuts}</code></td>
|
2491 |
+
<td>false</td>
|
2492 |
+
</tr>
|
2493 |
+
<tr class="acf-row">
|
2494 |
+
<td width="35%"><code>{current:post:post_author_data:admin_color}</code></td>
|
2495 |
+
<td>fresh</td>
|
2496 |
+
</tr>
|
2497 |
+
<tr class="acf-row">
|
2498 |
+
<td width="35%"><code>{current:post:post_author_data:use_ssl}</code></td>
|
2499 |
+
<td>1</td>
|
2500 |
+
</tr>
|
2501 |
+
<tr class="acf-row">
|
2502 |
+
<td width="35%"><code>{current:post:post_author_data:show_admin_bar_front}</code></td>
|
2503 |
+
<td>true</td>
|
2504 |
+
</tr>
|
2505 |
+
<tr class="acf-row">
|
2506 |
+
<td width="35%"><code>{current:post:post_author_data:locale}</code></td>
|
2507 |
+
<td></td>
|
2508 |
+
</tr>
|
2509 |
+
<tr class="acf-row">
|
2510 |
+
<td width="35%"><code>{current:post:post_author_data:wp_capabilities}</code></td>
|
2511 |
+
<td>a:1:{s:13:"administrator";b:1;}</td>
|
2512 |
+
</tr>
|
2513 |
+
<tr class="acf-row">
|
2514 |
+
<td width="35%"><code>{current:post:post_author_data:wp_user_level}</code></td>
|
2515 |
+
<td>10</td>
|
2516 |
+
</tr>
|
2517 |
+
<tr class="acf-row">
|
2518 |
+
<td width="35%"><code>{current:post:post_author_data:dismissed_wp_pointers}</code></td>
|
2519 |
+
<td></td>
|
2520 |
+
</tr>
|
2521 |
+
<tr class="acf-row">
|
2522 |
+
<td width="35%"><code>{current:post:post_author_data:show_welcome_panel}</code></td>
|
2523 |
+
<td>1</td>
|
2524 |
+
</tr>
|
2525 |
+
|
2526 |
<tr class="acf-row">
|
2527 |
<td width="35%"><code>{current:post:post_date}</code></td>
|
2528 |
<td>2020-03-01 20:07:48</td>
|
3147 |
|
3148 |
}
|
3149 |
|
3150 |
+
// post_author_data
|
3151 |
+
elseif(strtolower($field) === 'post_author_data'){
|
3152 |
+
|
3153 |
+
// Retrieve Post Author data
|
3154 |
+
$post_author = get_post_field('post_author', $post['id']);
|
3155 |
+
$user_object = get_user_by('ID', $post_author);
|
3156 |
+
|
3157 |
+
if(isset($user_object->data)){
|
3158 |
+
|
3159 |
+
$user = json_decode(json_encode($user_object->data), true);
|
3160 |
+
|
3161 |
+
$user_object_meta = get_user_meta($user['ID']);
|
3162 |
+
|
3163 |
+
$user_meta = array();
|
3164 |
+
|
3165 |
+
foreach($user_object_meta as $k => $v){
|
3166 |
+
|
3167 |
+
if(!isset($v[0]))
|
3168 |
+
continue;
|
3169 |
+
|
3170 |
+
$user_meta[$k] = $v[0];
|
3171 |
+
|
3172 |
+
}
|
3173 |
+
|
3174 |
+
$user_array = array_merge($user, $user_meta);
|
3175 |
+
|
3176 |
+
$user_array['permalink'] = get_author_posts_url($post_author);
|
3177 |
+
$user_array['admin_url'] = admin_url('user-edit.php?user_id=' . $post_author);
|
3178 |
+
|
3179 |
+
$post_author_data = $user_array;
|
3180 |
+
|
3181 |
+
$field_author = $explode[2];
|
3182 |
+
|
3183 |
+
$value = $post_author_data[$field_author];
|
3184 |
+
|
3185 |
+
}
|
3186 |
+
|
3187 |
+
}
|
3188 |
+
|
3189 |
// other
|
3190 |
else{
|
3191 |
|
3735 |
|
3736 |
}
|
3737 |
|
3738 |
+
$content_html = apply_filters('acfe/form/template_tag/fields', $content_html, $data);
|
3739 |
+
|
3740 |
// Replace
|
3741 |
$content = str_replace('{fields}', $content_html, $content);
|
3742 |
|
includes/modules/form/field-group.php
CHANGED
@@ -3,13 +3,15 @@
|
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
|
|
6 |
acf_add_local_field_group(array(
|
7 |
'key' => 'group_acfe_dynamic_form',
|
8 |
'title' => 'Dynamic Form',
|
|
|
9 |
'fields' => array(
|
10 |
|
11 |
/*
|
12 |
-
*
|
13 |
*/
|
14 |
array(
|
15 |
'key' => 'field_acfe_form_tab_general',
|
@@ -54,7 +56,7 @@ acf_add_local_field_group(array(
|
|
54 |
'name' => 'acfe_form_field_groups',
|
55 |
'type' => 'select',
|
56 |
'instructions' => 'Render & map fields of the following field groups',
|
57 |
-
'required' =>
|
58 |
'conditional_logic' => 0,
|
59 |
'wrapper' => array(
|
60 |
'width' => '',
|
@@ -74,31 +76,11 @@ acf_add_local_field_group(array(
|
|
74 |
'placeholder' => '',
|
75 |
),
|
76 |
array(
|
77 |
-
'key' => '
|
78 |
-
'label' => '
|
79 |
-
'name' => '
|
80 |
-
'type' => '
|
81 |
-
'instructions' => '
|
82 |
-
'required' => 0,
|
83 |
-
'conditional_logic' => 0,
|
84 |
-
'wrapper' => array(
|
85 |
-
'width' => '',
|
86 |
-
'class' => '',
|
87 |
-
'id' => '',
|
88 |
-
),
|
89 |
-
'acfe_permissions' => '',
|
90 |
-
'message' => '',
|
91 |
-
'default_value' => 0,
|
92 |
-
'ui' => 1,
|
93 |
-
'ui_on_text' => '',
|
94 |
-
'ui_off_text' => '',
|
95 |
-
),
|
96 |
-
array(
|
97 |
-
'key' => 'field_acfe_form_form_element',
|
98 |
-
'label' => 'Form element',
|
99 |
-
'name' => 'acfe_form_form_element',
|
100 |
-
'type' => 'true_false',
|
101 |
-
'instructions' => 'Whether or not to create a <code><form></code> element',
|
102 |
'required' => 0,
|
103 |
'conditional_logic' => 0,
|
104 |
'wrapper' => array(
|
@@ -107,676 +89,3053 @@ acf_add_local_field_group(array(
|
|
107 |
'id' => '',
|
108 |
),
|
109 |
'acfe_permissions' => '',
|
110 |
-
'
|
111 |
-
'
|
112 |
-
'
|
113 |
-
'
|
114 |
-
'
|
115 |
-
|
116 |
-
|
117 |
-
'
|
118 |
-
'
|
119 |
-
|
120 |
-
'type' => 'group',
|
121 |
-
'instructions' => 'Form class and id',
|
122 |
-
'required' => 0,
|
123 |
-
'wrapper' => array(
|
124 |
-
'width' => '',
|
125 |
-
'class' => '',
|
126 |
-
'id' => '',
|
127 |
-
),
|
128 |
-
'acfe_permissions' => '',
|
129 |
-
'layout' => 'block',
|
130 |
-
'acfe_seamless_style' => true,
|
131 |
-
'acfe_group_modal' => 0,
|
132 |
-
'conditional_logic' => array(
|
133 |
-
array(
|
134 |
-
array(
|
135 |
-
'field' => 'field_acfe_form_form_element',
|
136 |
-
'operator' => '==',
|
137 |
-
'value' => '1',
|
138 |
-
),
|
139 |
-
),
|
140 |
),
|
141 |
-
'
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
'name' => 'acfe_form_attributes_class',
|
146 |
-
'type' => 'text',
|
147 |
-
'instructions' => '',
|
148 |
-
'required' => 0,
|
149 |
-
'conditional_logic' => array(),
|
150 |
-
'wrapper' => array(
|
151 |
-
'width' => '33',
|
152 |
-
'class' => '',
|
153 |
-
'id' => '',
|
154 |
-
),
|
155 |
-
'acfe_permissions' => '',
|
156 |
-
'default_value' => 'acf-form',
|
157 |
-
'placeholder' => '',
|
158 |
-
'prepend' => 'class',
|
159 |
-
'append' => '',
|
160 |
-
'maxlength' => '',
|
161 |
-
),
|
162 |
-
array(
|
163 |
-
'key' => 'field_acfe_form_attributes_id',
|
164 |
-
'label' => '',
|
165 |
-
'name' => 'acfe_form_attributes_id',
|
166 |
-
'type' => 'text',
|
167 |
-
'instructions' => '',
|
168 |
-
'required' => 0,
|
169 |
-
'conditional_logic' => array(),
|
170 |
-
'wrapper' => array(
|
171 |
-
'width' => '33',
|
172 |
-
'class' => '',
|
173 |
-
'id' => '',
|
174 |
-
),
|
175 |
-
'acfe_permissions' => '',
|
176 |
-
'default_value' => '',
|
177 |
-
'placeholder' => '',
|
178 |
-
'prepend' => 'id',
|
179 |
-
'append' => '',
|
180 |
-
'maxlength' => '',
|
181 |
-
),
|
182 |
-
|
183 |
/*
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
'
|
188 |
-
'
|
189 |
-
'
|
190 |
-
'
|
191 |
-
'
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
),
|
197 |
-
'
|
198 |
-
'
|
199 |
-
'placeholder' => '',
|
200 |
-
'prepend' => 'action',
|
201 |
-
'append' => '',
|
202 |
-
'maxlength' => '',
|
203 |
),
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
'
|
210 |
-
'
|
211 |
-
'
|
212 |
-
'
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
),
|
|
|
|
|
437 |
),
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
'
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
),
|
|
|
|
|
464 |
),
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
'
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
603 |
),
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
'class' => '',
|
609 |
-
'id' => '',
|
610 |
-
),
|
611 |
-
'acfe_permissions' => '',
|
612 |
-
'default_value' => '',
|
613 |
-
'placeholder' => '',
|
614 |
-
'prepend' => '',
|
615 |
-
'append' => '',
|
616 |
-
'maxlength' => '',
|
617 |
-
),
|
618 |
-
array(
|
619 |
-
'key' => 'field_acfe_form_validation_advanced_field_validation',
|
620 |
-
'label' => 'PHP Field Validation',
|
621 |
-
'name' => 'acfe_form_validation_advanced_field_validation',
|
622 |
-
'type' => 'acfe_dynamic_message',
|
623 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
624 |
-
'instructions' => 'Native ACF field validation example',
|
625 |
-
'required' => 0,
|
626 |
-
'conditional_logic' => 0,
|
627 |
-
'wrapper' => array(
|
628 |
-
'width' => '',
|
629 |
-
'class' => '',
|
630 |
-
'id' => '',
|
631 |
-
),
|
632 |
-
'acfe_permissions' => '',
|
633 |
-
),
|
634 |
-
array(
|
635 |
-
'key' => 'field_acfe_form_validation_advanced_form_validation',
|
636 |
-
'label' => 'PHP Form Validation',
|
637 |
-
'name' => 'acfe_form_validation_advanced_form_validation',
|
638 |
-
'type' => 'acfe_dynamic_message',
|
639 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
640 |
-
'instructions' => 'Global form validation example',
|
641 |
-
'required' => 0,
|
642 |
-
'conditional_logic' => 0,
|
643 |
-
'wrapper' => array(
|
644 |
-
'width' => '',
|
645 |
-
'class' => '',
|
646 |
-
'id' => '',
|
647 |
-
),
|
648 |
-
'acfe_permissions' => '',
|
649 |
-
),
|
650 |
-
|
651 |
-
/*
|
652 |
-
* Actions
|
653 |
-
*/
|
654 |
-
array(
|
655 |
-
'key' => 'field_acfe_form_tab_actions',
|
656 |
-
'label' => 'Actions',
|
657 |
-
'name' => '',
|
658 |
-
'type' => 'tab',
|
659 |
-
'instructions' => '',
|
660 |
-
'required' => 0,
|
661 |
-
'conditional_logic' => 0,
|
662 |
-
'wrapper' => array(
|
663 |
-
'width' => '',
|
664 |
-
'class' => '',
|
665 |
-
'id' => '',
|
666 |
-
),
|
667 |
-
'acfe_permissions' => '',
|
668 |
-
'placement' => 'top',
|
669 |
-
'endpoint' => 0,
|
670 |
-
),
|
671 |
-
array(
|
672 |
-
'key' => 'field_acfe_form_actions',
|
673 |
-
'label' => 'Actions',
|
674 |
-
'name' => 'acfe_form_actions',
|
675 |
-
'type' => 'flexible_content',
|
676 |
-
'instructions' => '',
|
677 |
-
'required' => 0,
|
678 |
-
'conditional_logic' => 0,
|
679 |
-
'wrapper' => array(
|
680 |
-
'width' => '',
|
681 |
-
'class' => '',
|
682 |
-
'id' => '',
|
683 |
-
),
|
684 |
-
'acfe_permissions' => '',
|
685 |
-
'acfe_flexible_stylised_button' => 1,
|
686 |
-
'acfe_flexible_layouts_thumbnails' => 0,
|
687 |
-
'acfe_flexible_layouts_templates' => 0,
|
688 |
-
'acfe_flexible_layouts_placeholder' => 0,
|
689 |
-
'acfe_flexible_close_button' => 0,
|
690 |
-
'acfe_flexible_title_edition' => 0,
|
691 |
-
'acfe_flexible_copy_paste' => 0,
|
692 |
-
'acfe_flexible_modal_edition' => 0,
|
693 |
-
'acfe_flexible_modal' => array(
|
694 |
-
'acfe_flexible_modal_enabled' => '0',
|
695 |
-
),
|
696 |
-
'acfe_flexible_layouts_state' => '',
|
697 |
-
'acfe_flexible_layouts_remove_collapse' => 0,
|
698 |
-
'layouts' => array(
|
699 |
-
|
700 |
/*
|
701 |
-
* Layout:
|
702 |
*/
|
703 |
-
'
|
704 |
-
'key' => '
|
705 |
-
'name' => '
|
706 |
-
'label' => '
|
707 |
'display' => 'row',
|
708 |
'sub_fields' => array(
|
709 |
-
|
710 |
-
|
711 |
-
* Layout:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
*/
|
713 |
array(
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
730 |
array(
|
731 |
-
'key' => '
|
732 |
-
'label' => '
|
733 |
-
'name' => '
|
734 |
-
'type' => '
|
735 |
-
'instructions' => '
|
736 |
-
'required' =>
|
737 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
738 |
'wrapper' => array(
|
739 |
'width' => '',
|
740 |
'class' => '',
|
741 |
'id' => '',
|
742 |
),
|
743 |
'acfe_permissions' => '',
|
744 |
-
'default_value' => '',
|
745 |
-
'placeholder' => 'my-custom-action',
|
746 |
-
'prepend' => '',
|
747 |
-
'append' => '',
|
748 |
-
'maxlength' => '',
|
749 |
),
|
750 |
-
|
751 |
-
/*
|
752 |
-
* Layout: Custom Advanced
|
753 |
-
*/
|
754 |
array(
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
771 |
array(
|
772 |
-
'key' => '
|
773 |
-
'label' => '
|
774 |
-
'name' => '
|
775 |
'type' => 'acfe_dynamic_message',
|
776 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
777 |
'instructions' => '',
|
778 |
'required' => 0,
|
779 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
'wrapper' => array(
|
781 |
'width' => '',
|
782 |
'class' => '',
|
@@ -785,30 +3144,62 @@ acf_add_local_field_group(array(
|
|
785 |
'acfe_permissions' => '',
|
786 |
),
|
787 |
array(
|
788 |
-
'key' => '
|
789 |
-
'label' => '
|
790 |
-
'name' => '
|
791 |
-
'type' => '
|
792 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
793 |
'instructions' => '',
|
794 |
'required' => 0,
|
795 |
-
'conditional_logic' => 0,
|
796 |
'wrapper' => array(
|
797 |
'width' => '',
|
798 |
'class' => '',
|
799 |
'id' => '',
|
800 |
),
|
801 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
802 |
),
|
803 |
array(
|
804 |
-
'key' => '
|
805 |
-
'label' => '
|
806 |
-
'name' => '
|
807 |
'type' => 'acfe_dynamic_message',
|
808 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
809 |
'instructions' => '',
|
810 |
'required' => 0,
|
811 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
812 |
'wrapper' => array(
|
813 |
'width' => '',
|
814 |
'class' => '',
|
@@ -816,294 +3207,235 @@ acf_add_local_field_group(array(
|
|
816 |
),
|
817 |
'acfe_permissions' => '',
|
818 |
),
|
819 |
-
),
|
820 |
-
'min' => '',
|
821 |
-
'max' => '',
|
822 |
-
),
|
823 |
-
|
824 |
-
/*
|
825 |
-
* Layout: Email
|
826 |
-
*/
|
827 |
-
'layout_email' => array(
|
828 |
-
'key' => 'layout_email',
|
829 |
-
'name' => 'email',
|
830 |
-
'label' => 'Email action',
|
831 |
-
'display' => 'row',
|
832 |
-
'sub_fields' => array(
|
833 |
-
|
834 |
-
/*
|
835 |
-
* Layout: Email Action
|
836 |
-
*/
|
837 |
array(
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
854 |
array(
|
855 |
-
'key' => '
|
856 |
-
'label' => '
|
857 |
-
'name' => '
|
858 |
-
'type' => '
|
859 |
-
'instructions' => '
|
860 |
'required' => 0,
|
861 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
862 |
'wrapper' => array(
|
863 |
'width' => '',
|
864 |
'class' => '',
|
865 |
'id' => '',
|
866 |
),
|
867 |
'acfe_permissions' => '',
|
868 |
-
'default_value' => '',
|
869 |
-
'placeholder' => 'my-email-action',
|
870 |
-
'prepend' => '',
|
871 |
-
'append' => '',
|
872 |
-
'maxlength' => '',
|
873 |
),
|
874 |
-
array(
|
875 |
-
'key' => 'field_acfe_form_email_custom_query_var',
|
876 |
-
'label' => 'Query var',
|
877 |
-
'name' => 'acfe_form_custom_query_var',
|
878 |
-
'type' => 'true_false',
|
879 |
-
'instructions' => 'Automatically create a query var with the data of the email that has been sent.<br />Retrieve data using <code>{query_var:my-action:subject}</code> template tags.',
|
880 |
-
'required' => 0,
|
881 |
-
'wrapper' => array(
|
882 |
-
'width' => '',
|
883 |
-
'class' => '',
|
884 |
-
'id' => '',
|
885 |
-
),
|
886 |
-
'acfe_permissions' => '',
|
887 |
-
'message' => '',
|
888 |
-
'default_value' => 0,
|
889 |
-
'ui' => 1,
|
890 |
-
'ui_on_text' => '',
|
891 |
-
'ui_off_text' => '',
|
892 |
-
'conditional_logic' => array(
|
893 |
-
array(
|
894 |
-
array(
|
895 |
-
'field' => 'field_acfe_form_email_custom_alias',
|
896 |
-
'operator' => '!=empty',
|
897 |
-
),
|
898 |
-
),
|
899 |
-
),
|
900 |
-
),
|
901 |
-
|
902 |
-
/*
|
903 |
-
* Layout: Email Send
|
904 |
-
*/
|
905 |
-
array(
|
906 |
-
'key' => 'field_acfe_form_email_tab_email',
|
907 |
-
'label' => 'Email',
|
908 |
-
'name' => '',
|
909 |
-
'type' => 'tab',
|
910 |
-
'instructions' => '',
|
911 |
-
'required' => 0,
|
912 |
-
'conditional_logic' => 0,
|
913 |
-
'wrapper' => array(
|
914 |
-
'width' => '',
|
915 |
-
'class' => '',
|
916 |
-
'id' => '',
|
917 |
-
),
|
918 |
-
'acfe_permissions' => '',
|
919 |
-
'placement' => 'top',
|
920 |
-
'endpoint' => 0,
|
921 |
-
),
|
922 |
array(
|
923 |
-
'key' => '
|
924 |
-
'label' => '
|
925 |
-
'name' => '
|
926 |
-
'type' => '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
927 |
'instructions' => '',
|
928 |
-
'required' =>
|
929 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
930 |
'wrapper' => array(
|
931 |
'width' => '',
|
932 |
'class' => '',
|
933 |
'id' => '',
|
934 |
),
|
935 |
'acfe_permissions' => '',
|
936 |
-
'default_value' => '',
|
937 |
-
'placeholder' => 'Name <email@domain.com>',
|
938 |
-
'prepend' => '',
|
939 |
-
'append' => '',
|
940 |
-
'maxlength' => '',
|
941 |
),
|
942 |
-
array(
|
943 |
-
'key' => 'field_acfe_form_email_to',
|
944 |
-
'label' => 'To',
|
945 |
-
'name' => 'acfe_form_email_to',
|
946 |
-
'type' => 'text',
|
947 |
-
'instructions' => '',
|
948 |
-
'required' => 1,
|
949 |
-
'conditional_logic' => 0,
|
950 |
-
'wrapper' => array(
|
951 |
-
'width' => '',
|
952 |
-
'class' => '',
|
953 |
-
'id' => '',
|
954 |
-
),
|
955 |
-
'acfe_permissions' => '',
|
956 |
-
'default_value' => '',
|
957 |
-
'placeholder' => 'email@domain.com',
|
958 |
-
'prepend' => '',
|
959 |
-
'append' => '',
|
960 |
-
),
|
961 |
-
array(
|
962 |
-
'key' => 'field_acfe_form_email_reply_to',
|
963 |
-
'label' => 'Reply to',
|
964 |
-
'name' => 'acfe_form_email_reply_to',
|
965 |
-
'type' => 'text',
|
966 |
-
'instructions' => '',
|
967 |
-
'required' => 0,
|
968 |
-
'conditional_logic' => 0,
|
969 |
-
'wrapper' => array(
|
970 |
-
'width' => '',
|
971 |
-
'class' => '',
|
972 |
-
'id' => '',
|
973 |
-
),
|
974 |
-
'acfe_permissions' => '',
|
975 |
-
'default_value' => '',
|
976 |
-
'placeholder' => 'Name <email@domain.com>',
|
977 |
-
'prepend' => '',
|
978 |
-
'append' => '',
|
979 |
-
'maxlength' => '',
|
980 |
-
),
|
981 |
-
array(
|
982 |
-
'key' => 'field_acfe_form_email_cc',
|
983 |
-
'label' => 'Cc',
|
984 |
-
'name' => 'acfe_form_email_cc',
|
985 |
-
'type' => 'text',
|
986 |
-
'instructions' => '',
|
987 |
-
'required' => 0,
|
988 |
-
'conditional_logic' => 0,
|
989 |
-
'wrapper' => array(
|
990 |
-
'width' => '',
|
991 |
-
'class' => '',
|
992 |
-
'id' => '',
|
993 |
-
),
|
994 |
-
'acfe_permissions' => '',
|
995 |
-
'default_value' => '',
|
996 |
-
'placeholder' => 'email@domain.com',
|
997 |
-
'prepend' => '',
|
998 |
-
'append' => '',
|
999 |
-
'maxlength' => '',
|
1000 |
-
),
|
1001 |
-
array(
|
1002 |
-
'key' => 'field_acfe_form_email_bcc',
|
1003 |
-
'label' => 'Bcc',
|
1004 |
-
'name' => 'acfe_form_email_bcc',
|
1005 |
-
'type' => 'text',
|
1006 |
-
'instructions' => '',
|
1007 |
-
'required' => 0,
|
1008 |
-
'conditional_logic' => 0,
|
1009 |
-
'wrapper' => array(
|
1010 |
-
'width' => '',
|
1011 |
-
'class' => '',
|
1012 |
-
'id' => '',
|
1013 |
-
),
|
1014 |
-
'acfe_permissions' => '',
|
1015 |
-
'default_value' => '',
|
1016 |
-
'placeholder' => 'email@domain.com',
|
1017 |
-
'prepend' => '',
|
1018 |
-
'append' => '',
|
1019 |
-
'maxlength' => '',
|
1020 |
-
),
|
1021 |
array(
|
1022 |
-
'key' => '
|
1023 |
-
'label' => '
|
1024 |
-
'name' => '
|
1025 |
-
'type' => '
|
1026 |
'instructions' => '',
|
1027 |
-
'required' =>
|
1028 |
-
'conditional_logic' => 0,
|
1029 |
'wrapper' => array(
|
1030 |
'width' => '',
|
1031 |
'class' => '',
|
1032 |
'id' => '',
|
1033 |
),
|
1034 |
'acfe_permissions' => '',
|
1035 |
-
'
|
1036 |
-
'
|
1037 |
-
|
1038 |
-
'
|
1039 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1040 |
),
|
1041 |
array(
|
1042 |
-
'key' => '
|
1043 |
-
'label' => '
|
1044 |
-
'name' => '
|
1045 |
-
'type' => '
|
1046 |
-
'instructions' => '
|
1047 |
-
'required' =>
|
1048 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1049 |
'wrapper' => array(
|
1050 |
'width' => '',
|
1051 |
'class' => '',
|
1052 |
'id' => '',
|
1053 |
),
|
1054 |
'acfe_permissions' => '',
|
1055 |
-
'default_value' => '',
|
1056 |
-
'tabs' => 'all',
|
1057 |
-
'toolbar' => 'full',
|
1058 |
-
'media_upload' => 1,
|
1059 |
-
'delay' => 0,
|
1060 |
),
|
1061 |
-
|
1062 |
-
/*
|
1063 |
-
* Layout: Email Attachments
|
1064 |
-
*/
|
1065 |
-
array(
|
1066 |
-
'key' => 'field_acfe_form_email_tab_attachments',
|
1067 |
-
'label' => 'Attachments',
|
1068 |
-
'name' => '',
|
1069 |
-
'type' => 'tab',
|
1070 |
-
'instructions' => '',
|
1071 |
-
'required' => 0,
|
1072 |
-
'conditional_logic' => 0,
|
1073 |
-
'wrapper' => array(
|
1074 |
-
'width' => '',
|
1075 |
-
'class' => '',
|
1076 |
-
'id' => '',
|
1077 |
-
),
|
1078 |
-
'acfe_permissions' => '',
|
1079 |
-
'placement' => 'top',
|
1080 |
-
'endpoint' => 0,
|
1081 |
-
),
|
1082 |
array(
|
1083 |
-
'key' => '
|
1084 |
-
'label' => '
|
1085 |
-
'name' => '
|
1086 |
-
'type' => '
|
1087 |
'instructions' => '',
|
1088 |
'required' => 0,
|
1089 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1090 |
'wrapper' => array(
|
1091 |
'width' => '',
|
1092 |
'class' => '',
|
1093 |
'id' => '',
|
1094 |
),
|
1095 |
'acfe_permissions' => '',
|
1096 |
-
'
|
1097 |
-
'
|
1098 |
-
'
|
1099 |
-
'max' => 0,
|
1100 |
-
'layout' => 'table',
|
1101 |
-
'button_label' => 'Add file',
|
1102 |
'sub_fields' => array(
|
1103 |
array(
|
1104 |
-
'key' => '
|
1105 |
-
'label' => '
|
1106 |
-
'name' => '
|
1107 |
'type' => 'select',
|
1108 |
'instructions' => '',
|
1109 |
'required' => 0,
|
@@ -1115,1246 +3447,137 @@ acf_add_local_field_group(array(
|
|
1115 |
),
|
1116 |
'acfe_permissions' => '',
|
1117 |
'choices' => array(
|
|
|
1118 |
),
|
1119 |
'default_value' => array(
|
1120 |
),
|
1121 |
-
'allow_null' =>
|
1122 |
'multiple' => 0,
|
1123 |
'ui' => 1,
|
1124 |
'return_format' => 'value',
|
|
|
1125 |
'ajax' => 0,
|
1126 |
-
'placeholder' => '',
|
1127 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1128 |
'allow_custom' => 1,
|
1129 |
),
|
1130 |
-
array(
|
1131 |
-
'key' => 'field_acfe_form_email_file_delete',
|
1132 |
-
'label' => 'Delete file',
|
1133 |
-
'name' => 'acfe_form_email_file_delete',
|
1134 |
-
'type' => 'true_false',
|
1135 |
-
'instructions' => '',
|
1136 |
-
'required' => 0,
|
1137 |
-
'wrapper' => array(
|
1138 |
-
'width' => '',
|
1139 |
-
'class' => '',
|
1140 |
-
'id' => '',
|
1141 |
-
),
|
1142 |
-
'acfe_permissions' => '',
|
1143 |
-
'message' => 'Delete once submitted',
|
1144 |
-
'default_value' => 0,
|
1145 |
-
'ui' => 1,
|
1146 |
-
'ui_on_text' => '',
|
1147 |
-
'ui_off_text' => '',
|
1148 |
-
),
|
1149 |
-
),
|
1150 |
-
),
|
1151 |
-
array(
|
1152 |
-
'key' => 'field_acfe_form_email_files_static',
|
1153 |
-
'label' => 'Static files',
|
1154 |
-
'name' => 'acfe_form_email_files_static',
|
1155 |
-
'type' => 'repeater',
|
1156 |
-
'instructions' => '',
|
1157 |
-
'required' => 0,
|
1158 |
-
'conditional_logic' => 0,
|
1159 |
-
'wrapper' => array(
|
1160 |
-
'width' => '',
|
1161 |
-
'class' => '',
|
1162 |
-
'id' => '',
|
1163 |
-
),
|
1164 |
-
'acfe_permissions' => '',
|
1165 |
-
'acfe_repeater_stylised_button' => 0,
|
1166 |
-
'collapsed' => '',
|
1167 |
-
'min' => 0,
|
1168 |
-
'max' => 0,
|
1169 |
-
'layout' => 'table',
|
1170 |
-
'button_label' => 'Add file',
|
1171 |
-
'sub_fields' => array(
|
1172 |
array(
|
1173 |
-
'key' => '
|
1174 |
-
'label' => '
|
1175 |
-
'name' => '
|
1176 |
-
'type' => '
|
1177 |
'instructions' => '',
|
1178 |
-
'required' =>
|
1179 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1180 |
'wrapper' => array(
|
1181 |
'width' => '',
|
1182 |
'class' => '',
|
1183 |
'id' => '',
|
1184 |
),
|
1185 |
'acfe_permissions' => '',
|
1186 |
-
'
|
|
|
|
|
|
|
|
|
1187 |
),
|
1188 |
),
|
1189 |
),
|
1190 |
-
|
1191 |
-
/*
|
1192 |
-
* Layout: Email Advanced
|
1193 |
-
*/
|
1194 |
-
array(
|
1195 |
-
'key' => 'field_acfe_form_email_tab_advanced',
|
1196 |
-
'label' => 'Advanced',
|
1197 |
-
'name' => '',
|
1198 |
-
'type' => 'tab',
|
1199 |
-
'instructions' => '',
|
1200 |
-
'required' => 0,
|
1201 |
-
'conditional_logic' => 0,
|
1202 |
-
'wrapper' => array(
|
1203 |
-
'width' => '',
|
1204 |
-
'class' => '',
|
1205 |
-
'id' => '',
|
1206 |
-
),
|
1207 |
-
'acfe_permissions' => '',
|
1208 |
-
'placement' => 'top',
|
1209 |
-
'endpoint' => 0,
|
1210 |
-
),
|
1211 |
-
array(
|
1212 |
-
'key' => 'field_acfe_form_email_advanced_args',
|
1213 |
-
'label' => 'Change email arguments',
|
1214 |
-
'name' => 'acfe_form_email_advanced_args',
|
1215 |
-
'type' => 'acfe_dynamic_message',
|
1216 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
1217 |
-
'instructions' => 'Alter the <code>wp_mail()</code> arguments before it is sent',
|
1218 |
-
'required' => 0,
|
1219 |
-
'conditional_logic' => 0,
|
1220 |
-
'wrapper' => array(
|
1221 |
-
'width' => '',
|
1222 |
-
'class' => '',
|
1223 |
-
'id' => '',
|
1224 |
-
),
|
1225 |
-
'acfe_permissions' => '',
|
1226 |
-
),
|
1227 |
array(
|
1228 |
-
'key' => '
|
1229 |
-
'label' => '
|
1230 |
-
'name' => '
|
1231 |
'type' => 'acfe_dynamic_message',
|
1232 |
-
'
|
1233 |
-
'instructions' => 'This action allows you to hook in after the e-mail has been sent',
|
1234 |
'required' => 0,
|
1235 |
-
'conditional_logic' =>
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1240 |
),
|
1241 |
-
'acfe_permissions' => '',
|
1242 |
-
),
|
1243 |
-
),
|
1244 |
-
'min' => '',
|
1245 |
-
'max' => '',
|
1246 |
-
),
|
1247 |
-
|
1248 |
-
/*
|
1249 |
-
* Layout: Post
|
1250 |
-
*/
|
1251 |
-
'layout_post' => array(
|
1252 |
-
'key' => 'layout_post',
|
1253 |
-
'name' => 'post',
|
1254 |
-
'label' => 'Post action',
|
1255 |
-
'display' => 'row',
|
1256 |
-
'sub_fields' => array(
|
1257 |
-
|
1258 |
-
/*
|
1259 |
-
* Layout: Post Action
|
1260 |
-
*/
|
1261 |
-
array(
|
1262 |
-
'key' => 'field_acfe_form_post_tab_action',
|
1263 |
-
'label' => 'Action',
|
1264 |
-
'name' => '',
|
1265 |
-
'type' => 'tab',
|
1266 |
-
'instructions' => '',
|
1267 |
-
'required' => 0,
|
1268 |
-
'conditional_logic' => 0,
|
1269 |
-
'wrapper' => array(
|
1270 |
-
'width' => '',
|
1271 |
-
'class' => '',
|
1272 |
-
'id' => '',
|
1273 |
-
),
|
1274 |
-
'acfe_permissions' => '',
|
1275 |
-
'placement' => 'top',
|
1276 |
-
'endpoint' => 0,
|
1277 |
-
),
|
1278 |
-
array(
|
1279 |
-
'key' => 'field_acfe_form_post_action',
|
1280 |
-
'label' => 'Action',
|
1281 |
-
'name' => 'acfe_form_post_action',
|
1282 |
-
'type' => 'radio',
|
1283 |
-
'instructions' => '',
|
1284 |
-
'required' => 0,
|
1285 |
-
'conditional_logic' => 0,
|
1286 |
-
'wrapper' => array(
|
1287 |
-
'width' => '',
|
1288 |
-
'class' => '',
|
1289 |
-
'id' => '',
|
1290 |
-
),
|
1291 |
-
'acfe_permissions' => '',
|
1292 |
-
'choices' => array(
|
1293 |
-
'insert_post' => 'Create post',
|
1294 |
-
'update_post' => 'Update post',
|
1295 |
-
),
|
1296 |
-
'allow_null' => 0,
|
1297 |
-
'other_choice' => 0,
|
1298 |
-
'default_value' => 'insert_post',
|
1299 |
-
'layout' => 'vertical',
|
1300 |
-
'return_format' => 'value',
|
1301 |
-
'save_other_choice' => 0,
|
1302 |
-
),
|
1303 |
-
array(
|
1304 |
-
'key' => 'field_acfe_form_post_custom_alias',
|
1305 |
-
'label' => 'Action name',
|
1306 |
-
'name' => 'acfe_form_custom_alias',
|
1307 |
-
'type' => 'acfe_slug',
|
1308 |
-
'instructions' => '(Optional) Advanced usage. Allow the action to be targeted specifically with PHP hooks (must be unique). See "Advanced" tab.',
|
1309 |
-
'required' => 0,
|
1310 |
-
'conditional_logic' => 0,
|
1311 |
'wrapper' => array(
|
1312 |
'width' => '',
|
1313 |
'class' => '',
|
1314 |
'id' => '',
|
1315 |
),
|
1316 |
'acfe_permissions' => '',
|
1317 |
-
'default_value' => '',
|
1318 |
-
'placeholder' => 'my-post-action',
|
1319 |
-
'prepend' => '',
|
1320 |
-
'append' => '',
|
1321 |
-
'maxlength' => '',
|
1322 |
),
|
1323 |
-
array(
|
1324 |
-
'key' => 'field_acfe_form_post_custom_query_var',
|
1325 |
-
'label' => 'Query var',
|
1326 |
-
'name' => 'acfe_form_custom_query_var',
|
1327 |
-
'type' => 'true_false',
|
1328 |
-
'instructions' => 'Automatically create a query var with the data of the post that has been created/updated.<br />Retrieve data using <code>{query_var:my-action:post_title}</code> <code>{query_var:my-action:permalink}</code> template tags.',
|
1329 |
-
'required' => 0,
|
1330 |
-
'wrapper' => array(
|
1331 |
-
'width' => '',
|
1332 |
-
'class' => '',
|
1333 |
-
'id' => '',
|
1334 |
-
),
|
1335 |
-
'acfe_permissions' => '',
|
1336 |
-
'message' => '',
|
1337 |
-
'default_value' => 0,
|
1338 |
-
'ui' => 1,
|
1339 |
-
'ui_on_text' => '',
|
1340 |
-
'ui_off_text' => '',
|
1341 |
-
'conditional_logic' => array(
|
1342 |
-
array(
|
1343 |
-
array(
|
1344 |
-
'field' => 'field_acfe_form_post_custom_alias',
|
1345 |
-
'operator' => '!=empty',
|
1346 |
-
),
|
1347 |
-
),
|
1348 |
-
),
|
1349 |
-
),
|
1350 |
-
|
1351 |
-
/*
|
1352 |
-
* Layout: Post Save
|
1353 |
-
*/
|
1354 |
-
array(
|
1355 |
-
'key' => 'field_acfe_form_post_tab_save',
|
1356 |
-
'label' => 'Save',
|
1357 |
-
'name' => '',
|
1358 |
-
'type' => 'tab',
|
1359 |
-
'instructions' => '',
|
1360 |
-
'required' => 0,
|
1361 |
-
'conditional_logic' => 0,
|
1362 |
-
'wrapper' => array(
|
1363 |
-
'width' => '',
|
1364 |
-
'class' => '',
|
1365 |
-
'id' => '',
|
1366 |
-
),
|
1367 |
-
'acfe_permissions' => '',
|
1368 |
-
'placement' => 'top',
|
1369 |
-
'endpoint' => 0,
|
1370 |
-
),
|
1371 |
-
array(
|
1372 |
-
'key' => 'field_acfe_form_post_save_target',
|
1373 |
-
'label' => 'Target',
|
1374 |
-
'name' => 'acfe_form_post_save_target',
|
1375 |
-
'type' => 'select',
|
1376 |
-
'instructions' => '',
|
1377 |
-
'required' => 0,
|
1378 |
-
'conditional_logic' => array(
|
1379 |
-
array(
|
1380 |
-
array(
|
1381 |
-
'field' => 'field_acfe_form_post_action',
|
1382 |
-
'operator' => '==',
|
1383 |
-
'value' => 'update_post',
|
1384 |
-
),
|
1385 |
-
),
|
1386 |
-
),
|
1387 |
-
'wrapper' => array(
|
1388 |
-
'width' => '',
|
1389 |
-
'class' => '',
|
1390 |
-
'id' => '',
|
1391 |
-
),
|
1392 |
-
'acfe_permissions' => '',
|
1393 |
-
'choices' => array(
|
1394 |
-
),
|
1395 |
-
'default_value' => 'current_post',
|
1396 |
-
'allow_null' => 0,
|
1397 |
-
'multiple' => 0,
|
1398 |
-
'ui' => 1,
|
1399 |
-
'ajax' => 0,
|
1400 |
-
'return_format' => 'value',
|
1401 |
-
'placeholder' => '',
|
1402 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1403 |
-
'allow_custom' => 1,
|
1404 |
-
),
|
1405 |
-
array(
|
1406 |
-
'key' => 'field_acfe_form_post_save_post_type',
|
1407 |
-
'label' => 'Post type',
|
1408 |
-
'name' => 'acfe_form_post_save_post_type',
|
1409 |
-
'type' => 'acfe_post_types',
|
1410 |
-
'instructions' => '',
|
1411 |
-
'required' => 0,
|
1412 |
-
'conditional_logic' => array(
|
1413 |
-
array(
|
1414 |
-
array(
|
1415 |
-
'field' => 'field_acfe_form_post_map_post_type',
|
1416 |
-
'operator' => '==empty',
|
1417 |
-
),
|
1418 |
-
),
|
1419 |
-
),
|
1420 |
-
'wrapper' => array(
|
1421 |
-
'width' => '',
|
1422 |
-
'class' => '',
|
1423 |
-
'id' => '',
|
1424 |
-
),
|
1425 |
-
'acfe_permissions' => '',
|
1426 |
-
'post_type' => '',
|
1427 |
-
'field_type' => 'select',
|
1428 |
-
'default_value' => '',
|
1429 |
-
'return_format' => 'name',
|
1430 |
-
'allow_null' => 1,
|
1431 |
-
'placeholder' => 'Default',
|
1432 |
-
'multiple' => 0,
|
1433 |
-
'ui' => 1,
|
1434 |
-
'choices' => array(
|
1435 |
-
),
|
1436 |
-
'ajax' => 0,
|
1437 |
-
'layout' => '',
|
1438 |
-
'toggle' => 0,
|
1439 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1440 |
-
'allow_custom' => 1,
|
1441 |
-
),
|
1442 |
-
array(
|
1443 |
-
'key' => 'field_acfe_form_post_map_post_type_message',
|
1444 |
-
'label' => 'Post type',
|
1445 |
-
'name' => 'acfe_form_post_map_post_type_message',
|
1446 |
-
'type' => 'acfe_dynamic_message',
|
1447 |
-
'instructions' => '',
|
1448 |
-
'required' => 0,
|
1449 |
-
'conditional_logic' => array(
|
1450 |
-
array(
|
1451 |
-
array(
|
1452 |
-
'field' => 'field_acfe_form_post_map_post_type',
|
1453 |
-
'operator' => '!=empty',
|
1454 |
-
),
|
1455 |
-
),
|
1456 |
-
),
|
1457 |
-
'wrapper' => array(
|
1458 |
-
'width' => '',
|
1459 |
-
'class' => '',
|
1460 |
-
'id' => '',
|
1461 |
-
),
|
1462 |
-
'acfe_permissions' => '',
|
1463 |
-
),
|
1464 |
-
array(
|
1465 |
-
'key' => 'field_acfe_form_post_save_post_status',
|
1466 |
-
'label' => 'Post status',
|
1467 |
-
'name' => 'acfe_form_post_save_post_status',
|
1468 |
-
'type' => 'acfe_post_statuses',
|
1469 |
-
'instructions' => '',
|
1470 |
-
'required' => 0,
|
1471 |
-
'conditional_logic' => array(
|
1472 |
-
array(
|
1473 |
-
array(
|
1474 |
-
'field' => 'field_acfe_form_post_map_post_status',
|
1475 |
-
'operator' => '==empty',
|
1476 |
-
),
|
1477 |
-
),
|
1478 |
-
),
|
1479 |
-
'wrapper' => array(
|
1480 |
-
'width' => '',
|
1481 |
-
'class' => '',
|
1482 |
-
'id' => '',
|
1483 |
-
),
|
1484 |
-
'acfe_permissions' => '',
|
1485 |
-
'post_status' => '',
|
1486 |
-
'field_type' => 'select',
|
1487 |
-
'default_value' => '',
|
1488 |
-
'return_format' => 'name',
|
1489 |
-
'allow_null' => 1,
|
1490 |
-
'placeholder' => 'Default',
|
1491 |
-
'multiple' => 0,
|
1492 |
-
'ui' => 1,
|
1493 |
-
'choices' => array(
|
1494 |
-
),
|
1495 |
-
'ajax' => 0,
|
1496 |
-
'layout' => '',
|
1497 |
-
'toggle' => 0,
|
1498 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1499 |
-
'allow_custom' => 1,
|
1500 |
-
),
|
1501 |
-
array(
|
1502 |
-
'key' => 'field_acfe_form_post_map_post_status_message',
|
1503 |
-
'label' => 'Post status',
|
1504 |
-
'name' => 'acfe_form_post_map_post_status_message',
|
1505 |
-
'type' => 'acfe_dynamic_message',
|
1506 |
-
'instructions' => '',
|
1507 |
-
'required' => 0,
|
1508 |
-
'conditional_logic' => array(
|
1509 |
-
array(
|
1510 |
-
array(
|
1511 |
-
'field' => 'field_acfe_form_post_map_post_status',
|
1512 |
-
'operator' => '!=empty',
|
1513 |
-
),
|
1514 |
-
),
|
1515 |
-
),
|
1516 |
-
'wrapper' => array(
|
1517 |
-
'width' => '',
|
1518 |
-
'class' => '',
|
1519 |
-
'id' => '',
|
1520 |
-
),
|
1521 |
-
'acfe_permissions' => '',
|
1522 |
-
),
|
1523 |
-
|
1524 |
array(
|
1525 |
-
'key' => '
|
1526 |
-
'label' => '
|
1527 |
-
'name' => '
|
1528 |
-
'type' => '
|
1529 |
'instructions' => '',
|
1530 |
'required' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1531 |
'wrapper' => array(
|
1532 |
'width' => '',
|
1533 |
'class' => '',
|
1534 |
'id' => '',
|
1535 |
),
|
1536 |
'acfe_permissions' => '',
|
1537 |
-
'
|
1538 |
-
|
1539 |
-
|
1540 |
-
'default_value' => array(
|
1541 |
-
),
|
1542 |
'allow_null' => 1,
|
|
|
1543 |
'multiple' => 0,
|
1544 |
'ui' => 1,
|
1545 |
-
'return_format' => 'value',
|
1546 |
-
'placeholder' => 'Default',
|
1547 |
-
'ajax' => 0,
|
1548 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1549 |
-
'allow_custom' => 1,
|
1550 |
-
'conditional_logic' => array(
|
1551 |
-
array(
|
1552 |
-
array(
|
1553 |
-
'field' => 'field_acfe_form_post_map_post_title',
|
1554 |
-
'operator' => '==empty',
|
1555 |
-
),
|
1556 |
-
),
|
1557 |
-
),
|
1558 |
-
),
|
1559 |
-
|
1560 |
-
array(
|
1561 |
-
'key' => 'field_acfe_form_post_map_post_title_message',
|
1562 |
-
'label' => 'Post title',
|
1563 |
-
'name' => 'acfe_form_post_map_post_title_message',
|
1564 |
-
'type' => 'acfe_dynamic_message',
|
1565 |
-
'instructions' => '',
|
1566 |
-
'required' => 0,
|
1567 |
-
'conditional_logic' => array(
|
1568 |
-
array(
|
1569 |
-
array(
|
1570 |
-
'field' => 'field_acfe_form_post_map_post_title',
|
1571 |
-
'operator' => '!=empty',
|
1572 |
-
),
|
1573 |
-
),
|
1574 |
-
),
|
1575 |
-
'wrapper' => array(
|
1576 |
-
'width' => '',
|
1577 |
-
'class' => '',
|
1578 |
-
'id' => '',
|
1579 |
-
),
|
1580 |
-
'acfe_permissions' => '',
|
1581 |
-
),
|
1582 |
-
array(
|
1583 |
-
'key' => 'field_acfe_form_post_save_post_name',
|
1584 |
-
'label' => 'Post slug',
|
1585 |
-
'name' => 'acfe_form_post_save_post_name',
|
1586 |
-
'type' => 'select',
|
1587 |
-
'instructions' => '',
|
1588 |
-
'required' => 0,
|
1589 |
-
'wrapper' => array(
|
1590 |
-
'width' => '',
|
1591 |
-
'class' => '',
|
1592 |
-
'id' => '',
|
1593 |
-
),
|
1594 |
-
'acfe_permissions' => '',
|
1595 |
'choices' => array(
|
1596 |
-
'generated_id' => 'Generated ID',
|
1597 |
-
),
|
1598 |
-
'default_value' => array(
|
1599 |
),
|
1600 |
-
'
|
1601 |
-
'
|
1602 |
-
'
|
1603 |
-
'
|
1604 |
-
'
|
1605 |
-
|
1606 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1607 |
-
'allow_custom' => 1,
|
1608 |
-
'conditional_logic' => array(
|
1609 |
-
array(
|
1610 |
-
array(
|
1611 |
-
'field' => 'field_acfe_form_post_map_post_name',
|
1612 |
-
'operator' => '==empty',
|
1613 |
-
),
|
1614 |
-
),
|
1615 |
-
),
|
1616 |
-
),
|
1617 |
-
|
1618 |
-
array(
|
1619 |
-
'key' => 'field_acfe_form_post_map_post_name_message',
|
1620 |
-
'label' => 'Post slug',
|
1621 |
-
'name' => 'acfe_form_post_map_post_name_message',
|
1622 |
-
'type' => 'acfe_dynamic_message',
|
1623 |
-
'instructions' => '',
|
1624 |
-
'required' => 0,
|
1625 |
-
'conditional_logic' => array(
|
1626 |
-
array(
|
1627 |
-
array(
|
1628 |
-
'field' => 'field_acfe_form_post_map_post_name',
|
1629 |
-
'operator' => '!=empty',
|
1630 |
-
),
|
1631 |
-
),
|
1632 |
-
),
|
1633 |
-
'wrapper' => array(
|
1634 |
-
'width' => '',
|
1635 |
-
'class' => '',
|
1636 |
-
'id' => '',
|
1637 |
-
),
|
1638 |
-
'acfe_permissions' => '',
|
1639 |
-
),
|
1640 |
-
array(
|
1641 |
-
'key' => 'field_acfe_form_post_save_post_content_group',
|
1642 |
-
'label' => 'Post content',
|
1643 |
-
'name' => 'acfe_form_post_save_post_content_group',
|
1644 |
-
'type' => 'group',
|
1645 |
-
'instructions' => '',
|
1646 |
-
'required' => 0,
|
1647 |
-
'conditional_logic' => array(
|
1648 |
-
array(
|
1649 |
-
array(
|
1650 |
-
'field' => 'field_acfe_form_post_map_post_content',
|
1651 |
-
'operator' => '==empty',
|
1652 |
-
),
|
1653 |
-
),
|
1654 |
-
),
|
1655 |
-
'wrapper' => array(
|
1656 |
-
'width' => '',
|
1657 |
-
'class' => '',
|
1658 |
-
'id' => '',
|
1659 |
-
),
|
1660 |
-
'acfe_permissions' => '',
|
1661 |
-
'layout' => 'block',
|
1662 |
-
'acfe_seamless_style' => true,
|
1663 |
-
'acfe_group_modal' => 0,
|
1664 |
-
'sub_fields' => array(
|
1665 |
-
array(
|
1666 |
-
'key' => 'field_acfe_form_post_save_post_content',
|
1667 |
-
'label' => '',
|
1668 |
-
'name' => 'acfe_form_post_save_post_content',
|
1669 |
-
'type' => 'select',
|
1670 |
-
'instructions' => '',
|
1671 |
-
'required' => 0,
|
1672 |
-
'conditional_logic' => 0,
|
1673 |
-
'wrapper' => array(
|
1674 |
-
'width' => '',
|
1675 |
-
'class' => '',
|
1676 |
-
'id' => '',
|
1677 |
-
),
|
1678 |
-
'acfe_permissions' => '',
|
1679 |
-
'choices' => array(
|
1680 |
-
'custom' => 'WYSIWYG editor',
|
1681 |
-
),
|
1682 |
-
'default_value' => array(
|
1683 |
-
),
|
1684 |
-
'allow_null' => 1,
|
1685 |
-
'multiple' => 0,
|
1686 |
-
'ui' => 1,
|
1687 |
-
'return_format' => 'value',
|
1688 |
-
'placeholder' => 'Default',
|
1689 |
-
'ajax' => 0,
|
1690 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1691 |
-
'allow_custom' => 1,
|
1692 |
-
),
|
1693 |
-
array(
|
1694 |
-
'key' => 'field_acfe_form_post_save_post_content_custom',
|
1695 |
-
'label' => '',
|
1696 |
-
'name' => 'acfe_form_post_save_post_content_custom',
|
1697 |
-
'type' => 'wysiwyg',
|
1698 |
-
'instructions' => '',
|
1699 |
-
'required' => 0,
|
1700 |
-
'conditional_logic' => array(
|
1701 |
-
array(
|
1702 |
-
array(
|
1703 |
-
'field' => 'field_acfe_form_post_save_post_content',
|
1704 |
-
'operator' => '==',
|
1705 |
-
'value' => 'custom',
|
1706 |
-
),
|
1707 |
-
),
|
1708 |
-
),
|
1709 |
-
'wrapper' => array(
|
1710 |
-
'width' => '',
|
1711 |
-
'class' => '',
|
1712 |
-
'id' => '',
|
1713 |
-
),
|
1714 |
-
'acfe_permissions' => '',
|
1715 |
-
'default_value' => '',
|
1716 |
-
'tabs' => 'all',
|
1717 |
-
'toolbar' => 'full',
|
1718 |
-
'media_upload' => 1,
|
1719 |
-
'delay' => 0,
|
1720 |
-
),
|
1721 |
-
),
|
1722 |
-
),
|
1723 |
-
array(
|
1724 |
-
'key' => 'field_acfe_form_post_map_post_content_message',
|
1725 |
-
'label' => 'Post content',
|
1726 |
-
'name' => 'acfe_form_post_map_post_content_message',
|
1727 |
-
'type' => 'acfe_dynamic_message',
|
1728 |
-
'instructions' => '',
|
1729 |
-
'required' => 0,
|
1730 |
-
'conditional_logic' => array(
|
1731 |
-
array(
|
1732 |
-
array(
|
1733 |
-
'field' => 'field_acfe_form_post_map_post_content',
|
1734 |
-
'operator' => '!=empty',
|
1735 |
-
),
|
1736 |
-
),
|
1737 |
-
),
|
1738 |
-
'wrapper' => array(
|
1739 |
-
'width' => '',
|
1740 |
-
'class' => '',
|
1741 |
-
'id' => '',
|
1742 |
-
),
|
1743 |
-
'acfe_permissions' => '',
|
1744 |
-
),
|
1745 |
-
array(
|
1746 |
-
'key' => 'field_acfe_form_post_save_post_author',
|
1747 |
-
'label' => 'Post author',
|
1748 |
-
'name' => 'acfe_form_post_save_post_author',
|
1749 |
-
'type' => 'select',
|
1750 |
-
'instructions' => '',
|
1751 |
-
'required' => 0,
|
1752 |
-
'conditional_logic' => array(
|
1753 |
-
array(
|
1754 |
-
array(
|
1755 |
-
'field' => 'field_acfe_form_post_map_post_author',
|
1756 |
-
'operator' => '==empty',
|
1757 |
-
),
|
1758 |
-
),
|
1759 |
-
),
|
1760 |
-
'wrapper' => array(
|
1761 |
-
'width' => '',
|
1762 |
-
'class' => '',
|
1763 |
-
'id' => '',
|
1764 |
-
),
|
1765 |
-
'acfe_permissions' => '',
|
1766 |
-
'choices' => array(
|
1767 |
-
),
|
1768 |
-
'default_value' => array(
|
1769 |
-
),
|
1770 |
-
'allow_null' => 1,
|
1771 |
-
'multiple' => 0,
|
1772 |
-
'ui' => 1,
|
1773 |
-
'ajax' => 0,
|
1774 |
-
'return_format' => 'value',
|
1775 |
-
'placeholder' => 'Default',
|
1776 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1777 |
-
'allow_custom' => 1,
|
1778 |
-
),
|
1779 |
-
array(
|
1780 |
-
'key' => 'field_acfe_form_post_map_post_author_message',
|
1781 |
-
'label' => 'Post author',
|
1782 |
-
'name' => 'acfe_form_post_map_post_author_message',
|
1783 |
-
'type' => 'acfe_dynamic_message',
|
1784 |
-
'instructions' => '',
|
1785 |
-
'required' => 0,
|
1786 |
-
'conditional_logic' => array(
|
1787 |
-
array(
|
1788 |
-
array(
|
1789 |
-
'field' => 'field_acfe_form_post_map_post_author',
|
1790 |
-
'operator' => '!=empty',
|
1791 |
-
),
|
1792 |
-
),
|
1793 |
-
),
|
1794 |
-
'wrapper' => array(
|
1795 |
-
'width' => '',
|
1796 |
-
'class' => '',
|
1797 |
-
'id' => '',
|
1798 |
-
),
|
1799 |
-
'acfe_permissions' => '',
|
1800 |
-
),
|
1801 |
-
array(
|
1802 |
-
'key' => 'field_acfe_form_post_save_post_parent',
|
1803 |
-
'label' => 'Post parent',
|
1804 |
-
'name' => 'acfe_form_post_save_post_parent',
|
1805 |
-
'type' => 'select',
|
1806 |
-
'instructions' => '',
|
1807 |
-
'required' => 0,
|
1808 |
-
'conditional_logic' => array(
|
1809 |
-
array(
|
1810 |
-
array(
|
1811 |
-
'field' => 'field_acfe_form_post_map_post_parent',
|
1812 |
-
'operator' => '==empty',
|
1813 |
-
),
|
1814 |
-
),
|
1815 |
-
),
|
1816 |
-
'wrapper' => array(
|
1817 |
-
'width' => '',
|
1818 |
-
'class' => '',
|
1819 |
-
'id' => '',
|
1820 |
-
),
|
1821 |
-
'acfe_permissions' => '',
|
1822 |
-
'choices' => array(
|
1823 |
-
),
|
1824 |
-
'default_value' => array(
|
1825 |
-
),
|
1826 |
-
'allow_null' => 1,
|
1827 |
-
'multiple' => 0,
|
1828 |
-
'ui' => 1,
|
1829 |
-
'ajax' => 0,
|
1830 |
-
'return_format' => 'value',
|
1831 |
-
'placeholder' => 'Default',
|
1832 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1833 |
-
'allow_custom' => 1,
|
1834 |
-
),
|
1835 |
-
array(
|
1836 |
-
'key' => 'field_acfe_form_post_map_post_parent_message',
|
1837 |
-
'label' => 'Post parent',
|
1838 |
-
'name' => 'acfe_form_post_map_post_parent_message',
|
1839 |
-
'type' => 'acfe_dynamic_message',
|
1840 |
-
'instructions' => '',
|
1841 |
-
'required' => 0,
|
1842 |
-
'conditional_logic' => array(
|
1843 |
-
array(
|
1844 |
-
array(
|
1845 |
-
'field' => 'field_acfe_form_post_map_post_parent',
|
1846 |
-
'operator' => '!=empty',
|
1847 |
-
),
|
1848 |
-
),
|
1849 |
-
),
|
1850 |
-
'wrapper' => array(
|
1851 |
-
'width' => '',
|
1852 |
-
'class' => '',
|
1853 |
-
'id' => '',
|
1854 |
-
),
|
1855 |
-
'acfe_permissions' => '',
|
1856 |
-
),
|
1857 |
-
array(
|
1858 |
-
'key' => 'field_acfe_form_post_save_post_terms',
|
1859 |
-
'label' => 'Post terms',
|
1860 |
-
'name' => 'acfe_form_post_save_post_terms',
|
1861 |
-
'type' => 'acfe_taxonomy_terms',
|
1862 |
-
'instructions' => '',
|
1863 |
-
'required' => 0,
|
1864 |
-
'conditional_logic' => array(
|
1865 |
-
array(
|
1866 |
-
array(
|
1867 |
-
'field' => 'field_acfe_form_post_map_post_terms',
|
1868 |
-
'operator' => '==empty',
|
1869 |
-
),
|
1870 |
-
),
|
1871 |
-
),
|
1872 |
-
'wrapper' => array(
|
1873 |
-
'width' => '',
|
1874 |
-
'class' => '',
|
1875 |
-
'id' => '',
|
1876 |
-
),
|
1877 |
-
'acfe_permissions' => '',
|
1878 |
-
'taxonomy' => '',
|
1879 |
-
'field_type' => 'select',
|
1880 |
-
'default_value' => '',
|
1881 |
-
'return_format' => 'id',
|
1882 |
-
'allow_null' => 1,
|
1883 |
-
'placeholder' => 'Default',
|
1884 |
-
'multiple' => 1,
|
1885 |
-
'ui' => 1,
|
1886 |
-
'ajax' => 0,
|
1887 |
-
'choices' => array(
|
1888 |
-
),
|
1889 |
-
'layout' => '',
|
1890 |
-
'toggle' => 0,
|
1891 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1892 |
-
'allow_custom' => 1,
|
1893 |
-
),
|
1894 |
-
array(
|
1895 |
-
'key' => 'field_acfe_form_post_map_post_terms_message',
|
1896 |
-
'label' => 'Post terms',
|
1897 |
-
'name' => 'acfe_form_post_map_post_terms_message',
|
1898 |
-
'type' => 'acfe_dynamic_message',
|
1899 |
-
'instructions' => '',
|
1900 |
-
'required' => 0,
|
1901 |
-
'conditional_logic' => array(
|
1902 |
-
array(
|
1903 |
-
array(
|
1904 |
-
'field' => 'field_acfe_form_post_map_post_terms',
|
1905 |
-
'operator' => '!=empty',
|
1906 |
-
),
|
1907 |
-
),
|
1908 |
-
),
|
1909 |
-
'wrapper' => array(
|
1910 |
-
'width' => '',
|
1911 |
-
'class' => '',
|
1912 |
-
'id' => '',
|
1913 |
-
),
|
1914 |
-
'acfe_permissions' => '',
|
1915 |
-
),
|
1916 |
-
array(
|
1917 |
-
'key' => 'field_acfe_form_post_save_meta',
|
1918 |
-
'label' => 'Save ACF fields',
|
1919 |
-
'name' => 'acfe_form_post_save_meta',
|
1920 |
-
'type' => 'checkbox',
|
1921 |
-
'instructions' => 'Choose which ACF fields should be saved to this post',
|
1922 |
-
'required' => 0,
|
1923 |
-
'conditional_logic' => 0,
|
1924 |
-
'wrapper' => array(
|
1925 |
-
'width' => '',
|
1926 |
-
'class' => '',
|
1927 |
-
'id' => '',
|
1928 |
-
),
|
1929 |
-
'acfe_permissions' => '',
|
1930 |
-
'choices' => array(
|
1931 |
-
),
|
1932 |
-
'allow_custom' => 0,
|
1933 |
-
'default_value' => array(
|
1934 |
-
),
|
1935 |
-
'layout' => 'vertical',
|
1936 |
-
'toggle' => 1,
|
1937 |
-
'return_format' => 'value',
|
1938 |
-
'save_custom' => 0,
|
1939 |
-
),
|
1940 |
-
|
1941 |
-
/*
|
1942 |
-
* Layout: Post Load
|
1943 |
-
*/
|
1944 |
-
array(
|
1945 |
-
'key' => 'acfe_form_post_tab_load',
|
1946 |
-
'label' => 'Load',
|
1947 |
-
'name' => '',
|
1948 |
-
'type' => 'tab',
|
1949 |
-
'instructions' => '',
|
1950 |
-
'required' => 0,
|
1951 |
-
'conditional_logic' => 0,
|
1952 |
-
'wrapper' => array(
|
1953 |
-
'width' => '',
|
1954 |
-
'class' => '',
|
1955 |
-
'id' => '',
|
1956 |
-
),
|
1957 |
-
'acfe_permissions' => '',
|
1958 |
-
'placement' => 'top',
|
1959 |
-
'endpoint' => 0,
|
1960 |
-
),
|
1961 |
-
array(
|
1962 |
-
'key' => 'field_acfe_form_post_load_values',
|
1963 |
-
'label' => 'Load Values',
|
1964 |
-
'name' => 'acfe_form_post_load_values',
|
1965 |
-
'type' => 'true_false',
|
1966 |
-
'instructions' => 'Fill inputs with values',
|
1967 |
-
'required' => 0,
|
1968 |
-
'conditional_logic' => 0,
|
1969 |
-
'wrapper' => array(
|
1970 |
-
'width' => '',
|
1971 |
-
'class' => '',
|
1972 |
-
'id' => '',
|
1973 |
-
),
|
1974 |
-
'acfe_permissions' => '',
|
1975 |
-
'message' => '',
|
1976 |
-
'default_value' => 1,
|
1977 |
-
'ui' => 1,
|
1978 |
-
'ui_on_text' => '',
|
1979 |
-
'ui_off_text' => '',
|
1980 |
-
),
|
1981 |
-
array(
|
1982 |
-
'key' => 'field_acfe_form_post_load_source',
|
1983 |
-
'label' => 'Source',
|
1984 |
-
'name' => 'acfe_form_post_load_source',
|
1985 |
-
'type' => 'select',
|
1986 |
-
'instructions' => '',
|
1987 |
-
'required' => 0,
|
1988 |
-
'conditional_logic' => array(
|
1989 |
-
array(
|
1990 |
-
array(
|
1991 |
-
'field' => 'field_acfe_form_post_load_values',
|
1992 |
-
'operator' => '==',
|
1993 |
-
'value' => '1',
|
1994 |
-
),
|
1995 |
-
),
|
1996 |
-
),
|
1997 |
-
'wrapper' => array(
|
1998 |
-
'width' => '',
|
1999 |
-
'class' => '',
|
2000 |
-
'id' => '',
|
2001 |
-
),
|
2002 |
-
'acfe_permissions' => '',
|
2003 |
-
'choices' => array(
|
2004 |
-
),
|
2005 |
-
'default_value' => 'current_post',
|
2006 |
-
'allow_null' => 0,
|
2007 |
-
'multiple' => 0,
|
2008 |
-
'ui' => 1,
|
2009 |
-
'ajax' => 0,
|
2010 |
-
'return_format' => 'value',
|
2011 |
-
'placeholder' => '',
|
2012 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2013 |
-
'allow_custom' => 1,
|
2014 |
-
),
|
2015 |
-
|
2016 |
-
array(
|
2017 |
-
'key' => 'field_acfe_form_post_map_post_type',
|
2018 |
-
'label' => 'Post type',
|
2019 |
-
'name' => 'acfe_form_post_map_post_type',
|
2020 |
-
'type' => 'select',
|
2021 |
-
'instructions' => '',
|
2022 |
-
'required' => 0,
|
2023 |
-
'wrapper' => array(
|
2024 |
-
'width' => '',
|
2025 |
-
'class' => '',
|
2026 |
-
'id' => '',
|
2027 |
-
),
|
2028 |
-
'acfe_permissions' => '',
|
2029 |
-
'choices' => array(
|
2030 |
-
),
|
2031 |
-
'default_value' => array(
|
2032 |
-
),
|
2033 |
-
'allow_null' => 1,
|
2034 |
-
'multiple' => 0,
|
2035 |
-
'ui' => 1,
|
2036 |
-
'return_format' => 'value',
|
2037 |
-
'placeholder' => 'Default',
|
2038 |
-
'ajax' => 0,
|
2039 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2040 |
-
'allow_custom' => 1,
|
2041 |
-
'conditional_logic' => array(
|
2042 |
-
array(
|
2043 |
-
array(
|
2044 |
-
'field' => 'field_acfe_form_post_load_values',
|
2045 |
-
'operator' => '==',
|
2046 |
-
'value' => '1',
|
2047 |
-
),
|
2048 |
-
),
|
2049 |
-
),
|
2050 |
-
),
|
2051 |
-
array(
|
2052 |
-
'key' => 'field_acfe_form_post_map_post_status',
|
2053 |
-
'label' => 'Post status',
|
2054 |
-
'name' => 'acfe_form_post_map_post_status',
|
2055 |
-
'type' => 'select',
|
2056 |
-
'instructions' => '',
|
2057 |
-
'required' => 0,
|
2058 |
-
'wrapper' => array(
|
2059 |
-
'width' => '',
|
2060 |
-
'class' => '',
|
2061 |
-
'id' => '',
|
2062 |
-
),
|
2063 |
-
'acfe_permissions' => '',
|
2064 |
-
'choices' => array(
|
2065 |
-
),
|
2066 |
-
'default_value' => array(
|
2067 |
-
),
|
2068 |
-
'allow_null' => 1,
|
2069 |
-
'multiple' => 0,
|
2070 |
-
'ui' => 1,
|
2071 |
-
'return_format' => 'value',
|
2072 |
-
'placeholder' => 'Default',
|
2073 |
-
'ajax' => 0,
|
2074 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2075 |
-
'allow_custom' => 1,
|
2076 |
-
'conditional_logic' => array(
|
2077 |
-
array(
|
2078 |
-
array(
|
2079 |
-
'field' => 'field_acfe_form_post_load_values',
|
2080 |
-
'operator' => '==',
|
2081 |
-
'value' => '1',
|
2082 |
-
),
|
2083 |
-
),
|
2084 |
-
),
|
2085 |
-
),
|
2086 |
-
array(
|
2087 |
-
'key' => 'field_acfe_form_post_map_post_title',
|
2088 |
-
'label' => 'Post title',
|
2089 |
-
'name' => 'acfe_form_post_map_post_title',
|
2090 |
-
'type' => 'select',
|
2091 |
-
'instructions' => '',
|
2092 |
-
'required' => 0,
|
2093 |
-
'wrapper' => array(
|
2094 |
-
'width' => '',
|
2095 |
-
'class' => '',
|
2096 |
-
'id' => '',
|
2097 |
-
),
|
2098 |
-
'acfe_permissions' => '',
|
2099 |
-
'choices' => array(
|
2100 |
-
),
|
2101 |
-
'default_value' => array(
|
2102 |
-
),
|
2103 |
-
'allow_null' => 1,
|
2104 |
-
'multiple' => 0,
|
2105 |
-
'ui' => 1,
|
2106 |
-
'return_format' => 'value',
|
2107 |
-
'placeholder' => 'Default',
|
2108 |
-
'ajax' => 0,
|
2109 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2110 |
-
'allow_custom' => 1,
|
2111 |
-
'conditional_logic' => array(
|
2112 |
-
array(
|
2113 |
-
array(
|
2114 |
-
'field' => 'field_acfe_form_post_load_values',
|
2115 |
-
'operator' => '==',
|
2116 |
-
'value' => '1',
|
2117 |
-
),
|
2118 |
-
),
|
2119 |
-
),
|
2120 |
-
),
|
2121 |
-
array(
|
2122 |
-
'key' => 'field_acfe_form_post_map_post_name',
|
2123 |
-
'label' => 'Post slug',
|
2124 |
-
'name' => 'acfe_form_post_map_post_name',
|
2125 |
-
'type' => 'select',
|
2126 |
-
'instructions' => '',
|
2127 |
-
'required' => 0,
|
2128 |
-
'wrapper' => array(
|
2129 |
-
'width' => '',
|
2130 |
-
'class' => '',
|
2131 |
-
'id' => '',
|
2132 |
-
),
|
2133 |
-
'acfe_permissions' => '',
|
2134 |
-
'choices' => array(
|
2135 |
-
),
|
2136 |
-
'default_value' => array(
|
2137 |
-
),
|
2138 |
-
'allow_null' => 1,
|
2139 |
-
'multiple' => 0,
|
2140 |
-
'ui' => 1,
|
2141 |
-
'return_format' => 'value',
|
2142 |
-
'placeholder' => 'Default',
|
2143 |
-
'ajax' => 0,
|
2144 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2145 |
-
'allow_custom' => 1,
|
2146 |
-
'conditional_logic' => array(
|
2147 |
-
array(
|
2148 |
-
array(
|
2149 |
-
'field' => 'field_acfe_form_post_load_values',
|
2150 |
-
'operator' => '==',
|
2151 |
-
'value' => '1',
|
2152 |
-
),
|
2153 |
-
),
|
2154 |
-
),
|
2155 |
-
),
|
2156 |
-
array(
|
2157 |
-
'key' => 'field_acfe_form_post_map_post_content',
|
2158 |
-
'label' => 'Post content',
|
2159 |
-
'name' => 'acfe_form_post_map_post_content',
|
2160 |
-
'type' => 'select',
|
2161 |
-
'instructions' => '',
|
2162 |
-
'required' => 0,
|
2163 |
-
'wrapper' => array(
|
2164 |
-
'width' => '',
|
2165 |
-
'class' => '',
|
2166 |
-
'id' => '',
|
2167 |
-
),
|
2168 |
-
'acfe_permissions' => '',
|
2169 |
-
'choices' => array(
|
2170 |
-
),
|
2171 |
-
'default_value' => array(
|
2172 |
-
),
|
2173 |
-
'allow_null' => 1,
|
2174 |
-
'multiple' => 0,
|
2175 |
-
'ui' => 1,
|
2176 |
-
'return_format' => 'value',
|
2177 |
-
'placeholder' => 'Default',
|
2178 |
-
'ajax' => 0,
|
2179 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2180 |
-
'allow_custom' => 1,
|
2181 |
-
'conditional_logic' => array(
|
2182 |
-
array(
|
2183 |
-
array(
|
2184 |
-
'field' => 'field_acfe_form_post_load_values',
|
2185 |
-
'operator' => '==',
|
2186 |
-
'value' => '1',
|
2187 |
-
),
|
2188 |
-
),
|
2189 |
-
),
|
2190 |
-
),
|
2191 |
-
array(
|
2192 |
-
'key' => 'field_acfe_form_post_map_post_author',
|
2193 |
-
'label' => 'Post author',
|
2194 |
-
'name' => 'acfe_form_post_map_post_author',
|
2195 |
-
'type' => 'select',
|
2196 |
-
'instructions' => '',
|
2197 |
-
'required' => 0,
|
2198 |
-
'wrapper' => array(
|
2199 |
-
'width' => '',
|
2200 |
-
'class' => '',
|
2201 |
-
'id' => '',
|
2202 |
-
),
|
2203 |
-
'acfe_permissions' => '',
|
2204 |
-
'choices' => array(
|
2205 |
-
),
|
2206 |
-
'default_value' => array(
|
2207 |
-
),
|
2208 |
-
'allow_null' => 1,
|
2209 |
-
'multiple' => 0,
|
2210 |
-
'ui' => 1,
|
2211 |
-
'return_format' => 'value',
|
2212 |
-
'placeholder' => 'Default',
|
2213 |
-
'ajax' => 0,
|
2214 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2215 |
-
'allow_custom' => 1,
|
2216 |
-
'conditional_logic' => array(
|
2217 |
-
array(
|
2218 |
-
array(
|
2219 |
-
'field' => 'field_acfe_form_post_load_values',
|
2220 |
-
'operator' => '==',
|
2221 |
-
'value' => '1',
|
2222 |
-
),
|
2223 |
-
),
|
2224 |
-
),
|
2225 |
-
),
|
2226 |
-
array(
|
2227 |
-
'key' => 'field_acfe_form_post_map_post_parent',
|
2228 |
-
'label' => 'Post parent',
|
2229 |
-
'name' => 'acfe_form_post_map_post_parent',
|
2230 |
-
'type' => 'select',
|
2231 |
-
'instructions' => '',
|
2232 |
-
'required' => 0,
|
2233 |
-
'wrapper' => array(
|
2234 |
-
'width' => '',
|
2235 |
-
'class' => '',
|
2236 |
-
'id' => '',
|
2237 |
-
),
|
2238 |
-
'acfe_permissions' => '',
|
2239 |
-
'choices' => array(
|
2240 |
-
),
|
2241 |
-
'default_value' => array(
|
2242 |
-
),
|
2243 |
-
'allow_null' => 1,
|
2244 |
-
'multiple' => 0,
|
2245 |
-
'ui' => 1,
|
2246 |
-
'return_format' => 'value',
|
2247 |
-
'placeholder' => 'Default',
|
2248 |
-
'ajax' => 0,
|
2249 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2250 |
-
'allow_custom' => 1,
|
2251 |
-
'conditional_logic' => array(
|
2252 |
-
array(
|
2253 |
-
array(
|
2254 |
-
'field' => 'field_acfe_form_post_load_values',
|
2255 |
-
'operator' => '==',
|
2256 |
-
'value' => '1',
|
2257 |
-
),
|
2258 |
-
),
|
2259 |
-
),
|
2260 |
-
),
|
2261 |
-
array(
|
2262 |
-
'key' => 'field_acfe_form_post_map_post_terms',
|
2263 |
-
'label' => 'Post terms',
|
2264 |
-
'name' => 'acfe_form_post_map_post_terms',
|
2265 |
-
'type' => 'select',
|
2266 |
-
'instructions' => '',
|
2267 |
-
'required' => 0,
|
2268 |
-
'wrapper' => array(
|
2269 |
-
'width' => '',
|
2270 |
-
'class' => '',
|
2271 |
-
'id' => '',
|
2272 |
-
),
|
2273 |
-
'acfe_permissions' => '',
|
2274 |
-
'choices' => array(
|
2275 |
-
),
|
2276 |
-
'default_value' => array(
|
2277 |
-
),
|
2278 |
-
'allow_null' => 1,
|
2279 |
-
'multiple' => 0,
|
2280 |
-
'ui' => 1,
|
2281 |
-
'return_format' => 'value',
|
2282 |
-
'placeholder' => 'Default',
|
2283 |
-
'ajax' => 0,
|
2284 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2285 |
-
'allow_custom' => 1,
|
2286 |
-
'conditional_logic' => array(
|
2287 |
-
array(
|
2288 |
-
array(
|
2289 |
-
'field' => 'field_acfe_form_post_load_values',
|
2290 |
-
'operator' => '==',
|
2291 |
-
'value' => '1',
|
2292 |
-
),
|
2293 |
-
),
|
2294 |
-
),
|
2295 |
-
),
|
2296 |
-
array(
|
2297 |
-
'key' => 'field_acfe_form_post_load_meta',
|
2298 |
-
'label' => 'Load ACF fields',
|
2299 |
-
'name' => 'acfe_form_post_load_meta',
|
2300 |
-
'type' => 'checkbox',
|
2301 |
-
'instructions' => 'Choose which ACF fields should have their values loaded',
|
2302 |
-
'required' => 0,
|
2303 |
-
'conditional_logic' => array(
|
2304 |
-
array(
|
2305 |
-
array(
|
2306 |
-
'field' => 'field_acfe_form_post_load_values',
|
2307 |
-
'operator' => '==',
|
2308 |
-
'value' => '1',
|
2309 |
-
),
|
2310 |
-
),
|
2311 |
-
),
|
2312 |
-
'wrapper' => array(
|
2313 |
-
'width' => '',
|
2314 |
-
'class' => '',
|
2315 |
-
'id' => '',
|
2316 |
-
),
|
2317 |
-
'acfe_permissions' => '',
|
2318 |
-
'choices' => array(
|
2319 |
-
),
|
2320 |
-
'allow_custom' => 0,
|
2321 |
-
'default_value' => array(
|
2322 |
-
),
|
2323 |
-
'layout' => 'vertical',
|
2324 |
-
'toggle' => 1,
|
2325 |
-
'return_format' => 'value',
|
2326 |
-
'save_custom' => 0,
|
2327 |
-
),
|
2328 |
-
|
2329 |
-
/*
|
2330 |
-
* Layout: Post Advanced
|
2331 |
-
*/
|
2332 |
-
array(
|
2333 |
-
'key' => 'field_acfe_form_post_tab_advanced',
|
2334 |
-
'label' => 'Advanced',
|
2335 |
-
'name' => '',
|
2336 |
-
'type' => 'tab',
|
2337 |
-
'instructions' => '',
|
2338 |
-
'required' => 0,
|
2339 |
-
'conditional_logic' => 0,
|
2340 |
-
'wrapper' => array(
|
2341 |
-
'width' => '',
|
2342 |
-
'class' => '',
|
2343 |
-
'id' => '',
|
2344 |
-
),
|
2345 |
-
'acfe_permissions' => '',
|
2346 |
-
'placement' => 'top',
|
2347 |
-
'endpoint' => 0,
|
2348 |
-
),
|
2349 |
array(
|
2350 |
-
'key' => '
|
2351 |
-
'label' => '
|
2352 |
-
'name' => '
|
2353 |
'type' => 'acfe_dynamic_message',
|
2354 |
-
'
|
2355 |
-
'instructions' => 'Alter the post ID where meta values are loaded from',
|
2356 |
'required' => 0,
|
2357 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2358 |
'wrapper' => array(
|
2359 |
'width' => '',
|
2360 |
'class' => '',
|
@@ -2363,103 +3586,72 @@ acf_add_local_field_group(array(
|
|
2363 |
'acfe_permissions' => '',
|
2364 |
),
|
2365 |
array(
|
2366 |
-
'key' => '
|
2367 |
-
'label' => '
|
2368 |
-
'name' => '
|
2369 |
-
'type' => '
|
2370 |
-
'
|
2371 |
-
'instructions' => 'Alter the post arguments before database insert/update',
|
2372 |
'required' => 0,
|
2373 |
-
'conditional_logic' => 0,
|
2374 |
'wrapper' => array(
|
2375 |
'width' => '',
|
2376 |
'class' => '',
|
2377 |
'id' => '',
|
2378 |
),
|
2379 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2380 |
),
|
|
|
|
|
|
|
|
|
2381 |
array(
|
2382 |
-
'key' => '
|
2383 |
-
'label' => '
|
2384 |
-
'name' => '
|
2385 |
-
'type' => '
|
2386 |
-
'
|
2387 |
-
'instructions' => 'This action allows you to hook in before or after the meta data have been saved',
|
2388 |
'required' => 0,
|
2389 |
-
'conditional_logic' => 0,
|
2390 |
'wrapper' => array(
|
2391 |
'width' => '',
|
2392 |
'class' => '',
|
2393 |
'id' => '',
|
2394 |
),
|
2395 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2396 |
),
|
2397 |
-
),
|
2398 |
-
'min' => '',
|
2399 |
-
'max' => '',
|
2400 |
-
),
|
2401 |
-
|
2402 |
-
/*
|
2403 |
-
* Layout: Term
|
2404 |
-
*/
|
2405 |
-
'layout_term' => array(
|
2406 |
-
'key' => 'layout_term',
|
2407 |
-
'name' => 'term',
|
2408 |
-
'label' => 'Term action',
|
2409 |
-
'display' => 'row',
|
2410 |
-
'sub_fields' => array(
|
2411 |
-
|
2412 |
-
/*
|
2413 |
-
* Layout: Term Action
|
2414 |
-
*/
|
2415 |
-
array(
|
2416 |
-
'key' => 'field_acfe_form_term_tab_action',
|
2417 |
-
'label' => 'Action',
|
2418 |
-
'name' => '',
|
2419 |
-
'type' => 'tab',
|
2420 |
-
'instructions' => '',
|
2421 |
-
'required' => 0,
|
2422 |
-
'conditional_logic' => 0,
|
2423 |
-
'wrapper' => array(
|
2424 |
-
'width' => '',
|
2425 |
-
'class' => '',
|
2426 |
-
'id' => '',
|
2427 |
-
),
|
2428 |
-
'acfe_permissions' => '',
|
2429 |
-
'placement' => 'top',
|
2430 |
-
'endpoint' => 0,
|
2431 |
-
),
|
2432 |
-
array(
|
2433 |
-
'key' => 'acfe_form_term_action',
|
2434 |
-
'label' => 'Action',
|
2435 |
-
'name' => 'acfe_form_term_action',
|
2436 |
-
'type' => 'radio',
|
2437 |
-
'instructions' => '',
|
2438 |
-
'required' => 0,
|
2439 |
-
'conditional_logic' => 0,
|
2440 |
-
'wrapper' => array(
|
2441 |
-
'width' => '',
|
2442 |
-
'class' => '',
|
2443 |
-
'id' => '',
|
2444 |
-
),
|
2445 |
-
'acfe_permissions' => '',
|
2446 |
-
'choices' => array(
|
2447 |
-
'insert_term' => 'Create term',
|
2448 |
-
'update_term' => 'Update term',
|
2449 |
-
),
|
2450 |
-
'allow_null' => 0,
|
2451 |
-
'other_choice' => 0,
|
2452 |
-
'default_value' => 'insert_post',
|
2453 |
-
'layout' => 'vertical',
|
2454 |
-
'return_format' => 'value',
|
2455 |
-
'save_other_choice' => 0,
|
2456 |
-
),
|
2457 |
array(
|
2458 |
-
'key' => '
|
2459 |
-
'label' => '
|
2460 |
-
'name' => '
|
2461 |
-
'type' => '
|
2462 |
-
'instructions' => '
|
2463 |
'required' => 0,
|
2464 |
'conditional_logic' => 0,
|
2465 |
'wrapper' => array(
|
@@ -2468,153 +3660,51 @@ acf_add_local_field_group(array(
|
|
2468 |
'id' => '',
|
2469 |
),
|
2470 |
'acfe_permissions' => '',
|
2471 |
-
'
|
2472 |
-
'
|
2473 |
-
'
|
2474 |
-
'
|
2475 |
-
'
|
2476 |
),
|
2477 |
-
array(
|
2478 |
-
'key' => 'field_acfe_form_term_custom_query_var',
|
2479 |
-
'label' => 'Query var',
|
2480 |
-
'name' => 'acfe_form_custom_query_var',
|
2481 |
-
'type' => 'true_false',
|
2482 |
-
'instructions' => 'Automatically create a query var with the data of the term that has been created/updated.<br />Retrieve data using <code>{query_var:my-action:name}</code> <code>{query_var:my-action:permalink}</code> template tags.',
|
2483 |
-
'required' => 0,
|
2484 |
-
'wrapper' => array(
|
2485 |
-
'width' => '',
|
2486 |
-
'class' => '',
|
2487 |
-
'id' => '',
|
2488 |
-
),
|
2489 |
-
'acfe_permissions' => '',
|
2490 |
-
'message' => '',
|
2491 |
-
'default_value' => 0,
|
2492 |
-
'ui' => 1,
|
2493 |
-
'ui_on_text' => '',
|
2494 |
-
'ui_off_text' => '',
|
2495 |
-
'conditional_logic' => array(
|
2496 |
-
array(
|
2497 |
-
array(
|
2498 |
-
'field' => 'field_acfe_form_term_custom_alias',
|
2499 |
-
'operator' => '!=empty',
|
2500 |
-
),
|
2501 |
-
),
|
2502 |
-
),
|
2503 |
-
),
|
2504 |
-
|
2505 |
-
/*
|
2506 |
-
* Layout: Term Save
|
2507 |
-
*/
|
2508 |
-
array(
|
2509 |
-
'key' => 'field_acfe_form_term_tab_save',
|
2510 |
-
'label' => 'Save',
|
2511 |
-
'name' => '',
|
2512 |
-
'type' => 'tab',
|
2513 |
-
'instructions' => '',
|
2514 |
-
'required' => 0,
|
2515 |
-
'conditional_logic' => 0,
|
2516 |
-
'wrapper' => array(
|
2517 |
-
'width' => '',
|
2518 |
-
'class' => '',
|
2519 |
-
'id' => '',
|
2520 |
-
),
|
2521 |
-
'acfe_permissions' => '',
|
2522 |
-
'placement' => 'top',
|
2523 |
-
'endpoint' => 0,
|
2524 |
-
),
|
2525 |
-
array(
|
2526 |
-
'key' => 'field_acfe_form_term_save_target',
|
2527 |
-
'label' => 'Target',
|
2528 |
-
'name' => 'acfe_form_term_save_target',
|
2529 |
-
'type' => 'select',
|
2530 |
-
'instructions' => '',
|
2531 |
-
'required' => 0,
|
2532 |
-
'conditional_logic' => array(
|
2533 |
-
array(
|
2534 |
-
array(
|
2535 |
-
'field' => 'acfe_form_term_action',
|
2536 |
-
'operator' => '==',
|
2537 |
-
'value' => 'update_term',
|
2538 |
-
),
|
2539 |
-
),
|
2540 |
-
),
|
2541 |
-
'wrapper' => array(
|
2542 |
-
'width' => '',
|
2543 |
-
'class' => '',
|
2544 |
-
'id' => '',
|
2545 |
-
),
|
2546 |
-
'acfe_permissions' => '',
|
2547 |
-
'choices' => array(
|
2548 |
-
),
|
2549 |
-
'default_value' => 'current_term',
|
2550 |
-
'allow_null' => 0,
|
2551 |
-
'multiple' => 0,
|
2552 |
-
'ui' => 1,
|
2553 |
-
'ajax' => 0,
|
2554 |
-
'return_format' => 'value',
|
2555 |
-
'placeholder' => '',
|
2556 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2557 |
-
'allow_custom' => 1,
|
2558 |
-
),
|
2559 |
array(
|
2560 |
-
'key' => '
|
2561 |
-
'label' => '
|
2562 |
-
'name' => '
|
2563 |
'type' => 'select',
|
2564 |
'instructions' => '',
|
2565 |
'required' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2566 |
'wrapper' => array(
|
2567 |
'width' => '',
|
2568 |
'class' => '',
|
2569 |
'id' => '',
|
2570 |
),
|
2571 |
'acfe_permissions' => '',
|
2572 |
-
'choices' => array(
|
2573 |
-
'default_value' => array(
|
2574 |
),
|
2575 |
-
'
|
|
|
2576 |
'multiple' => 0,
|
2577 |
'ui' => 1,
|
2578 |
-
'return_format' => 'value',
|
2579 |
-
'placeholder' => 'Default',
|
2580 |
'ajax' => 0,
|
|
|
|
|
2581 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
array(
|
2586 |
-
'field' => 'field_acfe_form_term_map_name',
|
2587 |
-
'operator' => '==empty',
|
2588 |
-
),
|
2589 |
-
),
|
2590 |
-
),
|
2591 |
-
),
|
2592 |
-
array(
|
2593 |
-
'key' => 'field_acfe_form_term_map_name_message',
|
2594 |
-
'label' => 'Name',
|
2595 |
-
'name' => 'acfe_form_term_map_name_message',
|
2596 |
-
'type' => 'acfe_dynamic_message',
|
2597 |
-
'instructions' => '',
|
2598 |
-
'required' => 0,
|
2599 |
-
'conditional_logic' => array(
|
2600 |
-
array(
|
2601 |
-
array(
|
2602 |
-
'field' => 'field_acfe_form_term_map_name',
|
2603 |
-
'operator' => '!=empty',
|
2604 |
-
),
|
2605 |
-
),
|
2606 |
-
),
|
2607 |
-
'wrapper' => array(
|
2608 |
-
'width' => '',
|
2609 |
-
'class' => '',
|
2610 |
-
'id' => '',
|
2611 |
-
),
|
2612 |
-
'acfe_permissions' => '',
|
2613 |
-
),
|
2614 |
array(
|
2615 |
-
'key' => '
|
2616 |
-
'label' => '
|
2617 |
-
'name' => '
|
2618 |
'type' => 'select',
|
2619 |
'instructions' => '',
|
2620 |
'required' => 0,
|
@@ -2624,7 +3714,8 @@ acf_add_local_field_group(array(
|
|
2624 |
'id' => '',
|
2625 |
),
|
2626 |
'acfe_permissions' => '',
|
2627 |
-
'choices' => array(
|
|
|
2628 |
'default_value' => array(
|
2629 |
),
|
2630 |
'allow_null' => 1,
|
@@ -2634,973 +3725,66 @@ acf_add_local_field_group(array(
|
|
2634 |
'placeholder' => 'Default',
|
2635 |
'ajax' => 0,
|
2636 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2637 |
-
|
2638 |
'conditional_logic' => array(
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
'type' => 'acfe_dynamic_message',
|
2652 |
-
'instructions' => '',
|
2653 |
-
'required' => 0,
|
2654 |
-
'conditional_logic' => array(
|
2655 |
-
array(
|
2656 |
-
array(
|
2657 |
-
'field' => 'field_acfe_form_term_map_slug',
|
2658 |
-
'operator' => '!=empty',
|
2659 |
-
),
|
2660 |
-
),
|
2661 |
-
),
|
2662 |
-
'wrapper' => array(
|
2663 |
-
'width' => '',
|
2664 |
-
'class' => '',
|
2665 |
-
'id' => '',
|
2666 |
-
),
|
2667 |
-
'acfe_permissions' => '',
|
2668 |
-
),
|
2669 |
-
array(
|
2670 |
-
'key' => 'field_acfe_form_term_save_taxonomy',
|
2671 |
-
'label' => 'Taxonomy',
|
2672 |
-
'name' => 'acfe_form_term_save_taxonomy',
|
2673 |
-
'type' => 'acfe_taxonomies',
|
2674 |
-
'instructions' => '',
|
2675 |
-
'required' => 0,
|
2676 |
-
'conditional_logic' => array(
|
2677 |
-
array(
|
2678 |
-
array(
|
2679 |
-
'field' => 'field_acfe_form_term_map_taxonomy',
|
2680 |
-
'operator' => '==empty',
|
2681 |
-
),
|
2682 |
-
),
|
2683 |
-
),
|
2684 |
-
'wrapper' => array(
|
2685 |
-
'width' => '',
|
2686 |
-
'class' => '',
|
2687 |
-
'id' => '',
|
2688 |
-
),
|
2689 |
-
'acfe_permissions' => '',
|
2690 |
-
'taxonomy' => '',
|
2691 |
-
'field_type' => 'select',
|
2692 |
-
'default_value' => '',
|
2693 |
-
'return_format' => 'name',
|
2694 |
-
'allow_null' => 1,
|
2695 |
-
'placeholder' => 'Default',
|
2696 |
-
'multiple' => 0,
|
2697 |
-
'ui' => 1,
|
2698 |
-
'choices' => array(
|
2699 |
-
),
|
2700 |
-
'ajax' => 0,
|
2701 |
-
'layout' => '',
|
2702 |
-
'toggle' => 0,
|
2703 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2704 |
-
'allow_custom' => 1,
|
2705 |
-
),
|
2706 |
-
array(
|
2707 |
-
'key' => 'field_acfe_form_term_map_taxonomy_message',
|
2708 |
-
'label' => 'Taxonomy',
|
2709 |
-
'name' => 'acfe_form_term_map_taxonomy_message',
|
2710 |
-
'type' => 'acfe_dynamic_message',
|
2711 |
-
'instructions' => '',
|
2712 |
-
'required' => 0,
|
2713 |
-
'conditional_logic' => array(
|
2714 |
-
array(
|
2715 |
-
array(
|
2716 |
-
'field' => 'field_acfe_form_term_map_taxonomy',
|
2717 |
-
'operator' => '!=empty',
|
2718 |
-
),
|
2719 |
-
),
|
2720 |
-
),
|
2721 |
-
'wrapper' => array(
|
2722 |
-
'width' => '',
|
2723 |
-
'class' => '',
|
2724 |
-
'id' => '',
|
2725 |
-
),
|
2726 |
-
'acfe_permissions' => '',
|
2727 |
-
),
|
2728 |
-
array(
|
2729 |
-
'key' => 'field_acfe_form_term_save_parent',
|
2730 |
-
'label' => 'Parent',
|
2731 |
-
'name' => 'acfe_form_term_save_parent',
|
2732 |
-
'type' => 'select',
|
2733 |
-
'instructions' => '',
|
2734 |
-
'required' => 0,
|
2735 |
-
'conditional_logic' => array(
|
2736 |
-
array(
|
2737 |
-
array(
|
2738 |
-
'field' => 'field_acfe_form_term_map_parent',
|
2739 |
-
'operator' => '==empty',
|
2740 |
-
),
|
2741 |
-
),
|
2742 |
-
),
|
2743 |
-
'wrapper' => array(
|
2744 |
-
'width' => '',
|
2745 |
-
'class' => '',
|
2746 |
-
'id' => '',
|
2747 |
-
),
|
2748 |
-
'acfe_permissions' => '',
|
2749 |
-
'choices' => array(
|
2750 |
-
),
|
2751 |
-
'default_value' => array(
|
2752 |
-
),
|
2753 |
-
'allow_null' => 1,
|
2754 |
-
'multiple' => 0,
|
2755 |
-
'ui' => 1,
|
2756 |
-
'ajax' => 0,
|
2757 |
-
'return_format' => 'value',
|
2758 |
-
'placeholder' => 'Default',
|
2759 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2760 |
-
'allow_custom' => 1,
|
2761 |
-
),
|
2762 |
-
array(
|
2763 |
-
'key' => 'field_acfe_form_term_map_parent_message',
|
2764 |
-
'label' => 'Parent',
|
2765 |
-
'name' => 'acfe_form_term_map_parent_message',
|
2766 |
-
'type' => 'acfe_dynamic_message',
|
2767 |
-
'instructions' => '',
|
2768 |
-
'required' => 0,
|
2769 |
-
'conditional_logic' => array(
|
2770 |
-
array(
|
2771 |
-
array(
|
2772 |
-
'field' => 'field_acfe_form_term_map_parent',
|
2773 |
-
'operator' => '!=empty',
|
2774 |
-
),
|
2775 |
-
),
|
2776 |
-
),
|
2777 |
-
'wrapper' => array(
|
2778 |
-
'width' => '',
|
2779 |
-
'class' => '',
|
2780 |
-
'id' => '',
|
2781 |
-
),
|
2782 |
-
'acfe_permissions' => '',
|
2783 |
-
),
|
2784 |
-
array(
|
2785 |
-
'key' => 'field_acfe_form_term_save_description_group',
|
2786 |
-
'label' => 'Description',
|
2787 |
-
'name' => 'acfe_form_term_save_description_group',
|
2788 |
-
'type' => 'group',
|
2789 |
-
'instructions' => '',
|
2790 |
-
'required' => 0,
|
2791 |
-
'conditional_logic' => array(
|
2792 |
-
array(
|
2793 |
-
array(
|
2794 |
-
'field' => 'field_acfe_form_term_map_description',
|
2795 |
-
'operator' => '==empty',
|
2796 |
-
),
|
2797 |
-
),
|
2798 |
-
),
|
2799 |
-
'wrapper' => array(
|
2800 |
-
'width' => '',
|
2801 |
-
'class' => '',
|
2802 |
-
'id' => '',
|
2803 |
-
),
|
2804 |
-
'acfe_permissions' => '',
|
2805 |
-
'layout' => 'block',
|
2806 |
-
'acfe_seamless_style' => true,
|
2807 |
-
'acfe_group_modal' => 0,
|
2808 |
-
'sub_fields' => array(
|
2809 |
-
array(
|
2810 |
-
'key' => 'field_acfe_form_term_save_description',
|
2811 |
-
'label' => '',
|
2812 |
-
'name' => 'acfe_form_term_save_description',
|
2813 |
-
'type' => 'select',
|
2814 |
-
'instructions' => '',
|
2815 |
-
'required' => 0,
|
2816 |
-
'conditional_logic' => 0,
|
2817 |
-
'wrapper' => array(
|
2818 |
-
'width' => '',
|
2819 |
-
'class' => '',
|
2820 |
-
'id' => '',
|
2821 |
-
),
|
2822 |
-
'acfe_permissions' => '',
|
2823 |
-
'choices' => array(
|
2824 |
-
'custom' => 'WYSIWYG Editor',
|
2825 |
-
),
|
2826 |
-
'default_value' => array(
|
2827 |
-
),
|
2828 |
-
'allow_null' => 1,
|
2829 |
-
'multiple' => 0,
|
2830 |
-
'ui' => 1,
|
2831 |
-
'return_format' => 'value',
|
2832 |
-
'placeholder' => 'Default',
|
2833 |
-
'ajax' => 0,
|
2834 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2835 |
-
'allow_custom' => 1,
|
2836 |
-
),
|
2837 |
-
array(
|
2838 |
-
'key' => 'field_acfe_form_term_save_description_custom',
|
2839 |
-
'label' => '',
|
2840 |
-
'name' => 'acfe_form_term_save_description_custom',
|
2841 |
-
'type' => 'wysiwyg',
|
2842 |
-
'instructions' => '',
|
2843 |
-
'required' => 1,
|
2844 |
-
'conditional_logic' => array(
|
2845 |
-
array(
|
2846 |
-
array(
|
2847 |
-
'field' => 'field_acfe_form_term_save_description',
|
2848 |
-
'operator' => '==',
|
2849 |
-
'value' => 'custom',
|
2850 |
-
),
|
2851 |
-
),
|
2852 |
-
),
|
2853 |
-
'wrapper' => array(
|
2854 |
-
'width' => '',
|
2855 |
-
'class' => '',
|
2856 |
-
'id' => '',
|
2857 |
-
),
|
2858 |
-
'acfe_permissions' => '',
|
2859 |
-
'default_value' => '',
|
2860 |
-
'tabs' => 'all',
|
2861 |
-
'toolbar' => 'full',
|
2862 |
-
'media_upload' => 1,
|
2863 |
-
'delay' => 0,
|
2864 |
-
),
|
2865 |
-
),
|
2866 |
-
),
|
2867 |
-
array(
|
2868 |
-
'key' => 'field_acfe_form_term_map_description_message',
|
2869 |
-
'label' => 'Description',
|
2870 |
-
'name' => 'acfe_form_term_map_description_message',
|
2871 |
-
'type' => 'acfe_dynamic_message',
|
2872 |
-
'instructions' => '',
|
2873 |
-
'required' => 0,
|
2874 |
-
'conditional_logic' => array(
|
2875 |
-
array(
|
2876 |
-
array(
|
2877 |
-
'field' => 'field_acfe_form_term_map_description',
|
2878 |
-
'operator' => '!=empty',
|
2879 |
-
),
|
2880 |
-
),
|
2881 |
-
),
|
2882 |
-
'wrapper' => array(
|
2883 |
-
'width' => '',
|
2884 |
-
'class' => '',
|
2885 |
-
'id' => '',
|
2886 |
-
),
|
2887 |
-
'acfe_permissions' => '',
|
2888 |
-
),
|
2889 |
-
array(
|
2890 |
-
'key' => 'field_acfe_form_term_save_meta',
|
2891 |
-
'label' => 'Save ACF fields',
|
2892 |
-
'name' => 'acfe_form_term_save_meta',
|
2893 |
-
'type' => 'checkbox',
|
2894 |
-
'instructions' => 'Choose which ACF fields should be saved to this term',
|
2895 |
-
'required' => 0,
|
2896 |
-
'conditional_logic' => 0,
|
2897 |
-
'wrapper' => array(
|
2898 |
-
'width' => '',
|
2899 |
-
'class' => '',
|
2900 |
-
'id' => '',
|
2901 |
-
),
|
2902 |
-
'acfe_permissions' => '',
|
2903 |
-
'choices' => array(
|
2904 |
-
),
|
2905 |
-
'allow_custom' => 0,
|
2906 |
-
'default_value' => array(
|
2907 |
-
),
|
2908 |
-
'layout' => 'vertical',
|
2909 |
-
'toggle' => 1,
|
2910 |
-
'return_format' => 'value',
|
2911 |
-
'save_custom' => 0,
|
2912 |
-
),
|
2913 |
-
|
2914 |
-
/*
|
2915 |
-
* Layout: Term Load
|
2916 |
-
*/
|
2917 |
-
array(
|
2918 |
-
'key' => 'field_acfe_form_term_tab_load',
|
2919 |
-
'label' => 'Load',
|
2920 |
-
'name' => '',
|
2921 |
-
'type' => 'tab',
|
2922 |
-
'instructions' => '',
|
2923 |
-
'required' => 0,
|
2924 |
-
'conditional_logic' => 0,
|
2925 |
-
'wrapper' => array(
|
2926 |
-
'width' => '',
|
2927 |
-
'class' => '',
|
2928 |
-
'id' => '',
|
2929 |
-
),
|
2930 |
-
'acfe_permissions' => '',
|
2931 |
-
'placement' => 'top',
|
2932 |
-
'endpoint' => 0,
|
2933 |
-
),
|
2934 |
-
array(
|
2935 |
-
'key' => 'field_acfe_form_term_load_values',
|
2936 |
-
'label' => 'Load Values',
|
2937 |
-
'name' => 'acfe_form_term_load_values',
|
2938 |
-
'type' => 'true_false',
|
2939 |
-
'instructions' => 'Fill inputs with values',
|
2940 |
-
'required' => 0,
|
2941 |
-
'conditional_logic' => 0,
|
2942 |
-
'wrapper' => array(
|
2943 |
-
'width' => '',
|
2944 |
-
'class' => '',
|
2945 |
-
'id' => '',
|
2946 |
-
),
|
2947 |
-
'acfe_permissions' => '',
|
2948 |
-
'message' => '',
|
2949 |
-
'default_value' => 1,
|
2950 |
-
'ui' => 1,
|
2951 |
-
'ui_on_text' => '',
|
2952 |
-
'ui_off_text' => '',
|
2953 |
-
),
|
2954 |
-
array(
|
2955 |
-
'key' => 'field_acfe_form_term_load_source',
|
2956 |
-
'label' => 'Source',
|
2957 |
-
'name' => 'acfe_form_term_load_source',
|
2958 |
-
'type' => 'select',
|
2959 |
-
'instructions' => '',
|
2960 |
-
'required' => 0,
|
2961 |
-
'conditional_logic' => array(
|
2962 |
-
array(
|
2963 |
-
array(
|
2964 |
-
'field' => 'field_acfe_form_term_load_values',
|
2965 |
-
'operator' => '==',
|
2966 |
-
'value' => '1',
|
2967 |
-
),
|
2968 |
-
),
|
2969 |
-
),
|
2970 |
-
'wrapper' => array(
|
2971 |
-
'width' => '',
|
2972 |
-
'class' => '',
|
2973 |
-
'id' => '',
|
2974 |
-
),
|
2975 |
-
'acfe_permissions' => '',
|
2976 |
-
'choices' => array(
|
2977 |
-
),
|
2978 |
-
'default_value' => 'current_term',
|
2979 |
-
'allow_null' => 0,
|
2980 |
-
'multiple' => 0,
|
2981 |
-
'ui' => 1,
|
2982 |
-
'ajax' => 0,
|
2983 |
-
'return_format' => 'value',
|
2984 |
-
'placeholder' => '',
|
2985 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2986 |
-
'allow_custom' => 1,
|
2987 |
-
),
|
2988 |
-
array(
|
2989 |
-
'key' => 'field_acfe_form_term_map_name',
|
2990 |
-
'label' => 'Name',
|
2991 |
-
'name' => 'acfe_form_term_map_name',
|
2992 |
-
'type' => 'select',
|
2993 |
-
'instructions' => '',
|
2994 |
-
'required' => 0,
|
2995 |
-
'wrapper' => array(
|
2996 |
-
'width' => '',
|
2997 |
-
'class' => '',
|
2998 |
-
'id' => '',
|
2999 |
-
),
|
3000 |
-
'acfe_permissions' => '',
|
3001 |
-
'choices' => array(
|
3002 |
-
),
|
3003 |
-
'default_value' => array(
|
3004 |
-
),
|
3005 |
-
'allow_null' => 1,
|
3006 |
-
'multiple' => 0,
|
3007 |
-
'ui' => 1,
|
3008 |
-
'return_format' => 'value',
|
3009 |
-
'placeholder' => 'Default',
|
3010 |
-
'ajax' => 0,
|
3011 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3012 |
-
'allow_custom' => 1,
|
3013 |
-
'conditional_logic' => array(
|
3014 |
-
array(
|
3015 |
-
array(
|
3016 |
-
'field' => 'field_acfe_form_term_load_values',
|
3017 |
-
'operator' => '==',
|
3018 |
-
'value' => '1',
|
3019 |
-
),
|
3020 |
-
),
|
3021 |
-
),
|
3022 |
-
),
|
3023 |
-
array(
|
3024 |
-
'key' => 'field_acfe_form_term_map_slug',
|
3025 |
-
'label' => 'Slug',
|
3026 |
-
'name' => 'acfe_form_term_map_slug',
|
3027 |
-
'type' => 'select',
|
3028 |
-
'instructions' => '',
|
3029 |
-
'required' => 0,
|
3030 |
-
'wrapper' => array(
|
3031 |
-
'width' => '',
|
3032 |
-
'class' => '',
|
3033 |
-
'id' => '',
|
3034 |
-
),
|
3035 |
-
'acfe_permissions' => '',
|
3036 |
-
'choices' => array(
|
3037 |
-
),
|
3038 |
-
'default_value' => array(
|
3039 |
-
),
|
3040 |
-
'allow_null' => 1,
|
3041 |
-
'multiple' => 0,
|
3042 |
-
'ui' => 1,
|
3043 |
-
'return_format' => 'value',
|
3044 |
-
'placeholder' => 'Default',
|
3045 |
-
'ajax' => 0,
|
3046 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3047 |
-
'allow_custom' => 1,
|
3048 |
-
'conditional_logic' => array(
|
3049 |
-
array(
|
3050 |
-
array(
|
3051 |
-
'field' => 'field_acfe_form_term_load_values',
|
3052 |
-
'operator' => '==',
|
3053 |
-
'value' => '1',
|
3054 |
-
),
|
3055 |
-
),
|
3056 |
-
),
|
3057 |
-
),
|
3058 |
-
array(
|
3059 |
-
'key' => 'field_acfe_form_term_map_taxonomy',
|
3060 |
-
'label' => 'Taxonomy',
|
3061 |
-
'name' => 'acfe_form_term_map_taxonomy',
|
3062 |
-
'type' => 'select',
|
3063 |
-
'instructions' => '',
|
3064 |
-
'required' => 0,
|
3065 |
-
'wrapper' => array(
|
3066 |
-
'width' => '',
|
3067 |
-
'class' => '',
|
3068 |
-
'id' => '',
|
3069 |
-
),
|
3070 |
-
'acfe_permissions' => '',
|
3071 |
-
'choices' => array(
|
3072 |
-
),
|
3073 |
-
'default_value' => array(
|
3074 |
-
),
|
3075 |
-
'allow_null' => 1,
|
3076 |
-
'multiple' => 0,
|
3077 |
-
'ui' => 1,
|
3078 |
-
'return_format' => 'value',
|
3079 |
-
'placeholder' => 'Default',
|
3080 |
-
'ajax' => 0,
|
3081 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3082 |
-
'allow_custom' => 1,
|
3083 |
-
'conditional_logic' => array(
|
3084 |
-
array(
|
3085 |
-
array(
|
3086 |
-
'field' => 'field_acfe_form_term_load_values',
|
3087 |
-
'operator' => '==',
|
3088 |
-
'value' => '1',
|
3089 |
-
),
|
3090 |
-
),
|
3091 |
-
),
|
3092 |
-
),
|
3093 |
-
array(
|
3094 |
-
'key' => 'field_acfe_form_term_map_parent',
|
3095 |
-
'label' => 'Parent',
|
3096 |
-
'name' => 'acfe_form_term_map_parent',
|
3097 |
-
'type' => 'select',
|
3098 |
-
'instructions' => '',
|
3099 |
-
'required' => 0,
|
3100 |
-
'wrapper' => array(
|
3101 |
-
'width' => '',
|
3102 |
-
'class' => '',
|
3103 |
-
'id' => '',
|
3104 |
-
),
|
3105 |
-
'acfe_permissions' => '',
|
3106 |
-
'choices' => array(
|
3107 |
-
),
|
3108 |
-
'default_value' => array(
|
3109 |
-
),
|
3110 |
-
'allow_null' => 1,
|
3111 |
-
'multiple' => 0,
|
3112 |
-
'ui' => 1,
|
3113 |
-
'return_format' => 'value',
|
3114 |
-
'placeholder' => 'Default',
|
3115 |
-
'ajax' => 0,
|
3116 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3117 |
-
'allow_custom' => 1,
|
3118 |
-
'conditional_logic' => array(
|
3119 |
-
array(
|
3120 |
-
array(
|
3121 |
-
'field' => 'field_acfe_form_term_load_values',
|
3122 |
-
'operator' => '==',
|
3123 |
-
'value' => '1',
|
3124 |
-
),
|
3125 |
-
),
|
3126 |
-
),
|
3127 |
-
),
|
3128 |
-
array(
|
3129 |
-
'key' => 'field_acfe_form_term_map_description',
|
3130 |
-
'label' => 'Description',
|
3131 |
-
'name' => 'acfe_form_term_map_description',
|
3132 |
-
'type' => 'select',
|
3133 |
-
'instructions' => '',
|
3134 |
-
'required' => 0,
|
3135 |
-
'wrapper' => array(
|
3136 |
-
'width' => '',
|
3137 |
-
'class' => '',
|
3138 |
-
'id' => '',
|
3139 |
-
),
|
3140 |
-
'acfe_permissions' => '',
|
3141 |
-
'choices' => array(
|
3142 |
-
),
|
3143 |
-
'default_value' => array(
|
3144 |
-
),
|
3145 |
-
'allow_null' => 1,
|
3146 |
-
'multiple' => 0,
|
3147 |
-
'ui' => 1,
|
3148 |
-
'return_format' => 'value',
|
3149 |
-
'placeholder' => 'Default',
|
3150 |
-
'ajax' => 0,
|
3151 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3152 |
-
'allow_custom' => 1,
|
3153 |
-
'conditional_logic' => array(
|
3154 |
-
array(
|
3155 |
-
array(
|
3156 |
-
'field' => 'field_acfe_form_term_load_values',
|
3157 |
-
'operator' => '==',
|
3158 |
-
'value' => '1',
|
3159 |
-
),
|
3160 |
-
),
|
3161 |
-
),
|
3162 |
-
),
|
3163 |
-
array(
|
3164 |
-
'key' => 'field_acfe_form_term_load_meta',
|
3165 |
-
'label' => 'Load ACF fields',
|
3166 |
-
'name' => 'acfe_form_term_load_meta',
|
3167 |
-
'type' => 'checkbox',
|
3168 |
-
'instructions' => 'Choose which ACF fields should have their values loaded',
|
3169 |
-
'required' => 0,
|
3170 |
-
'conditional_logic' => array(
|
3171 |
-
array(
|
3172 |
-
array(
|
3173 |
-
'field' => 'field_acfe_form_term_load_values',
|
3174 |
-
'operator' => '==',
|
3175 |
-
'value' => '1',
|
3176 |
-
),
|
3177 |
-
),
|
3178 |
-
),
|
3179 |
-
'wrapper' => array(
|
3180 |
-
'width' => '',
|
3181 |
-
'class' => '',
|
3182 |
-
'id' => '',
|
3183 |
-
),
|
3184 |
-
'acfe_permissions' => '',
|
3185 |
-
'choices' => array(
|
3186 |
-
),
|
3187 |
-
'allow_custom' => 0,
|
3188 |
-
'default_value' => array(
|
3189 |
-
),
|
3190 |
-
'layout' => 'vertical',
|
3191 |
-
'toggle' => 1,
|
3192 |
-
'return_format' => 'value',
|
3193 |
-
'save_custom' => 0,
|
3194 |
-
),
|
3195 |
-
|
3196 |
-
/*
|
3197 |
-
* Layout: Term Advanced
|
3198 |
-
*/
|
3199 |
-
array(
|
3200 |
-
'key' => 'field_acfe_form_term_tab_advanced',
|
3201 |
-
'label' => 'Advanced',
|
3202 |
-
'name' => '',
|
3203 |
-
'type' => 'tab',
|
3204 |
-
'instructions' => '',
|
3205 |
-
'required' => 0,
|
3206 |
-
'conditional_logic' => 0,
|
3207 |
-
'wrapper' => array(
|
3208 |
-
'width' => '',
|
3209 |
-
'class' => '',
|
3210 |
-
'id' => '',
|
3211 |
-
),
|
3212 |
-
'acfe_permissions' => '',
|
3213 |
-
'placement' => 'top',
|
3214 |
-
'endpoint' => 0,
|
3215 |
-
),
|
3216 |
-
array(
|
3217 |
-
'key' => 'field_acfe_form_term_advanced_load',
|
3218 |
-
'label' => 'Change values source',
|
3219 |
-
'name' => 'acfe_form_term_advanced_load',
|
3220 |
-
'type' => 'acfe_dynamic_message',
|
3221 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
3222 |
-
'instructions' => 'Alter the term ID where meta values are loaded from',
|
3223 |
-
'required' => 0,
|
3224 |
-
'conditional_logic' => 0,
|
3225 |
-
'wrapper' => array(
|
3226 |
-
'width' => '',
|
3227 |
-
'class' => '',
|
3228 |
-
'id' => '',
|
3229 |
),
|
3230 |
-
'acfe_permissions' => '',
|
3231 |
),
|
3232 |
array(
|
3233 |
-
'key' => '
|
3234 |
-
'label' => '
|
3235 |
-
'name' => '
|
3236 |
-
'type' => '
|
3237 |
-
'
|
3238 |
-
'instructions' => 'Alter the term arguments before database insert/update',
|
3239 |
'required' => 0,
|
3240 |
-
'conditional_logic' => 0,
|
3241 |
'wrapper' => array(
|
3242 |
'width' => '',
|
3243 |
'class' => '',
|
3244 |
'id' => '',
|
3245 |
),
|
3246 |
'acfe_permissions' => '',
|
3247 |
-
|
3248 |
-
array(
|
3249 |
-
'key' => 'field_acfe_form_term_advanced_save',
|
3250 |
-
'label' => 'Add custom action on term save',
|
3251 |
-
'name' => 'acfe_form_term_advanced_save',
|
3252 |
-
'type' => 'acfe_dynamic_message',
|
3253 |
-
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
3254 |
-
'instructions' => 'This action allows you to hook in before or after the meta data have been saved',
|
3255 |
-
'required' => 0,
|
3256 |
-
'conditional_logic' => 0,
|
3257 |
-
'wrapper' => array(
|
3258 |
-
'width' => '',
|
3259 |
-
'class' => '',
|
3260 |
-
'id' => '',
|
3261 |
),
|
3262 |
-
'
|
3263 |
-
),
|
3264 |
-
),
|
3265 |
-
'min' => '',
|
3266 |
-
'max' => '',
|
3267 |
-
),
|
3268 |
-
|
3269 |
-
/*
|
3270 |
-
* Layout: User
|
3271 |
-
*/
|
3272 |
-
'layout_user' => array(
|
3273 |
-
'key' => 'layout_user',
|
3274 |
-
'name' => 'user',
|
3275 |
-
'label' => 'User action',
|
3276 |
-
'display' => 'row',
|
3277 |
-
'sub_fields' => array(
|
3278 |
-
|
3279 |
-
/*
|
3280 |
-
* Layout: User Action
|
3281 |
-
*/
|
3282 |
-
array(
|
3283 |
-
'key' => 'field_acfe_form_user_tab_action',
|
3284 |
-
'label' => 'Action',
|
3285 |
-
'name' => '',
|
3286 |
-
'type' => 'tab',
|
3287 |
-
'instructions' => '',
|
3288 |
-
'required' => 0,
|
3289 |
-
'conditional_logic' => 0,
|
3290 |
-
'wrapper' => array(
|
3291 |
-
'width' => '',
|
3292 |
-
'class' => '',
|
3293 |
-
'id' => '',
|
3294 |
-
),
|
3295 |
-
'acfe_permissions' => '',
|
3296 |
-
'placement' => 'top',
|
3297 |
-
'endpoint' => 0,
|
3298 |
-
),
|
3299 |
-
array(
|
3300 |
-
'key' => 'field_acfe_form_user_action',
|
3301 |
-
'label' => 'Action',
|
3302 |
-
'name' => 'acfe_form_user_action',
|
3303 |
-
'type' => 'radio',
|
3304 |
-
'instructions' => '',
|
3305 |
-
'required' => 0,
|
3306 |
-
'conditional_logic' => 0,
|
3307 |
-
'wrapper' => array(
|
3308 |
-
'width' => '',
|
3309 |
-
'class' => '',
|
3310 |
-
'id' => '',
|
3311 |
-
),
|
3312 |
-
'acfe_permissions' => '',
|
3313 |
-
'choices' => array(
|
3314 |
-
'insert_user' => 'Create user',
|
3315 |
-
'update_user' => 'Update user',
|
3316 |
-
'log_user' => 'Log user',
|
3317 |
-
),
|
3318 |
-
'allow_null' => 0,
|
3319 |
-
'other_choice' => 0,
|
3320 |
-
'default_value' => 'insert_post',
|
3321 |
-
'layout' => 'vertical',
|
3322 |
-
'return_format' => 'value',
|
3323 |
-
'save_other_choice' => 0,
|
3324 |
-
),
|
3325 |
-
array(
|
3326 |
-
'key' => 'field_acfe_form_user_custom_alias',
|
3327 |
-
'label' => 'Action name',
|
3328 |
-
'name' => 'acfe_form_custom_alias',
|
3329 |
-
'type' => 'acfe_slug',
|
3330 |
-
'instructions' => '(Optional) Advanced usage. Allow the action to be targeted specifically with PHP hooks (must be unique). See "Advanced" tab.',
|
3331 |
-
'required' => 0,
|
3332 |
-
'conditional_logic' => 0,
|
3333 |
-
'wrapper' => array(
|
3334 |
-
'width' => '',
|
3335 |
-
'class' => '',
|
3336 |
-
'id' => '',
|
3337 |
),
|
3338 |
-
'
|
3339 |
-
'
|
3340 |
-
'
|
3341 |
-
'
|
3342 |
-
'
|
3343 |
-
'
|
3344 |
-
),
|
3345 |
-
array(
|
3346 |
-
'key' => 'field_acfe_form_user_custom_query_var',
|
3347 |
-
'label' => 'Query var',
|
3348 |
-
'name' => 'acfe_form_custom_query_var',
|
3349 |
-
'type' => 'true_false',
|
3350 |
-
'instructions' => 'Automatically create a query var with the data of the user that has been created/updated.<br />Retrieve data using <code>{query_var:my-action:display_name}</code> template tags.',
|
3351 |
-
'required' => 0,
|
3352 |
-
'wrapper' => array(
|
3353 |
-
'width' => '',
|
3354 |
-
'class' => '',
|
3355 |
-
'id' => '',
|
3356 |
-
),
|
3357 |
-
'acfe_permissions' => '',
|
3358 |
-
'message' => '',
|
3359 |
-
'default_value' => 0,
|
3360 |
-
'ui' => 1,
|
3361 |
-
'ui_on_text' => '',
|
3362 |
-
'ui_off_text' => '',
|
3363 |
-
'conditional_logic' => array(
|
3364 |
-
array(
|
3365 |
-
array(
|
3366 |
-
'field' => 'field_acfe_form_user_custom_alias',
|
3367 |
-
'operator' => '!=empty',
|
3368 |
-
),
|
3369 |
-
),
|
3370 |
-
),
|
3371 |
-
),
|
3372 |
-
|
3373 |
-
/*
|
3374 |
-
* Layout: User Login
|
3375 |
-
*/
|
3376 |
-
array(
|
3377 |
-
'key' => 'field_acfe_form_user_tab_login',
|
3378 |
-
'label' => 'Login',
|
3379 |
-
'name' => '',
|
3380 |
-
'type' => 'tab',
|
3381 |
-
'instructions' => '',
|
3382 |
-
'required' => 0,
|
3383 |
-
'wrapper' => array(
|
3384 |
-
'width' => '',
|
3385 |
-
'class' => '',
|
3386 |
-
'id' => '',
|
3387 |
-
),
|
3388 |
-
'acfe_permissions' => '',
|
3389 |
-
'placement' => 'top',
|
3390 |
-
'endpoint' => 0,
|
3391 |
-
'conditional_logic' => array(
|
3392 |
-
array(
|
3393 |
-
array(
|
3394 |
-
'field' => 'field_acfe_form_user_action',
|
3395 |
-
'operator' => '==',
|
3396 |
-
'value' => 'log_user',
|
3397 |
-
),
|
3398 |
-
),
|
3399 |
-
),
|
3400 |
-
),
|
3401 |
-
array(
|
3402 |
-
'key' => 'field_acfe_form_user_log_type',
|
3403 |
-
'label' => 'Login type',
|
3404 |
-
'name' => 'acfe_form_user_log_type',
|
3405 |
-
'type' => 'radio',
|
3406 |
-
'instructions' => '',
|
3407 |
-
'required' => 0,
|
3408 |
-
'wrapper' => array(
|
3409 |
-
'width' => '',
|
3410 |
-
'class' => '',
|
3411 |
-
'id' => '',
|
3412 |
-
),
|
3413 |
-
'acfe_permissions' => '',
|
3414 |
-
'choices' => array(
|
3415 |
-
'email' => 'E-mail',
|
3416 |
-
'username' => 'Username',
|
3417 |
-
'email_username' => 'E-mail or username',
|
3418 |
-
),
|
3419 |
-
'allow_null' => 0,
|
3420 |
-
'other_choice' => 0,
|
3421 |
-
'default_value' => 'email',
|
3422 |
-
'layout' => 'vertical',
|
3423 |
-
'return_format' => 'value',
|
3424 |
-
'save_other_choice' => 0,
|
3425 |
-
'conditional_logic' => array(
|
3426 |
-
array(
|
3427 |
-
array(
|
3428 |
-
'field' => 'field_acfe_form_user_action',
|
3429 |
-
'operator' => '==',
|
3430 |
-
'value' => 'log_user',
|
3431 |
-
),
|
3432 |
-
),
|
3433 |
-
),
|
3434 |
-
),
|
3435 |
-
array(
|
3436 |
-
'key' => 'field_acfe_form_user_save_login_user',
|
3437 |
-
'label' => 'Login',
|
3438 |
-
'name' => 'acfe_form_user_save_login_user',
|
3439 |
-
'type' => 'select',
|
3440 |
-
'instructions' => '',
|
3441 |
-
'required' => 0,
|
3442 |
-
'wrapper' => array(
|
3443 |
-
'width' => '',
|
3444 |
-
'class' => '',
|
3445 |
-
'id' => '',
|
3446 |
-
),
|
3447 |
-
'acfe_permissions' => '',
|
3448 |
-
'choices' => array(),
|
3449 |
-
'default_value' => array(
|
3450 |
-
),
|
3451 |
-
'allow_null' => 1,
|
3452 |
-
'multiple' => 0,
|
3453 |
-
'ui' => 1,
|
3454 |
-
'return_format' => 'value',
|
3455 |
-
'placeholder' => 'Default',
|
3456 |
-
'ajax' => 0,
|
3457 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3458 |
-
'allow_custom' => 1,
|
3459 |
-
'conditional_logic' => array(
|
3460 |
-
array(
|
3461 |
-
array(
|
3462 |
-
'field' => 'field_acfe_form_user_action',
|
3463 |
-
'operator' => '==',
|
3464 |
-
'value' => 'log_user',
|
3465 |
-
),
|
3466 |
-
),
|
3467 |
-
),
|
3468 |
-
),
|
3469 |
-
array(
|
3470 |
-
'key' => 'field_acfe_form_user_save_login_pass',
|
3471 |
-
'label' => 'Password',
|
3472 |
-
'name' => 'acfe_form_user_save_login_pass',
|
3473 |
-
'type' => 'select',
|
3474 |
-
'instructions' => '',
|
3475 |
-
'required' => 0,
|
3476 |
-
'wrapper' => array(
|
3477 |
-
'width' => '',
|
3478 |
-
'class' => '',
|
3479 |
-
'id' => '',
|
3480 |
-
),
|
3481 |
-
'acfe_permissions' => '',
|
3482 |
-
'choices' => array(),
|
3483 |
-
'default_value' => array(
|
3484 |
-
),
|
3485 |
-
'allow_null' => 1,
|
3486 |
-
'multiple' => 0,
|
3487 |
-
'ui' => 1,
|
3488 |
-
'return_format' => 'value',
|
3489 |
-
'placeholder' => 'Default',
|
3490 |
-
'ajax' => 0,
|
3491 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3492 |
-
'allow_custom' => 1,
|
3493 |
-
'conditional_logic' => array(
|
3494 |
-
array(
|
3495 |
-
array(
|
3496 |
-
'field' => 'field_acfe_form_user_action',
|
3497 |
-
'operator' => '==',
|
3498 |
-
'value' => 'log_user',
|
3499 |
-
),
|
3500 |
-
),
|
3501 |
-
),
|
3502 |
-
),
|
3503 |
-
array(
|
3504 |
-
'key' => 'field_acfe_form_user_save_login_remember',
|
3505 |
-
'label' => 'Remember me',
|
3506 |
-
'name' => 'acfe_form_user_save_login_remember',
|
3507 |
-
'type' => 'select',
|
3508 |
-
'instructions' => '',
|
3509 |
-
'required' => 0,
|
3510 |
-
'wrapper' => array(
|
3511 |
-
'width' => '',
|
3512 |
-
'class' => '',
|
3513 |
-
'id' => '',
|
3514 |
-
),
|
3515 |
-
'acfe_permissions' => '',
|
3516 |
-
'choices' => array(),
|
3517 |
-
'default_value' => array(
|
3518 |
-
),
|
3519 |
-
'allow_null' => 1,
|
3520 |
-
'multiple' => 0,
|
3521 |
-
'ui' => 1,
|
3522 |
-
'return_format' => 'value',
|
3523 |
-
'placeholder' => 'Default',
|
3524 |
-
'ajax' => 0,
|
3525 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3526 |
-
'allow_custom' => 1,
|
3527 |
-
'conditional_logic' => array(
|
3528 |
-
array(
|
3529 |
-
array(
|
3530 |
-
'field' => 'field_acfe_form_user_action',
|
3531 |
-
'operator' => '==',
|
3532 |
-
'value' => 'log_user',
|
3533 |
-
),
|
3534 |
-
),
|
3535 |
-
),
|
3536 |
-
),
|
3537 |
-
|
3538 |
-
/*
|
3539 |
-
* Layout: User Save
|
3540 |
-
*/
|
3541 |
-
array(
|
3542 |
-
'key' => 'field_acfe_form_user_tab_save',
|
3543 |
-
'label' => 'Save',
|
3544 |
-
'name' => '',
|
3545 |
-
'type' => 'tab',
|
3546 |
-
'instructions' => '',
|
3547 |
-
'required' => 0,
|
3548 |
-
'wrapper' => array(
|
3549 |
-
'width' => '',
|
3550 |
-
'class' => '',
|
3551 |
-
'id' => '',
|
3552 |
-
),
|
3553 |
-
'acfe_permissions' => '',
|
3554 |
-
'placement' => 'top',
|
3555 |
-
'endpoint' => 0,
|
3556 |
-
'conditional_logic' => array(
|
3557 |
-
array(
|
3558 |
-
array(
|
3559 |
-
'field' => 'field_acfe_form_user_action',
|
3560 |
-
'operator' => '!=',
|
3561 |
-
'value' => 'log_user',
|
3562 |
-
),
|
3563 |
-
),
|
3564 |
-
),
|
3565 |
-
),
|
3566 |
-
array(
|
3567 |
-
'key' => 'field_acfe_form_user_save_target',
|
3568 |
-
'label' => 'Target',
|
3569 |
-
'name' => 'acfe_form_user_save_target',
|
3570 |
-
'type' => 'select',
|
3571 |
-
'instructions' => '',
|
3572 |
-
'required' => 0,
|
3573 |
-
'conditional_logic' => array(
|
3574 |
-
array(
|
3575 |
-
array(
|
3576 |
-
'field' => 'field_acfe_form_user_action',
|
3577 |
-
'operator' => '==',
|
3578 |
-
'value' => 'update_user',
|
3579 |
-
),
|
3580 |
-
),
|
3581 |
-
),
|
3582 |
-
'wrapper' => array(
|
3583 |
-
'width' => '',
|
3584 |
-
'class' => '',
|
3585 |
-
'id' => '',
|
3586 |
-
),
|
3587 |
-
'acfe_permissions' => '',
|
3588 |
-
'choices' => array(
|
3589 |
-
),
|
3590 |
-
'default_value' => 'current_user',
|
3591 |
-
'allow_null' => 0,
|
3592 |
-
'multiple' => 0,
|
3593 |
-
'ui' => 1,
|
3594 |
-
'ajax' => 0,
|
3595 |
-
'return_format' => 'value',
|
3596 |
-
'placeholder' => '',
|
3597 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3598 |
-
|
3599 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3600 |
array(
|
3601 |
-
'key' => '
|
3602 |
-
'label' => '
|
3603 |
-
'name' => '
|
3604 |
'type' => 'select',
|
3605 |
'instructions' => '',
|
3606 |
'required' => 0,
|
@@ -3610,7 +3794,8 @@ acf_add_local_field_group(array(
|
|
3610 |
'id' => '',
|
3611 |
),
|
3612 |
'acfe_permissions' => '',
|
3613 |
-
'choices' => array(
|
|
|
3614 |
'default_value' => array(
|
3615 |
),
|
3616 |
'allow_null' => 1,
|
@@ -3620,52 +3805,26 @@ acf_add_local_field_group(array(
|
|
3620 |
'placeholder' => 'Default',
|
3621 |
'ajax' => 0,
|
3622 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3623 |
-
|
3624 |
'conditional_logic' => array(
|
3625 |
-
|
3626 |
-
array(
|
3627 |
-
'field' => 'field_acfe_form_user_map_email',
|
3628 |
-
'operator' => '==empty',
|
3629 |
-
),
|
3630 |
array(
|
3631 |
-
|
3632 |
-
|
3633 |
-
|
3634 |
-
|
3635 |
-
),
|
3636 |
-
),
|
3637 |
-
),
|
3638 |
-
array(
|
3639 |
-
'key' => 'field_acfe_form_user_map_email_message',
|
3640 |
-
'label' => 'Email',
|
3641 |
-
'name' => 'acfe_form_user_map_email_message',
|
3642 |
-
'type' => 'acfe_dynamic_message',
|
3643 |
-
'instructions' => '',
|
3644 |
-
'required' => 0,
|
3645 |
-
'conditional_logic' => array(
|
3646 |
-
array(
|
3647 |
-
array(
|
3648 |
-
'field' => 'field_acfe_form_user_map_email',
|
3649 |
-
'operator' => '!=empty',
|
3650 |
-
),
|
3651 |
array(
|
3652 |
-
|
3653 |
-
|
3654 |
-
|
3655 |
-
|
3656 |
-
|
3657 |
-
|
3658 |
-
|
3659 |
-
'width' => '',
|
3660 |
-
'class' => '',
|
3661 |
-
'id' => '',
|
3662 |
-
),
|
3663 |
-
'acfe_permissions' => '',
|
3664 |
-
),
|
3665 |
array(
|
3666 |
-
'key' => '
|
3667 |
-
'label' => '
|
3668 |
-
'name' => '
|
3669 |
'type' => 'select',
|
3670 |
'instructions' => '',
|
3671 |
'required' => 0,
|
@@ -3675,7 +3834,8 @@ acf_add_local_field_group(array(
|
|
3675 |
'id' => '',
|
3676 |
),
|
3677 |
'acfe_permissions' => '',
|
3678 |
-
'choices' => array(
|
|
|
3679 |
'default_value' => array(
|
3680 |
),
|
3681 |
'allow_null' => 1,
|
@@ -3685,52 +3845,26 @@ acf_add_local_field_group(array(
|
|
3685 |
'placeholder' => 'Default',
|
3686 |
'ajax' => 0,
|
3687 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3688 |
-
|
3689 |
'conditional_logic' => array(
|
3690 |
-
|
3691 |
-
array(
|
3692 |
-
'field' => 'field_acfe_form_user_map_username',
|
3693 |
-
'operator' => '==empty',
|
3694 |
-
),
|
3695 |
array(
|
3696 |
-
|
3697 |
-
|
3698 |
-
|
3699 |
-
|
3700 |
-
),
|
3701 |
-
),
|
3702 |
-
),
|
3703 |
-
array(
|
3704 |
-
'key' => 'field_acfe_form_user_map_username_message',
|
3705 |
-
'label' => 'Username',
|
3706 |
-
'name' => 'acfe_form_user_map_username_message',
|
3707 |
-
'type' => 'acfe_dynamic_message',
|
3708 |
-
'instructions' => '',
|
3709 |
-
'required' => 0,
|
3710 |
-
'conditional_logic' => array(
|
3711 |
-
array(
|
3712 |
-
array(
|
3713 |
-
'field' => 'field_acfe_form_user_map_username',
|
3714 |
-
'operator' => '!=empty',
|
3715 |
-
),
|
3716 |
array(
|
3717 |
-
|
3718 |
-
|
3719 |
-
|
3720 |
-
|
3721 |
-
|
3722 |
-
|
3723 |
-
|
3724 |
-
'width' => '',
|
3725 |
-
'class' => '',
|
3726 |
-
'id' => '',
|
3727 |
-
),
|
3728 |
-
'acfe_permissions' => '',
|
3729 |
-
),
|
3730 |
array(
|
3731 |
-
'key' => '
|
3732 |
-
'label' => '
|
3733 |
-
'name' => '
|
3734 |
'type' => 'select',
|
3735 |
'instructions' => '',
|
3736 |
'required' => 0,
|
@@ -3741,7 +3875,6 @@ acf_add_local_field_group(array(
|
|
3741 |
),
|
3742 |
'acfe_permissions' => '',
|
3743 |
'choices' => array(
|
3744 |
-
'generate_password' => 'Generate password',
|
3745 |
),
|
3746 |
'default_value' => array(
|
3747 |
),
|
@@ -3752,52 +3885,26 @@ acf_add_local_field_group(array(
|
|
3752 |
'placeholder' => 'Default',
|
3753 |
'ajax' => 0,
|
3754 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3755 |
-
|
3756 |
'conditional_logic' => array(
|
3757 |
-
|
3758 |
-
array(
|
3759 |
-
'field' => 'field_acfe_form_user_map_password',
|
3760 |
-
'operator' => '==empty',
|
3761 |
-
),
|
3762 |
array(
|
3763 |
-
|
3764 |
-
|
3765 |
-
|
3766 |
-
|
3767 |
-
),
|
3768 |
-
),
|
3769 |
-
),
|
3770 |
-
array(
|
3771 |
-
'key' => 'field_acfe_form_user_map_password_message',
|
3772 |
-
'label' => 'Password',
|
3773 |
-
'name' => 'acfe_form_user_map_password_message',
|
3774 |
-
'type' => 'acfe_dynamic_message',
|
3775 |
-
'instructions' => '',
|
3776 |
-
'required' => 0,
|
3777 |
-
'conditional_logic' => array(
|
3778 |
-
array(
|
3779 |
-
array(
|
3780 |
-
'field' => 'field_acfe_form_user_map_password',
|
3781 |
-
'operator' => '!=empty',
|
3782 |
-
),
|
3783 |
array(
|
3784 |
-
|
3785 |
-
|
3786 |
-
|
3787 |
-
|
3788 |
-
|
3789 |
-
|
3790 |
-
|
3791 |
-
'width' => '',
|
3792 |
-
'class' => '',
|
3793 |
-
'id' => '',
|
3794 |
-
),
|
3795 |
-
'acfe_permissions' => '',
|
3796 |
-
),
|
3797 |
array(
|
3798 |
-
'key' => '
|
3799 |
-
'label' => '
|
3800 |
-
'name' => '
|
3801 |
'type' => 'select',
|
3802 |
'instructions' => '',
|
3803 |
'required' => 0,
|
@@ -3807,7 +3914,8 @@ acf_add_local_field_group(array(
|
|
3807 |
'id' => '',
|
3808 |
),
|
3809 |
'acfe_permissions' => '',
|
3810 |
-
'choices' => array(
|
|
|
3811 |
'default_value' => array(
|
3812 |
),
|
3813 |
'allow_null' => 1,
|
@@ -3817,52 +3925,26 @@ acf_add_local_field_group(array(
|
|
3817 |
'placeholder' => 'Default',
|
3818 |
'ajax' => 0,
|
3819 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3820 |
-
|
3821 |
'conditional_logic' => array(
|
3822 |
-
|
3823 |
-
array(
|
3824 |
-
'field' => 'field_acfe_form_user_map_first_name',
|
3825 |
-
'operator' => '==empty',
|
3826 |
-
),
|
3827 |
array(
|
3828 |
-
|
3829 |
-
|
3830 |
-
|
3831 |
-
|
3832 |
-
),
|
3833 |
-
),
|
3834 |
-
),
|
3835 |
-
array(
|
3836 |
-
'key' => 'field_acfe_form_user_map_first_name_message',
|
3837 |
-
'label' => 'First name',
|
3838 |
-
'name' => 'acfe_form_user_map_first_name_message',
|
3839 |
-
'type' => 'acfe_dynamic_message',
|
3840 |
-
'instructions' => '',
|
3841 |
-
'required' => 0,
|
3842 |
-
'conditional_logic' => array(
|
3843 |
-
array(
|
3844 |
-
array(
|
3845 |
-
'field' => 'field_acfe_form_user_map_first_name',
|
3846 |
-
'operator' => '!=empty',
|
3847 |
-
),
|
3848 |
array(
|
3849 |
-
|
3850 |
-
|
3851 |
-
|
3852 |
-
|
3853 |
-
|
3854 |
-
|
3855 |
-
|
3856 |
-
'width' => '',
|
3857 |
-
'class' => '',
|
3858 |
-
'id' => '',
|
3859 |
-
),
|
3860 |
-
'acfe_permissions' => '',
|
3861 |
-
),
|
3862 |
array(
|
3863 |
-
'key' => '
|
3864 |
-
'label' => '
|
3865 |
-
'name' => '
|
3866 |
'type' => 'select',
|
3867 |
'instructions' => '',
|
3868 |
'required' => 0,
|
@@ -3872,8 +3954,10 @@ acf_add_local_field_group(array(
|
|
3872 |
'id' => '',
|
3873 |
),
|
3874 |
'acfe_permissions' => '',
|
3875 |
-
'choices' => array(
|
3876 |
-
|
|
|
|
|
3877 |
'allow_null' => 1,
|
3878 |
'multiple' => 0,
|
3879 |
'ui' => 1,
|
@@ -3881,52 +3965,26 @@ acf_add_local_field_group(array(
|
|
3881 |
'placeholder' => 'Default',
|
3882 |
'ajax' => 0,
|
3883 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3884 |
-
|
3885 |
'conditional_logic' => array(
|
3886 |
-
|
3887 |
-
array(
|
3888 |
-
'field' => 'field_acfe_form_user_map_last_name',
|
3889 |
-
'operator' => '==empty',
|
3890 |
-
),
|
3891 |
array(
|
3892 |
-
|
3893 |
-
|
3894 |
-
|
3895 |
-
|
3896 |
-
),
|
3897 |
-
),
|
3898 |
-
),
|
3899 |
-
array(
|
3900 |
-
'key' => 'field_acfe_form_user_map_last_name_message',
|
3901 |
-
'label' => 'Last name',
|
3902 |
-
'name' => 'acfe_form_user_map_last_name_message',
|
3903 |
-
'type' => 'acfe_dynamic_message',
|
3904 |
-
'instructions' => '',
|
3905 |
-
'required' => 0,
|
3906 |
-
'conditional_logic' => array(
|
3907 |
-
array(
|
3908 |
-
array(
|
3909 |
-
'field' => 'field_acfe_form_user_map_last_name',
|
3910 |
-
'operator' => '!=empty',
|
3911 |
-
),
|
3912 |
array(
|
3913 |
-
|
3914 |
-
|
3915 |
-
|
3916 |
-
|
3917 |
-
|
3918 |
-
|
3919 |
-
|
3920 |
-
'width' => '',
|
3921 |
-
'class' => '',
|
3922 |
-
'id' => '',
|
3923 |
-
),
|
3924 |
-
'acfe_permissions' => '',
|
3925 |
-
),
|
3926 |
array(
|
3927 |
-
'key' => '
|
3928 |
-
'label' => '
|
3929 |
-
'name' => '
|
3930 |
'type' => 'select',
|
3931 |
'instructions' => '',
|
3932 |
'required' => 0,
|
@@ -3936,7 +3994,8 @@ acf_add_local_field_group(array(
|
|
3936 |
'id' => '',
|
3937 |
),
|
3938 |
'acfe_permissions' => '',
|
3939 |
-
'choices' => array(
|
|
|
3940 |
'default_value' => array(
|
3941 |
),
|
3942 |
'allow_null' => 1,
|
@@ -3946,52 +4005,26 @@ acf_add_local_field_group(array(
|
|
3946 |
'placeholder' => 'Default',
|
3947 |
'ajax' => 0,
|
3948 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3949 |
-
|
3950 |
'conditional_logic' => array(
|
3951 |
-
|
3952 |
-
array(
|
3953 |
-
'field' => 'field_acfe_form_user_map_nickname',
|
3954 |
-
'operator' => '==empty',
|
3955 |
-
),
|
3956 |
array(
|
3957 |
-
|
3958 |
-
|
3959 |
-
|
3960 |
-
|
3961 |
-
),
|
3962 |
-
),
|
3963 |
-
),
|
3964 |
-
array(
|
3965 |
-
'key' => 'field_acfe_form_user_map_nickname_message',
|
3966 |
-
'label' => 'Nickname',
|
3967 |
-
'name' => 'acfe_form_user_map_nickname_message',
|
3968 |
-
'type' => 'acfe_dynamic_message',
|
3969 |
-
'instructions' => '',
|
3970 |
-
'required' => 0,
|
3971 |
-
'conditional_logic' => array(
|
3972 |
-
array(
|
3973 |
-
array(
|
3974 |
-
'field' => 'field_acfe_form_user_map_nickname',
|
3975 |
-
'operator' => '!=empty',
|
3976 |
-
),
|
3977 |
array(
|
3978 |
-
|
3979 |
-
|
3980 |
-
|
3981 |
-
|
3982 |
-
|
3983 |
-
|
3984 |
-
|
3985 |
-
'width' => '',
|
3986 |
-
'class' => '',
|
3987 |
-
'id' => '',
|
3988 |
-
),
|
3989 |
-
'acfe_permissions' => '',
|
3990 |
-
),
|
3991 |
array(
|
3992 |
-
'key' => '
|
3993 |
-
'label' => '
|
3994 |
-
'name' => '
|
3995 |
'type' => 'select',
|
3996 |
'instructions' => '',
|
3997 |
'required' => 0,
|
@@ -4001,7 +4034,8 @@ acf_add_local_field_group(array(
|
|
4001 |
'id' => '',
|
4002 |
),
|
4003 |
'acfe_permissions' => '',
|
4004 |
-
'choices' => array(
|
|
|
4005 |
'default_value' => array(
|
4006 |
),
|
4007 |
'allow_null' => 1,
|
@@ -4011,52 +4045,26 @@ acf_add_local_field_group(array(
|
|
4011 |
'placeholder' => 'Default',
|
4012 |
'ajax' => 0,
|
4013 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4014 |
-
|
4015 |
'conditional_logic' => array(
|
4016 |
-
|
4017 |
-
array(
|
4018 |
-
'field' => 'field_acfe_form_user_map_display_name',
|
4019 |
-
'operator' => '==empty',
|
4020 |
-
),
|
4021 |
array(
|
4022 |
-
|
4023 |
-
|
4024 |
-
|
4025 |
-
|
4026 |
-
),
|
4027 |
-
),
|
4028 |
-
),
|
4029 |
-
array(
|
4030 |
-
'key' => 'field_acfe_form_user_map_display_name_message',
|
4031 |
-
'label' => 'Display name',
|
4032 |
-
'name' => 'acfe_form_user_map_display_name_message',
|
4033 |
-
'type' => 'acfe_dynamic_message',
|
4034 |
-
'instructions' => '',
|
4035 |
-
'required' => 0,
|
4036 |
-
'conditional_logic' => array(
|
4037 |
-
array(
|
4038 |
-
array(
|
4039 |
-
'field' => 'field_acfe_form_user_map_display_name',
|
4040 |
-
'operator' => '!=empty',
|
4041 |
-
),
|
4042 |
array(
|
4043 |
-
|
4044 |
-
|
4045 |
-
|
4046 |
-
|
4047 |
-
|
4048 |
-
|
4049 |
-
|
4050 |
-
'width' => '',
|
4051 |
-
'class' => '',
|
4052 |
-
'id' => '',
|
4053 |
-
),
|
4054 |
-
'acfe_permissions' => '',
|
4055 |
-
),
|
4056 |
array(
|
4057 |
-
'key' => '
|
4058 |
-
'label' => '
|
4059 |
-
'name' => '
|
4060 |
'type' => 'select',
|
4061 |
'instructions' => '',
|
4062 |
'required' => 0,
|
@@ -4066,7 +4074,8 @@ acf_add_local_field_group(array(
|
|
4066 |
'id' => '',
|
4067 |
),
|
4068 |
'acfe_permissions' => '',
|
4069 |
-
'choices' => array(
|
|
|
4070 |
'default_value' => array(
|
4071 |
),
|
4072 |
'allow_null' => 1,
|
@@ -4076,801 +4085,76 @@ acf_add_local_field_group(array(
|
|
4076 |
'placeholder' => 'Default',
|
4077 |
'ajax' => 0,
|
4078 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4079 |
-
|
4080 |
'conditional_logic' => array(
|
4081 |
-
|
4082 |
-
array(
|
4083 |
-
'field' => 'field_acfe_form_user_map_website',
|
4084 |
-
'operator' => '==empty',
|
4085 |
-
),
|
4086 |
-
array(
|
4087 |
-
'field' => 'field_acfe_form_user_action',
|
4088 |
-
'operator' => '!=',
|
4089 |
-
'value' => 'log_user',
|
4090 |
-
),
|
4091 |
-
),
|
4092 |
-
),
|
4093 |
-
),
|
4094 |
-
array(
|
4095 |
-
'key' => 'field_acfe_form_user_map_website_message',
|
4096 |
-
'label' => 'Website',
|
4097 |
-
'name' => 'acfe_form_user_map_website_message',
|
4098 |
-
'type' => 'acfe_dynamic_message',
|
4099 |
-
'instructions' => '',
|
4100 |
-
'required' => 0,
|
4101 |
-
'conditional_logic' => array(
|
4102 |
-
array(
|
4103 |
-
array(
|
4104 |
-
'field' => 'field_acfe_form_user_map_website',
|
4105 |
-
'operator' => '!=empty',
|
4106 |
-
),
|
4107 |
-
array(
|
4108 |
-
'field' => 'field_acfe_form_user_action',
|
4109 |
-
'operator' => '!=',
|
4110 |
-
'value' => 'log_user',
|
4111 |
-
),
|
4112 |
-
),
|
4113 |
-
),
|
4114 |
-
'wrapper' => array(
|
4115 |
-
'width' => '',
|
4116 |
-
'class' => '',
|
4117 |
-
'id' => '',
|
4118 |
-
),
|
4119 |
-
'acfe_permissions' => '',
|
4120 |
-
),
|
4121 |
-
array(
|
4122 |
-
'key' => 'field_acfe_form_user_save_description_group',
|
4123 |
-
'label' => 'Description',
|
4124 |
-
'name' => 'acfe_form_user_save_description_group',
|
4125 |
-
'type' => 'group',
|
4126 |
-
'instructions' => '',
|
4127 |
-
'required' => 0,
|
4128 |
-
'conditional_logic' => array(
|
4129 |
-
array(
|
4130 |
-
array(
|
4131 |
-
'field' => 'field_acfe_form_user_map_description',
|
4132 |
-
'operator' => '==empty',
|
4133 |
-
),
|
4134 |
-
array(
|
4135 |
-
'field' => 'field_acfe_form_user_action',
|
4136 |
-
'operator' => '!=',
|
4137 |
-
'value' => 'log_user',
|
4138 |
-
),
|
4139 |
-
),
|
4140 |
-
),
|
4141 |
-
'wrapper' => array(
|
4142 |
-
'width' => '',
|
4143 |
-
'class' => '',
|
4144 |
-
'id' => '',
|
4145 |
-
),
|
4146 |
-
'acfe_permissions' => '',
|
4147 |
-
'layout' => 'block',
|
4148 |
-
'acfe_seamless_style' => true,
|
4149 |
-
'acfe_group_modal' => 0,
|
4150 |
-
'sub_fields' => array(
|
4151 |
-
array(
|
4152 |
-
'key' => 'field_acfe_form_user_save_description',
|
4153 |
-
'label' => '',
|
4154 |
-
'name' => 'acfe_form_user_save_description',
|
4155 |
-
'type' => 'select',
|
4156 |
-
'instructions' => '',
|
4157 |
-
'required' => 0,
|
4158 |
-
'conditional_logic' => 0,
|
4159 |
-
'wrapper' => array(
|
4160 |
-
'width' => '',
|
4161 |
-
'class' => '',
|
4162 |
-
'id' => '',
|
4163 |
-
),
|
4164 |
-
'acfe_permissions' => '',
|
4165 |
-
'choices' => array(
|
4166 |
-
'custom' => 'WYSIWYG Editor',
|
4167 |
-
),
|
4168 |
-
'default_value' => array(
|
4169 |
-
),
|
4170 |
-
'allow_null' => 1,
|
4171 |
-
'multiple' => 0,
|
4172 |
-
'ui' => 1,
|
4173 |
-
'return_format' => 'value',
|
4174 |
-
'placeholder' => 'Default',
|
4175 |
-
'ajax' => 0,
|
4176 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4177 |
-
'allow_custom' => 1,
|
4178 |
-
),
|
4179 |
-
array(
|
4180 |
-
'key' => 'field_acfe_form_user_save_description_custom',
|
4181 |
-
'label' => '',
|
4182 |
-
'name' => 'acfe_form_user_save_description_custom',
|
4183 |
-
'type' => 'wysiwyg',
|
4184 |
-
'instructions' => '',
|
4185 |
-
'required' => 1,
|
4186 |
-
'conditional_logic' => array(
|
4187 |
-
array(
|
4188 |
-
array(
|
4189 |
-
'field' => 'field_acfe_form_user_save_description',
|
4190 |
-
'operator' => '==',
|
4191 |
-
'value' => 'custom',
|
4192 |
-
),
|
4193 |
-
),
|
4194 |
-
),
|
4195 |
-
'wrapper' => array(
|
4196 |
-
'width' => '',
|
4197 |
-
'class' => '',
|
4198 |
-
'id' => '',
|
4199 |
-
),
|
4200 |
-
'acfe_permissions' => '',
|
4201 |
-
'default_value' => '',
|
4202 |
-
'tabs' => 'all',
|
4203 |
-
'toolbar' => 'full',
|
4204 |
-
'media_upload' => 1,
|
4205 |
-
'delay' => 0,
|
4206 |
-
),
|
4207 |
-
),
|
4208 |
-
),
|
4209 |
-
array(
|
4210 |
-
'key' => 'field_acfe_form_user_map_description_message',
|
4211 |
-
'label' => 'Description',
|
4212 |
-
'name' => 'acfe_form_user_map_description_message',
|
4213 |
-
'type' => 'acfe_dynamic_message',
|
4214 |
-
'instructions' => '',
|
4215 |
-
'required' => 0,
|
4216 |
-
'conditional_logic' => array(
|
4217 |
-
array(
|
4218 |
-
array(
|
4219 |
-
'field' => 'field_acfe_form_user_map_description',
|
4220 |
-
'operator' => '!=empty',
|
4221 |
-
),
|
4222 |
array(
|
4223 |
-
|
4224 |
-
|
4225 |
-
|
4226 |
-
|
4227 |
-
),
|
4228 |
-
),
|
4229 |
-
'wrapper' => array(
|
4230 |
-
'width' => '',
|
4231 |
-
'class' => '',
|
4232 |
-
'id' => '',
|
4233 |
-
),
|
4234 |
-
'acfe_permissions' => '',
|
4235 |
-
),
|
4236 |
-
array(
|
4237 |
-
'key' => 'field_acfe_form_user_save_role',
|
4238 |
-
'label' => 'Role',
|
4239 |
-
'name' => 'acfe_form_user_save_role',
|
4240 |
-
'type' => 'acfe_user_roles',
|
4241 |
-
'instructions' => '',
|
4242 |
-
'required' => 0,
|
4243 |
-
'conditional_logic' => array(
|
4244 |
-
array(
|
4245 |
-
array(
|
4246 |
-
'field' => 'field_acfe_form_user_map_role',
|
4247 |
-
'operator' => '==empty',
|
4248 |
-
),
|
4249 |
array(
|
4250 |
-
|
4251 |
-
|
4252 |
-
|
4253 |
-
|
4254 |
-
|
4255 |
-
|
4256 |
-
|
4257 |
-
|
4258 |
-
|
4259 |
-
|
4260 |
-
|
4261 |
-
|
4262 |
-
|
4263 |
-
|
4264 |
-
|
4265 |
-
|
4266 |
-
'placeholder' => 'Default',
|
4267 |
-
'multiple' => 0,
|
4268 |
-
'ui' => 1,
|
4269 |
-
'choices' => array(
|
4270 |
-
),
|
4271 |
-
'ajax' => 0,
|
4272 |
-
'layout' => '',
|
4273 |
-
'toggle' => 0,
|
4274 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4275 |
-
'allow_custom' => 1,
|
4276 |
-
),
|
4277 |
-
array(
|
4278 |
-
'key' => 'field_acfe_form_user_map_role_message',
|
4279 |
-
'label' => 'Role',
|
4280 |
-
'name' => 'acfe_form_user_map_role_message',
|
4281 |
-
'type' => 'acfe_dynamic_message',
|
4282 |
-
'instructions' => '',
|
4283 |
-
'required' => 0,
|
4284 |
-
'conditional_logic' => array(
|
4285 |
-
array(
|
4286 |
-
array(
|
4287 |
-
'field' => 'field_acfe_form_user_map_role',
|
4288 |
-
'operator' => '!=empty',
|
4289 |
-
),
|
4290 |
array(
|
4291 |
-
|
4292 |
-
|
4293 |
-
|
4294 |
-
|
4295 |
-
|
4296 |
-
|
4297 |
-
|
4298 |
-
|
4299 |
-
|
4300 |
-
|
4301 |
-
|
4302 |
-
|
4303 |
-
|
4304 |
-
|
4305 |
-
|
4306 |
-
|
4307 |
-
|
4308 |
-
|
4309 |
-
|
4310 |
-
|
4311 |
-
|
4312 |
-
|
4313 |
-
|
4314 |
-
|
4315 |
-
|
4316 |
-
'acfe_permissions' => '',
|
4317 |
-
'choices' => array(
|
4318 |
-
),
|
4319 |
-
'allow_custom' => 0,
|
4320 |
-
'default_value' => array(
|
4321 |
-
),
|
4322 |
-
'layout' => 'vertical',
|
4323 |
-
'toggle' => 1,
|
4324 |
-
'return_format' => 'value',
|
4325 |
-
'save_custom' => 0,
|
4326 |
-
'conditional_logic' => array(
|
4327 |
-
array(
|
4328 |
-
array(
|
4329 |
-
'field' => 'field_acfe_form_user_action',
|
4330 |
-
'operator' => '!=',
|
4331 |
-
'value' => 'log_user',
|
4332 |
-
),
|
4333 |
-
),
|
4334 |
-
),
|
4335 |
-
),
|
4336 |
-
|
4337 |
-
/*
|
4338 |
-
* Layout: User Load
|
4339 |
-
*/
|
4340 |
-
array(
|
4341 |
-
'key' => 'acfe_form_user_tab_load',
|
4342 |
-
'label' => 'Load',
|
4343 |
-
'name' => '',
|
4344 |
-
'type' => 'tab',
|
4345 |
-
'instructions' => '',
|
4346 |
-
'required' => 0,
|
4347 |
-
'wrapper' => array(
|
4348 |
-
'width' => '',
|
4349 |
-
'class' => '',
|
4350 |
-
'id' => '',
|
4351 |
-
),
|
4352 |
-
'acfe_permissions' => '',
|
4353 |
-
'placement' => 'top',
|
4354 |
-
'endpoint' => 0,
|
4355 |
-
'conditional_logic' => array(
|
4356 |
-
array(
|
4357 |
-
array(
|
4358 |
-
'field' => 'field_acfe_form_user_action',
|
4359 |
-
'operator' => '!=',
|
4360 |
-
'value' => 'log_user',
|
4361 |
-
),
|
4362 |
-
),
|
4363 |
-
),
|
4364 |
-
),
|
4365 |
-
array(
|
4366 |
-
'key' => 'field_acfe_form_user_load_values',
|
4367 |
-
'label' => 'Load Values',
|
4368 |
-
'name' => 'acfe_form_user_load_values',
|
4369 |
-
'type' => 'true_false',
|
4370 |
-
'instructions' => 'Fill inputs with values',
|
4371 |
-
'required' => 0,
|
4372 |
-
'conditional_logic' => 0,
|
4373 |
-
'wrapper' => array(
|
4374 |
-
'width' => '',
|
4375 |
-
'class' => '',
|
4376 |
-
'id' => '',
|
4377 |
-
),
|
4378 |
-
'acfe_permissions' => '',
|
4379 |
-
'message' => '',
|
4380 |
-
'default_value' => 1,
|
4381 |
-
'ui' => 1,
|
4382 |
-
'ui_on_text' => '',
|
4383 |
-
'ui_off_text' => '',
|
4384 |
-
),
|
4385 |
-
array(
|
4386 |
-
'key' => 'field_acfe_form_user_load_source',
|
4387 |
-
'label' => 'Source',
|
4388 |
-
'name' => 'acfe_form_user_load_source',
|
4389 |
-
'type' => 'select',
|
4390 |
-
'instructions' => '',
|
4391 |
-
'required' => 0,
|
4392 |
-
'conditional_logic' => array(
|
4393 |
-
array(
|
4394 |
-
array(
|
4395 |
-
'field' => 'field_acfe_form_user_load_values',
|
4396 |
-
'operator' => '==',
|
4397 |
-
'value' => '1',
|
4398 |
-
),
|
4399 |
-
),
|
4400 |
-
),
|
4401 |
-
'wrapper' => array(
|
4402 |
-
'width' => '',
|
4403 |
-
'class' => '',
|
4404 |
-
'id' => '',
|
4405 |
-
),
|
4406 |
-
'acfe_permissions' => '',
|
4407 |
-
'choices' => array(
|
4408 |
-
),
|
4409 |
-
'default_value' => 'current_user',
|
4410 |
-
'allow_null' => 0,
|
4411 |
-
'multiple' => 0,
|
4412 |
-
'ui' => 1,
|
4413 |
-
'ajax' => 0,
|
4414 |
-
'return_format' => 'value',
|
4415 |
-
'placeholder' => '',
|
4416 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4417 |
-
'allow_custom' => 1,
|
4418 |
-
),
|
4419 |
-
|
4420 |
-
array(
|
4421 |
-
'key' => 'field_acfe_form_user_map_email',
|
4422 |
-
'label' => 'Email',
|
4423 |
-
'name' => 'acfe_form_user_map_email',
|
4424 |
-
'type' => 'select',
|
4425 |
-
'instructions' => '',
|
4426 |
-
'required' => 0,
|
4427 |
-
'wrapper' => array(
|
4428 |
-
'width' => '',
|
4429 |
-
'class' => '',
|
4430 |
-
'id' => '',
|
4431 |
-
),
|
4432 |
-
'acfe_permissions' => '',
|
4433 |
-
'choices' => array(
|
4434 |
-
),
|
4435 |
-
'default_value' => array(
|
4436 |
-
),
|
4437 |
-
'allow_null' => 1,
|
4438 |
-
'multiple' => 0,
|
4439 |
-
'ui' => 1,
|
4440 |
-
'return_format' => 'value',
|
4441 |
-
'placeholder' => 'Default',
|
4442 |
-
'ajax' => 0,
|
4443 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4444 |
-
'allow_custom' => 1,
|
4445 |
-
'conditional_logic' => array(
|
4446 |
-
array(
|
4447 |
-
array(
|
4448 |
-
'field' => 'field_acfe_form_user_load_values',
|
4449 |
-
'operator' => '==',
|
4450 |
-
'value' => '1',
|
4451 |
-
),
|
4452 |
-
array(
|
4453 |
-
'field' => 'field_acfe_form_user_action',
|
4454 |
-
'operator' => '!=',
|
4455 |
-
'value' => 'log_user',
|
4456 |
-
),
|
4457 |
-
),
|
4458 |
-
),
|
4459 |
-
),
|
4460 |
-
array(
|
4461 |
-
'key' => 'field_acfe_form_user_map_username',
|
4462 |
-
'label' => 'Username',
|
4463 |
-
'name' => 'acfe_form_user_map_username',
|
4464 |
-
'type' => 'select',
|
4465 |
-
'instructions' => '',
|
4466 |
-
'required' => 0,
|
4467 |
-
'wrapper' => array(
|
4468 |
-
'width' => '',
|
4469 |
-
'class' => '',
|
4470 |
-
'id' => '',
|
4471 |
-
),
|
4472 |
-
'acfe_permissions' => '',
|
4473 |
-
'choices' => array(
|
4474 |
-
),
|
4475 |
-
'default_value' => array(
|
4476 |
-
),
|
4477 |
-
'allow_null' => 1,
|
4478 |
-
'multiple' => 0,
|
4479 |
-
'ui' => 1,
|
4480 |
-
'return_format' => 'value',
|
4481 |
-
'placeholder' => 'Default',
|
4482 |
-
'ajax' => 0,
|
4483 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4484 |
-
'allow_custom' => 1,
|
4485 |
-
'conditional_logic' => array(
|
4486 |
-
array(
|
4487 |
-
array(
|
4488 |
-
'field' => 'field_acfe_form_user_load_values',
|
4489 |
-
'operator' => '==',
|
4490 |
-
'value' => '1',
|
4491 |
-
),
|
4492 |
-
array(
|
4493 |
-
'field' => 'field_acfe_form_user_action',
|
4494 |
-
'operator' => '!=',
|
4495 |
-
'value' => 'log_user',
|
4496 |
-
),
|
4497 |
-
),
|
4498 |
-
),
|
4499 |
-
),
|
4500 |
-
array(
|
4501 |
-
'key' => 'field_acfe_form_user_map_password',
|
4502 |
-
'label' => 'Password',
|
4503 |
-
'name' => 'acfe_form_user_map_password',
|
4504 |
-
'type' => 'select',
|
4505 |
-
'instructions' => '',
|
4506 |
-
'required' => 0,
|
4507 |
-
'wrapper' => array(
|
4508 |
-
'width' => '',
|
4509 |
-
'class' => '',
|
4510 |
-
'id' => '',
|
4511 |
-
),
|
4512 |
-
'acfe_permissions' => '',
|
4513 |
-
'choices' => array(
|
4514 |
-
),
|
4515 |
-
'default_value' => array(
|
4516 |
-
),
|
4517 |
-
'allow_null' => 1,
|
4518 |
-
'multiple' => 0,
|
4519 |
-
'ui' => 1,
|
4520 |
-
'return_format' => 'value',
|
4521 |
-
'placeholder' => 'Default',
|
4522 |
-
'ajax' => 0,
|
4523 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4524 |
-
'allow_custom' => 1,
|
4525 |
-
'conditional_logic' => array(
|
4526 |
-
array(
|
4527 |
-
array(
|
4528 |
-
'field' => 'field_acfe_form_user_load_values',
|
4529 |
-
'operator' => '==',
|
4530 |
-
'value' => '1',
|
4531 |
-
),
|
4532 |
-
array(
|
4533 |
-
'field' => 'field_acfe_form_user_action',
|
4534 |
-
'operator' => '!=',
|
4535 |
-
'value' => 'log_user',
|
4536 |
-
),
|
4537 |
-
),
|
4538 |
-
),
|
4539 |
-
),
|
4540 |
-
array(
|
4541 |
-
'key' => 'field_acfe_form_user_map_first_name',
|
4542 |
-
'label' => 'First name',
|
4543 |
-
'name' => 'acfe_form_user_map_first_name',
|
4544 |
-
'type' => 'select',
|
4545 |
-
'instructions' => '',
|
4546 |
-
'required' => 0,
|
4547 |
-
'wrapper' => array(
|
4548 |
-
'width' => '',
|
4549 |
-
'class' => '',
|
4550 |
-
'id' => '',
|
4551 |
-
),
|
4552 |
-
'acfe_permissions' => '',
|
4553 |
-
'choices' => array(
|
4554 |
-
),
|
4555 |
-
'default_value' => array(
|
4556 |
-
),
|
4557 |
-
'allow_null' => 1,
|
4558 |
-
'multiple' => 0,
|
4559 |
-
'ui' => 1,
|
4560 |
-
'return_format' => 'value',
|
4561 |
-
'placeholder' => 'Default',
|
4562 |
-
'ajax' => 0,
|
4563 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4564 |
-
'allow_custom' => 1,
|
4565 |
-
'conditional_logic' => array(
|
4566 |
-
array(
|
4567 |
-
array(
|
4568 |
-
'field' => 'field_acfe_form_user_load_values',
|
4569 |
-
'operator' => '==',
|
4570 |
-
'value' => '1',
|
4571 |
-
),
|
4572 |
-
array(
|
4573 |
-
'field' => 'field_acfe_form_user_action',
|
4574 |
-
'operator' => '!=',
|
4575 |
-
'value' => 'log_user',
|
4576 |
-
),
|
4577 |
-
),
|
4578 |
-
),
|
4579 |
-
),
|
4580 |
-
array(
|
4581 |
-
'key' => 'field_acfe_form_user_map_last_name',
|
4582 |
-
'label' => 'Last name',
|
4583 |
-
'name' => 'acfe_form_user_map_last_name',
|
4584 |
-
'type' => 'select',
|
4585 |
-
'instructions' => '',
|
4586 |
-
'required' => 0,
|
4587 |
-
'wrapper' => array(
|
4588 |
-
'width' => '',
|
4589 |
-
'class' => '',
|
4590 |
-
'id' => '',
|
4591 |
-
),
|
4592 |
-
'acfe_permissions' => '',
|
4593 |
-
'choices' => array(
|
4594 |
-
),
|
4595 |
-
'default_value' => array(
|
4596 |
-
),
|
4597 |
-
'allow_null' => 1,
|
4598 |
-
'multiple' => 0,
|
4599 |
-
'ui' => 1,
|
4600 |
-
'return_format' => 'value',
|
4601 |
-
'placeholder' => 'Default',
|
4602 |
-
'ajax' => 0,
|
4603 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4604 |
-
'allow_custom' => 1,
|
4605 |
-
'conditional_logic' => array(
|
4606 |
-
array(
|
4607 |
-
array(
|
4608 |
-
'field' => 'field_acfe_form_user_load_values',
|
4609 |
-
'operator' => '==',
|
4610 |
-
'value' => '1',
|
4611 |
-
),
|
4612 |
-
array(
|
4613 |
-
'field' => 'field_acfe_form_user_action',
|
4614 |
-
'operator' => '!=',
|
4615 |
-
'value' => 'log_user',
|
4616 |
-
),
|
4617 |
-
),
|
4618 |
-
),
|
4619 |
-
),
|
4620 |
-
array(
|
4621 |
-
'key' => 'field_acfe_form_user_map_nickname',
|
4622 |
-
'label' => 'Nickname',
|
4623 |
-
'name' => 'acfe_form_user_map_nickname',
|
4624 |
-
'type' => 'select',
|
4625 |
-
'instructions' => '',
|
4626 |
-
'required' => 0,
|
4627 |
-
'wrapper' => array(
|
4628 |
-
'width' => '',
|
4629 |
-
'class' => '',
|
4630 |
-
'id' => '',
|
4631 |
-
),
|
4632 |
-
'acfe_permissions' => '',
|
4633 |
-
'choices' => array(
|
4634 |
-
),
|
4635 |
-
'default_value' => array(
|
4636 |
-
),
|
4637 |
-
'allow_null' => 1,
|
4638 |
-
'multiple' => 0,
|
4639 |
-
'ui' => 1,
|
4640 |
-
'return_format' => 'value',
|
4641 |
-
'placeholder' => 'Default',
|
4642 |
-
'ajax' => 0,
|
4643 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4644 |
-
'allow_custom' => 1,
|
4645 |
-
'conditional_logic' => array(
|
4646 |
-
array(
|
4647 |
-
array(
|
4648 |
-
'field' => 'field_acfe_form_user_load_values',
|
4649 |
-
'operator' => '==',
|
4650 |
-
'value' => '1',
|
4651 |
-
),
|
4652 |
-
array(
|
4653 |
-
'field' => 'field_acfe_form_user_action',
|
4654 |
-
'operator' => '!=',
|
4655 |
-
'value' => 'log_user',
|
4656 |
-
),
|
4657 |
-
),
|
4658 |
-
),
|
4659 |
-
),
|
4660 |
-
array(
|
4661 |
-
'key' => 'field_acfe_form_user_map_display_name',
|
4662 |
-
'label' => 'Display name',
|
4663 |
-
'name' => 'acfe_form_user_map_display_name',
|
4664 |
-
'type' => 'select',
|
4665 |
-
'instructions' => '',
|
4666 |
-
'required' => 0,
|
4667 |
-
'wrapper' => array(
|
4668 |
-
'width' => '',
|
4669 |
-
'class' => '',
|
4670 |
-
'id' => '',
|
4671 |
-
),
|
4672 |
-
'acfe_permissions' => '',
|
4673 |
-
'choices' => array(
|
4674 |
-
),
|
4675 |
-
'default_value' => array(
|
4676 |
-
),
|
4677 |
-
'allow_null' => 1,
|
4678 |
-
'multiple' => 0,
|
4679 |
-
'ui' => 1,
|
4680 |
-
'return_format' => 'value',
|
4681 |
-
'placeholder' => 'Default',
|
4682 |
-
'ajax' => 0,
|
4683 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4684 |
-
'allow_custom' => 1,
|
4685 |
-
'conditional_logic' => array(
|
4686 |
-
array(
|
4687 |
-
array(
|
4688 |
-
'field' => 'field_acfe_form_user_load_values',
|
4689 |
-
'operator' => '==',
|
4690 |
-
'value' => '1',
|
4691 |
-
),
|
4692 |
-
array(
|
4693 |
-
'field' => 'field_acfe_form_user_action',
|
4694 |
-
'operator' => '!=',
|
4695 |
-
'value' => 'log_user',
|
4696 |
-
),
|
4697 |
-
),
|
4698 |
-
),
|
4699 |
-
),
|
4700 |
-
array(
|
4701 |
-
'key' => 'field_acfe_form_user_map_website',
|
4702 |
-
'label' => 'Website',
|
4703 |
-
'name' => 'acfe_form_user_map_website',
|
4704 |
-
'type' => 'select',
|
4705 |
-
'instructions' => '',
|
4706 |
-
'required' => 0,
|
4707 |
-
'wrapper' => array(
|
4708 |
-
'width' => '',
|
4709 |
-
'class' => '',
|
4710 |
-
'id' => '',
|
4711 |
-
),
|
4712 |
-
'acfe_permissions' => '',
|
4713 |
-
'choices' => array(
|
4714 |
-
),
|
4715 |
-
'default_value' => array(
|
4716 |
-
),
|
4717 |
-
'allow_null' => 1,
|
4718 |
-
'multiple' => 0,
|
4719 |
-
'ui' => 1,
|
4720 |
-
'return_format' => 'value',
|
4721 |
-
'placeholder' => 'Default',
|
4722 |
-
'ajax' => 0,
|
4723 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4724 |
-
'allow_custom' => 1,
|
4725 |
-
'conditional_logic' => array(
|
4726 |
-
array(
|
4727 |
-
array(
|
4728 |
-
'field' => 'field_acfe_form_user_load_values',
|
4729 |
-
'operator' => '==',
|
4730 |
-
'value' => '1',
|
4731 |
-
),
|
4732 |
-
array(
|
4733 |
-
'field' => 'field_acfe_form_user_action',
|
4734 |
-
'operator' => '!=',
|
4735 |
-
'value' => 'log_user',
|
4736 |
-
),
|
4737 |
-
),
|
4738 |
-
),
|
4739 |
-
),
|
4740 |
-
array(
|
4741 |
-
'key' => 'field_acfe_form_user_map_description',
|
4742 |
-
'label' => 'Description',
|
4743 |
-
'name' => 'acfe_form_user_map_description',
|
4744 |
-
'type' => 'select',
|
4745 |
-
'instructions' => '',
|
4746 |
-
'required' => 0,
|
4747 |
-
'wrapper' => array(
|
4748 |
-
'width' => '',
|
4749 |
-
'class' => '',
|
4750 |
-
'id' => '',
|
4751 |
-
),
|
4752 |
-
'acfe_permissions' => '',
|
4753 |
-
'choices' => array(
|
4754 |
-
),
|
4755 |
-
'default_value' => array(
|
4756 |
-
),
|
4757 |
-
'allow_null' => 1,
|
4758 |
-
'multiple' => 0,
|
4759 |
-
'ui' => 1,
|
4760 |
-
'return_format' => 'value',
|
4761 |
-
'placeholder' => 'Default',
|
4762 |
-
'ajax' => 0,
|
4763 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4764 |
-
'allow_custom' => 1,
|
4765 |
-
'conditional_logic' => array(
|
4766 |
-
array(
|
4767 |
-
array(
|
4768 |
-
'field' => 'field_acfe_form_user_load_values',
|
4769 |
-
'operator' => '==',
|
4770 |
-
'value' => '1',
|
4771 |
-
),
|
4772 |
-
array(
|
4773 |
-
'field' => 'field_acfe_form_user_action',
|
4774 |
-
'operator' => '!=',
|
4775 |
-
'value' => 'log_user',
|
4776 |
-
),
|
4777 |
-
),
|
4778 |
-
),
|
4779 |
-
),
|
4780 |
-
array(
|
4781 |
-
'key' => 'field_acfe_form_user_map_role',
|
4782 |
-
'label' => 'Role',
|
4783 |
-
'name' => 'acfe_form_user_map_role',
|
4784 |
-
'type' => 'select',
|
4785 |
-
'instructions' => '',
|
4786 |
-
'required' => 0,
|
4787 |
-
'wrapper' => array(
|
4788 |
-
'width' => '',
|
4789 |
-
'class' => '',
|
4790 |
-
'id' => '',
|
4791 |
-
),
|
4792 |
-
'acfe_permissions' => '',
|
4793 |
-
'choices' => array(
|
4794 |
-
),
|
4795 |
-
'default_value' => array(
|
4796 |
-
),
|
4797 |
-
'allow_null' => 1,
|
4798 |
-
'multiple' => 0,
|
4799 |
-
'ui' => 1,
|
4800 |
-
'return_format' => 'value',
|
4801 |
-
'placeholder' => 'Default',
|
4802 |
-
'ajax' => 0,
|
4803 |
-
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4804 |
-
'allow_custom' => 1,
|
4805 |
-
'conditional_logic' => array(
|
4806 |
-
array(
|
4807 |
-
array(
|
4808 |
-
'field' => 'field_acfe_form_user_load_values',
|
4809 |
-
'operator' => '==',
|
4810 |
-
'value' => '1',
|
4811 |
-
),
|
4812 |
-
array(
|
4813 |
-
'field' => 'field_acfe_form_user_action',
|
4814 |
-
'operator' => '!=',
|
4815 |
-
'value' => 'log_user',
|
4816 |
-
),
|
4817 |
-
),
|
4818 |
-
),
|
4819 |
-
),
|
4820 |
-
array(
|
4821 |
-
'key' => 'field_acfe_form_user_load_meta',
|
4822 |
-
'label' => 'Load ACF fields',
|
4823 |
-
'name' => 'acfe_form_user_load_meta',
|
4824 |
-
'type' => 'checkbox',
|
4825 |
-
'instructions' => 'Choose which ACF fields should have their values loaded',
|
4826 |
-
'required' => 0,
|
4827 |
-
'conditional_logic' => array(
|
4828 |
-
array(
|
4829 |
-
array(
|
4830 |
-
'field' => 'field_acfe_form_user_load_values',
|
4831 |
-
'operator' => '==',
|
4832 |
-
'value' => '1',
|
4833 |
-
),
|
4834 |
-
),
|
4835 |
-
),
|
4836 |
-
'wrapper' => array(
|
4837 |
-
'width' => '',
|
4838 |
-
'class' => '',
|
4839 |
-
'id' => '',
|
4840 |
-
),
|
4841 |
-
'acfe_permissions' => '',
|
4842 |
-
'choices' => array(
|
4843 |
-
),
|
4844 |
-
'allow_custom' => 0,
|
4845 |
-
'default_value' => array(
|
4846 |
-
),
|
4847 |
-
'layout' => 'vertical',
|
4848 |
-
'toggle' => 1,
|
4849 |
-
'return_format' => 'value',
|
4850 |
-
'save_custom' => 0,
|
4851 |
-
),
|
4852 |
-
|
4853 |
-
|
4854 |
-
/*
|
4855 |
* Layout: User Advanced
|
4856 |
*/
|
4857 |
array(
|
4858 |
-
|
4859 |
-
|
4860 |
-
|
4861 |
-
|
4862 |
-
|
4863 |
-
|
4864 |
-
|
4865 |
-
|
4866 |
-
|
4867 |
-
|
4868 |
-
|
4869 |
-
|
4870 |
-
|
4871 |
-
|
4872 |
-
|
4873 |
-
|
4874 |
array(
|
4875 |
'key' => 'field_acfe_form_user_advanced_load',
|
4876 |
'label' => 'Change values source',
|
@@ -4919,23 +4203,538 @@ acf_add_local_field_group(array(
|
|
4919 |
),
|
4920 |
'acfe_permissions' => '',
|
4921 |
),
|
4922 |
-
|
4923 |
-
|
4924 |
-
|
4925 |
-
|
4926 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4927 |
),
|
4928 |
-
'
|
4929 |
-
'
|
4930 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4931 |
),
|
4932 |
|
4933 |
/*
|
4934 |
-
*
|
4935 |
*/
|
4936 |
array(
|
4937 |
-
'key' => '
|
4938 |
-
'label' => '
|
4939 |
'name' => '',
|
4940 |
'type' => 'tab',
|
4941 |
'instructions' => '',
|
@@ -4951,33 +4750,221 @@ acf_add_local_field_group(array(
|
|
4951 |
'endpoint' => 0,
|
4952 |
),
|
4953 |
array(
|
4954 |
-
'key' => '
|
4955 |
-
'label' => '
|
4956 |
-
'name' => '
|
4957 |
'type' => 'true_false',
|
4958 |
-
'instructions' => '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4959 |
'required' => 0,
|
4960 |
-
'conditional_logic' =>
|
4961 |
'wrapper' => array(
|
4962 |
'width' => '',
|
4963 |
'class' => '',
|
4964 |
'id' => '',
|
4965 |
),
|
4966 |
'acfe_permissions' => '',
|
4967 |
-
'
|
4968 |
-
|
4969 |
-
|
4970 |
-
|
4971 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4972 |
),
|
4973 |
array(
|
4974 |
-
'key' => '
|
4975 |
-
'label' => '
|
4976 |
-
'name' => '
|
4977 |
'type' => 'text',
|
4978 |
-
'instructions' => '
|
4979 |
'required' => 0,
|
4980 |
-
'conditional_logic' =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4981 |
'wrapper' => array(
|
4982 |
'width' => '',
|
4983 |
'class' => '',
|
@@ -4991,32 +4978,12 @@ acf_add_local_field_group(array(
|
|
4991 |
'maxlength' => '',
|
4992 |
),
|
4993 |
array(
|
4994 |
-
'key' => '
|
4995 |
-
'label' => '
|
4996 |
-
'name' => '
|
4997 |
-
'type' => '
|
4998 |
-
'
|
4999 |
-
'
|
5000 |
-
'conditional_logic' => 0,
|
5001 |
-
'wrapper' => array(
|
5002 |
-
'width' => '',
|
5003 |
-
'class' => '',
|
5004 |
-
'id' => '',
|
5005 |
-
),
|
5006 |
-
'acfe_permissions' => '',
|
5007 |
-
'default_value' => __('Post updated', 'acf'),
|
5008 |
-
'tabs' => 'all',
|
5009 |
-
'toolbar' => 'full',
|
5010 |
-
'media_upload' => 1,
|
5011 |
-
'delay' => 0,
|
5012 |
-
),
|
5013 |
-
array(
|
5014 |
-
'key' => 'field_acfe_form_html_updated_message',
|
5015 |
-
'label' => 'Success wrapper HTML',
|
5016 |
-
'name' => 'acfe_form_html_updated_message',
|
5017 |
-
'type' => 'acfe_code_editor',
|
5018 |
-
'instructions' => 'HTML used to render the updated message.<br /><br />
|
5019 |
-
If used, you have to include the following code <code>%s</code> to print the actual \'Success message\' above.',
|
5020 |
'required' => 0,
|
5021 |
'conditional_logic' => 0,
|
5022 |
'wrapper' => array(
|
@@ -5025,18 +4992,14 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5025 |
'id' => '',
|
5026 |
),
|
5027 |
'acfe_permissions' => '',
|
5028 |
-
'default_value' => '<div id="message" class="updated">%s</div>',
|
5029 |
-
'placeholder' => '',
|
5030 |
-
'maxlength' => '',
|
5031 |
-
'rows' => 2,
|
5032 |
),
|
5033 |
array(
|
5034 |
-
'key' => '
|
5035 |
-
'label' => 'PHP Form
|
5036 |
-
'name' => '
|
5037 |
'type' => 'acfe_dynamic_message',
|
5038 |
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
5039 |
-
'instructions' => '
|
5040 |
'required' => 0,
|
5041 |
'conditional_logic' => 0,
|
5042 |
'wrapper' => array(
|
@@ -5048,11 +5011,12 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5048 |
),
|
5049 |
|
5050 |
/*
|
5051 |
-
*
|
5052 |
*/
|
|
|
5053 |
array(
|
5054 |
-
'key' => '
|
5055 |
-
'label' => '
|
5056 |
'name' => '',
|
5057 |
'type' => 'tab',
|
5058 |
'instructions' => '',
|
@@ -5067,13 +5031,17 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5067 |
'placement' => 'top',
|
5068 |
'endpoint' => 0,
|
5069 |
),
|
|
|
|
|
5070 |
/*
|
|
|
|
|
5071 |
array(
|
5072 |
-
'key' => '
|
5073 |
-
'label' => '
|
5074 |
-
'name' => '
|
5075 |
-
'type' => '
|
5076 |
-
'instructions' => '
|
5077 |
'required' => 0,
|
5078 |
'conditional_logic' => 0,
|
5079 |
'wrapper' => array(
|
@@ -5082,20 +5050,17 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5082 |
'id' => '',
|
5083 |
),
|
5084 |
'acfe_permissions' => '',
|
5085 |
-
'
|
5086 |
-
'
|
5087 |
-
'return_format' => 'value',
|
5088 |
-
'placeholder' => '',
|
5089 |
),
|
5090 |
-
*/
|
5091 |
array(
|
5092 |
-
'key' => '
|
5093 |
-
'label' => '
|
5094 |
-
'name' => '
|
5095 |
'type' => 'true_false',
|
5096 |
-
'instructions' => '
|
5097 |
'required' => 0,
|
5098 |
-
'conditional_logic' =>
|
5099 |
'wrapper' => array(
|
5100 |
'width' => '',
|
5101 |
'class' => '',
|
@@ -5103,17 +5068,17 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5103 |
),
|
5104 |
'acfe_permissions' => '',
|
5105 |
'message' => '',
|
5106 |
-
'default_value' =>
|
5107 |
'ui' => 1,
|
5108 |
'ui_on_text' => '',
|
5109 |
'ui_off_text' => '',
|
5110 |
),
|
5111 |
array(
|
5112 |
-
'key' => '
|
5113 |
-
'label' => '
|
5114 |
-
'name' => '
|
5115 |
-
'type' => '
|
5116 |
-
'instructions' => '
|
5117 |
'required' => 0,
|
5118 |
'conditional_logic' => 0,
|
5119 |
'wrapper' => array(
|
@@ -5122,19 +5087,18 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5122 |
'id' => '',
|
5123 |
),
|
5124 |
'acfe_permissions' => '',
|
5125 |
-
'
|
5126 |
-
'
|
5127 |
-
'
|
5128 |
-
'
|
5129 |
-
'
|
5130 |
),
|
5131 |
array(
|
5132 |
-
'key' => '
|
5133 |
-
'label' => '
|
5134 |
-
'name' => '
|
5135 |
-
'type' => '
|
5136 |
-
'instructions' => '
|
5137 |
-
Choices of \'wp\' or \'basic\'.',
|
5138 |
'required' => 0,
|
5139 |
'conditional_logic' => 0,
|
5140 |
'wrapper' => array(
|
@@ -5143,24 +5107,19 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5143 |
'id' => '',
|
5144 |
),
|
5145 |
'acfe_permissions' => '',
|
5146 |
-
'
|
5147 |
-
|
5148 |
-
|
5149 |
-
|
5150 |
-
|
5151 |
-
'allow_null' => 0,
|
5152 |
-
'other_choice' => 0,
|
5153 |
-
'default_value' => 'default',
|
5154 |
-
'layout' => 'vertical',
|
5155 |
-
'return_format' => 'value',
|
5156 |
-
'save_other_choice' => 0,
|
5157 |
),
|
5158 |
array(
|
5159 |
-
'key' => '
|
5160 |
-
'label' => '
|
5161 |
-
'name' => '
|
5162 |
-
'type' => '
|
5163 |
-
'instructions' => '
|
|
|
5164 |
'required' => 0,
|
5165 |
'conditional_logic' => 0,
|
5166 |
'wrapper' => array(
|
@@ -5169,28 +5128,18 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5169 |
'id' => '',
|
5170 |
),
|
5171 |
'acfe_permissions' => '',
|
5172 |
-
'
|
5173 |
-
|
5174 |
-
|
5175 |
-
|
5176 |
-
'ul' => '<ul>',
|
5177 |
-
'ol' => '<ol>',
|
5178 |
-
'dl' => '<dl>',
|
5179 |
-
),
|
5180 |
-
'allow_null' => 0,
|
5181 |
-
'other_choice' => 0,
|
5182 |
-
'default_value' => 'div',
|
5183 |
-
'layout' => 'vertical',
|
5184 |
-
'return_format' => 'value',
|
5185 |
-
'save_other_choice' => 0,
|
5186 |
),
|
5187 |
array(
|
5188 |
-
'key' => '
|
5189 |
-
'label' => '
|
5190 |
-
'name' => '
|
5191 |
-
'type' => '
|
5192 |
-
'
|
5193 |
-
|
5194 |
'required' => 0,
|
5195 |
'conditional_logic' => 0,
|
5196 |
'wrapper' => array(
|
@@ -5199,24 +5148,14 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5199 |
'id' => '',
|
5200 |
),
|
5201 |
'acfe_permissions' => '',
|
5202 |
-
'choices' => array(
|
5203 |
-
'top' => 'Top',
|
5204 |
-
'left' => 'Left',
|
5205 |
-
),
|
5206 |
-
'allow_null' => 0,
|
5207 |
-
'other_choice' => 0,
|
5208 |
-
'default_value' => 'top',
|
5209 |
-
'layout' => 'vertical',
|
5210 |
-
'return_format' => 'value',
|
5211 |
-
'save_other_choice' => 0,
|
5212 |
),
|
5213 |
array(
|
5214 |
-
'key' => '
|
5215 |
-
'label' => '
|
5216 |
-
'name' => '
|
5217 |
-
'type' => '
|
5218 |
-
'
|
5219 |
-
|
5220 |
'required' => 0,
|
5221 |
'conditional_logic' => 0,
|
5222 |
'wrapper' => array(
|
@@ -5225,16 +5164,6 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5225 |
'id' => '',
|
5226 |
),
|
5227 |
'acfe_permissions' => '',
|
5228 |
-
'choices' => array(
|
5229 |
-
'label' => 'Label',
|
5230 |
-
'field' => 'Field',
|
5231 |
-
),
|
5232 |
-
'allow_null' => 0,
|
5233 |
-
'other_choice' => 0,
|
5234 |
-
'default_value' => 'label',
|
5235 |
-
'layout' => 'vertical',
|
5236 |
-
'return_format' => 'value',
|
5237 |
-
'save_other_choice' => 0,
|
5238 |
),
|
5239 |
|
5240 |
/*
|
@@ -5319,12 +5248,12 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5319 |
),
|
5320 |
),
|
5321 |
array(
|
5322 |
-
'key' => '
|
5323 |
-
'label' => '
|
5324 |
-
'name' => '
|
5325 |
'type' => 'acfe_dynamic_message',
|
5326 |
-
'value' =>
|
5327 |
-
'instructions' => 'Retrieve
|
5328 |
'required' => 0,
|
5329 |
'conditional_logic' => 0,
|
5330 |
'wrapper' => array(
|
@@ -5334,12 +5263,12 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5334 |
),
|
5335 |
),
|
5336 |
array(
|
5337 |
-
'key' => '
|
5338 |
-
'label' => '
|
5339 |
-
'name' => '
|
5340 |
'type' => 'acfe_dynamic_message',
|
5341 |
-
'value' => '',
|
5342 |
-
'instructions' => 'Retrieve
|
5343 |
'required' => 0,
|
5344 |
'conditional_logic' => 0,
|
5345 |
'wrapper' => array(
|
@@ -5441,7 +5370,6 @@ If used, you have to include the following code <code>%s</code> to print the act
|
|
5441 |
'hide_on_screen' => '',
|
5442 |
'active' => true,
|
5443 |
'description' => '',
|
5444 |
-
'acfe_display_title' => '',
|
5445 |
'acfe_permissions' => '',
|
5446 |
'acfe_form' => 0,
|
5447 |
'acfe_meta' => '',
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
+
|
7 |
acf_add_local_field_group(array(
|
8 |
'key' => 'group_acfe_dynamic_form',
|
9 |
'title' => 'Dynamic Form',
|
10 |
+
'acfe_display_title' => '',
|
11 |
'fields' => array(
|
12 |
|
13 |
/*
|
14 |
+
* Actions
|
15 |
*/
|
16 |
array(
|
17 |
'key' => 'field_acfe_form_tab_general',
|
56 |
'name' => 'acfe_form_field_groups',
|
57 |
'type' => 'select',
|
58 |
'instructions' => 'Render & map fields of the following field groups',
|
59 |
+
'required' => 0,
|
60 |
'conditional_logic' => 0,
|
61 |
'wrapper' => array(
|
62 |
'width' => '',
|
76 |
'placeholder' => '',
|
77 |
),
|
78 |
array(
|
79 |
+
'key' => 'field_acfe_form_actions',
|
80 |
+
'label' => 'Actions',
|
81 |
+
'name' => 'acfe_form_actions',
|
82 |
+
'type' => 'flexible_content',
|
83 |
+
'instructions' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
'required' => 0,
|
85 |
'conditional_logic' => 0,
|
86 |
'wrapper' => array(
|
89 |
'id' => '',
|
90 |
),
|
91 |
'acfe_permissions' => '',
|
92 |
+
'acfe_flexible_stylised_button' => 1,
|
93 |
+
'acfe_flexible_layouts_thumbnails' => 0,
|
94 |
+
'acfe_flexible_layouts_templates' => 0,
|
95 |
+
'acfe_flexible_layouts_placeholder' => 0,
|
96 |
+
'acfe_flexible_close_button' => 0,
|
97 |
+
'acfe_flexible_title_edition' => 0,
|
98 |
+
'acfe_flexible_copy_paste' => 0,
|
99 |
+
'acfe_flexible_modal_edition' => 0,
|
100 |
+
'acfe_flexible_modal' => array(
|
101 |
+
'acfe_flexible_modal_enabled' => '0',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
),
|
103 |
+
'acfe_flexible_layouts_state' => '',
|
104 |
+
'acfe_flexible_layouts_remove_collapse' => 0,
|
105 |
+
'layouts' => array(
|
106 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
/*
|
108 |
+
* Layout: Custom
|
109 |
+
*/
|
110 |
+
'layout_custom' => array(
|
111 |
+
'key' => 'layout_custom',
|
112 |
+
'name' => 'custom',
|
113 |
+
'label' => 'Custom action',
|
114 |
+
'display' => 'row',
|
115 |
+
'sub_fields' => array(
|
116 |
+
|
117 |
+
/*
|
118 |
+
* Layout: Custom Action
|
119 |
+
*/
|
120 |
+
array(
|
121 |
+
'key' => 'field_acfe_form_custom_action_tab_action',
|
122 |
+
'label' => 'Action',
|
123 |
+
'name' => '',
|
124 |
+
'type' => 'tab',
|
125 |
+
'instructions' => '',
|
126 |
+
'required' => 0,
|
127 |
+
'conditional_logic' => 0,
|
128 |
+
'wrapper' => array(
|
129 |
+
'width' => '',
|
130 |
+
'class' => '',
|
131 |
+
'id' => '',
|
132 |
+
),
|
133 |
+
'acfe_permissions' => '',
|
134 |
+
'placement' => 'top',
|
135 |
+
'endpoint' => 0,
|
136 |
+
),
|
137 |
+
array(
|
138 |
+
'key' => 'field_acfe_form_custom_action',
|
139 |
+
'label' => 'Action name',
|
140 |
+
'name' => 'acfe_form_custom_action',
|
141 |
+
'type' => 'acfe_slug',
|
142 |
+
'instructions' => 'Set a unique action slug',
|
143 |
+
'required' => 1,
|
144 |
+
'conditional_logic' => 0,
|
145 |
+
'wrapper' => array(
|
146 |
+
'width' => '',
|
147 |
+
'class' => '',
|
148 |
+
'id' => '',
|
149 |
+
),
|
150 |
+
'acfe_permissions' => '',
|
151 |
+
'default_value' => '',
|
152 |
+
'placeholder' => 'my-custom-action',
|
153 |
+
'prepend' => '',
|
154 |
+
'append' => '',
|
155 |
+
'maxlength' => '',
|
156 |
+
),
|
157 |
+
|
158 |
+
/*
|
159 |
+
* Layout: Custom Advanced
|
160 |
+
*/
|
161 |
+
array(
|
162 |
+
'key' => 'field_acfe_form_custom_action_tab_advanced',
|
163 |
+
'label' => 'Code',
|
164 |
+
'name' => '',
|
165 |
+
'type' => 'tab',
|
166 |
+
'instructions' => '',
|
167 |
+
'required' => 0,
|
168 |
+
'conditional_logic' => 0,
|
169 |
+
'wrapper' => array(
|
170 |
+
'width' => '',
|
171 |
+
'class' => '',
|
172 |
+
'id' => '',
|
173 |
+
),
|
174 |
+
'acfe_permissions' => '',
|
175 |
+
'placement' => 'top',
|
176 |
+
'endpoint' => 0,
|
177 |
+
),
|
178 |
+
array(
|
179 |
+
'key' => 'field_acfe_form_custom_action_advanced_load',
|
180 |
+
'label' => 'Change form settings before rendering',
|
181 |
+
'name' => 'acfe_form_custom_action_advanced_load',
|
182 |
+
'type' => 'acfe_dynamic_message',
|
183 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
184 |
+
'instructions' => '',
|
185 |
+
'required' => 0,
|
186 |
+
'conditional_logic' => 0,
|
187 |
+
'wrapper' => array(
|
188 |
+
'width' => '',
|
189 |
+
'class' => '',
|
190 |
+
'id' => '',
|
191 |
+
),
|
192 |
+
'acfe_permissions' => '',
|
193 |
+
),
|
194 |
+
array(
|
195 |
+
'key' => 'field_acfe_form_custom_action_advanced_validation',
|
196 |
+
'label' => 'Add custom validation on submission',
|
197 |
+
'name' => 'acfe_form_custom_action_advanced_validation',
|
198 |
+
'type' => 'acfe_dynamic_message',
|
199 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
200 |
+
'instructions' => '',
|
201 |
+
'required' => 0,
|
202 |
+
'conditional_logic' => 0,
|
203 |
+
'wrapper' => array(
|
204 |
+
'width' => '',
|
205 |
+
'class' => '',
|
206 |
+
'id' => '',
|
207 |
+
),
|
208 |
+
'acfe_permissions' => '',
|
209 |
+
),
|
210 |
+
array(
|
211 |
+
'key' => 'field_acfe_form_custom_action_advanced_submit',
|
212 |
+
'label' => 'Add custom action on submission',
|
213 |
+
'name' => 'acfe_form_custom_action_advanced_submit',
|
214 |
+
'type' => 'acfe_dynamic_message',
|
215 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
216 |
+
'instructions' => '',
|
217 |
+
'required' => 0,
|
218 |
+
'conditional_logic' => 0,
|
219 |
+
'wrapper' => array(
|
220 |
+
'width' => '',
|
221 |
+
'class' => '',
|
222 |
+
'id' => '',
|
223 |
+
),
|
224 |
+
'acfe_permissions' => '',
|
225 |
+
),
|
226 |
),
|
227 |
+
'min' => '',
|
228 |
+
'max' => '',
|
|
|
|
|
|
|
|
|
229 |
),
|
230 |
+
|
231 |
+
/*
|
232 |
+
* Layout: Email
|
233 |
+
*/
|
234 |
+
'layout_email' => array(
|
235 |
+
'key' => 'layout_email',
|
236 |
+
'name' => 'email',
|
237 |
+
'label' => 'Email action',
|
238 |
+
'display' => 'row',
|
239 |
+
'sub_fields' => array(
|
240 |
+
|
241 |
+
/*
|
242 |
+
* Layout: Email Action
|
243 |
+
*/
|
244 |
+
array(
|
245 |
+
'key' => 'field_acfe_form_email_tab_action',
|
246 |
+
'label' => 'Action',
|
247 |
+
'name' => '',
|
248 |
+
'type' => 'tab',
|
249 |
+
'instructions' => '',
|
250 |
+
'required' => 0,
|
251 |
+
'conditional_logic' => 0,
|
252 |
+
'wrapper' => array(
|
253 |
+
'width' => '',
|
254 |
+
'class' => '',
|
255 |
+
'id' => '',
|
256 |
+
),
|
257 |
+
'acfe_permissions' => '',
|
258 |
+
'placement' => 'top',
|
259 |
+
'endpoint' => 0,
|
260 |
+
),
|
261 |
+
array(
|
262 |
+
'key' => 'field_acfe_form_email_custom_alias',
|
263 |
+
'label' => 'Action name',
|
264 |
+
'name' => 'acfe_form_custom_alias',
|
265 |
+
'type' => 'acfe_slug',
|
266 |
+
'instructions' => '(Optional) Target this action using hooks & allow custom <code>{query_var:my-action}</code> name.',
|
267 |
+
'required' => 0,
|
268 |
+
'conditional_logic' => 0,
|
269 |
+
'wrapper' => array(
|
270 |
+
'width' => '',
|
271 |
+
'class' => '',
|
272 |
+
'id' => '',
|
273 |
+
),
|
274 |
+
'acfe_permissions' => '',
|
275 |
+
'default_value' => '',
|
276 |
+
'placeholder' => 'Email',
|
277 |
+
'prepend' => '',
|
278 |
+
'append' => '',
|
279 |
+
'maxlength' => '',
|
280 |
+
),
|
281 |
+
|
282 |
+
/*
|
283 |
+
* Layout: Email Send
|
284 |
+
*/
|
285 |
+
array(
|
286 |
+
'key' => 'field_acfe_form_email_tab_email',
|
287 |
+
'label' => 'Email',
|
288 |
+
'name' => '',
|
289 |
+
'type' => 'tab',
|
290 |
+
'instructions' => '',
|
291 |
+
'required' => 0,
|
292 |
+
'conditional_logic' => 0,
|
293 |
+
'wrapper' => array(
|
294 |
+
'width' => '',
|
295 |
+
'class' => '',
|
296 |
+
'id' => '',
|
297 |
+
),
|
298 |
+
'acfe_permissions' => '',
|
299 |
+
'placement' => 'top',
|
300 |
+
'endpoint' => 0,
|
301 |
+
),
|
302 |
+
array(
|
303 |
+
'key' => 'field_acfe_form_email_from',
|
304 |
+
'label' => 'From',
|
305 |
+
'name' => 'acfe_form_email_from',
|
306 |
+
'type' => 'text',
|
307 |
+
'instructions' => '',
|
308 |
+
'required' => 0,
|
309 |
+
'conditional_logic' => 0,
|
310 |
+
'wrapper' => array(
|
311 |
+
'width' => '',
|
312 |
+
'class' => '',
|
313 |
+
'id' => '',
|
314 |
+
),
|
315 |
+
'acfe_permissions' => '',
|
316 |
+
'default_value' => '',
|
317 |
+
'placeholder' => 'Name <email@domain.com>',
|
318 |
+
'prepend' => '',
|
319 |
+
'append' => '',
|
320 |
+
'maxlength' => '',
|
321 |
+
),
|
322 |
+
array(
|
323 |
+
'key' => 'field_acfe_form_email_to',
|
324 |
+
'label' => 'To',
|
325 |
+
'name' => 'acfe_form_email_to',
|
326 |
+
'type' => 'text',
|
327 |
+
'instructions' => '',
|
328 |
+
'required' => 0,
|
329 |
+
'conditional_logic' => 0,
|
330 |
+
'wrapper' => array(
|
331 |
+
'width' => '',
|
332 |
+
'class' => '',
|
333 |
+
'id' => '',
|
334 |
+
),
|
335 |
+
'acfe_permissions' => '',
|
336 |
+
'default_value' => '',
|
337 |
+
'placeholder' => 'email@domain.com',
|
338 |
+
'prepend' => '',
|
339 |
+
'append' => '',
|
340 |
+
),
|
341 |
+
array(
|
342 |
+
'key' => 'field_acfe_form_email_reply_to',
|
343 |
+
'label' => 'Reply to',
|
344 |
+
'name' => 'acfe_form_email_reply_to',
|
345 |
+
'type' => 'text',
|
346 |
+
'instructions' => '',
|
347 |
+
'required' => 0,
|
348 |
+
'conditional_logic' => 0,
|
349 |
+
'wrapper' => array(
|
350 |
+
'width' => '',
|
351 |
+
'class' => '',
|
352 |
+
'id' => '',
|
353 |
+
),
|
354 |
+
'acfe_permissions' => '',
|
355 |
+
'default_value' => '',
|
356 |
+
'placeholder' => 'Name <email@domain.com>',
|
357 |
+
'prepend' => '',
|
358 |
+
'append' => '',
|
359 |
+
'maxlength' => '',
|
360 |
+
),
|
361 |
+
array(
|
362 |
+
'key' => 'field_acfe_form_email_cc',
|
363 |
+
'label' => 'Cc',
|
364 |
+
'name' => 'acfe_form_email_cc',
|
365 |
+
'type' => 'text',
|
366 |
+
'instructions' => '',
|
367 |
+
'required' => 0,
|
368 |
+
'conditional_logic' => 0,
|
369 |
+
'wrapper' => array(
|
370 |
+
'width' => '',
|
371 |
+
'class' => '',
|
372 |
+
'id' => '',
|
373 |
+
),
|
374 |
+
'acfe_permissions' => '',
|
375 |
+
'default_value' => '',
|
376 |
+
'placeholder' => 'email@domain.com',
|
377 |
+
'prepend' => '',
|
378 |
+
'append' => '',
|
379 |
+
'maxlength' => '',
|
380 |
+
),
|
381 |
+
array(
|
382 |
+
'key' => 'field_acfe_form_email_bcc',
|
383 |
+
'label' => 'Bcc',
|
384 |
+
'name' => 'acfe_form_email_bcc',
|
385 |
+
'type' => 'text',
|
386 |
+
'instructions' => '',
|
387 |
+
'required' => 0,
|
388 |
+
'conditional_logic' => 0,
|
389 |
+
'wrapper' => array(
|
390 |
+
'width' => '',
|
391 |
+
'class' => '',
|
392 |
+
'id' => '',
|
393 |
+
),
|
394 |
+
'acfe_permissions' => '',
|
395 |
+
'default_value' => '',
|
396 |
+
'placeholder' => 'email@domain.com',
|
397 |
+
'prepend' => '',
|
398 |
+
'append' => '',
|
399 |
+
'maxlength' => '',
|
400 |
+
),
|
401 |
+
array(
|
402 |
+
'key' => 'field_acfe_form_email_subject',
|
403 |
+
'label' => 'Subject',
|
404 |
+
'name' => 'acfe_form_email_subject',
|
405 |
+
'type' => 'text',
|
406 |
+
'instructions' => '',
|
407 |
+
'required' => 0,
|
408 |
+
'conditional_logic' => 0,
|
409 |
+
'wrapper' => array(
|
410 |
+
'width' => '',
|
411 |
+
'class' => '',
|
412 |
+
'id' => '',
|
413 |
+
),
|
414 |
+
'acfe_permissions' => '',
|
415 |
+
'default_value' => '',
|
416 |
+
'placeholder' => '',
|
417 |
+
'prepend' => '',
|
418 |
+
'append' => '',
|
419 |
+
'maxlength' => '',
|
420 |
+
),
|
421 |
+
array(
|
422 |
+
'key' => 'field_acfe_form_email_content',
|
423 |
+
'label' => 'Content',
|
424 |
+
'name' => 'acfe_form_email_content',
|
425 |
+
'type' => 'wysiwyg',
|
426 |
+
'instructions' => 'Fields values may be included using <code>{field:field_key}</code> <code>{field:title}</code>. All fields may be included using <code>{fields}</code>.<br />See "Cheatsheet" tab for advanced usage.',
|
427 |
+
'required' => 0,
|
428 |
+
'conditional_logic' => 0,
|
429 |
+
'wrapper' => array(
|
430 |
+
'width' => '',
|
431 |
+
'class' => '',
|
432 |
+
'id' => '',
|
433 |
+
),
|
434 |
+
'acfe_permissions' => '',
|
435 |
+
'default_value' => '',
|
436 |
+
'tabs' => 'all',
|
437 |
+
'toolbar' => 'full',
|
438 |
+
'media_upload' => 1,
|
439 |
+
'delay' => 0,
|
440 |
+
),
|
441 |
+
|
442 |
+
/*
|
443 |
+
* Layout: Email Attachments
|
444 |
+
*/
|
445 |
+
array(
|
446 |
+
'key' => 'field_acfe_form_email_tab_attachments',
|
447 |
+
'label' => 'Attachments',
|
448 |
+
'name' => '',
|
449 |
+
'type' => 'tab',
|
450 |
+
'instructions' => '',
|
451 |
+
'required' => 0,
|
452 |
+
'conditional_logic' => 0,
|
453 |
+
'wrapper' => array(
|
454 |
+
'width' => '',
|
455 |
+
'class' => '',
|
456 |
+
'id' => '',
|
457 |
+
),
|
458 |
+
'acfe_permissions' => '',
|
459 |
+
'placement' => 'top',
|
460 |
+
'endpoint' => 0,
|
461 |
+
),
|
462 |
+
array(
|
463 |
+
'key' => 'field_acfe_form_email_files',
|
464 |
+
'label' => 'Dynamic files',
|
465 |
+
'name' => 'acfe_form_email_files',
|
466 |
+
'type' => 'repeater',
|
467 |
+
'instructions' => '',
|
468 |
+
'required' => 0,
|
469 |
+
'conditional_logic' => 0,
|
470 |
+
'wrapper' => array(
|
471 |
+
'width' => '',
|
472 |
+
'class' => '',
|
473 |
+
'id' => '',
|
474 |
+
),
|
475 |
+
'acfe_permissions' => '',
|
476 |
+
'acfe_repeater_stylised_button' => 0,
|
477 |
+
'collapsed' => '',
|
478 |
+
'min' => 0,
|
479 |
+
'max' => 0,
|
480 |
+
'layout' => 'table',
|
481 |
+
'button_label' => 'Add file',
|
482 |
+
'sub_fields' => array(
|
483 |
+
array(
|
484 |
+
'key' => 'field_acfe_form_email_file',
|
485 |
+
'label' => 'File',
|
486 |
+
'name' => 'acfe_form_email_file',
|
487 |
+
'type' => 'select',
|
488 |
+
'instructions' => '',
|
489 |
+
'required' => 0,
|
490 |
+
'conditional_logic' => 0,
|
491 |
+
'wrapper' => array(
|
492 |
+
'width' => '',
|
493 |
+
'class' => '',
|
494 |
+
'id' => '',
|
495 |
+
),
|
496 |
+
'acfe_permissions' => '',
|
497 |
+
'choices' => array(
|
498 |
+
),
|
499 |
+
'default_value' => array(
|
500 |
+
),
|
501 |
+
'allow_null' => 0,
|
502 |
+
'multiple' => 0,
|
503 |
+
'ui' => 1,
|
504 |
+
'return_format' => 'value',
|
505 |
+
'ajax' => 0,
|
506 |
+
'placeholder' => '',
|
507 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
508 |
+
'allow_custom' => 1,
|
509 |
+
),
|
510 |
+
array(
|
511 |
+
'key' => 'field_acfe_form_email_file_delete',
|
512 |
+
'label' => 'Delete file',
|
513 |
+
'name' => 'acfe_form_email_file_delete',
|
514 |
+
'type' => 'true_false',
|
515 |
+
'instructions' => '',
|
516 |
+
'required' => 0,
|
517 |
+
'wrapper' => array(
|
518 |
+
'width' => '',
|
519 |
+
'class' => '',
|
520 |
+
'id' => '',
|
521 |
+
),
|
522 |
+
'acfe_permissions' => '',
|
523 |
+
'message' => 'Delete once submitted',
|
524 |
+
'default_value' => 0,
|
525 |
+
'ui' => 1,
|
526 |
+
'ui_on_text' => '',
|
527 |
+
'ui_off_text' => '',
|
528 |
+
),
|
529 |
+
),
|
530 |
+
),
|
531 |
+
array(
|
532 |
+
'key' => 'field_acfe_form_email_files_static',
|
533 |
+
'label' => 'Static files',
|
534 |
+
'name' => 'acfe_form_email_files_static',
|
535 |
+
'type' => 'repeater',
|
536 |
+
'instructions' => '',
|
537 |
+
'required' => 0,
|
538 |
+
'conditional_logic' => 0,
|
539 |
+
'wrapper' => array(
|
540 |
+
'width' => '',
|
541 |
+
'class' => '',
|
542 |
+
'id' => '',
|
543 |
+
),
|
544 |
+
'acfe_permissions' => '',
|
545 |
+
'acfe_repeater_stylised_button' => 0,
|
546 |
+
'collapsed' => '',
|
547 |
+
'min' => 0,
|
548 |
+
'max' => 0,
|
549 |
+
'layout' => 'table',
|
550 |
+
'button_label' => 'Add file',
|
551 |
+
'sub_fields' => array(
|
552 |
+
array(
|
553 |
+
'key' => 'field_acfe_form_email_file_static',
|
554 |
+
'label' => 'File',
|
555 |
+
'name' => 'acfe_form_email_file_static',
|
556 |
+
'type' => 'file',
|
557 |
+
'instructions' => '',
|
558 |
+
'required' => 0,
|
559 |
+
'conditional_logic' => 0,
|
560 |
+
'wrapper' => array(
|
561 |
+
'width' => '',
|
562 |
+
'class' => '',
|
563 |
+
'id' => '',
|
564 |
+
),
|
565 |
+
'acfe_permissions' => '',
|
566 |
+
'return_format' => 'id',
|
567 |
+
),
|
568 |
+
),
|
569 |
+
),
|
570 |
+
|
571 |
+
/*
|
572 |
+
* Layout: Email Advanced
|
573 |
+
*/
|
574 |
+
array(
|
575 |
+
'key' => 'field_acfe_form_email_tab_advanced',
|
576 |
+
'label' => 'Code',
|
577 |
+
'name' => '',
|
578 |
+
'type' => 'tab',
|
579 |
+
'instructions' => '',
|
580 |
+
'required' => 0,
|
581 |
+
'conditional_logic' => 0,
|
582 |
+
'wrapper' => array(
|
583 |
+
'width' => '',
|
584 |
+
'class' => '',
|
585 |
+
'id' => '',
|
586 |
+
),
|
587 |
+
'acfe_permissions' => '',
|
588 |
+
'placement' => 'top',
|
589 |
+
'endpoint' => 0,
|
590 |
+
),
|
591 |
+
array(
|
592 |
+
'key' => 'field_acfe_form_email_advanced_args',
|
593 |
+
'label' => 'Change email arguments',
|
594 |
+
'name' => 'acfe_form_email_advanced_args',
|
595 |
+
'type' => 'acfe_dynamic_message',
|
596 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
597 |
+
'instructions' => 'Alter the <code>wp_mail()</code> arguments before it is sent',
|
598 |
+
'required' => 0,
|
599 |
+
'conditional_logic' => 0,
|
600 |
+
'wrapper' => array(
|
601 |
+
'width' => '',
|
602 |
+
'class' => '',
|
603 |
+
'id' => '',
|
604 |
+
),
|
605 |
+
'acfe_permissions' => '',
|
606 |
+
),
|
607 |
+
array(
|
608 |
+
'key' => 'field_acfe_form_email_advanced_send',
|
609 |
+
'label' => 'Add custom action when e-mail is sent',
|
610 |
+
'name' => 'form_email_advanced_send',
|
611 |
+
'type' => 'acfe_dynamic_message',
|
612 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
613 |
+
'instructions' => 'This action allows you to hook in after the e-mail has been sent',
|
614 |
+
'required' => 0,
|
615 |
+
'conditional_logic' => 0,
|
616 |
+
'wrapper' => array(
|
617 |
+
'width' => '',
|
618 |
+
'class' => '',
|
619 |
+
'id' => '',
|
620 |
+
),
|
621 |
+
'acfe_permissions' => '',
|
622 |
+
),
|
623 |
),
|
624 |
+
'min' => '',
|
625 |
+
'max' => '',
|
626 |
),
|
627 |
+
|
628 |
+
/*
|
629 |
+
* Layout: Post
|
630 |
+
*/
|
631 |
+
'layout_post' => array(
|
632 |
+
'key' => 'layout_post',
|
633 |
+
'name' => 'post',
|
634 |
+
'label' => 'Post action',
|
635 |
+
'display' => 'row',
|
636 |
+
'sub_fields' => array(
|
637 |
+
|
638 |
+
/*
|
639 |
+
* Layout: Post Action
|
640 |
+
*/
|
641 |
+
array(
|
642 |
+
'key' => 'field_acfe_form_post_tab_action',
|
643 |
+
'label' => 'Action',
|
644 |
+
'name' => '',
|
645 |
+
'type' => 'tab',
|
646 |
+
'instructions' => '',
|
647 |
+
'required' => 0,
|
648 |
+
'conditional_logic' => 0,
|
649 |
+
'wrapper' => array(
|
650 |
+
'width' => '',
|
651 |
+
'class' => '',
|
652 |
+
'id' => '',
|
653 |
+
),
|
654 |
+
'acfe_permissions' => '',
|
655 |
+
'placement' => 'top',
|
656 |
+
'endpoint' => 0,
|
657 |
+
),
|
658 |
+
array(
|
659 |
+
'key' => 'field_acfe_form_post_action',
|
660 |
+
'label' => 'Action',
|
661 |
+
'name' => 'acfe_form_post_action',
|
662 |
+
'type' => 'radio',
|
663 |
+
'instructions' => '',
|
664 |
+
'required' => 0,
|
665 |
+
'conditional_logic' => 0,
|
666 |
+
'wrapper' => array(
|
667 |
+
'width' => '',
|
668 |
+
'class' => '',
|
669 |
+
'id' => '',
|
670 |
+
),
|
671 |
+
'acfe_permissions' => '',
|
672 |
+
'choices' => array(
|
673 |
+
'insert_post' => 'Create post',
|
674 |
+
'update_post' => 'Update post',
|
675 |
+
),
|
676 |
+
'default_value' => 'insert_post',
|
677 |
+
),
|
678 |
+
array(
|
679 |
+
'key' => 'field_acfe_form_post_custom_alias',
|
680 |
+
'label' => 'Action name',
|
681 |
+
'name' => 'acfe_form_custom_alias',
|
682 |
+
'type' => 'acfe_slug',
|
683 |
+
'instructions' => '(Optional) Target this action using hooks & allow custom <code>{query_var:my-action}</code> name.',
|
684 |
+
'required' => 0,
|
685 |
+
'conditional_logic' => 0,
|
686 |
+
'wrapper' => array(
|
687 |
+
'width' => '',
|
688 |
+
'class' => '',
|
689 |
+
'id' => '',
|
690 |
+
),
|
691 |
+
'acfe_permissions' => '',
|
692 |
+
'default_value' => '',
|
693 |
+
'placeholder' => 'Post',
|
694 |
+
'prepend' => '',
|
695 |
+
'append' => '',
|
696 |
+
'maxlength' => '',
|
697 |
+
),
|
698 |
+
|
699 |
+
/*
|
700 |
+
* Layout: Post Save
|
701 |
+
*/
|
702 |
+
array(
|
703 |
+
'key' => 'field_acfe_form_post_tab_save',
|
704 |
+
'label' => 'Save',
|
705 |
+
'name' => '',
|
706 |
+
'type' => 'tab',
|
707 |
+
'instructions' => '',
|
708 |
+
'required' => 0,
|
709 |
+
'conditional_logic' => 0,
|
710 |
+
'wrapper' => array(
|
711 |
+
'width' => '',
|
712 |
+
'class' => '',
|
713 |
+
'id' => '',
|
714 |
+
),
|
715 |
+
'acfe_permissions' => '',
|
716 |
+
'placement' => 'top',
|
717 |
+
'endpoint' => 0,
|
718 |
+
),
|
719 |
+
array(
|
720 |
+
'key' => 'field_acfe_form_post_save_target',
|
721 |
+
'label' => 'Target',
|
722 |
+
'name' => 'acfe_form_post_save_target',
|
723 |
+
'type' => 'select',
|
724 |
+
'instructions' => '',
|
725 |
+
'required' => 0,
|
726 |
+
'conditional_logic' => array(
|
727 |
+
array(
|
728 |
+
array(
|
729 |
+
'field' => 'field_acfe_form_post_action',
|
730 |
+
'operator' => '==',
|
731 |
+
'value' => 'update_post',
|
732 |
+
),
|
733 |
+
),
|
734 |
+
),
|
735 |
+
'wrapper' => array(
|
736 |
+
'width' => '',
|
737 |
+
'class' => '',
|
738 |
+
'id' => '',
|
739 |
+
),
|
740 |
+
'acfe_permissions' => '',
|
741 |
+
'choices' => array(
|
742 |
+
),
|
743 |
+
'default_value' => 'current_post',
|
744 |
+
'allow_null' => 0,
|
745 |
+
'multiple' => 0,
|
746 |
+
'ui' => 1,
|
747 |
+
'ajax' => 0,
|
748 |
+
'return_format' => 'value',
|
749 |
+
'placeholder' => '',
|
750 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
751 |
+
'allow_custom' => 1,
|
752 |
+
),
|
753 |
+
array(
|
754 |
+
'key' => 'field_acfe_form_post_save_post_type',
|
755 |
+
'label' => 'Post type',
|
756 |
+
'name' => 'acfe_form_post_save_post_type',
|
757 |
+
'type' => 'acfe_post_types',
|
758 |
+
'instructions' => '',
|
759 |
+
'required' => 0,
|
760 |
+
'conditional_logic' => array(
|
761 |
+
array(
|
762 |
+
array(
|
763 |
+
'field' => 'field_acfe_form_post_map_post_type',
|
764 |
+
'operator' => '==empty',
|
765 |
+
),
|
766 |
+
),
|
767 |
+
),
|
768 |
+
'wrapper' => array(
|
769 |
+
'width' => '',
|
770 |
+
'class' => '',
|
771 |
+
'id' => '',
|
772 |
+
),
|
773 |
+
'acfe_permissions' => '',
|
774 |
+
'post_type' => '',
|
775 |
+
'field_type' => 'select',
|
776 |
+
'default_value' => '',
|
777 |
+
'return_format' => 'name',
|
778 |
+
'allow_null' => 1,
|
779 |
+
'placeholder' => 'Default',
|
780 |
+
'multiple' => 0,
|
781 |
+
'ui' => 1,
|
782 |
+
'choices' => array(
|
783 |
+
),
|
784 |
+
'ajax' => 0,
|
785 |
+
'layout' => '',
|
786 |
+
'toggle' => 0,
|
787 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
788 |
+
'allow_custom' => 1,
|
789 |
+
),
|
790 |
+
array(
|
791 |
+
'key' => 'field_acfe_form_post_map_post_type_message',
|
792 |
+
'label' => 'Post type',
|
793 |
+
'name' => 'acfe_form_post_map_post_type_message',
|
794 |
+
'type' => 'acfe_dynamic_message',
|
795 |
+
'instructions' => '',
|
796 |
+
'required' => 0,
|
797 |
+
'conditional_logic' => array(
|
798 |
+
array(
|
799 |
+
array(
|
800 |
+
'field' => 'field_acfe_form_post_map_post_type',
|
801 |
+
'operator' => '!=empty',
|
802 |
+
),
|
803 |
+
),
|
804 |
+
),
|
805 |
+
'wrapper' => array(
|
806 |
+
'width' => '',
|
807 |
+
'class' => '',
|
808 |
+
'id' => '',
|
809 |
+
),
|
810 |
+
'acfe_permissions' => '',
|
811 |
+
),
|
812 |
+
array(
|
813 |
+
'key' => 'field_acfe_form_post_save_post_status',
|
814 |
+
'label' => 'Post status',
|
815 |
+
'name' => 'acfe_form_post_save_post_status',
|
816 |
+
'type' => 'acfe_post_statuses',
|
817 |
+
'instructions' => '',
|
818 |
+
'required' => 0,
|
819 |
+
'conditional_logic' => array(
|
820 |
+
array(
|
821 |
+
array(
|
822 |
+
'field' => 'field_acfe_form_post_map_post_status',
|
823 |
+
'operator' => '==empty',
|
824 |
+
),
|
825 |
+
),
|
826 |
+
),
|
827 |
+
'wrapper' => array(
|
828 |
+
'width' => '',
|
829 |
+
'class' => '',
|
830 |
+
'id' => '',
|
831 |
+
),
|
832 |
+
'acfe_permissions' => '',
|
833 |
+
'post_status' => '',
|
834 |
+
'field_type' => 'select',
|
835 |
+
'default_value' => '',
|
836 |
+
'return_format' => 'name',
|
837 |
+
'allow_null' => 1,
|
838 |
+
'placeholder' => 'Default',
|
839 |
+
'multiple' => 0,
|
840 |
+
'ui' => 1,
|
841 |
+
'choices' => array(
|
842 |
+
),
|
843 |
+
'ajax' => 0,
|
844 |
+
'layout' => '',
|
845 |
+
'toggle' => 0,
|
846 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
847 |
+
'allow_custom' => 1,
|
848 |
+
),
|
849 |
+
array(
|
850 |
+
'key' => 'field_acfe_form_post_map_post_status_message',
|
851 |
+
'label' => 'Post status',
|
852 |
+
'name' => 'acfe_form_post_map_post_status_message',
|
853 |
+
'type' => 'acfe_dynamic_message',
|
854 |
+
'instructions' => '',
|
855 |
+
'required' => 0,
|
856 |
+
'conditional_logic' => array(
|
857 |
+
array(
|
858 |
+
array(
|
859 |
+
'field' => 'field_acfe_form_post_map_post_status',
|
860 |
+
'operator' => '!=empty',
|
861 |
+
),
|
862 |
+
),
|
863 |
+
),
|
864 |
+
'wrapper' => array(
|
865 |
+
'width' => '',
|
866 |
+
'class' => '',
|
867 |
+
'id' => '',
|
868 |
+
),
|
869 |
+
'acfe_permissions' => '',
|
870 |
+
),
|
871 |
+
|
872 |
+
array(
|
873 |
+
'key' => 'field_acfe_form_post_save_post_title',
|
874 |
+
'label' => 'Post title',
|
875 |
+
'name' => 'acfe_form_post_save_post_title',
|
876 |
+
'type' => 'select',
|
877 |
+
'instructions' => '',
|
878 |
+
'required' => 0,
|
879 |
+
'wrapper' => array(
|
880 |
+
'width' => '',
|
881 |
+
'class' => '',
|
882 |
+
'id' => '',
|
883 |
+
),
|
884 |
+
'acfe_permissions' => '',
|
885 |
+
'choices' => array(
|
886 |
+
'generated_id' => 'Generated ID',
|
887 |
+
),
|
888 |
+
'default_value' => array(
|
889 |
+
),
|
890 |
+
'allow_null' => 1,
|
891 |
+
'multiple' => 0,
|
892 |
+
'ui' => 1,
|
893 |
+
'return_format' => 'value',
|
894 |
+
'placeholder' => 'Default',
|
895 |
+
'ajax' => 0,
|
896 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
897 |
+
'allow_custom' => 1,
|
898 |
+
'conditional_logic' => array(
|
899 |
+
array(
|
900 |
+
array(
|
901 |
+
'field' => 'field_acfe_form_post_map_post_title',
|
902 |
+
'operator' => '==empty',
|
903 |
+
),
|
904 |
+
),
|
905 |
+
),
|
906 |
+
),
|
907 |
+
|
908 |
+
array(
|
909 |
+
'key' => 'field_acfe_form_post_map_post_title_message',
|
910 |
+
'label' => 'Post title',
|
911 |
+
'name' => 'acfe_form_post_map_post_title_message',
|
912 |
+
'type' => 'acfe_dynamic_message',
|
913 |
+
'instructions' => '',
|
914 |
+
'required' => 0,
|
915 |
+
'conditional_logic' => array(
|
916 |
+
array(
|
917 |
+
array(
|
918 |
+
'field' => 'field_acfe_form_post_map_post_title',
|
919 |
+
'operator' => '!=empty',
|
920 |
+
),
|
921 |
+
),
|
922 |
+
),
|
923 |
+
'wrapper' => array(
|
924 |
+
'width' => '',
|
925 |
+
'class' => '',
|
926 |
+
'id' => '',
|
927 |
+
),
|
928 |
+
'acfe_permissions' => '',
|
929 |
+
),
|
930 |
+
array(
|
931 |
+
'key' => 'field_acfe_form_post_save_post_name',
|
932 |
+
'label' => 'Post slug',
|
933 |
+
'name' => 'acfe_form_post_save_post_name',
|
934 |
+
'type' => 'select',
|
935 |
+
'instructions' => '',
|
936 |
+
'required' => 0,
|
937 |
+
'wrapper' => array(
|
938 |
+
'width' => '',
|
939 |
+
'class' => '',
|
940 |
+
'id' => '',
|
941 |
+
),
|
942 |
+
'acfe_permissions' => '',
|
943 |
+
'choices' => array(
|
944 |
+
'generated_id' => 'Generated ID',
|
945 |
+
),
|
946 |
+
'default_value' => array(
|
947 |
+
),
|
948 |
+
'allow_null' => 1,
|
949 |
+
'multiple' => 0,
|
950 |
+
'ui' => 1,
|
951 |
+
'return_format' => 'value',
|
952 |
+
'placeholder' => 'Default',
|
953 |
+
'ajax' => 0,
|
954 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
955 |
+
'allow_custom' => 1,
|
956 |
+
'conditional_logic' => array(
|
957 |
+
array(
|
958 |
+
array(
|
959 |
+
'field' => 'field_acfe_form_post_map_post_name',
|
960 |
+
'operator' => '==empty',
|
961 |
+
),
|
962 |
+
),
|
963 |
+
),
|
964 |
+
),
|
965 |
+
|
966 |
+
array(
|
967 |
+
'key' => 'field_acfe_form_post_map_post_name_message',
|
968 |
+
'label' => 'Post slug',
|
969 |
+
'name' => 'acfe_form_post_map_post_name_message',
|
970 |
+
'type' => 'acfe_dynamic_message',
|
971 |
+
'instructions' => '',
|
972 |
+
'required' => 0,
|
973 |
+
'conditional_logic' => array(
|
974 |
+
array(
|
975 |
+
array(
|
976 |
+
'field' => 'field_acfe_form_post_map_post_name',
|
977 |
+
'operator' => '!=empty',
|
978 |
+
),
|
979 |
+
),
|
980 |
+
),
|
981 |
+
'wrapper' => array(
|
982 |
+
'width' => '',
|
983 |
+
'class' => '',
|
984 |
+
'id' => '',
|
985 |
+
),
|
986 |
+
'acfe_permissions' => '',
|
987 |
+
),
|
988 |
+
array(
|
989 |
+
'key' => 'field_acfe_form_post_save_post_content_group',
|
990 |
+
'label' => 'Post content',
|
991 |
+
'name' => 'acfe_form_post_save_post_content_group',
|
992 |
+
'type' => 'group',
|
993 |
+
'instructions' => '',
|
994 |
+
'required' => 0,
|
995 |
+
'conditional_logic' => array(
|
996 |
+
array(
|
997 |
+
array(
|
998 |
+
'field' => 'field_acfe_form_post_map_post_content',
|
999 |
+
'operator' => '==empty',
|
1000 |
+
),
|
1001 |
+
),
|
1002 |
+
),
|
1003 |
+
'wrapper' => array(
|
1004 |
+
'width' => '',
|
1005 |
+
'class' => '',
|
1006 |
+
'id' => '',
|
1007 |
+
),
|
1008 |
+
'acfe_permissions' => '',
|
1009 |
+
'layout' => 'block',
|
1010 |
+
'acfe_seamless_style' => true,
|
1011 |
+
'acfe_group_modal' => 0,
|
1012 |
+
'sub_fields' => array(
|
1013 |
+
array(
|
1014 |
+
'key' => 'field_acfe_form_post_save_post_content',
|
1015 |
+
'label' => '',
|
1016 |
+
'name' => 'acfe_form_post_save_post_content',
|
1017 |
+
'type' => 'select',
|
1018 |
+
'instructions' => '',
|
1019 |
+
'required' => 0,
|
1020 |
+
'conditional_logic' => 0,
|
1021 |
+
'wrapper' => array(
|
1022 |
+
'width' => '',
|
1023 |
+
'class' => '',
|
1024 |
+
'id' => '',
|
1025 |
+
),
|
1026 |
+
'acfe_permissions' => '',
|
1027 |
+
'choices' => array(
|
1028 |
+
'custom' => 'WYSIWYG editor',
|
1029 |
+
),
|
1030 |
+
'default_value' => array(
|
1031 |
+
),
|
1032 |
+
'allow_null' => 1,
|
1033 |
+
'multiple' => 0,
|
1034 |
+
'ui' => 1,
|
1035 |
+
'return_format' => 'value',
|
1036 |
+
'placeholder' => 'Default',
|
1037 |
+
'ajax' => 0,
|
1038 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1039 |
+
'allow_custom' => 1,
|
1040 |
+
),
|
1041 |
+
array(
|
1042 |
+
'key' => 'field_acfe_form_post_save_post_content_custom',
|
1043 |
+
'label' => '',
|
1044 |
+
'name' => 'acfe_form_post_save_post_content_custom',
|
1045 |
+
'type' => 'wysiwyg',
|
1046 |
+
'instructions' => '',
|
1047 |
+
'required' => 0,
|
1048 |
+
'conditional_logic' => array(
|
1049 |
+
array(
|
1050 |
+
array(
|
1051 |
+
'field' => 'field_acfe_form_post_save_post_content',
|
1052 |
+
'operator' => '==',
|
1053 |
+
'value' => 'custom',
|
1054 |
+
),
|
1055 |
+
),
|
1056 |
+
),
|
1057 |
+
'wrapper' => array(
|
1058 |
+
'width' => '',
|
1059 |
+
'class' => '',
|
1060 |
+
'id' => '',
|
1061 |
+
),
|
1062 |
+
'acfe_permissions' => '',
|
1063 |
+
'default_value' => '',
|
1064 |
+
'tabs' => 'all',
|
1065 |
+
'toolbar' => 'full',
|
1066 |
+
'media_upload' => 1,
|
1067 |
+
'delay' => 0,
|
1068 |
+
),
|
1069 |
+
),
|
1070 |
+
),
|
1071 |
+
array(
|
1072 |
+
'key' => 'field_acfe_form_post_map_post_content_message',
|
1073 |
+
'label' => 'Post content',
|
1074 |
+
'name' => 'acfe_form_post_map_post_content_message',
|
1075 |
+
'type' => 'acfe_dynamic_message',
|
1076 |
+
'instructions' => '',
|
1077 |
+
'required' => 0,
|
1078 |
+
'conditional_logic' => array(
|
1079 |
+
array(
|
1080 |
+
array(
|
1081 |
+
'field' => 'field_acfe_form_post_map_post_content',
|
1082 |
+
'operator' => '!=empty',
|
1083 |
+
),
|
1084 |
+
),
|
1085 |
+
),
|
1086 |
+
'wrapper' => array(
|
1087 |
+
'width' => '',
|
1088 |
+
'class' => '',
|
1089 |
+
'id' => '',
|
1090 |
+
),
|
1091 |
+
'acfe_permissions' => '',
|
1092 |
+
),
|
1093 |
+
array(
|
1094 |
+
'key' => 'field_acfe_form_post_save_post_author',
|
1095 |
+
'label' => 'Post author',
|
1096 |
+
'name' => 'acfe_form_post_save_post_author',
|
1097 |
+
'type' => 'select',
|
1098 |
+
'instructions' => '',
|
1099 |
+
'required' => 0,
|
1100 |
+
'conditional_logic' => array(
|
1101 |
+
array(
|
1102 |
+
array(
|
1103 |
+
'field' => 'field_acfe_form_post_map_post_author',
|
1104 |
+
'operator' => '==empty',
|
1105 |
+
),
|
1106 |
+
),
|
1107 |
+
),
|
1108 |
+
'wrapper' => array(
|
1109 |
+
'width' => '',
|
1110 |
+
'class' => '',
|
1111 |
+
'id' => '',
|
1112 |
+
),
|
1113 |
+
'acfe_permissions' => '',
|
1114 |
+
'choices' => array(
|
1115 |
+
),
|
1116 |
+
'default_value' => array(
|
1117 |
+
),
|
1118 |
+
'allow_null' => 1,
|
1119 |
+
'multiple' => 0,
|
1120 |
+
'ui' => 1,
|
1121 |
+
'ajax' => 0,
|
1122 |
+
'return_format' => 'value',
|
1123 |
+
'placeholder' => 'Default',
|
1124 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1125 |
+
'allow_custom' => 1,
|
1126 |
+
),
|
1127 |
+
array(
|
1128 |
+
'key' => 'field_acfe_form_post_map_post_author_message',
|
1129 |
+
'label' => 'Post author',
|
1130 |
+
'name' => 'acfe_form_post_map_post_author_message',
|
1131 |
+
'type' => 'acfe_dynamic_message',
|
1132 |
+
'instructions' => '',
|
1133 |
+
'required' => 0,
|
1134 |
+
'conditional_logic' => array(
|
1135 |
+
array(
|
1136 |
+
array(
|
1137 |
+
'field' => 'field_acfe_form_post_map_post_author',
|
1138 |
+
'operator' => '!=empty',
|
1139 |
+
),
|
1140 |
+
),
|
1141 |
+
),
|
1142 |
+
'wrapper' => array(
|
1143 |
+
'width' => '',
|
1144 |
+
'class' => '',
|
1145 |
+
'id' => '',
|
1146 |
+
),
|
1147 |
+
'acfe_permissions' => '',
|
1148 |
+
),
|
1149 |
+
array(
|
1150 |
+
'key' => 'field_acfe_form_post_save_post_parent',
|
1151 |
+
'label' => 'Post parent',
|
1152 |
+
'name' => 'acfe_form_post_save_post_parent',
|
1153 |
+
'type' => 'select',
|
1154 |
+
'instructions' => '',
|
1155 |
+
'required' => 0,
|
1156 |
+
'conditional_logic' => array(
|
1157 |
+
array(
|
1158 |
+
array(
|
1159 |
+
'field' => 'field_acfe_form_post_map_post_parent',
|
1160 |
+
'operator' => '==empty',
|
1161 |
+
),
|
1162 |
+
),
|
1163 |
+
),
|
1164 |
+
'wrapper' => array(
|
1165 |
+
'width' => '',
|
1166 |
+
'class' => '',
|
1167 |
+
'id' => '',
|
1168 |
+
),
|
1169 |
+
'acfe_permissions' => '',
|
1170 |
+
'choices' => array(
|
1171 |
+
),
|
1172 |
+
'default_value' => array(
|
1173 |
+
),
|
1174 |
+
'allow_null' => 1,
|
1175 |
+
'multiple' => 0,
|
1176 |
+
'ui' => 1,
|
1177 |
+
'ajax' => 0,
|
1178 |
+
'return_format' => 'value',
|
1179 |
+
'placeholder' => 'Default',
|
1180 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1181 |
+
'allow_custom' => 1,
|
1182 |
+
),
|
1183 |
+
array(
|
1184 |
+
'key' => 'field_acfe_form_post_map_post_parent_message',
|
1185 |
+
'label' => 'Post parent',
|
1186 |
+
'name' => 'acfe_form_post_map_post_parent_message',
|
1187 |
+
'type' => 'acfe_dynamic_message',
|
1188 |
+
'instructions' => '',
|
1189 |
+
'required' => 0,
|
1190 |
+
'conditional_logic' => array(
|
1191 |
+
array(
|
1192 |
+
array(
|
1193 |
+
'field' => 'field_acfe_form_post_map_post_parent',
|
1194 |
+
'operator' => '!=empty',
|
1195 |
+
),
|
1196 |
+
),
|
1197 |
+
),
|
1198 |
+
'wrapper' => array(
|
1199 |
+
'width' => '',
|
1200 |
+
'class' => '',
|
1201 |
+
'id' => '',
|
1202 |
+
),
|
1203 |
+
'acfe_permissions' => '',
|
1204 |
+
),
|
1205 |
+
array(
|
1206 |
+
'key' => 'field_acfe_form_post_save_post_terms',
|
1207 |
+
'label' => 'Post terms',
|
1208 |
+
'name' => 'acfe_form_post_save_post_terms',
|
1209 |
+
'type' => 'acfe_taxonomy_terms',
|
1210 |
+
'instructions' => '',
|
1211 |
+
'required' => 0,
|
1212 |
+
'conditional_logic' => array(
|
1213 |
+
array(
|
1214 |
+
array(
|
1215 |
+
'field' => 'field_acfe_form_post_map_post_terms',
|
1216 |
+
'operator' => '==empty',
|
1217 |
+
),
|
1218 |
+
),
|
1219 |
+
),
|
1220 |
+
'wrapper' => array(
|
1221 |
+
'width' => '',
|
1222 |
+
'class' => '',
|
1223 |
+
'id' => '',
|
1224 |
+
),
|
1225 |
+
'acfe_permissions' => '',
|
1226 |
+
'taxonomy' => '',
|
1227 |
+
'field_type' => 'select',
|
1228 |
+
'default_value' => '',
|
1229 |
+
'return_format' => 'id',
|
1230 |
+
'allow_null' => 1,
|
1231 |
+
'placeholder' => 'Default',
|
1232 |
+
'multiple' => 1,
|
1233 |
+
'ui' => 1,
|
1234 |
+
'ajax' => 0,
|
1235 |
+
'choices' => array(
|
1236 |
+
),
|
1237 |
+
'layout' => '',
|
1238 |
+
'toggle' => 0,
|
1239 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1240 |
+
'allow_custom' => 1,
|
1241 |
+
),
|
1242 |
+
array(
|
1243 |
+
'key' => 'field_acfe_form_post_map_post_terms_message',
|
1244 |
+
'label' => 'Post terms',
|
1245 |
+
'name' => 'acfe_form_post_map_post_terms_message',
|
1246 |
+
'type' => 'acfe_dynamic_message',
|
1247 |
+
'instructions' => '',
|
1248 |
+
'required' => 0,
|
1249 |
+
'conditional_logic' => array(
|
1250 |
+
array(
|
1251 |
+
array(
|
1252 |
+
'field' => 'field_acfe_form_post_map_post_terms',
|
1253 |
+
'operator' => '!=empty',
|
1254 |
+
),
|
1255 |
+
),
|
1256 |
+
),
|
1257 |
+
'wrapper' => array(
|
1258 |
+
'width' => '',
|
1259 |
+
'class' => '',
|
1260 |
+
'id' => '',
|
1261 |
+
),
|
1262 |
+
'acfe_permissions' => '',
|
1263 |
+
),
|
1264 |
+
array(
|
1265 |
+
'key' => 'field_acfe_form_post_save_meta',
|
1266 |
+
'label' => 'Save ACF fields',
|
1267 |
+
'name' => 'acfe_form_post_save_meta',
|
1268 |
+
'type' => 'checkbox',
|
1269 |
+
'instructions' => 'Choose which ACF fields should be saved to this post',
|
1270 |
+
'required' => 0,
|
1271 |
+
'conditional_logic' => 0,
|
1272 |
+
'wrapper' => array(
|
1273 |
+
'width' => '',
|
1274 |
+
'class' => '',
|
1275 |
+
'id' => '',
|
1276 |
+
),
|
1277 |
+
'acfe_permissions' => '',
|
1278 |
+
'choices' => array(
|
1279 |
+
),
|
1280 |
+
'allow_custom' => 0,
|
1281 |
+
'default_value' => array(
|
1282 |
+
),
|
1283 |
+
'layout' => 'vertical',
|
1284 |
+
'toggle' => 1,
|
1285 |
+
'return_format' => 'value',
|
1286 |
+
'save_custom' => 0,
|
1287 |
+
),
|
1288 |
+
|
1289 |
+
/*
|
1290 |
+
* Layout: Post Load
|
1291 |
+
*/
|
1292 |
+
array(
|
1293 |
+
'key' => 'acfe_form_post_tab_load',
|
1294 |
+
'label' => 'Load',
|
1295 |
+
'name' => '',
|
1296 |
+
'type' => 'tab',
|
1297 |
+
'instructions' => '',
|
1298 |
+
'required' => 0,
|
1299 |
+
'conditional_logic' => 0,
|
1300 |
+
'wrapper' => array(
|
1301 |
+
'width' => '',
|
1302 |
+
'class' => '',
|
1303 |
+
'id' => '',
|
1304 |
+
),
|
1305 |
+
'acfe_permissions' => '',
|
1306 |
+
'placement' => 'top',
|
1307 |
+
'endpoint' => 0,
|
1308 |
+
),
|
1309 |
+
array(
|
1310 |
+
'key' => 'field_acfe_form_post_load_values',
|
1311 |
+
'label' => 'Load Values',
|
1312 |
+
'name' => 'acfe_form_post_load_values',
|
1313 |
+
'type' => 'true_false',
|
1314 |
+
'instructions' => 'Fill inputs with values',
|
1315 |
+
'required' => 0,
|
1316 |
+
'conditional_logic' => 0,
|
1317 |
+
'wrapper' => array(
|
1318 |
+
'width' => '',
|
1319 |
+
'class' => '',
|
1320 |
+
'id' => '',
|
1321 |
+
),
|
1322 |
+
'acfe_permissions' => '',
|
1323 |
+
'message' => '',
|
1324 |
+
'default_value' => 1,
|
1325 |
+
'ui' => 1,
|
1326 |
+
'ui_on_text' => '',
|
1327 |
+
'ui_off_text' => '',
|
1328 |
+
),
|
1329 |
+
array(
|
1330 |
+
'key' => 'field_acfe_form_post_load_source',
|
1331 |
+
'label' => 'Source',
|
1332 |
+
'name' => 'acfe_form_post_load_source',
|
1333 |
+
'type' => 'select',
|
1334 |
+
'instructions' => '',
|
1335 |
+
'required' => 0,
|
1336 |
+
'conditional_logic' => array(
|
1337 |
+
array(
|
1338 |
+
array(
|
1339 |
+
'field' => 'field_acfe_form_post_load_values',
|
1340 |
+
'operator' => '==',
|
1341 |
+
'value' => '1',
|
1342 |
+
),
|
1343 |
+
),
|
1344 |
+
),
|
1345 |
+
'wrapper' => array(
|
1346 |
+
'width' => '',
|
1347 |
+
'class' => '',
|
1348 |
+
'id' => '',
|
1349 |
+
),
|
1350 |
+
'acfe_permissions' => '',
|
1351 |
+
'choices' => array(
|
1352 |
+
),
|
1353 |
+
'default_value' => 'current_post',
|
1354 |
+
'allow_null' => 0,
|
1355 |
+
'multiple' => 0,
|
1356 |
+
'ui' => 1,
|
1357 |
+
'ajax' => 0,
|
1358 |
+
'return_format' => 'value',
|
1359 |
+
'placeholder' => '',
|
1360 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1361 |
+
'allow_custom' => 1,
|
1362 |
+
),
|
1363 |
+
|
1364 |
+
array(
|
1365 |
+
'key' => 'field_acfe_form_post_map_post_type',
|
1366 |
+
'label' => 'Post type',
|
1367 |
+
'name' => 'acfe_form_post_map_post_type',
|
1368 |
+
'type' => 'select',
|
1369 |
+
'instructions' => '',
|
1370 |
+
'required' => 0,
|
1371 |
+
'wrapper' => array(
|
1372 |
+
'width' => '',
|
1373 |
+
'class' => '',
|
1374 |
+
'id' => '',
|
1375 |
+
),
|
1376 |
+
'acfe_permissions' => '',
|
1377 |
+
'choices' => array(
|
1378 |
+
),
|
1379 |
+
'default_value' => array(
|
1380 |
+
),
|
1381 |
+
'allow_null' => 1,
|
1382 |
+
'multiple' => 0,
|
1383 |
+
'ui' => 1,
|
1384 |
+
'return_format' => 'value',
|
1385 |
+
'placeholder' => 'Default',
|
1386 |
+
'ajax' => 0,
|
1387 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1388 |
+
'allow_custom' => 1,
|
1389 |
+
'conditional_logic' => array(
|
1390 |
+
array(
|
1391 |
+
array(
|
1392 |
+
'field' => 'field_acfe_form_post_load_values',
|
1393 |
+
'operator' => '==',
|
1394 |
+
'value' => '1',
|
1395 |
+
),
|
1396 |
+
),
|
1397 |
+
),
|
1398 |
+
),
|
1399 |
+
array(
|
1400 |
+
'key' => 'field_acfe_form_post_map_post_status',
|
1401 |
+
'label' => 'Post status',
|
1402 |
+
'name' => 'acfe_form_post_map_post_status',
|
1403 |
+
'type' => 'select',
|
1404 |
+
'instructions' => '',
|
1405 |
+
'required' => 0,
|
1406 |
+
'wrapper' => array(
|
1407 |
+
'width' => '',
|
1408 |
+
'class' => '',
|
1409 |
+
'id' => '',
|
1410 |
+
),
|
1411 |
+
'acfe_permissions' => '',
|
1412 |
+
'choices' => array(
|
1413 |
+
),
|
1414 |
+
'default_value' => array(
|
1415 |
+
),
|
1416 |
+
'allow_null' => 1,
|
1417 |
+
'multiple' => 0,
|
1418 |
+
'ui' => 1,
|
1419 |
+
'return_format' => 'value',
|
1420 |
+
'placeholder' => 'Default',
|
1421 |
+
'ajax' => 0,
|
1422 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1423 |
+
'allow_custom' => 1,
|
1424 |
+
'conditional_logic' => array(
|
1425 |
+
array(
|
1426 |
+
array(
|
1427 |
+
'field' => 'field_acfe_form_post_load_values',
|
1428 |
+
'operator' => '==',
|
1429 |
+
'value' => '1',
|
1430 |
+
),
|
1431 |
+
),
|
1432 |
+
),
|
1433 |
+
),
|
1434 |
+
array(
|
1435 |
+
'key' => 'field_acfe_form_post_map_post_title',
|
1436 |
+
'label' => 'Post title',
|
1437 |
+
'name' => 'acfe_form_post_map_post_title',
|
1438 |
+
'type' => 'select',
|
1439 |
+
'instructions' => '',
|
1440 |
+
'required' => 0,
|
1441 |
+
'wrapper' => array(
|
1442 |
+
'width' => '',
|
1443 |
+
'class' => '',
|
1444 |
+
'id' => '',
|
1445 |
+
),
|
1446 |
+
'acfe_permissions' => '',
|
1447 |
+
'choices' => array(
|
1448 |
+
),
|
1449 |
+
'default_value' => array(
|
1450 |
+
),
|
1451 |
+
'allow_null' => 1,
|
1452 |
+
'multiple' => 0,
|
1453 |
+
'ui' => 1,
|
1454 |
+
'return_format' => 'value',
|
1455 |
+
'placeholder' => 'Default',
|
1456 |
+
'ajax' => 0,
|
1457 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1458 |
+
'allow_custom' => 1,
|
1459 |
+
'conditional_logic' => array(
|
1460 |
+
array(
|
1461 |
+
array(
|
1462 |
+
'field' => 'field_acfe_form_post_load_values',
|
1463 |
+
'operator' => '==',
|
1464 |
+
'value' => '1',
|
1465 |
+
),
|
1466 |
+
),
|
1467 |
+
),
|
1468 |
+
),
|
1469 |
+
array(
|
1470 |
+
'key' => 'field_acfe_form_post_map_post_name',
|
1471 |
+
'label' => 'Post slug',
|
1472 |
+
'name' => 'acfe_form_post_map_post_name',
|
1473 |
+
'type' => 'select',
|
1474 |
+
'instructions' => '',
|
1475 |
+
'required' => 0,
|
1476 |
+
'wrapper' => array(
|
1477 |
+
'width' => '',
|
1478 |
+
'class' => '',
|
1479 |
+
'id' => '',
|
1480 |
+
),
|
1481 |
+
'acfe_permissions' => '',
|
1482 |
+
'choices' => array(
|
1483 |
+
),
|
1484 |
+
'default_value' => array(
|
1485 |
+
),
|
1486 |
+
'allow_null' => 1,
|
1487 |
+
'multiple' => 0,
|
1488 |
+
'ui' => 1,
|
1489 |
+
'return_format' => 'value',
|
1490 |
+
'placeholder' => 'Default',
|
1491 |
+
'ajax' => 0,
|
1492 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1493 |
+
'allow_custom' => 1,
|
1494 |
+
'conditional_logic' => array(
|
1495 |
+
array(
|
1496 |
+
array(
|
1497 |
+
'field' => 'field_acfe_form_post_load_values',
|
1498 |
+
'operator' => '==',
|
1499 |
+
'value' => '1',
|
1500 |
+
),
|
1501 |
+
),
|
1502 |
+
),
|
1503 |
+
),
|
1504 |
+
array(
|
1505 |
+
'key' => 'field_acfe_form_post_map_post_content',
|
1506 |
+
'label' => 'Post content',
|
1507 |
+
'name' => 'acfe_form_post_map_post_content',
|
1508 |
+
'type' => 'select',
|
1509 |
+
'instructions' => '',
|
1510 |
+
'required' => 0,
|
1511 |
+
'wrapper' => array(
|
1512 |
+
'width' => '',
|
1513 |
+
'class' => '',
|
1514 |
+
'id' => '',
|
1515 |
+
),
|
1516 |
+
'acfe_permissions' => '',
|
1517 |
+
'choices' => array(
|
1518 |
+
),
|
1519 |
+
'default_value' => array(
|
1520 |
+
),
|
1521 |
+
'allow_null' => 1,
|
1522 |
+
'multiple' => 0,
|
1523 |
+
'ui' => 1,
|
1524 |
+
'return_format' => 'value',
|
1525 |
+
'placeholder' => 'Default',
|
1526 |
+
'ajax' => 0,
|
1527 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1528 |
+
'allow_custom' => 1,
|
1529 |
+
'conditional_logic' => array(
|
1530 |
+
array(
|
1531 |
+
array(
|
1532 |
+
'field' => 'field_acfe_form_post_load_values',
|
1533 |
+
'operator' => '==',
|
1534 |
+
'value' => '1',
|
1535 |
+
),
|
1536 |
+
),
|
1537 |
+
),
|
1538 |
+
),
|
1539 |
+
array(
|
1540 |
+
'key' => 'field_acfe_form_post_map_post_author',
|
1541 |
+
'label' => 'Post author',
|
1542 |
+
'name' => 'acfe_form_post_map_post_author',
|
1543 |
+
'type' => 'select',
|
1544 |
+
'instructions' => '',
|
1545 |
+
'required' => 0,
|
1546 |
+
'wrapper' => array(
|
1547 |
+
'width' => '',
|
1548 |
+
'class' => '',
|
1549 |
+
'id' => '',
|
1550 |
+
),
|
1551 |
+
'acfe_permissions' => '',
|
1552 |
+
'choices' => array(
|
1553 |
+
),
|
1554 |
+
'default_value' => array(
|
1555 |
+
),
|
1556 |
+
'allow_null' => 1,
|
1557 |
+
'multiple' => 0,
|
1558 |
+
'ui' => 1,
|
1559 |
+
'return_format' => 'value',
|
1560 |
+
'placeholder' => 'Default',
|
1561 |
+
'ajax' => 0,
|
1562 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1563 |
+
'allow_custom' => 1,
|
1564 |
+
'conditional_logic' => array(
|
1565 |
+
array(
|
1566 |
+
array(
|
1567 |
+
'field' => 'field_acfe_form_post_load_values',
|
1568 |
+
'operator' => '==',
|
1569 |
+
'value' => '1',
|
1570 |
+
),
|
1571 |
+
),
|
1572 |
+
),
|
1573 |
+
),
|
1574 |
+
array(
|
1575 |
+
'key' => 'field_acfe_form_post_map_post_parent',
|
1576 |
+
'label' => 'Post parent',
|
1577 |
+
'name' => 'acfe_form_post_map_post_parent',
|
1578 |
+
'type' => 'select',
|
1579 |
+
'instructions' => '',
|
1580 |
+
'required' => 0,
|
1581 |
+
'wrapper' => array(
|
1582 |
+
'width' => '',
|
1583 |
+
'class' => '',
|
1584 |
+
'id' => '',
|
1585 |
+
),
|
1586 |
+
'acfe_permissions' => '',
|
1587 |
+
'choices' => array(
|
1588 |
+
),
|
1589 |
+
'default_value' => array(
|
1590 |
+
),
|
1591 |
+
'allow_null' => 1,
|
1592 |
+
'multiple' => 0,
|
1593 |
+
'ui' => 1,
|
1594 |
+
'return_format' => 'value',
|
1595 |
+
'placeholder' => 'Default',
|
1596 |
+
'ajax' => 0,
|
1597 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1598 |
+
'allow_custom' => 1,
|
1599 |
+
'conditional_logic' => array(
|
1600 |
+
array(
|
1601 |
+
array(
|
1602 |
+
'field' => 'field_acfe_form_post_load_values',
|
1603 |
+
'operator' => '==',
|
1604 |
+
'value' => '1',
|
1605 |
+
),
|
1606 |
+
),
|
1607 |
+
),
|
1608 |
+
),
|
1609 |
+
array(
|
1610 |
+
'key' => 'field_acfe_form_post_map_post_terms',
|
1611 |
+
'label' => 'Post terms',
|
1612 |
+
'name' => 'acfe_form_post_map_post_terms',
|
1613 |
+
'type' => 'select',
|
1614 |
+
'instructions' => '',
|
1615 |
+
'required' => 0,
|
1616 |
+
'wrapper' => array(
|
1617 |
+
'width' => '',
|
1618 |
+
'class' => '',
|
1619 |
+
'id' => '',
|
1620 |
+
),
|
1621 |
+
'acfe_permissions' => '',
|
1622 |
+
'choices' => array(
|
1623 |
+
),
|
1624 |
+
'default_value' => array(
|
1625 |
+
),
|
1626 |
+
'allow_null' => 1,
|
1627 |
+
'multiple' => 0,
|
1628 |
+
'ui' => 1,
|
1629 |
+
'return_format' => 'value',
|
1630 |
+
'placeholder' => 'Default',
|
1631 |
+
'ajax' => 0,
|
1632 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1633 |
+
'allow_custom' => 1,
|
1634 |
+
'conditional_logic' => array(
|
1635 |
+
array(
|
1636 |
+
array(
|
1637 |
+
'field' => 'field_acfe_form_post_load_values',
|
1638 |
+
'operator' => '==',
|
1639 |
+
'value' => '1',
|
1640 |
+
),
|
1641 |
+
),
|
1642 |
+
),
|
1643 |
+
),
|
1644 |
+
array(
|
1645 |
+
'key' => 'field_acfe_form_post_load_meta',
|
1646 |
+
'label' => 'Load ACF fields',
|
1647 |
+
'name' => 'acfe_form_post_load_meta',
|
1648 |
+
'type' => 'checkbox',
|
1649 |
+
'instructions' => 'Choose which ACF fields should have their values loaded',
|
1650 |
+
'required' => 0,
|
1651 |
+
'conditional_logic' => array(
|
1652 |
+
array(
|
1653 |
+
array(
|
1654 |
+
'field' => 'field_acfe_form_post_load_values',
|
1655 |
+
'operator' => '==',
|
1656 |
+
'value' => '1',
|
1657 |
+
),
|
1658 |
+
),
|
1659 |
+
),
|
1660 |
+
'wrapper' => array(
|
1661 |
+
'width' => '',
|
1662 |
+
'class' => '',
|
1663 |
+
'id' => '',
|
1664 |
+
),
|
1665 |
+
'acfe_permissions' => '',
|
1666 |
+
'choices' => array(
|
1667 |
+
),
|
1668 |
+
'allow_custom' => 0,
|
1669 |
+
'default_value' => array(
|
1670 |
+
),
|
1671 |
+
'layout' => 'vertical',
|
1672 |
+
'toggle' => 1,
|
1673 |
+
'return_format' => 'value',
|
1674 |
+
'save_custom' => 0,
|
1675 |
+
),
|
1676 |
+
|
1677 |
+
/*
|
1678 |
+
* Layout: Post Advanced
|
1679 |
+
*/
|
1680 |
+
array(
|
1681 |
+
'key' => 'field_acfe_form_post_tab_advanced',
|
1682 |
+
'label' => 'Code',
|
1683 |
+
'name' => '',
|
1684 |
+
'type' => 'tab',
|
1685 |
+
'instructions' => '',
|
1686 |
+
'required' => 0,
|
1687 |
+
'conditional_logic' => 0,
|
1688 |
+
'wrapper' => array(
|
1689 |
+
'width' => '',
|
1690 |
+
'class' => '',
|
1691 |
+
'id' => '',
|
1692 |
+
),
|
1693 |
+
'acfe_permissions' => '',
|
1694 |
+
'placement' => 'top',
|
1695 |
+
'endpoint' => 0,
|
1696 |
+
),
|
1697 |
+
array(
|
1698 |
+
'key' => 'field_acfe_form_post_advanced_load',
|
1699 |
+
'label' => 'Change values source',
|
1700 |
+
'name' => 'acfe_form_post_advanced_load',
|
1701 |
+
'type' => 'acfe_dynamic_message',
|
1702 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
1703 |
+
'instructions' => 'Alter the post ID where meta values are loaded from',
|
1704 |
+
'required' => 0,
|
1705 |
+
'conditional_logic' => 0,
|
1706 |
+
'wrapper' => array(
|
1707 |
+
'width' => '',
|
1708 |
+
'class' => '',
|
1709 |
+
'id' => '',
|
1710 |
+
),
|
1711 |
+
'acfe_permissions' => '',
|
1712 |
+
),
|
1713 |
+
array(
|
1714 |
+
'key' => 'field_acfe_form_post_advanced_save_args',
|
1715 |
+
'label' => 'Change post arguments',
|
1716 |
+
'name' => 'acfe_form_post_advanced_save_args',
|
1717 |
+
'type' => 'acfe_dynamic_message',
|
1718 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
1719 |
+
'instructions' => 'Alter the post arguments before database insert/update',
|
1720 |
+
'required' => 0,
|
1721 |
+
'conditional_logic' => 0,
|
1722 |
+
'wrapper' => array(
|
1723 |
+
'width' => '',
|
1724 |
+
'class' => '',
|
1725 |
+
'id' => '',
|
1726 |
+
),
|
1727 |
+
'acfe_permissions' => '',
|
1728 |
+
),
|
1729 |
+
array(
|
1730 |
+
'key' => 'field_acfe_form_post_advanced_save',
|
1731 |
+
'label' => 'Add custom action on post save',
|
1732 |
+
'name' => 'acfe_form_post_advanced_save',
|
1733 |
+
'type' => 'acfe_dynamic_message',
|
1734 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
1735 |
+
'instructions' => 'This action allows you to hook in before or after the meta data have been saved',
|
1736 |
+
'required' => 0,
|
1737 |
+
'conditional_logic' => 0,
|
1738 |
+
'wrapper' => array(
|
1739 |
+
'width' => '',
|
1740 |
+
'class' => '',
|
1741 |
+
'id' => '',
|
1742 |
+
),
|
1743 |
+
'acfe_permissions' => '',
|
1744 |
+
),
|
1745 |
),
|
1746 |
+
'min' => '',
|
1747 |
+
'max' => '',
|
1748 |
),
|
1749 |
+
|
1750 |
+
/*
|
1751 |
+
* Layout: Term
|
1752 |
+
*/
|
1753 |
+
'layout_term' => array(
|
1754 |
+
'key' => 'layout_term',
|
1755 |
+
'name' => 'term',
|
1756 |
+
'label' => 'Term action',
|
1757 |
+
'display' => 'row',
|
1758 |
+
'sub_fields' => array(
|
1759 |
+
|
1760 |
+
/*
|
1761 |
+
* Layout: Term Action
|
1762 |
+
*/
|
1763 |
+
array(
|
1764 |
+
'key' => 'field_acfe_form_term_tab_action',
|
1765 |
+
'label' => 'Action',
|
1766 |
+
'name' => '',
|
1767 |
+
'type' => 'tab',
|
1768 |
+
'instructions' => '',
|
1769 |
+
'required' => 0,
|
1770 |
+
'conditional_logic' => 0,
|
1771 |
+
'wrapper' => array(
|
1772 |
+
'width' => '',
|
1773 |
+
'class' => '',
|
1774 |
+
'id' => '',
|
1775 |
+
),
|
1776 |
+
'acfe_permissions' => '',
|
1777 |
+
'placement' => 'top',
|
1778 |
+
'endpoint' => 0,
|
1779 |
+
),
|
1780 |
+
array(
|
1781 |
+
'key' => 'acfe_form_term_action',
|
1782 |
+
'label' => 'Action',
|
1783 |
+
'name' => 'acfe_form_term_action',
|
1784 |
+
'type' => 'radio',
|
1785 |
+
'instructions' => '',
|
1786 |
+
'required' => 0,
|
1787 |
+
'conditional_logic' => 0,
|
1788 |
+
'wrapper' => array(
|
1789 |
+
'width' => '',
|
1790 |
+
'class' => '',
|
1791 |
+
'id' => '',
|
1792 |
+
),
|
1793 |
+
'acfe_permissions' => '',
|
1794 |
+
'choices' => array(
|
1795 |
+
'insert_term' => 'Create term',
|
1796 |
+
'update_term' => 'Update term',
|
1797 |
+
),
|
1798 |
+
'default_value' => 'insert_term',
|
1799 |
+
),
|
1800 |
+
array(
|
1801 |
+
'key' => 'field_acfe_form_term_custom_alias',
|
1802 |
+
'label' => 'Action name',
|
1803 |
+
'name' => 'acfe_form_custom_alias',
|
1804 |
+
'type' => 'acfe_slug',
|
1805 |
+
'instructions' => '(Optional) Target this action using hooks & allow custom <code>{query_var:my-action}</code> name.',
|
1806 |
+
'required' => 0,
|
1807 |
+
'conditional_logic' => 0,
|
1808 |
+
'wrapper' => array(
|
1809 |
+
'width' => '',
|
1810 |
+
'class' => '',
|
1811 |
+
'id' => '',
|
1812 |
+
),
|
1813 |
+
'acfe_permissions' => '',
|
1814 |
+
'default_value' => '',
|
1815 |
+
'placeholder' => 'Term',
|
1816 |
+
'prepend' => '',
|
1817 |
+
'append' => '',
|
1818 |
+
'maxlength' => '',
|
1819 |
+
),
|
1820 |
+
|
1821 |
+
/*
|
1822 |
+
* Layout: Term Save
|
1823 |
+
*/
|
1824 |
+
array(
|
1825 |
+
'key' => 'field_acfe_form_term_tab_save',
|
1826 |
+
'label' => 'Save',
|
1827 |
+
'name' => '',
|
1828 |
+
'type' => 'tab',
|
1829 |
+
'instructions' => '',
|
1830 |
+
'required' => 0,
|
1831 |
+
'conditional_logic' => 0,
|
1832 |
+
'wrapper' => array(
|
1833 |
+
'width' => '',
|
1834 |
+
'class' => '',
|
1835 |
+
'id' => '',
|
1836 |
+
),
|
1837 |
+
'acfe_permissions' => '',
|
1838 |
+
'placement' => 'top',
|
1839 |
+
'endpoint' => 0,
|
1840 |
+
),
|
1841 |
+
array(
|
1842 |
+
'key' => 'field_acfe_form_term_save_target',
|
1843 |
+
'label' => 'Target',
|
1844 |
+
'name' => 'acfe_form_term_save_target',
|
1845 |
+
'type' => 'select',
|
1846 |
+
'instructions' => '',
|
1847 |
+
'required' => 0,
|
1848 |
+
'conditional_logic' => array(
|
1849 |
+
array(
|
1850 |
+
array(
|
1851 |
+
'field' => 'acfe_form_term_action',
|
1852 |
+
'operator' => '==',
|
1853 |
+
'value' => 'update_term',
|
1854 |
+
),
|
1855 |
+
),
|
1856 |
+
),
|
1857 |
+
'wrapper' => array(
|
1858 |
+
'width' => '',
|
1859 |
+
'class' => '',
|
1860 |
+
'id' => '',
|
1861 |
+
),
|
1862 |
+
'acfe_permissions' => '',
|
1863 |
+
'choices' => array(
|
1864 |
+
),
|
1865 |
+
'default_value' => 'current_term',
|
1866 |
+
'allow_null' => 0,
|
1867 |
+
'multiple' => 0,
|
1868 |
+
'ui' => 1,
|
1869 |
+
'ajax' => 0,
|
1870 |
+
'return_format' => 'value',
|
1871 |
+
'placeholder' => '',
|
1872 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1873 |
+
'allow_custom' => 1,
|
1874 |
+
),
|
1875 |
+
array(
|
1876 |
+
'key' => 'field_acfe_form_term_save_name',
|
1877 |
+
'label' => 'Name',
|
1878 |
+
'name' => 'acfe_form_term_save_name',
|
1879 |
+
'type' => 'select',
|
1880 |
+
'instructions' => '',
|
1881 |
+
'required' => 0,
|
1882 |
+
'wrapper' => array(
|
1883 |
+
'width' => '',
|
1884 |
+
'class' => '',
|
1885 |
+
'id' => '',
|
1886 |
+
),
|
1887 |
+
'acfe_permissions' => '',
|
1888 |
+
'choices' => array(),
|
1889 |
+
'default_value' => array(
|
1890 |
+
),
|
1891 |
+
'allow_null' => 1,
|
1892 |
+
'multiple' => 0,
|
1893 |
+
'ui' => 1,
|
1894 |
+
'return_format' => 'value',
|
1895 |
+
'placeholder' => 'Default',
|
1896 |
+
'ajax' => 0,
|
1897 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1898 |
+
'allow_custom' => 1,
|
1899 |
+
'conditional_logic' => array(
|
1900 |
+
array(
|
1901 |
+
array(
|
1902 |
+
'field' => 'field_acfe_form_term_map_name',
|
1903 |
+
'operator' => '==empty',
|
1904 |
+
),
|
1905 |
+
),
|
1906 |
+
),
|
1907 |
+
),
|
1908 |
+
array(
|
1909 |
+
'key' => 'field_acfe_form_term_map_name_message',
|
1910 |
+
'label' => 'Name',
|
1911 |
+
'name' => 'acfe_form_term_map_name_message',
|
1912 |
+
'type' => 'acfe_dynamic_message',
|
1913 |
+
'instructions' => '',
|
1914 |
+
'required' => 0,
|
1915 |
+
'conditional_logic' => array(
|
1916 |
+
array(
|
1917 |
+
array(
|
1918 |
+
'field' => 'field_acfe_form_term_map_name',
|
1919 |
+
'operator' => '!=empty',
|
1920 |
+
),
|
1921 |
+
),
|
1922 |
+
),
|
1923 |
+
'wrapper' => array(
|
1924 |
+
'width' => '',
|
1925 |
+
'class' => '',
|
1926 |
+
'id' => '',
|
1927 |
+
),
|
1928 |
+
'acfe_permissions' => '',
|
1929 |
+
),
|
1930 |
+
array(
|
1931 |
+
'key' => 'field_acfe_form_term_save_slug',
|
1932 |
+
'label' => 'Slug',
|
1933 |
+
'name' => 'acfe_form_term_save_slug',
|
1934 |
+
'type' => 'select',
|
1935 |
+
'instructions' => '',
|
1936 |
+
'required' => 0,
|
1937 |
+
'wrapper' => array(
|
1938 |
+
'width' => '',
|
1939 |
+
'class' => '',
|
1940 |
+
'id' => '',
|
1941 |
+
),
|
1942 |
+
'acfe_permissions' => '',
|
1943 |
+
'choices' => array(),
|
1944 |
+
'default_value' => array(
|
1945 |
+
),
|
1946 |
+
'allow_null' => 1,
|
1947 |
+
'multiple' => 0,
|
1948 |
+
'ui' => 1,
|
1949 |
+
'return_format' => 'value',
|
1950 |
+
'placeholder' => 'Default',
|
1951 |
+
'ajax' => 0,
|
1952 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
1953 |
+
'allow_custom' => 1,
|
1954 |
+
'conditional_logic' => array(
|
1955 |
+
array(
|
1956 |
+
array(
|
1957 |
+
'field' => 'field_acfe_form_term_map_slug',
|
1958 |
+
'operator' => '==empty',
|
1959 |
+
),
|
1960 |
+
),
|
1961 |
+
),
|
1962 |
+
),
|
1963 |
+
array(
|
1964 |
+
'key' => 'field_acfe_form_term_map_slug_message',
|
1965 |
+
'label' => 'Slug',
|
1966 |
+
'name' => 'acfe_form_term_map_slug_message',
|
1967 |
+
'type' => 'acfe_dynamic_message',
|
1968 |
+
'instructions' => '',
|
1969 |
+
'required' => 0,
|
1970 |
+
'conditional_logic' => array(
|
1971 |
+
array(
|
1972 |
+
array(
|
1973 |
+
'field' => 'field_acfe_form_term_map_slug',
|
1974 |
+
'operator' => '!=empty',
|
1975 |
+
),
|
1976 |
+
),
|
1977 |
+
),
|
1978 |
+
'wrapper' => array(
|
1979 |
+
'width' => '',
|
1980 |
+
'class' => '',
|
1981 |
+
'id' => '',
|
1982 |
+
),
|
1983 |
+
'acfe_permissions' => '',
|
1984 |
+
),
|
1985 |
+
array(
|
1986 |
+
'key' => 'field_acfe_form_term_save_taxonomy',
|
1987 |
+
'label' => 'Taxonomy',
|
1988 |
+
'name' => 'acfe_form_term_save_taxonomy',
|
1989 |
+
'type' => 'acfe_taxonomies',
|
1990 |
+
'instructions' => '',
|
1991 |
+
'required' => 0,
|
1992 |
+
'conditional_logic' => array(
|
1993 |
+
array(
|
1994 |
+
array(
|
1995 |
+
'field' => 'field_acfe_form_term_map_taxonomy',
|
1996 |
+
'operator' => '==empty',
|
1997 |
+
),
|
1998 |
+
),
|
1999 |
+
),
|
2000 |
+
'wrapper' => array(
|
2001 |
+
'width' => '',
|
2002 |
+
'class' => '',
|
2003 |
+
'id' => '',
|
2004 |
+
),
|
2005 |
+
'acfe_permissions' => '',
|
2006 |
+
'taxonomy' => '',
|
2007 |
+
'field_type' => 'select',
|
2008 |
+
'default_value' => '',
|
2009 |
+
'return_format' => 'name',
|
2010 |
+
'allow_null' => 1,
|
2011 |
+
'placeholder' => 'Default',
|
2012 |
+
'multiple' => 0,
|
2013 |
+
'ui' => 1,
|
2014 |
+
'choices' => array(
|
2015 |
+
),
|
2016 |
+
'ajax' => 0,
|
2017 |
+
'layout' => '',
|
2018 |
+
'toggle' => 0,
|
2019 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2020 |
+
'allow_custom' => 1,
|
2021 |
+
),
|
2022 |
+
array(
|
2023 |
+
'key' => 'field_acfe_form_term_map_taxonomy_message',
|
2024 |
+
'label' => 'Taxonomy',
|
2025 |
+
'name' => 'acfe_form_term_map_taxonomy_message',
|
2026 |
+
'type' => 'acfe_dynamic_message',
|
2027 |
+
'instructions' => '',
|
2028 |
+
'required' => 0,
|
2029 |
+
'conditional_logic' => array(
|
2030 |
+
array(
|
2031 |
+
array(
|
2032 |
+
'field' => 'field_acfe_form_term_map_taxonomy',
|
2033 |
+
'operator' => '!=empty',
|
2034 |
+
),
|
2035 |
+
),
|
2036 |
+
),
|
2037 |
+
'wrapper' => array(
|
2038 |
+
'width' => '',
|
2039 |
+
'class' => '',
|
2040 |
+
'id' => '',
|
2041 |
+
),
|
2042 |
+
'acfe_permissions' => '',
|
2043 |
+
),
|
2044 |
+
array(
|
2045 |
+
'key' => 'field_acfe_form_term_save_parent',
|
2046 |
+
'label' => 'Parent',
|
2047 |
+
'name' => 'acfe_form_term_save_parent',
|
2048 |
+
'type' => 'select',
|
2049 |
+
'instructions' => '',
|
2050 |
+
'required' => 0,
|
2051 |
+
'conditional_logic' => array(
|
2052 |
+
array(
|
2053 |
+
array(
|
2054 |
+
'field' => 'field_acfe_form_term_map_parent',
|
2055 |
+
'operator' => '==empty',
|
2056 |
+
),
|
2057 |
+
),
|
2058 |
+
),
|
2059 |
+
'wrapper' => array(
|
2060 |
+
'width' => '',
|
2061 |
+
'class' => '',
|
2062 |
+
'id' => '',
|
2063 |
+
),
|
2064 |
+
'acfe_permissions' => '',
|
2065 |
+
'choices' => array(
|
2066 |
+
),
|
2067 |
+
'default_value' => array(
|
2068 |
+
),
|
2069 |
+
'allow_null' => 1,
|
2070 |
+
'multiple' => 0,
|
2071 |
+
'ui' => 1,
|
2072 |
+
'ajax' => 0,
|
2073 |
+
'return_format' => 'value',
|
2074 |
+
'placeholder' => 'Default',
|
2075 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2076 |
+
'allow_custom' => 1,
|
2077 |
+
),
|
2078 |
+
array(
|
2079 |
+
'key' => 'field_acfe_form_term_map_parent_message',
|
2080 |
+
'label' => 'Parent',
|
2081 |
+
'name' => 'acfe_form_term_map_parent_message',
|
2082 |
+
'type' => 'acfe_dynamic_message',
|
2083 |
+
'instructions' => '',
|
2084 |
+
'required' => 0,
|
2085 |
+
'conditional_logic' => array(
|
2086 |
+
array(
|
2087 |
+
array(
|
2088 |
+
'field' => 'field_acfe_form_term_map_parent',
|
2089 |
+
'operator' => '!=empty',
|
2090 |
+
),
|
2091 |
+
),
|
2092 |
+
),
|
2093 |
+
'wrapper' => array(
|
2094 |
+
'width' => '',
|
2095 |
+
'class' => '',
|
2096 |
+
'id' => '',
|
2097 |
+
),
|
2098 |
+
'acfe_permissions' => '',
|
2099 |
+
),
|
2100 |
+
array(
|
2101 |
+
'key' => 'field_acfe_form_term_save_description_group',
|
2102 |
+
'label' => 'Description',
|
2103 |
+
'name' => 'acfe_form_term_save_description_group',
|
2104 |
+
'type' => 'group',
|
2105 |
+
'instructions' => '',
|
2106 |
+
'required' => 0,
|
2107 |
+
'conditional_logic' => array(
|
2108 |
+
array(
|
2109 |
+
array(
|
2110 |
+
'field' => 'field_acfe_form_term_map_description',
|
2111 |
+
'operator' => '==empty',
|
2112 |
+
),
|
2113 |
+
),
|
2114 |
+
),
|
2115 |
+
'wrapper' => array(
|
2116 |
+
'width' => '',
|
2117 |
+
'class' => '',
|
2118 |
+
'id' => '',
|
2119 |
+
),
|
2120 |
+
'acfe_permissions' => '',
|
2121 |
+
'layout' => 'block',
|
2122 |
+
'acfe_seamless_style' => true,
|
2123 |
+
'acfe_group_modal' => 0,
|
2124 |
+
'sub_fields' => array(
|
2125 |
+
array(
|
2126 |
+
'key' => 'field_acfe_form_term_save_description',
|
2127 |
+
'label' => '',
|
2128 |
+
'name' => 'acfe_form_term_save_description',
|
2129 |
+
'type' => 'select',
|
2130 |
+
'instructions' => '',
|
2131 |
+
'required' => 0,
|
2132 |
+
'conditional_logic' => 0,
|
2133 |
+
'wrapper' => array(
|
2134 |
+
'width' => '',
|
2135 |
+
'class' => '',
|
2136 |
+
'id' => '',
|
2137 |
+
),
|
2138 |
+
'acfe_permissions' => '',
|
2139 |
+
'choices' => array(
|
2140 |
+
'custom' => 'WYSIWYG Editor',
|
2141 |
+
),
|
2142 |
+
'default_value' => array(
|
2143 |
+
),
|
2144 |
+
'allow_null' => 1,
|
2145 |
+
'multiple' => 0,
|
2146 |
+
'ui' => 1,
|
2147 |
+
'return_format' => 'value',
|
2148 |
+
'placeholder' => 'Default',
|
2149 |
+
'ajax' => 0,
|
2150 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2151 |
+
'allow_custom' => 1,
|
2152 |
+
),
|
2153 |
+
array(
|
2154 |
+
'key' => 'field_acfe_form_term_save_description_custom',
|
2155 |
+
'label' => '',
|
2156 |
+
'name' => 'acfe_form_term_save_description_custom',
|
2157 |
+
'type' => 'wysiwyg',
|
2158 |
+
'instructions' => '',
|
2159 |
+
'required' => 1,
|
2160 |
+
'conditional_logic' => array(
|
2161 |
+
array(
|
2162 |
+
array(
|
2163 |
+
'field' => 'field_acfe_form_term_save_description',
|
2164 |
+
'operator' => '==',
|
2165 |
+
'value' => 'custom',
|
2166 |
+
),
|
2167 |
+
),
|
2168 |
+
),
|
2169 |
+
'wrapper' => array(
|
2170 |
+
'width' => '',
|
2171 |
+
'class' => '',
|
2172 |
+
'id' => '',
|
2173 |
+
),
|
2174 |
+
'acfe_permissions' => '',
|
2175 |
+
'default_value' => '',
|
2176 |
+
'tabs' => 'all',
|
2177 |
+
'toolbar' => 'full',
|
2178 |
+
'media_upload' => 1,
|
2179 |
+
'delay' => 0,
|
2180 |
+
),
|
2181 |
+
),
|
2182 |
+
),
|
2183 |
+
array(
|
2184 |
+
'key' => 'field_acfe_form_term_map_description_message',
|
2185 |
+
'label' => 'Description',
|
2186 |
+
'name' => 'acfe_form_term_map_description_message',
|
2187 |
+
'type' => 'acfe_dynamic_message',
|
2188 |
+
'instructions' => '',
|
2189 |
+
'required' => 0,
|
2190 |
+
'conditional_logic' => array(
|
2191 |
+
array(
|
2192 |
+
array(
|
2193 |
+
'field' => 'field_acfe_form_term_map_description',
|
2194 |
+
'operator' => '!=empty',
|
2195 |
+
),
|
2196 |
+
),
|
2197 |
+
),
|
2198 |
+
'wrapper' => array(
|
2199 |
+
'width' => '',
|
2200 |
+
'class' => '',
|
2201 |
+
'id' => '',
|
2202 |
+
),
|
2203 |
+
'acfe_permissions' => '',
|
2204 |
+
),
|
2205 |
+
array(
|
2206 |
+
'key' => 'field_acfe_form_term_save_meta',
|
2207 |
+
'label' => 'Save ACF fields',
|
2208 |
+
'name' => 'acfe_form_term_save_meta',
|
2209 |
+
'type' => 'checkbox',
|
2210 |
+
'instructions' => 'Choose which ACF fields should be saved to this term',
|
2211 |
+
'required' => 0,
|
2212 |
+
'conditional_logic' => 0,
|
2213 |
+
'wrapper' => array(
|
2214 |
+
'width' => '',
|
2215 |
+
'class' => '',
|
2216 |
+
'id' => '',
|
2217 |
+
),
|
2218 |
+
'acfe_permissions' => '',
|
2219 |
+
'choices' => array(
|
2220 |
+
),
|
2221 |
+
'allow_custom' => 0,
|
2222 |
+
'default_value' => array(
|
2223 |
+
),
|
2224 |
+
'layout' => 'vertical',
|
2225 |
+
'toggle' => 1,
|
2226 |
+
'return_format' => 'value',
|
2227 |
+
'save_custom' => 0,
|
2228 |
+
),
|
2229 |
+
|
2230 |
+
/*
|
2231 |
+
* Layout: Term Load
|
2232 |
+
*/
|
2233 |
+
array(
|
2234 |
+
'key' => 'field_acfe_form_term_tab_load',
|
2235 |
+
'label' => 'Load',
|
2236 |
+
'name' => '',
|
2237 |
+
'type' => 'tab',
|
2238 |
+
'instructions' => '',
|
2239 |
+
'required' => 0,
|
2240 |
+
'conditional_logic' => 0,
|
2241 |
+
'wrapper' => array(
|
2242 |
+
'width' => '',
|
2243 |
+
'class' => '',
|
2244 |
+
'id' => '',
|
2245 |
+
),
|
2246 |
+
'acfe_permissions' => '',
|
2247 |
+
'placement' => 'top',
|
2248 |
+
'endpoint' => 0,
|
2249 |
+
),
|
2250 |
+
array(
|
2251 |
+
'key' => 'field_acfe_form_term_load_values',
|
2252 |
+
'label' => 'Load Values',
|
2253 |
+
'name' => 'acfe_form_term_load_values',
|
2254 |
+
'type' => 'true_false',
|
2255 |
+
'instructions' => 'Fill inputs with values',
|
2256 |
+
'required' => 0,
|
2257 |
+
'conditional_logic' => 0,
|
2258 |
+
'wrapper' => array(
|
2259 |
+
'width' => '',
|
2260 |
+
'class' => '',
|
2261 |
+
'id' => '',
|
2262 |
+
),
|
2263 |
+
'acfe_permissions' => '',
|
2264 |
+
'message' => '',
|
2265 |
+
'default_value' => 1,
|
2266 |
+
'ui' => 1,
|
2267 |
+
'ui_on_text' => '',
|
2268 |
+
'ui_off_text' => '',
|
2269 |
+
),
|
2270 |
+
array(
|
2271 |
+
'key' => 'field_acfe_form_term_load_source',
|
2272 |
+
'label' => 'Source',
|
2273 |
+
'name' => 'acfe_form_term_load_source',
|
2274 |
+
'type' => 'select',
|
2275 |
+
'instructions' => '',
|
2276 |
+
'required' => 0,
|
2277 |
+
'conditional_logic' => array(
|
2278 |
+
array(
|
2279 |
+
array(
|
2280 |
+
'field' => 'field_acfe_form_term_load_values',
|
2281 |
+
'operator' => '==',
|
2282 |
+
'value' => '1',
|
2283 |
+
),
|
2284 |
+
),
|
2285 |
+
),
|
2286 |
+
'wrapper' => array(
|
2287 |
+
'width' => '',
|
2288 |
+
'class' => '',
|
2289 |
+
'id' => '',
|
2290 |
+
),
|
2291 |
+
'acfe_permissions' => '',
|
2292 |
+
'choices' => array(
|
2293 |
+
),
|
2294 |
+
'default_value' => 'current_term',
|
2295 |
+
'allow_null' => 0,
|
2296 |
+
'multiple' => 0,
|
2297 |
+
'ui' => 1,
|
2298 |
+
'ajax' => 0,
|
2299 |
+
'return_format' => 'value',
|
2300 |
+
'placeholder' => '',
|
2301 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2302 |
+
'allow_custom' => 1,
|
2303 |
+
),
|
2304 |
+
array(
|
2305 |
+
'key' => 'field_acfe_form_term_map_name',
|
2306 |
+
'label' => 'Name',
|
2307 |
+
'name' => 'acfe_form_term_map_name',
|
2308 |
+
'type' => 'select',
|
2309 |
+
'instructions' => '',
|
2310 |
+
'required' => 0,
|
2311 |
+
'wrapper' => array(
|
2312 |
+
'width' => '',
|
2313 |
+
'class' => '',
|
2314 |
+
'id' => '',
|
2315 |
+
),
|
2316 |
+
'acfe_permissions' => '',
|
2317 |
+
'choices' => array(
|
2318 |
+
),
|
2319 |
+
'default_value' => array(
|
2320 |
+
),
|
2321 |
+
'allow_null' => 1,
|
2322 |
+
'multiple' => 0,
|
2323 |
+
'ui' => 1,
|
2324 |
+
'return_format' => 'value',
|
2325 |
+
'placeholder' => 'Default',
|
2326 |
+
'ajax' => 0,
|
2327 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2328 |
+
'allow_custom' => 1,
|
2329 |
+
'conditional_logic' => array(
|
2330 |
+
array(
|
2331 |
+
array(
|
2332 |
+
'field' => 'field_acfe_form_term_load_values',
|
2333 |
+
'operator' => '==',
|
2334 |
+
'value' => '1',
|
2335 |
+
),
|
2336 |
+
),
|
2337 |
+
),
|
2338 |
+
),
|
2339 |
+
array(
|
2340 |
+
'key' => 'field_acfe_form_term_map_slug',
|
2341 |
+
'label' => 'Slug',
|
2342 |
+
'name' => 'acfe_form_term_map_slug',
|
2343 |
+
'type' => 'select',
|
2344 |
+
'instructions' => '',
|
2345 |
+
'required' => 0,
|
2346 |
+
'wrapper' => array(
|
2347 |
+
'width' => '',
|
2348 |
+
'class' => '',
|
2349 |
+
'id' => '',
|
2350 |
+
),
|
2351 |
+
'acfe_permissions' => '',
|
2352 |
+
'choices' => array(
|
2353 |
+
),
|
2354 |
+
'default_value' => array(
|
2355 |
+
),
|
2356 |
+
'allow_null' => 1,
|
2357 |
+
'multiple' => 0,
|
2358 |
+
'ui' => 1,
|
2359 |
+
'return_format' => 'value',
|
2360 |
+
'placeholder' => 'Default',
|
2361 |
+
'ajax' => 0,
|
2362 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2363 |
+
'allow_custom' => 1,
|
2364 |
+
'conditional_logic' => array(
|
2365 |
+
array(
|
2366 |
+
array(
|
2367 |
+
'field' => 'field_acfe_form_term_load_values',
|
2368 |
+
'operator' => '==',
|
2369 |
+
'value' => '1',
|
2370 |
+
),
|
2371 |
+
),
|
2372 |
+
),
|
2373 |
+
),
|
2374 |
+
array(
|
2375 |
+
'key' => 'field_acfe_form_term_map_taxonomy',
|
2376 |
+
'label' => 'Taxonomy',
|
2377 |
+
'name' => 'acfe_form_term_map_taxonomy',
|
2378 |
+
'type' => 'select',
|
2379 |
+
'instructions' => '',
|
2380 |
+
'required' => 0,
|
2381 |
+
'wrapper' => array(
|
2382 |
+
'width' => '',
|
2383 |
+
'class' => '',
|
2384 |
+
'id' => '',
|
2385 |
+
),
|
2386 |
+
'acfe_permissions' => '',
|
2387 |
+
'choices' => array(
|
2388 |
+
),
|
2389 |
+
'default_value' => array(
|
2390 |
+
),
|
2391 |
+
'allow_null' => 1,
|
2392 |
+
'multiple' => 0,
|
2393 |
+
'ui' => 1,
|
2394 |
+
'return_format' => 'value',
|
2395 |
+
'placeholder' => 'Default',
|
2396 |
+
'ajax' => 0,
|
2397 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2398 |
+
'allow_custom' => 1,
|
2399 |
+
'conditional_logic' => array(
|
2400 |
+
array(
|
2401 |
+
array(
|
2402 |
+
'field' => 'field_acfe_form_term_load_values',
|
2403 |
+
'operator' => '==',
|
2404 |
+
'value' => '1',
|
2405 |
+
),
|
2406 |
+
),
|
2407 |
+
),
|
2408 |
+
),
|
2409 |
+
array(
|
2410 |
+
'key' => 'field_acfe_form_term_map_parent',
|
2411 |
+
'label' => 'Parent',
|
2412 |
+
'name' => 'acfe_form_term_map_parent',
|
2413 |
+
'type' => 'select',
|
2414 |
+
'instructions' => '',
|
2415 |
+
'required' => 0,
|
2416 |
+
'wrapper' => array(
|
2417 |
+
'width' => '',
|
2418 |
+
'class' => '',
|
2419 |
+
'id' => '',
|
2420 |
+
),
|
2421 |
+
'acfe_permissions' => '',
|
2422 |
+
'choices' => array(
|
2423 |
+
),
|
2424 |
+
'default_value' => array(
|
2425 |
+
),
|
2426 |
+
'allow_null' => 1,
|
2427 |
+
'multiple' => 0,
|
2428 |
+
'ui' => 1,
|
2429 |
+
'return_format' => 'value',
|
2430 |
+
'placeholder' => 'Default',
|
2431 |
+
'ajax' => 0,
|
2432 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2433 |
+
'allow_custom' => 1,
|
2434 |
+
'conditional_logic' => array(
|
2435 |
+
array(
|
2436 |
+
array(
|
2437 |
+
'field' => 'field_acfe_form_term_load_values',
|
2438 |
+
'operator' => '==',
|
2439 |
+
'value' => '1',
|
2440 |
+
),
|
2441 |
+
),
|
2442 |
+
),
|
2443 |
+
),
|
2444 |
+
array(
|
2445 |
+
'key' => 'field_acfe_form_term_map_description',
|
2446 |
+
'label' => 'Description',
|
2447 |
+
'name' => 'acfe_form_term_map_description',
|
2448 |
+
'type' => 'select',
|
2449 |
+
'instructions' => '',
|
2450 |
+
'required' => 0,
|
2451 |
+
'wrapper' => array(
|
2452 |
+
'width' => '',
|
2453 |
+
'class' => '',
|
2454 |
+
'id' => '',
|
2455 |
+
),
|
2456 |
+
'acfe_permissions' => '',
|
2457 |
+
'choices' => array(
|
2458 |
+
),
|
2459 |
+
'default_value' => array(
|
2460 |
+
),
|
2461 |
+
'allow_null' => 1,
|
2462 |
+
'multiple' => 0,
|
2463 |
+
'ui' => 1,
|
2464 |
+
'return_format' => 'value',
|
2465 |
+
'placeholder' => 'Default',
|
2466 |
+
'ajax' => 0,
|
2467 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2468 |
+
'allow_custom' => 1,
|
2469 |
+
'conditional_logic' => array(
|
2470 |
+
array(
|
2471 |
+
array(
|
2472 |
+
'field' => 'field_acfe_form_term_load_values',
|
2473 |
+
'operator' => '==',
|
2474 |
+
'value' => '1',
|
2475 |
+
),
|
2476 |
+
),
|
2477 |
+
),
|
2478 |
+
),
|
2479 |
+
array(
|
2480 |
+
'key' => 'field_acfe_form_term_load_meta',
|
2481 |
+
'label' => 'Load ACF fields',
|
2482 |
+
'name' => 'acfe_form_term_load_meta',
|
2483 |
+
'type' => 'checkbox',
|
2484 |
+
'instructions' => 'Choose which ACF fields should have their values loaded',
|
2485 |
+
'required' => 0,
|
2486 |
+
'conditional_logic' => array(
|
2487 |
+
array(
|
2488 |
+
array(
|
2489 |
+
'field' => 'field_acfe_form_term_load_values',
|
2490 |
+
'operator' => '==',
|
2491 |
+
'value' => '1',
|
2492 |
+
),
|
2493 |
+
),
|
2494 |
+
),
|
2495 |
+
'wrapper' => array(
|
2496 |
+
'width' => '',
|
2497 |
+
'class' => '',
|
2498 |
+
'id' => '',
|
2499 |
+
),
|
2500 |
+
'acfe_permissions' => '',
|
2501 |
+
'choices' => array(
|
2502 |
+
),
|
2503 |
+
'allow_custom' => 0,
|
2504 |
+
'default_value' => array(
|
2505 |
+
),
|
2506 |
+
'layout' => 'vertical',
|
2507 |
+
'toggle' => 1,
|
2508 |
+
'return_format' => 'value',
|
2509 |
+
'save_custom' => 0,
|
2510 |
+
),
|
2511 |
+
|
2512 |
+
/*
|
2513 |
+
* Layout: Term Advanced
|
2514 |
+
*/
|
2515 |
+
array(
|
2516 |
+
'key' => 'field_acfe_form_term_tab_advanced',
|
2517 |
+
'label' => 'Code',
|
2518 |
+
'name' => '',
|
2519 |
+
'type' => 'tab',
|
2520 |
+
'instructions' => '',
|
2521 |
+
'required' => 0,
|
2522 |
+
'conditional_logic' => 0,
|
2523 |
+
'wrapper' => array(
|
2524 |
+
'width' => '',
|
2525 |
+
'class' => '',
|
2526 |
+
'id' => '',
|
2527 |
+
),
|
2528 |
+
'acfe_permissions' => '',
|
2529 |
+
'placement' => 'top',
|
2530 |
+
'endpoint' => 0,
|
2531 |
+
),
|
2532 |
+
array(
|
2533 |
+
'key' => 'field_acfe_form_term_advanced_load',
|
2534 |
+
'label' => 'Change values source',
|
2535 |
+
'name' => 'acfe_form_term_advanced_load',
|
2536 |
+
'type' => 'acfe_dynamic_message',
|
2537 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
2538 |
+
'instructions' => 'Alter the term ID where meta values are loaded from',
|
2539 |
+
'required' => 0,
|
2540 |
+
'conditional_logic' => 0,
|
2541 |
+
'wrapper' => array(
|
2542 |
+
'width' => '',
|
2543 |
+
'class' => '',
|
2544 |
+
'id' => '',
|
2545 |
+
),
|
2546 |
+
'acfe_permissions' => '',
|
2547 |
+
),
|
2548 |
+
array(
|
2549 |
+
'key' => 'field_acfe_form_term_advanced_save_args',
|
2550 |
+
'label' => 'Change term arguments',
|
2551 |
+
'name' => 'acfe_form_term_advanced_save_args',
|
2552 |
+
'type' => 'acfe_dynamic_message',
|
2553 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
2554 |
+
'instructions' => 'Alter the term arguments before database insert/update',
|
2555 |
+
'required' => 0,
|
2556 |
+
'conditional_logic' => 0,
|
2557 |
+
'wrapper' => array(
|
2558 |
+
'width' => '',
|
2559 |
+
'class' => '',
|
2560 |
+
'id' => '',
|
2561 |
+
),
|
2562 |
+
'acfe_permissions' => '',
|
2563 |
+
),
|
2564 |
+
array(
|
2565 |
+
'key' => 'field_acfe_form_term_advanced_save',
|
2566 |
+
'label' => 'Add custom action on term save',
|
2567 |
+
'name' => 'acfe_form_term_advanced_save',
|
2568 |
+
'type' => 'acfe_dynamic_message',
|
2569 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
2570 |
+
'instructions' => 'This action allows you to hook in before or after the meta data have been saved',
|
2571 |
+
'required' => 0,
|
2572 |
+
'conditional_logic' => 0,
|
2573 |
+
'wrapper' => array(
|
2574 |
+
'width' => '',
|
2575 |
+
'class' => '',
|
2576 |
+
'id' => '',
|
2577 |
+
),
|
2578 |
+
'acfe_permissions' => '',
|
2579 |
+
),
|
2580 |
),
|
2581 |
+
'min' => '',
|
2582 |
+
'max' => '',
|
2583 |
+
),
|
2584 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2585 |
/*
|
2586 |
+
* Layout: User
|
2587 |
*/
|
2588 |
+
'layout_user' => array(
|
2589 |
+
'key' => 'layout_user',
|
2590 |
+
'name' => 'user',
|
2591 |
+
'label' => 'User action',
|
2592 |
'display' => 'row',
|
2593 |
'sub_fields' => array(
|
2594 |
+
|
2595 |
+
/*
|
2596 |
+
* Layout: User Action
|
2597 |
+
*/
|
2598 |
+
array(
|
2599 |
+
'key' => 'field_acfe_form_user_tab_action',
|
2600 |
+
'label' => 'Action',
|
2601 |
+
'name' => '',
|
2602 |
+
'type' => 'tab',
|
2603 |
+
'instructions' => '',
|
2604 |
+
'required' => 0,
|
2605 |
+
'conditional_logic' => 0,
|
2606 |
+
'wrapper' => array(
|
2607 |
+
'width' => '',
|
2608 |
+
'class' => '',
|
2609 |
+
'id' => '',
|
2610 |
+
),
|
2611 |
+
'acfe_permissions' => '',
|
2612 |
+
'placement' => 'top',
|
2613 |
+
'endpoint' => 0,
|
2614 |
+
),
|
2615 |
+
array(
|
2616 |
+
'key' => 'field_acfe_form_user_action',
|
2617 |
+
'label' => 'Action',
|
2618 |
+
'name' => 'acfe_form_user_action',
|
2619 |
+
'type' => 'radio',
|
2620 |
+
'instructions' => '',
|
2621 |
+
'required' => 0,
|
2622 |
+
'conditional_logic' => 0,
|
2623 |
+
'wrapper' => array(
|
2624 |
+
'width' => '',
|
2625 |
+
'class' => '',
|
2626 |
+
'id' => '',
|
2627 |
+
),
|
2628 |
+
'acfe_permissions' => '',
|
2629 |
+
'choices' => array(
|
2630 |
+
'insert_user' => 'Create user',
|
2631 |
+
'update_user' => 'Update user',
|
2632 |
+
'log_user' => 'Log user',
|
2633 |
+
),
|
2634 |
+
'default_value' => 'insert_post',
|
2635 |
+
),
|
2636 |
+
array(
|
2637 |
+
'key' => 'field_acfe_form_user_custom_alias',
|
2638 |
+
'label' => 'Action name',
|
2639 |
+
'name' => 'acfe_form_custom_alias',
|
2640 |
+
'type' => 'acfe_slug',
|
2641 |
+
'instructions' => '(Optional) Target this action using hooks & allow custom <code>{query_var:my-action}</code> name.',
|
2642 |
+
'required' => 0,
|
2643 |
+
'conditional_logic' => 0,
|
2644 |
+
'wrapper' => array(
|
2645 |
+
'width' => '',
|
2646 |
+
'class' => '',
|
2647 |
+
'id' => '',
|
2648 |
+
),
|
2649 |
+
'acfe_permissions' => '',
|
2650 |
+
'default_value' => '',
|
2651 |
+
'placeholder' => 'User',
|
2652 |
+
'prepend' => '',
|
2653 |
+
'append' => '',
|
2654 |
+
'maxlength' => '',
|
2655 |
+
),
|
2656 |
+
|
2657 |
+
/*
|
2658 |
+
* Layout: User Login
|
2659 |
+
*/
|
2660 |
+
array(
|
2661 |
+
'key' => 'field_acfe_form_user_tab_login',
|
2662 |
+
'label' => 'Login',
|
2663 |
+
'name' => '',
|
2664 |
+
'type' => 'tab',
|
2665 |
+
'instructions' => '',
|
2666 |
+
'required' => 0,
|
2667 |
+
'wrapper' => array(
|
2668 |
+
'width' => '',
|
2669 |
+
'class' => '',
|
2670 |
+
'id' => '',
|
2671 |
+
),
|
2672 |
+
'acfe_permissions' => '',
|
2673 |
+
'placement' => 'top',
|
2674 |
+
'endpoint' => 0,
|
2675 |
+
'conditional_logic' => array(
|
2676 |
+
array(
|
2677 |
+
array(
|
2678 |
+
'field' => 'field_acfe_form_user_action',
|
2679 |
+
'operator' => '==',
|
2680 |
+
'value' => 'log_user',
|
2681 |
+
),
|
2682 |
+
),
|
2683 |
+
),
|
2684 |
+
),
|
2685 |
+
array(
|
2686 |
+
'key' => 'field_acfe_form_user_log_type',
|
2687 |
+
'label' => 'Login type',
|
2688 |
+
'name' => 'acfe_form_user_log_type',
|
2689 |
+
'type' => 'radio',
|
2690 |
+
'instructions' => '',
|
2691 |
+
'required' => 0,
|
2692 |
+
'wrapper' => array(
|
2693 |
+
'width' => '',
|
2694 |
+
'class' => '',
|
2695 |
+
'id' => '',
|
2696 |
+
),
|
2697 |
+
'acfe_permissions' => '',
|
2698 |
+
'choices' => array(
|
2699 |
+
'email' => 'E-mail',
|
2700 |
+
'username' => 'Username',
|
2701 |
+
'email_username' => 'E-mail or username',
|
2702 |
+
),
|
2703 |
+
'allow_null' => 0,
|
2704 |
+
'other_choice' => 0,
|
2705 |
+
'default_value' => 'email',
|
2706 |
+
'layout' => 'vertical',
|
2707 |
+
'return_format' => 'value',
|
2708 |
+
'save_other_choice' => 0,
|
2709 |
+
'conditional_logic' => array(
|
2710 |
+
array(
|
2711 |
+
array(
|
2712 |
+
'field' => 'field_acfe_form_user_action',
|
2713 |
+
'operator' => '==',
|
2714 |
+
'value' => 'log_user',
|
2715 |
+
),
|
2716 |
+
),
|
2717 |
+
),
|
2718 |
+
),
|
2719 |
+
array(
|
2720 |
+
'key' => 'field_acfe_form_user_save_login_user',
|
2721 |
+
'label' => 'Login',
|
2722 |
+
'name' => 'acfe_form_user_save_login_user',
|
2723 |
+
'type' => 'select',
|
2724 |
+
'instructions' => '',
|
2725 |
+
'required' => 0,
|
2726 |
+
'wrapper' => array(
|
2727 |
+
'width' => '',
|
2728 |
+
'class' => '',
|
2729 |
+
'id' => '',
|
2730 |
+
),
|
2731 |
+
'acfe_permissions' => '',
|
2732 |
+
'choices' => array(),
|
2733 |
+
'default_value' => array(
|
2734 |
+
),
|
2735 |
+
'allow_null' => 1,
|
2736 |
+
'multiple' => 0,
|
2737 |
+
'ui' => 1,
|
2738 |
+
'return_format' => 'value',
|
2739 |
+
'placeholder' => 'Default',
|
2740 |
+
'ajax' => 0,
|
2741 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2742 |
+
'allow_custom' => 1,
|
2743 |
+
'conditional_logic' => array(
|
2744 |
+
array(
|
2745 |
+
array(
|
2746 |
+
'field' => 'field_acfe_form_user_action',
|
2747 |
+
'operator' => '==',
|
2748 |
+
'value' => 'log_user',
|
2749 |
+
),
|
2750 |
+
),
|
2751 |
+
),
|
2752 |
+
),
|
2753 |
+
array(
|
2754 |
+
'key' => 'field_acfe_form_user_save_login_pass',
|
2755 |
+
'label' => 'Password',
|
2756 |
+
'name' => 'acfe_form_user_save_login_pass',
|
2757 |
+
'type' => 'select',
|
2758 |
+
'instructions' => '',
|
2759 |
+
'required' => 0,
|
2760 |
+
'wrapper' => array(
|
2761 |
+
'width' => '',
|
2762 |
+
'class' => '',
|
2763 |
+
'id' => '',
|
2764 |
+
),
|
2765 |
+
'acfe_permissions' => '',
|
2766 |
+
'choices' => array(),
|
2767 |
+
'default_value' => array(
|
2768 |
+
),
|
2769 |
+
'allow_null' => 1,
|
2770 |
+
'multiple' => 0,
|
2771 |
+
'ui' => 1,
|
2772 |
+
'return_format' => 'value',
|
2773 |
+
'placeholder' => 'Default',
|
2774 |
+
'ajax' => 0,
|
2775 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2776 |
+
'allow_custom' => 1,
|
2777 |
+
'conditional_logic' => array(
|
2778 |
+
array(
|
2779 |
+
array(
|
2780 |
+
'field' => 'field_acfe_form_user_action',
|
2781 |
+
'operator' => '==',
|
2782 |
+
'value' => 'log_user',
|
2783 |
+
),
|
2784 |
+
),
|
2785 |
+
),
|
2786 |
+
),
|
2787 |
+
array(
|
2788 |
+
'key' => 'field_acfe_form_user_save_login_remember',
|
2789 |
+
'label' => 'Remember me',
|
2790 |
+
'name' => 'acfe_form_user_save_login_remember',
|
2791 |
+
'type' => 'select',
|
2792 |
+
'instructions' => '',
|
2793 |
+
'required' => 0,
|
2794 |
+
'wrapper' => array(
|
2795 |
+
'width' => '',
|
2796 |
+
'class' => '',
|
2797 |
+
'id' => '',
|
2798 |
+
),
|
2799 |
+
'acfe_permissions' => '',
|
2800 |
+
'choices' => array(),
|
2801 |
+
'default_value' => array(
|
2802 |
+
),
|
2803 |
+
'allow_null' => 1,
|
2804 |
+
'multiple' => 0,
|
2805 |
+
'ui' => 1,
|
2806 |
+
'return_format' => 'value',
|
2807 |
+
'placeholder' => 'Default',
|
2808 |
+
'ajax' => 0,
|
2809 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2810 |
+
'allow_custom' => 1,
|
2811 |
+
'conditional_logic' => array(
|
2812 |
+
array(
|
2813 |
+
array(
|
2814 |
+
'field' => 'field_acfe_form_user_action',
|
2815 |
+
'operator' => '==',
|
2816 |
+
'value' => 'log_user',
|
2817 |
+
),
|
2818 |
+
),
|
2819 |
+
),
|
2820 |
+
),
|
2821 |
+
|
2822 |
+
/*
|
2823 |
+
* Layout: User Save
|
2824 |
*/
|
2825 |
array(
|
2826 |
+
'key' => 'field_acfe_form_user_tab_save',
|
2827 |
+
'label' => 'Save',
|
2828 |
+
'name' => '',
|
2829 |
+
'type' => 'tab',
|
2830 |
+
'instructions' => '',
|
2831 |
+
'required' => 0,
|
2832 |
+
'wrapper' => array(
|
2833 |
+
'width' => '',
|
2834 |
+
'class' => '',
|
2835 |
+
'id' => '',
|
2836 |
+
),
|
2837 |
+
'acfe_permissions' => '',
|
2838 |
+
'placement' => 'top',
|
2839 |
+
'endpoint' => 0,
|
2840 |
+
'conditional_logic' => array(
|
2841 |
+
array(
|
2842 |
+
array(
|
2843 |
+
'field' => 'field_acfe_form_user_action',
|
2844 |
+
'operator' => '!=',
|
2845 |
+
'value' => 'log_user',
|
2846 |
+
),
|
2847 |
+
),
|
2848 |
+
),
|
2849 |
+
),
|
2850 |
+
array(
|
2851 |
+
'key' => 'field_acfe_form_user_save_target',
|
2852 |
+
'label' => 'Target',
|
2853 |
+
'name' => 'acfe_form_user_save_target',
|
2854 |
+
'type' => 'select',
|
2855 |
+
'instructions' => '',
|
2856 |
+
'required' => 0,
|
2857 |
+
'conditional_logic' => array(
|
2858 |
+
array(
|
2859 |
+
array(
|
2860 |
+
'field' => 'field_acfe_form_user_action',
|
2861 |
+
'operator' => '==',
|
2862 |
+
'value' => 'update_user',
|
2863 |
+
),
|
2864 |
+
),
|
2865 |
+
),
|
2866 |
+
'wrapper' => array(
|
2867 |
+
'width' => '',
|
2868 |
+
'class' => '',
|
2869 |
+
'id' => '',
|
2870 |
+
),
|
2871 |
+
'acfe_permissions' => '',
|
2872 |
+
'choices' => array(
|
2873 |
+
),
|
2874 |
+
'default_value' => 'current_user',
|
2875 |
+
'allow_null' => 0,
|
2876 |
+
'multiple' => 0,
|
2877 |
+
'ui' => 1,
|
2878 |
+
'ajax' => 0,
|
2879 |
+
'return_format' => 'value',
|
2880 |
+
'placeholder' => '',
|
2881 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2882 |
+
'allow_custom' => 1,
|
2883 |
+
),
|
2884 |
+
array(
|
2885 |
+
'key' => 'field_acfe_form_user_save_email',
|
2886 |
+
'label' => 'Email',
|
2887 |
+
'name' => 'acfe_form_user_save_email',
|
2888 |
+
'type' => 'select',
|
2889 |
+
'instructions' => '',
|
2890 |
+
'required' => 0,
|
2891 |
+
'wrapper' => array(
|
2892 |
+
'width' => '',
|
2893 |
+
'class' => '',
|
2894 |
+
'id' => '',
|
2895 |
+
),
|
2896 |
+
'acfe_permissions' => '',
|
2897 |
+
'choices' => array(),
|
2898 |
+
'default_value' => array(
|
2899 |
+
),
|
2900 |
+
'allow_null' => 1,
|
2901 |
+
'multiple' => 0,
|
2902 |
+
'ui' => 1,
|
2903 |
+
'return_format' => 'value',
|
2904 |
+
'placeholder' => 'Default',
|
2905 |
+
'ajax' => 0,
|
2906 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2907 |
+
'allow_custom' => 1,
|
2908 |
+
'conditional_logic' => array(
|
2909 |
+
array(
|
2910 |
+
array(
|
2911 |
+
'field' => 'field_acfe_form_user_map_email',
|
2912 |
+
'operator' => '==empty',
|
2913 |
+
),
|
2914 |
+
array(
|
2915 |
+
'field' => 'field_acfe_form_user_action',
|
2916 |
+
'operator' => '!=',
|
2917 |
+
'value' => 'log_user',
|
2918 |
+
),
|
2919 |
+
),
|
2920 |
+
),
|
2921 |
+
),
|
2922 |
+
array(
|
2923 |
+
'key' => 'field_acfe_form_user_map_email_message',
|
2924 |
+
'label' => 'Email',
|
2925 |
+
'name' => 'acfe_form_user_map_email_message',
|
2926 |
+
'type' => 'acfe_dynamic_message',
|
2927 |
+
'instructions' => '',
|
2928 |
+
'required' => 0,
|
2929 |
+
'conditional_logic' => array(
|
2930 |
+
array(
|
2931 |
+
array(
|
2932 |
+
'field' => 'field_acfe_form_user_map_email',
|
2933 |
+
'operator' => '!=empty',
|
2934 |
+
),
|
2935 |
+
array(
|
2936 |
+
'field' => 'field_acfe_form_user_action',
|
2937 |
+
'operator' => '!=',
|
2938 |
+
'value' => 'log_user',
|
2939 |
+
),
|
2940 |
+
),
|
2941 |
+
),
|
2942 |
+
'wrapper' => array(
|
2943 |
+
'width' => '',
|
2944 |
+
'class' => '',
|
2945 |
+
'id' => '',
|
2946 |
+
),
|
2947 |
+
'acfe_permissions' => '',
|
2948 |
+
),
|
2949 |
+
array(
|
2950 |
+
'key' => 'field_acfe_form_user_save_username',
|
2951 |
+
'label' => 'Username',
|
2952 |
+
'name' => 'acfe_form_user_save_username',
|
2953 |
+
'type' => 'select',
|
2954 |
+
'instructions' => '',
|
2955 |
+
'required' => 0,
|
2956 |
+
'wrapper' => array(
|
2957 |
+
'width' => '',
|
2958 |
+
'class' => '',
|
2959 |
+
'id' => '',
|
2960 |
+
),
|
2961 |
+
'acfe_permissions' => '',
|
2962 |
+
'choices' => array(),
|
2963 |
+
'default_value' => array(
|
2964 |
+
),
|
2965 |
+
'allow_null' => 1,
|
2966 |
+
'multiple' => 0,
|
2967 |
+
'ui' => 1,
|
2968 |
+
'return_format' => 'value',
|
2969 |
+
'placeholder' => 'Default',
|
2970 |
+
'ajax' => 0,
|
2971 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
2972 |
+
'allow_custom' => 1,
|
2973 |
+
'conditional_logic' => array(
|
2974 |
+
array(
|
2975 |
+
array(
|
2976 |
+
'field' => 'field_acfe_form_user_map_username',
|
2977 |
+
'operator' => '==empty',
|
2978 |
+
),
|
2979 |
+
array(
|
2980 |
+
'field' => 'field_acfe_form_user_action',
|
2981 |
+
'operator' => '!=',
|
2982 |
+
'value' => 'log_user',
|
2983 |
+
),
|
2984 |
+
),
|
2985 |
+
),
|
2986 |
+
),
|
2987 |
+
array(
|
2988 |
+
'key' => 'field_acfe_form_user_map_username_message',
|
2989 |
+
'label' => 'Username',
|
2990 |
+
'name' => 'acfe_form_user_map_username_message',
|
2991 |
+
'type' => 'acfe_dynamic_message',
|
2992 |
+
'instructions' => '',
|
2993 |
+
'required' => 0,
|
2994 |
+
'conditional_logic' => array(
|
2995 |
+
array(
|
2996 |
+
array(
|
2997 |
+
'field' => 'field_acfe_form_user_map_username',
|
2998 |
+
'operator' => '!=empty',
|
2999 |
+
),
|
3000 |
+
array(
|
3001 |
+
'field' => 'field_acfe_form_user_action',
|
3002 |
+
'operator' => '!=',
|
3003 |
+
'value' => 'log_user',
|
3004 |
+
),
|
3005 |
+
),
|
3006 |
+
),
|
3007 |
+
'wrapper' => array(
|
3008 |
+
'width' => '',
|
3009 |
+
'class' => '',
|
3010 |
+
'id' => '',
|
3011 |
+
),
|
3012 |
+
'acfe_permissions' => '',
|
3013 |
+
),
|
3014 |
+
array(
|
3015 |
+
'key' => 'field_acfe_form_user_save_password',
|
3016 |
+
'label' => 'Password',
|
3017 |
+
'name' => 'acfe_form_user_save_password',
|
3018 |
+
'type' => 'select',
|
3019 |
+
'instructions' => '',
|
3020 |
+
'required' => 0,
|
3021 |
+
'wrapper' => array(
|
3022 |
+
'width' => '',
|
3023 |
+
'class' => '',
|
3024 |
+
'id' => '',
|
3025 |
+
),
|
3026 |
+
'acfe_permissions' => '',
|
3027 |
+
'choices' => array(
|
3028 |
+
'generate_password' => 'Generate password',
|
3029 |
+
),
|
3030 |
+
'default_value' => array(
|
3031 |
+
),
|
3032 |
+
'allow_null' => 1,
|
3033 |
+
'multiple' => 0,
|
3034 |
+
'ui' => 1,
|
3035 |
+
'return_format' => 'value',
|
3036 |
+
'placeholder' => 'Default',
|
3037 |
+
'ajax' => 0,
|
3038 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3039 |
+
'allow_custom' => 1,
|
3040 |
+
'conditional_logic' => array(
|
3041 |
+
array(
|
3042 |
+
array(
|
3043 |
+
'field' => 'field_acfe_form_user_map_password',
|
3044 |
+
'operator' => '==empty',
|
3045 |
+
),
|
3046 |
+
array(
|
3047 |
+
'field' => 'field_acfe_form_user_action',
|
3048 |
+
'operator' => '!=',
|
3049 |
+
'value' => 'log_user',
|
3050 |
+
),
|
3051 |
+
),
|
3052 |
+
),
|
3053 |
+
),
|
3054 |
array(
|
3055 |
+
'key' => 'field_acfe_form_user_map_password_message',
|
3056 |
+
'label' => 'Password',
|
3057 |
+
'name' => 'acfe_form_user_map_password_message',
|
3058 |
+
'type' => 'acfe_dynamic_message',
|
3059 |
+
'instructions' => '',
|
3060 |
+
'required' => 0,
|
3061 |
+
'conditional_logic' => array(
|
3062 |
+
array(
|
3063 |
+
array(
|
3064 |
+
'field' => 'field_acfe_form_user_map_password',
|
3065 |
+
'operator' => '!=empty',
|
3066 |
+
),
|
3067 |
+
array(
|
3068 |
+
'field' => 'field_acfe_form_user_action',
|
3069 |
+
'operator' => '!=',
|
3070 |
+
'value' => 'log_user',
|
3071 |
+
),
|
3072 |
+
),
|
3073 |
+
),
|
3074 |
'wrapper' => array(
|
3075 |
'width' => '',
|
3076 |
'class' => '',
|
3077 |
'id' => '',
|
3078 |
),
|
3079 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
3080 |
),
|
|
|
|
|
|
|
|
|
3081 |
array(
|
3082 |
+
'key' => 'field_acfe_form_user_save_first_name',
|
3083 |
+
'label' => 'First name',
|
3084 |
+
'name' => 'acfe_form_user_save_first_name',
|
3085 |
+
'type' => 'select',
|
3086 |
+
'instructions' => '',
|
3087 |
+
'required' => 0,
|
3088 |
+
'wrapper' => array(
|
3089 |
+
'width' => '',
|
3090 |
+
'class' => '',
|
3091 |
+
'id' => '',
|
3092 |
+
),
|
3093 |
+
'acfe_permissions' => '',
|
3094 |
+
'choices' => array(),
|
3095 |
+
'default_value' => array(
|
3096 |
+
),
|
3097 |
+
'allow_null' => 1,
|
3098 |
+
'multiple' => 0,
|
3099 |
+
'ui' => 1,
|
3100 |
+
'return_format' => 'value',
|
3101 |
+
'placeholder' => 'Default',
|
3102 |
+
'ajax' => 0,
|
3103 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3104 |
+
'allow_custom' => 1,
|
3105 |
+
'conditional_logic' => array(
|
3106 |
+
array(
|
3107 |
+
array(
|
3108 |
+
'field' => 'field_acfe_form_user_map_first_name',
|
3109 |
+
'operator' => '==empty',
|
3110 |
+
),
|
3111 |
+
array(
|
3112 |
+
'field' => 'field_acfe_form_user_action',
|
3113 |
+
'operator' => '!=',
|
3114 |
+
'value' => 'log_user',
|
3115 |
+
),
|
3116 |
+
),
|
3117 |
+
),
|
3118 |
+
),
|
3119 |
array(
|
3120 |
+
'key' => 'field_acfe_form_user_map_first_name_message',
|
3121 |
+
'label' => 'First name',
|
3122 |
+
'name' => 'acfe_form_user_map_first_name_message',
|
3123 |
'type' => 'acfe_dynamic_message',
|
|
|
3124 |
'instructions' => '',
|
3125 |
'required' => 0,
|
3126 |
+
'conditional_logic' => array(
|
3127 |
+
array(
|
3128 |
+
array(
|
3129 |
+
'field' => 'field_acfe_form_user_map_first_name',
|
3130 |
+
'operator' => '!=empty',
|
3131 |
+
),
|
3132 |
+
array(
|
3133 |
+
'field' => 'field_acfe_form_user_action',
|
3134 |
+
'operator' => '!=',
|
3135 |
+
'value' => 'log_user',
|
3136 |
+
),
|
3137 |
+
),
|
3138 |
+
),
|
3139 |
'wrapper' => array(
|
3140 |
'width' => '',
|
3141 |
'class' => '',
|
3144 |
'acfe_permissions' => '',
|
3145 |
),
|
3146 |
array(
|
3147 |
+
'key' => 'field_acfe_form_user_save_last_name',
|
3148 |
+
'label' => 'Last name',
|
3149 |
+
'name' => 'acfe_form_user_save_last_name',
|
3150 |
+
'type' => 'select',
|
|
|
3151 |
'instructions' => '',
|
3152 |
'required' => 0,
|
|
|
3153 |
'wrapper' => array(
|
3154 |
'width' => '',
|
3155 |
'class' => '',
|
3156 |
'id' => '',
|
3157 |
),
|
3158 |
'acfe_permissions' => '',
|
3159 |
+
'choices' => array(),
|
3160 |
+
'default_value' => array(),
|
3161 |
+
'allow_null' => 1,
|
3162 |
+
'multiple' => 0,
|
3163 |
+
'ui' => 1,
|
3164 |
+
'return_format' => 'value',
|
3165 |
+
'placeholder' => 'Default',
|
3166 |
+
'ajax' => 0,
|
3167 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3168 |
+
'allow_custom' => 1,
|
3169 |
+
'conditional_logic' => array(
|
3170 |
+
array(
|
3171 |
+
array(
|
3172 |
+
'field' => 'field_acfe_form_user_map_last_name',
|
3173 |
+
'operator' => '==empty',
|
3174 |
+
),
|
3175 |
+
array(
|
3176 |
+
'field' => 'field_acfe_form_user_action',
|
3177 |
+
'operator' => '!=',
|
3178 |
+
'value' => 'log_user',
|
3179 |
+
),
|
3180 |
+
),
|
3181 |
+
),
|
3182 |
),
|
3183 |
array(
|
3184 |
+
'key' => 'field_acfe_form_user_map_last_name_message',
|
3185 |
+
'label' => 'Last name',
|
3186 |
+
'name' => 'acfe_form_user_map_last_name_message',
|
3187 |
'type' => 'acfe_dynamic_message',
|
|
|
3188 |
'instructions' => '',
|
3189 |
'required' => 0,
|
3190 |
+
'conditional_logic' => array(
|
3191 |
+
array(
|
3192 |
+
array(
|
3193 |
+
'field' => 'field_acfe_form_user_map_last_name',
|
3194 |
+
'operator' => '!=empty',
|
3195 |
+
),
|
3196 |
+
array(
|
3197 |
+
'field' => 'field_acfe_form_user_action',
|
3198 |
+
'operator' => '!=',
|
3199 |
+
'value' => 'log_user',
|
3200 |
+
),
|
3201 |
+
),
|
3202 |
+
),
|
3203 |
'wrapper' => array(
|
3204 |
'width' => '',
|
3205 |
'class' => '',
|
3207 |
),
|
3208 |
'acfe_permissions' => '',
|
3209 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3210 |
array(
|
3211 |
+
'key' => 'field_acfe_form_user_save_nickname',
|
3212 |
+
'label' => 'Nickname',
|
3213 |
+
'name' => 'acfe_form_user_save_nickname',
|
3214 |
+
'type' => 'select',
|
3215 |
+
'instructions' => '',
|
3216 |
+
'required' => 0,
|
3217 |
+
'wrapper' => array(
|
3218 |
+
'width' => '',
|
3219 |
+
'class' => '',
|
3220 |
+
'id' => '',
|
3221 |
+
),
|
3222 |
+
'acfe_permissions' => '',
|
3223 |
+
'choices' => array(),
|
3224 |
+
'default_value' => array(
|
3225 |
+
),
|
3226 |
+
'allow_null' => 1,
|
3227 |
+
'multiple' => 0,
|
3228 |
+
'ui' => 1,
|
3229 |
+
'return_format' => 'value',
|
3230 |
+
'placeholder' => 'Default',
|
3231 |
+
'ajax' => 0,
|
3232 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3233 |
+
'allow_custom' => 1,
|
3234 |
+
'conditional_logic' => array(
|
3235 |
+
array(
|
3236 |
+
array(
|
3237 |
+
'field' => 'field_acfe_form_user_map_nickname',
|
3238 |
+
'operator' => '==empty',
|
3239 |
+
),
|
3240 |
+
array(
|
3241 |
+
'field' => 'field_acfe_form_user_action',
|
3242 |
+
'operator' => '!=',
|
3243 |
+
'value' => 'log_user',
|
3244 |
+
),
|
3245 |
+
),
|
3246 |
+
),
|
3247 |
+
),
|
3248 |
array(
|
3249 |
+
'key' => 'field_acfe_form_user_map_nickname_message',
|
3250 |
+
'label' => 'Nickname',
|
3251 |
+
'name' => 'acfe_form_user_map_nickname_message',
|
3252 |
+
'type' => 'acfe_dynamic_message',
|
3253 |
+
'instructions' => '',
|
3254 |
'required' => 0,
|
3255 |
+
'conditional_logic' => array(
|
3256 |
+
array(
|
3257 |
+
array(
|
3258 |
+
'field' => 'field_acfe_form_user_map_nickname',
|
3259 |
+
'operator' => '!=empty',
|
3260 |
+
),
|
3261 |
+
array(
|
3262 |
+
'field' => 'field_acfe_form_user_action',
|
3263 |
+
'operator' => '!=',
|
3264 |
+
'value' => 'log_user',
|
3265 |
+
),
|
3266 |
+
),
|
3267 |
+
),
|
3268 |
'wrapper' => array(
|
3269 |
'width' => '',
|
3270 |
'class' => '',
|
3271 |
'id' => '',
|
3272 |
),
|
3273 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
3274 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3275 |
array(
|
3276 |
+
'key' => 'field_acfe_form_user_save_display_name',
|
3277 |
+
'label' => 'Display name',
|
3278 |
+
'name' => 'acfe_form_user_save_display_name',
|
3279 |
+
'type' => 'select',
|
3280 |
+
'instructions' => '',
|
3281 |
+
'required' => 0,
|
3282 |
+
'wrapper' => array(
|
3283 |
+
'width' => '',
|
3284 |
+
'class' => '',
|
3285 |
+
'id' => '',
|
3286 |
+
),
|
3287 |
+
'acfe_permissions' => '',
|
3288 |
+
'choices' => array(),
|
3289 |
+
'default_value' => array(
|
3290 |
+
),
|
3291 |
+
'allow_null' => 1,
|
3292 |
+
'multiple' => 0,
|
3293 |
+
'ui' => 1,
|
3294 |
+
'return_format' => 'value',
|
3295 |
+
'placeholder' => 'Default',
|
3296 |
+
'ajax' => 0,
|
3297 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3298 |
+
'allow_custom' => 1,
|
3299 |
+
'conditional_logic' => array(
|
3300 |
+
array(
|
3301 |
+
array(
|
3302 |
+
'field' => 'field_acfe_form_user_map_display_name',
|
3303 |
+
'operator' => '==empty',
|
3304 |
+
),
|
3305 |
+
array(
|
3306 |
+
'field' => 'field_acfe_form_user_action',
|
3307 |
+
'operator' => '!=',
|
3308 |
+
'value' => 'log_user',
|
3309 |
+
),
|
3310 |
+
),
|
3311 |
+
),
|
3312 |
+
),
|
3313 |
+
array(
|
3314 |
+
'key' => 'field_acfe_form_user_map_display_name_message',
|
3315 |
+
'label' => 'Display name',
|
3316 |
+
'name' => 'acfe_form_user_map_display_name_message',
|
3317 |
+
'type' => 'acfe_dynamic_message',
|
3318 |
'instructions' => '',
|
3319 |
+
'required' => 0,
|
3320 |
+
'conditional_logic' => array(
|
3321 |
+
array(
|
3322 |
+
array(
|
3323 |
+
'field' => 'field_acfe_form_user_map_display_name',
|
3324 |
+
'operator' => '!=empty',
|
3325 |
+
),
|
3326 |
+
array(
|
3327 |
+
'field' => 'field_acfe_form_user_action',
|
3328 |
+
'operator' => '!=',
|
3329 |
+
'value' => 'log_user',
|
3330 |
+
),
|
3331 |
+
),
|
3332 |
+
),
|
3333 |
'wrapper' => array(
|
3334 |
'width' => '',
|
3335 |
'class' => '',
|
3336 |
'id' => '',
|
3337 |
),
|
3338 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
3339 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3340 |
array(
|
3341 |
+
'key' => 'field_acfe_form_user_save_website',
|
3342 |
+
'label' => 'Website',
|
3343 |
+
'name' => 'acfe_form_user_save_website',
|
3344 |
+
'type' => 'select',
|
3345 |
'instructions' => '',
|
3346 |
+
'required' => 0,
|
|
|
3347 |
'wrapper' => array(
|
3348 |
'width' => '',
|
3349 |
'class' => '',
|
3350 |
'id' => '',
|
3351 |
),
|
3352 |
'acfe_permissions' => '',
|
3353 |
+
'choices' => array(),
|
3354 |
+
'default_value' => array(
|
3355 |
+
),
|
3356 |
+
'allow_null' => 1,
|
3357 |
+
'multiple' => 0,
|
3358 |
+
'ui' => 1,
|
3359 |
+
'return_format' => 'value',
|
3360 |
+
'placeholder' => 'Default',
|
3361 |
+
'ajax' => 0,
|
3362 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3363 |
+
'allow_custom' => 1,
|
3364 |
+
'conditional_logic' => array(
|
3365 |
+
array(
|
3366 |
+
array(
|
3367 |
+
'field' => 'field_acfe_form_user_map_website',
|
3368 |
+
'operator' => '==empty',
|
3369 |
+
),
|
3370 |
+
array(
|
3371 |
+
'field' => 'field_acfe_form_user_action',
|
3372 |
+
'operator' => '!=',
|
3373 |
+
'value' => 'log_user',
|
3374 |
+
),
|
3375 |
+
),
|
3376 |
+
),
|
3377 |
),
|
3378 |
array(
|
3379 |
+
'key' => 'field_acfe_form_user_map_website_message',
|
3380 |
+
'label' => 'Website',
|
3381 |
+
'name' => 'acfe_form_user_map_website_message',
|
3382 |
+
'type' => 'acfe_dynamic_message',
|
3383 |
+
'instructions' => '',
|
3384 |
+
'required' => 0,
|
3385 |
+
'conditional_logic' => array(
|
3386 |
+
array(
|
3387 |
+
array(
|
3388 |
+
'field' => 'field_acfe_form_user_map_website',
|
3389 |
+
'operator' => '!=empty',
|
3390 |
+
),
|
3391 |
+
array(
|
3392 |
+
'field' => 'field_acfe_form_user_action',
|
3393 |
+
'operator' => '!=',
|
3394 |
+
'value' => 'log_user',
|
3395 |
+
),
|
3396 |
+
),
|
3397 |
+
),
|
3398 |
'wrapper' => array(
|
3399 |
'width' => '',
|
3400 |
'class' => '',
|
3401 |
'id' => '',
|
3402 |
),
|
3403 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
3404 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3405 |
array(
|
3406 |
+
'key' => 'field_acfe_form_user_save_description_group',
|
3407 |
+
'label' => 'Description',
|
3408 |
+
'name' => 'acfe_form_user_save_description_group',
|
3409 |
+
'type' => 'group',
|
3410 |
'instructions' => '',
|
3411 |
'required' => 0,
|
3412 |
+
'conditional_logic' => array(
|
3413 |
+
array(
|
3414 |
+
array(
|
3415 |
+
'field' => 'field_acfe_form_user_map_description',
|
3416 |
+
'operator' => '==empty',
|
3417 |
+
),
|
3418 |
+
array(
|
3419 |
+
'field' => 'field_acfe_form_user_action',
|
3420 |
+
'operator' => '!=',
|
3421 |
+
'value' => 'log_user',
|
3422 |
+
),
|
3423 |
+
),
|
3424 |
+
),
|
3425 |
'wrapper' => array(
|
3426 |
'width' => '',
|
3427 |
'class' => '',
|
3428 |
'id' => '',
|
3429 |
),
|
3430 |
'acfe_permissions' => '',
|
3431 |
+
'layout' => 'block',
|
3432 |
+
'acfe_seamless_style' => true,
|
3433 |
+
'acfe_group_modal' => 0,
|
|
|
|
|
|
|
3434 |
'sub_fields' => array(
|
3435 |
array(
|
3436 |
+
'key' => 'field_acfe_form_user_save_description',
|
3437 |
+
'label' => '',
|
3438 |
+
'name' => 'acfe_form_user_save_description',
|
3439 |
'type' => 'select',
|
3440 |
'instructions' => '',
|
3441 |
'required' => 0,
|
3447 |
),
|
3448 |
'acfe_permissions' => '',
|
3449 |
'choices' => array(
|
3450 |
+
'custom' => 'WYSIWYG Editor',
|
3451 |
),
|
3452 |
'default_value' => array(
|
3453 |
),
|
3454 |
+
'allow_null' => 1,
|
3455 |
'multiple' => 0,
|
3456 |
'ui' => 1,
|
3457 |
'return_format' => 'value',
|
3458 |
+
'placeholder' => 'Default',
|
3459 |
'ajax' => 0,
|
|
|
3460 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3461 |
'allow_custom' => 1,
|
3462 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3463 |
array(
|
3464 |
+
'key' => 'field_acfe_form_user_save_description_custom',
|
3465 |
+
'label' => '',
|
3466 |
+
'name' => 'acfe_form_user_save_description_custom',
|
3467 |
+
'type' => 'wysiwyg',
|
3468 |
'instructions' => '',
|
3469 |
+
'required' => 1,
|
3470 |
+
'conditional_logic' => array(
|
3471 |
+
array(
|
3472 |
+
array(
|
3473 |
+
'field' => 'field_acfe_form_user_save_description',
|
3474 |
+
'operator' => '==',
|
3475 |
+
'value' => 'custom',
|
3476 |
+
),
|
3477 |
+
),
|
3478 |
+
),
|
3479 |
'wrapper' => array(
|
3480 |
'width' => '',
|
3481 |
'class' => '',
|
3482 |
'id' => '',
|
3483 |
),
|
3484 |
'acfe_permissions' => '',
|
3485 |
+
'default_value' => '',
|
3486 |
+
'tabs' => 'all',
|
3487 |
+
'toolbar' => 'full',
|
3488 |
+
'media_upload' => 1,
|
3489 |
+
'delay' => 0,
|
3490 |
),
|
3491 |
),
|
3492 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3493 |
array(
|
3494 |
+
'key' => 'field_acfe_form_user_map_description_message',
|
3495 |
+
'label' => 'Description',
|
3496 |
+
'name' => 'acfe_form_user_map_description_message',
|
3497 |
'type' => 'acfe_dynamic_message',
|
3498 |
+
'instructions' => '',
|
|
|
3499 |
'required' => 0,
|
3500 |
+
'conditional_logic' => array(
|
3501 |
+
array(
|
3502 |
+
array(
|
3503 |
+
'field' => 'field_acfe_form_user_map_description',
|
3504 |
+
'operator' => '!=empty',
|
3505 |
+
),
|
3506 |
+
array(
|
3507 |
+
'field' => 'field_acfe_form_user_action',
|
3508 |
+
'operator' => '!=',
|
3509 |
+
'value' => 'log_user',
|
3510 |
+
),
|
3511 |
+
),
|
3512 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3513 |
'wrapper' => array(
|
3514 |
'width' => '',
|
3515 |
'class' => '',
|
3516 |
'id' => '',
|
3517 |
),
|
3518 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
3519 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3520 |
array(
|
3521 |
+
'key' => 'field_acfe_form_user_save_role',
|
3522 |
+
'label' => 'Role',
|
3523 |
+
'name' => 'acfe_form_user_save_role',
|
3524 |
+
'type' => 'acfe_user_roles',
|
3525 |
'instructions' => '',
|
3526 |
'required' => 0,
|
3527 |
+
'conditional_logic' => array(
|
3528 |
+
array(
|
3529 |
+
array(
|
3530 |
+
'field' => 'field_acfe_form_user_map_role',
|
3531 |
+
'operator' => '==empty',
|
3532 |
+
),
|
3533 |
+
array(
|
3534 |
+
'field' => 'field_acfe_form_user_action',
|
3535 |
+
'operator' => '!=',
|
3536 |
+
'value' => 'log_user',
|
3537 |
+
),
|
3538 |
+
),
|
3539 |
+
),
|
3540 |
'wrapper' => array(
|
3541 |
'width' => '',
|
3542 |
'class' => '',
|
3543 |
'id' => '',
|
3544 |
),
|
3545 |
'acfe_permissions' => '',
|
3546 |
+
'user_role' => '',
|
3547 |
+
'field_type' => 'select',
|
3548 |
+
'default_value' => '',
|
|
|
|
|
3549 |
'allow_null' => 1,
|
3550 |
+
'placeholder' => 'Default',
|
3551 |
'multiple' => 0,
|
3552 |
'ui' => 1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3553 |
'choices' => array(
|
|
|
|
|
|
|
3554 |
),
|
3555 |
+
'ajax' => 0,
|
3556 |
+
'layout' => '',
|
3557 |
+
'toggle' => 0,
|
3558 |
+
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3559 |
+
'allow_custom' => 1,
|
3560 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3561 |
array(
|
3562 |
+
'key' => 'field_acfe_form_user_map_role_message',
|
3563 |
+
'label' => 'Role',
|
3564 |
+
'name' => 'acfe_form_user_map_role_message',
|
3565 |
'type' => 'acfe_dynamic_message',
|
3566 |
+
'instructions' => '',
|
|
|
3567 |
'required' => 0,
|
3568 |
+
'conditional_logic' => array(
|
3569 |
+
array(
|
3570 |
+
array(
|
3571 |
+
'field' => 'field_acfe_form_user_map_role',
|
3572 |
+
'operator' => '!=empty',
|
3573 |
+
),
|
3574 |
+
array(
|
3575 |
+
'field' => 'field_acfe_form_user_action',
|
3576 |
+
'operator' => '!=',
|
3577 |
+
'value' => 'log_user',
|
3578 |
+
),
|
3579 |
+
),
|
3580 |
+
),
|
3581 |
'wrapper' => array(
|
3582 |
'width' => '',
|
3583 |
'class' => '',
|
3586 |
'acfe_permissions' => '',
|
3587 |
),
|
3588 |
array(
|
3589 |
+
'key' => 'field_acfe_form_user_save_meta',
|
3590 |
+
'label' => 'Save ACF fields',
|
3591 |
+
'name' => 'acfe_form_user_save_meta',
|
3592 |
+
'type' => 'checkbox',
|
3593 |
+
'instructions' => 'Choose which ACF fields should be saved to this user',
|
|
|
3594 |
'required' => 0,
|
|
|
3595 |
'wrapper' => array(
|
3596 |
'width' => '',
|
3597 |
'class' => '',
|
3598 |
'id' => '',
|
3599 |
),
|
3600 |
'acfe_permissions' => '',
|
3601 |
+
'choices' => array(
|
3602 |
+
),
|
3603 |
+
'allow_custom' => 0,
|
3604 |
+
'default_value' => array(
|
3605 |
+
),
|
3606 |
+
'layout' => 'vertical',
|
3607 |
+
'toggle' => 1,
|
3608 |
+
'return_format' => 'value',
|
3609 |
+
'save_custom' => 0,
|
3610 |
+
'conditional_logic' => array(
|
3611 |
+
array(
|
3612 |
+
array(
|
3613 |
+
'field' => 'field_acfe_form_user_action',
|
3614 |
+
'operator' => '!=',
|
3615 |
+
'value' => 'log_user',
|
3616 |
+
),
|
3617 |
+
),
|
3618 |
+
),
|
3619 |
),
|
3620 |
+
|
3621 |
+
/*
|
3622 |
+
* Layout: User Load
|
3623 |
+
*/
|
3624 |
array(
|
3625 |
+
'key' => 'acfe_form_user_tab_load',
|
3626 |
+
'label' => 'Load',
|
3627 |
+
'name' => '',
|
3628 |
+
'type' => 'tab',
|
3629 |
+
'instructions' => '',
|
|
|
3630 |
'required' => 0,
|
|
|
3631 |
'wrapper' => array(
|
3632 |
'width' => '',
|
3633 |
'class' => '',
|
3634 |
'id' => '',
|
3635 |
),
|
3636 |
'acfe_permissions' => '',
|
3637 |
+
'placement' => 'top',
|
3638 |
+
'endpoint' => 0,
|
3639 |
+
'conditional_logic' => array(
|
3640 |
+
array(
|
3641 |
+
array(
|
3642 |
+
'field' => 'field_acfe_form_user_action',
|
3643 |
+
'operator' => '!=',
|
3644 |
+
'value' => 'log_user',
|
3645 |
+
),
|
3646 |
+
),
|
3647 |
+
),
|
3648 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3649 |
array(
|
3650 |
+
'key' => 'field_acfe_form_user_load_values',
|
3651 |
+
'label' => 'Load Values',
|
3652 |
+
'name' => 'acfe_form_user_load_values',
|
3653 |
+
'type' => 'true_false',
|
3654 |
+
'instructions' => 'Fill inputs with values',
|
3655 |
'required' => 0,
|
3656 |
'conditional_logic' => 0,
|
3657 |
'wrapper' => array(
|
3660 |
'id' => '',
|
3661 |
),
|
3662 |
'acfe_permissions' => '',
|
3663 |
+
'message' => '',
|
3664 |
+
'default_value' => 1,
|
3665 |
+
'ui' => 1,
|
3666 |
+
'ui_on_text' => '',
|
3667 |
+
'ui_off_text' => '',
|
3668 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3669 |
array(
|
3670 |
+
'key' => 'field_acfe_form_user_load_source',
|
3671 |
+
'label' => 'Source',
|
3672 |
+
'name' => 'acfe_form_user_load_source',
|
3673 |
'type' => 'select',
|
3674 |
'instructions' => '',
|
3675 |
'required' => 0,
|
3676 |
+
'conditional_logic' => array(
|
3677 |
+
array(
|
3678 |
+
array(
|
3679 |
+
'field' => 'field_acfe_form_user_load_values',
|
3680 |
+
'operator' => '==',
|
3681 |
+
'value' => '1',
|
3682 |
+
),
|
3683 |
+
),
|
3684 |
+
),
|
3685 |
'wrapper' => array(
|
3686 |
'width' => '',
|
3687 |
'class' => '',
|
3688 |
'id' => '',
|
3689 |
),
|
3690 |
'acfe_permissions' => '',
|
3691 |
+
'choices' => array(
|
|
|
3692 |
),
|
3693 |
+
'default_value' => 'current_user',
|
3694 |
+
'allow_null' => 0,
|
3695 |
'multiple' => 0,
|
3696 |
'ui' => 1,
|
|
|
|
|
3697 |
'ajax' => 0,
|
3698 |
+
'return_format' => 'value',
|
3699 |
+
'placeholder' => '',
|
3700 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3701 |
+
'allow_custom' => 1,
|
3702 |
+
),
|
3703 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3704 |
array(
|
3705 |
+
'key' => 'field_acfe_form_user_map_email',
|
3706 |
+
'label' => 'Email',
|
3707 |
+
'name' => 'acfe_form_user_map_email',
|
3708 |
'type' => 'select',
|
3709 |
'instructions' => '',
|
3710 |
'required' => 0,
|
3714 |
'id' => '',
|
3715 |
),
|
3716 |
'acfe_permissions' => '',
|
3717 |
+
'choices' => array(
|
3718 |
+
),
|
3719 |
'default_value' => array(
|
3720 |
),
|
3721 |
'allow_null' => 1,
|
3725 |
'placeholder' => 'Default',
|
3726 |
'ajax' => 0,
|
3727 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3728 |
+
'allow_custom' => 1,
|
3729 |
'conditional_logic' => array(
|
3730 |
+
array(
|
3731 |
+
array(
|
3732 |
+
'field' => 'field_acfe_form_user_load_values',
|
3733 |
+
'operator' => '==',
|
3734 |
+
'value' => '1',
|
3735 |
+
),
|
3736 |
+
array(
|
3737 |
+
'field' => 'field_acfe_form_user_action',
|
3738 |
+
'operator' => '!=',
|
3739 |
+
'value' => 'log_user',
|
3740 |
+
),
|
3741 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3742 |
),
|
|
|
3743 |
),
|
3744 |
array(
|
3745 |
+
'key' => 'field_acfe_form_user_map_username',
|
3746 |
+
'label' => 'Username',
|
3747 |
+
'name' => 'acfe_form_user_map_username',
|
3748 |
+
'type' => 'select',
|
3749 |
+
'instructions' => '',
|
|
|
3750 |
'required' => 0,
|
|
|
3751 |
'wrapper' => array(
|
3752 |
'width' => '',
|
3753 |
'class' => '',
|
3754 |
'id' => '',
|
3755 |
),
|
3756 |
'acfe_permissions' => '',
|
3757 |
+
'choices' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3758 |
),
|
3759 |
+
'default_value' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3760 |
),
|
3761 |
+
'allow_null' => 1,
|
3762 |
+
'multiple' => 0,
|
3763 |
+
'ui' => 1,
|
3764 |
+
'return_format' => 'value',
|
3765 |
+
'placeholder' => 'Default',
|
3766 |
+
'ajax' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3767 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3768 |
+
'allow_custom' => 1,
|
3769 |
+
'conditional_logic' => array(
|
3770 |
+
array(
|
3771 |
+
array(
|
3772 |
+
'field' => 'field_acfe_form_user_load_values',
|
3773 |
+
'operator' => '==',
|
3774 |
+
'value' => '1',
|
3775 |
+
),
|
3776 |
+
array(
|
3777 |
+
'field' => 'field_acfe_form_user_action',
|
3778 |
+
'operator' => '!=',
|
3779 |
+
'value' => 'log_user',
|
3780 |
+
),
|
3781 |
+
),
|
3782 |
+
),
|
3783 |
+
),
|
3784 |
array(
|
3785 |
+
'key' => 'field_acfe_form_user_map_password',
|
3786 |
+
'label' => 'Password',
|
3787 |
+
'name' => 'acfe_form_user_map_password',
|
3788 |
'type' => 'select',
|
3789 |
'instructions' => '',
|
3790 |
'required' => 0,
|
3794 |
'id' => '',
|
3795 |
),
|
3796 |
'acfe_permissions' => '',
|
3797 |
+
'choices' => array(
|
3798 |
+
),
|
3799 |
'default_value' => array(
|
3800 |
),
|
3801 |
'allow_null' => 1,
|
3805 |
'placeholder' => 'Default',
|
3806 |
'ajax' => 0,
|
3807 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3808 |
+
'allow_custom' => 1,
|
3809 |
'conditional_logic' => array(
|
3810 |
+
array(
|
|
|
|
|
|
|
|
|
3811 |
array(
|
3812 |
+
'field' => 'field_acfe_form_user_load_values',
|
3813 |
+
'operator' => '==',
|
3814 |
+
'value' => '1',
|
3815 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3816 |
array(
|
3817 |
+
'field' => 'field_acfe_form_user_action',
|
3818 |
+
'operator' => '!=',
|
3819 |
+
'value' => 'log_user',
|
3820 |
+
),
|
3821 |
+
),
|
3822 |
+
),
|
3823 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3824 |
array(
|
3825 |
+
'key' => 'field_acfe_form_user_map_first_name',
|
3826 |
+
'label' => 'First name',
|
3827 |
+
'name' => 'acfe_form_user_map_first_name',
|
3828 |
'type' => 'select',
|
3829 |
'instructions' => '',
|
3830 |
'required' => 0,
|
3834 |
'id' => '',
|
3835 |
),
|
3836 |
'acfe_permissions' => '',
|
3837 |
+
'choices' => array(
|
3838 |
+
),
|
3839 |
'default_value' => array(
|
3840 |
),
|
3841 |
'allow_null' => 1,
|
3845 |
'placeholder' => 'Default',
|
3846 |
'ajax' => 0,
|
3847 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3848 |
+
'allow_custom' => 1,
|
3849 |
'conditional_logic' => array(
|
3850 |
+
array(
|
|
|
|
|
|
|
|
|
3851 |
array(
|
3852 |
+
'field' => 'field_acfe_form_user_load_values',
|
3853 |
+
'operator' => '==',
|
3854 |
+
'value' => '1',
|
3855 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3856 |
array(
|
3857 |
+
'field' => 'field_acfe_form_user_action',
|
3858 |
+
'operator' => '!=',
|
3859 |
+
'value' => 'log_user',
|
3860 |
+
),
|
3861 |
+
),
|
3862 |
+
),
|
3863 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3864 |
array(
|
3865 |
+
'key' => 'field_acfe_form_user_map_last_name',
|
3866 |
+
'label' => 'Last name',
|
3867 |
+
'name' => 'acfe_form_user_map_last_name',
|
3868 |
'type' => 'select',
|
3869 |
'instructions' => '',
|
3870 |
'required' => 0,
|
3875 |
),
|
3876 |
'acfe_permissions' => '',
|
3877 |
'choices' => array(
|
|
|
3878 |
),
|
3879 |
'default_value' => array(
|
3880 |
),
|
3885 |
'placeholder' => 'Default',
|
3886 |
'ajax' => 0,
|
3887 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3888 |
+
'allow_custom' => 1,
|
3889 |
'conditional_logic' => array(
|
3890 |
+
array(
|
|
|
|
|
|
|
|
|
3891 |
array(
|
3892 |
+
'field' => 'field_acfe_form_user_load_values',
|
3893 |
+
'operator' => '==',
|
3894 |
+
'value' => '1',
|
3895 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3896 |
array(
|
3897 |
+
'field' => 'field_acfe_form_user_action',
|
3898 |
+
'operator' => '!=',
|
3899 |
+
'value' => 'log_user',
|
3900 |
+
),
|
3901 |
+
),
|
3902 |
+
),
|
3903 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3904 |
array(
|
3905 |
+
'key' => 'field_acfe_form_user_map_nickname',
|
3906 |
+
'label' => 'Nickname',
|
3907 |
+
'name' => 'acfe_form_user_map_nickname',
|
3908 |
'type' => 'select',
|
3909 |
'instructions' => '',
|
3910 |
'required' => 0,
|
3914 |
'id' => '',
|
3915 |
),
|
3916 |
'acfe_permissions' => '',
|
3917 |
+
'choices' => array(
|
3918 |
+
),
|
3919 |
'default_value' => array(
|
3920 |
),
|
3921 |
'allow_null' => 1,
|
3925 |
'placeholder' => 'Default',
|
3926 |
'ajax' => 0,
|
3927 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3928 |
+
'allow_custom' => 1,
|
3929 |
'conditional_logic' => array(
|
3930 |
+
array(
|
|
|
|
|
|
|
|
|
3931 |
array(
|
3932 |
+
'field' => 'field_acfe_form_user_load_values',
|
3933 |
+
'operator' => '==',
|
3934 |
+
'value' => '1',
|
3935 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3936 |
array(
|
3937 |
+
'field' => 'field_acfe_form_user_action',
|
3938 |
+
'operator' => '!=',
|
3939 |
+
'value' => 'log_user',
|
3940 |
+
),
|
3941 |
+
),
|
3942 |
+
),
|
3943 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3944 |
array(
|
3945 |
+
'key' => 'field_acfe_form_user_map_display_name',
|
3946 |
+
'label' => 'Display name',
|
3947 |
+
'name' => 'acfe_form_user_map_display_name',
|
3948 |
'type' => 'select',
|
3949 |
'instructions' => '',
|
3950 |
'required' => 0,
|
3954 |
'id' => '',
|
3955 |
),
|
3956 |
'acfe_permissions' => '',
|
3957 |
+
'choices' => array(
|
3958 |
+
),
|
3959 |
+
'default_value' => array(
|
3960 |
+
),
|
3961 |
'allow_null' => 1,
|
3962 |
'multiple' => 0,
|
3963 |
'ui' => 1,
|
3965 |
'placeholder' => 'Default',
|
3966 |
'ajax' => 0,
|
3967 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
3968 |
+
'allow_custom' => 1,
|
3969 |
'conditional_logic' => array(
|
3970 |
+
array(
|
|
|
|
|
|
|
|
|
3971 |
array(
|
3972 |
+
'field' => 'field_acfe_form_user_load_values',
|
3973 |
+
'operator' => '==',
|
3974 |
+
'value' => '1',
|
3975 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3976 |
array(
|
3977 |
+
'field' => 'field_acfe_form_user_action',
|
3978 |
+
'operator' => '!=',
|
3979 |
+
'value' => 'log_user',
|
3980 |
+
),
|
3981 |
+
),
|
3982 |
+
),
|
3983 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3984 |
array(
|
3985 |
+
'key' => 'field_acfe_form_user_map_website',
|
3986 |
+
'label' => 'Website',
|
3987 |
+
'name' => 'acfe_form_user_map_website',
|
3988 |
'type' => 'select',
|
3989 |
'instructions' => '',
|
3990 |
'required' => 0,
|
3994 |
'id' => '',
|
3995 |
),
|
3996 |
'acfe_permissions' => '',
|
3997 |
+
'choices' => array(
|
3998 |
+
),
|
3999 |
'default_value' => array(
|
4000 |
),
|
4001 |
'allow_null' => 1,
|
4005 |
'placeholder' => 'Default',
|
4006 |
'ajax' => 0,
|
4007 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4008 |
+
'allow_custom' => 1,
|
4009 |
'conditional_logic' => array(
|
4010 |
+
array(
|
|
|
|
|
|
|
|
|
4011 |
array(
|
4012 |
+
'field' => 'field_acfe_form_user_load_values',
|
4013 |
+
'operator' => '==',
|
4014 |
+
'value' => '1',
|
4015 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4016 |
array(
|
4017 |
+
'field' => 'field_acfe_form_user_action',
|
4018 |
+
'operator' => '!=',
|
4019 |
+
'value' => 'log_user',
|
4020 |
+
),
|
4021 |
+
),
|
4022 |
+
),
|
4023 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
4024 |
array(
|
4025 |
+
'key' => 'field_acfe_form_user_map_description',
|
4026 |
+
'label' => 'Description',
|
4027 |
+
'name' => 'acfe_form_user_map_description',
|
4028 |
'type' => 'select',
|
4029 |
'instructions' => '',
|
4030 |
'required' => 0,
|
4034 |
'id' => '',
|
4035 |
),
|
4036 |
'acfe_permissions' => '',
|
4037 |
+
'choices' => array(
|
4038 |
+
),
|
4039 |
'default_value' => array(
|
4040 |
),
|
4041 |
'allow_null' => 1,
|
4045 |
'placeholder' => 'Default',
|
4046 |
'ajax' => 0,
|
4047 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4048 |
+
'allow_custom' => 1,
|
4049 |
'conditional_logic' => array(
|
4050 |
+
array(
|
|
|
|
|
|
|
|
|
4051 |
array(
|
4052 |
+
'field' => 'field_acfe_form_user_load_values',
|
4053 |
+
'operator' => '==',
|
4054 |
+
'value' => '1',
|
4055 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4056 |
array(
|
4057 |
+
'field' => 'field_acfe_form_user_action',
|
4058 |
+
'operator' => '!=',
|
4059 |
+
'value' => 'log_user',
|
4060 |
+
),
|
4061 |
+
),
|
4062 |
+
),
|
4063 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
4064 |
array(
|
4065 |
+
'key' => 'field_acfe_form_user_map_role',
|
4066 |
+
'label' => 'Role',
|
4067 |
+
'name' => 'acfe_form_user_map_role',
|
4068 |
'type' => 'select',
|
4069 |
'instructions' => '',
|
4070 |
'required' => 0,
|
4074 |
'id' => '',
|
4075 |
),
|
4076 |
'acfe_permissions' => '',
|
4077 |
+
'choices' => array(
|
4078 |
+
),
|
4079 |
'default_value' => array(
|
4080 |
),
|
4081 |
'allow_null' => 1,
|
4085 |
'placeholder' => 'Default',
|
4086 |
'ajax' => 0,
|
4087 |
'search_placeholder' => 'Enter a custom value or template tag. (See "Cheatsheet" tab)',
|
4088 |
+
'allow_custom' => 1,
|
4089 |
'conditional_logic' => array(
|
4090 |
+
array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4091 |
array(
|
4092 |
+
'field' => 'field_acfe_form_user_load_values',
|
4093 |
+
'operator' => '==',
|
4094 |
+
'value' => '1',
|
4095 |
+
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4096 |
array(
|
4097 |
+
'field' => 'field_acfe_form_user_action',
|
4098 |
+
'operator' => '!=',
|
4099 |
+
'value' => 'log_user',
|
4100 |
+
),
|
4101 |
+
),
|
4102 |
+
),
|
4103 |
+
),
|
4104 |
+
array(
|
4105 |
+
'key' => 'field_acfe_form_user_load_meta',
|
4106 |
+
'label' => 'Load ACF fields',
|
4107 |
+
'name' => 'acfe_form_user_load_meta',
|
4108 |
+
'type' => 'checkbox',
|
4109 |
+
'instructions' => 'Choose which ACF fields should have their values loaded',
|
4110 |
+
'required' => 0,
|
4111 |
+
'conditional_logic' => array(
|
4112 |
+
array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4113 |
array(
|
4114 |
+
'field' => 'field_acfe_form_user_load_values',
|
4115 |
+
'operator' => '==',
|
4116 |
+
'value' => '1',
|
4117 |
+
),
|
4118 |
+
),
|
4119 |
+
),
|
4120 |
+
'wrapper' => array(
|
4121 |
+
'width' => '',
|
4122 |
+
'class' => '',
|
4123 |
+
'id' => '',
|
4124 |
+
),
|
4125 |
+
'acfe_permissions' => '',
|
4126 |
+
'choices' => array(
|
4127 |
+
),
|
4128 |
+
'allow_custom' => 0,
|
4129 |
+
'default_value' => array(
|
4130 |
+
),
|
4131 |
+
'layout' => 'vertical',
|
4132 |
+
'toggle' => 1,
|
4133 |
+
'return_format' => 'value',
|
4134 |
+
'save_custom' => 0,
|
4135 |
+
),
|
4136 |
+
|
4137 |
+
|
4138 |
+
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4139 |
* Layout: User Advanced
|
4140 |
*/
|
4141 |
array(
|
4142 |
+
'key' => 'field_acfe_form_user_tab_advanced',
|
4143 |
+
'label' => 'Code',
|
4144 |
+
'name' => '',
|
4145 |
+
'type' => 'tab',
|
4146 |
+
'instructions' => '',
|
4147 |
+
'required' => 0,
|
4148 |
+
'conditional_logic' => 0,
|
4149 |
+
'wrapper' => array(
|
4150 |
+
'width' => '',
|
4151 |
+
'class' => '',
|
4152 |
+
'id' => '',
|
4153 |
+
),
|
4154 |
+
'acfe_permissions' => '',
|
4155 |
+
'placement' => 'top',
|
4156 |
+
'endpoint' => 0,
|
4157 |
+
),
|
4158 |
array(
|
4159 |
'key' => 'field_acfe_form_user_advanced_load',
|
4160 |
'label' => 'Change values source',
|
4203 |
),
|
4204 |
'acfe_permissions' => '',
|
4205 |
),
|
4206 |
+
),
|
4207 |
+
'min' => '',
|
4208 |
+
'max' => '',
|
4209 |
+
),
|
4210 |
+
|
4211 |
+
),
|
4212 |
+
'button_label' => 'Add action',
|
4213 |
+
'min' => '',
|
4214 |
+
'max' => '',
|
4215 |
+
),
|
4216 |
+
|
4217 |
+
/*
|
4218 |
+
* Settings
|
4219 |
+
*/
|
4220 |
+
array(
|
4221 |
+
'key' => 'field_acfe_form_tab_settings',
|
4222 |
+
'label' => 'Settings',
|
4223 |
+
'name' => '',
|
4224 |
+
'type' => 'tab',
|
4225 |
+
'instructions' => '',
|
4226 |
+
'required' => 0,
|
4227 |
+
'conditional_logic' => 0,
|
4228 |
+
'wrapper' => array(
|
4229 |
+
'width' => '',
|
4230 |
+
'class' => '',
|
4231 |
+
'id' => '',
|
4232 |
+
),
|
4233 |
+
'acfe_permissions' => '',
|
4234 |
+
'placement' => 'top',
|
4235 |
+
'endpoint' => 0,
|
4236 |
+
),
|
4237 |
+
array(
|
4238 |
+
'key' => 'field_acfe_form_field_groups_rules',
|
4239 |
+
'label' => 'Field groups locations rules',
|
4240 |
+
'name' => 'acfe_form_field_groups_rules',
|
4241 |
+
'type' => 'true_false',
|
4242 |
+
'instructions' => 'Apply field groups locations rules for front-end display',
|
4243 |
+
'required' => 0,
|
4244 |
+
'wrapper' => array(
|
4245 |
+
'width' => '',
|
4246 |
+
'class' => '',
|
4247 |
+
'id' => '',
|
4248 |
+
),
|
4249 |
+
'acfe_permissions' => '',
|
4250 |
+
'message' => '',
|
4251 |
+
'default_value' => 0,
|
4252 |
+
'ui' => 1,
|
4253 |
+
'ui_on_text' => '',
|
4254 |
+
'ui_off_text' => '',
|
4255 |
+
/*
|
4256 |
+
'conditional_logic' => array(
|
4257 |
+
array(
|
4258 |
+
array(
|
4259 |
+
'field' => 'field_acfe_form_field_groups',
|
4260 |
+
'operator' => '>',
|
4261 |
+
'value' => '0',
|
4262 |
+
),
|
4263 |
+
),
|
4264 |
+
),
|
4265 |
+
*/
|
4266 |
+
),
|
4267 |
+
array(
|
4268 |
+
'key' => 'field_acfe_form_form_element',
|
4269 |
+
'label' => 'Form element',
|
4270 |
+
'name' => 'acfe_form_form_element',
|
4271 |
+
'type' => 'true_false',
|
4272 |
+
'instructions' => 'Whether or not to create a <code><form></code> element',
|
4273 |
+
'required' => 0,
|
4274 |
+
'conditional_logic' => 0,
|
4275 |
+
'wrapper' => array(
|
4276 |
+
'width' => '',
|
4277 |
+
'class' => '',
|
4278 |
+
'id' => '',
|
4279 |
+
),
|
4280 |
+
'acfe_permissions' => '',
|
4281 |
+
'message' => '',
|
4282 |
+
'default_value' => 1,
|
4283 |
+
'ui' => 1,
|
4284 |
+
'ui_on_text' => '',
|
4285 |
+
'ui_off_text' => '',
|
4286 |
+
),
|
4287 |
+
array(
|
4288 |
+
'key' => 'field_acfe_form_attributes',
|
4289 |
+
'label' => 'Form attributes',
|
4290 |
+
'name' => 'acfe_form_attributes',
|
4291 |
+
'type' => 'group',
|
4292 |
+
'instructions' => 'Form class and id',
|
4293 |
+
'required' => 0,
|
4294 |
+
'wrapper' => array(
|
4295 |
+
'width' => '',
|
4296 |
+
'class' => '',
|
4297 |
+
'id' => '',
|
4298 |
+
),
|
4299 |
+
'acfe_permissions' => '',
|
4300 |
+
'layout' => 'block',
|
4301 |
+
'acfe_seamless_style' => true,
|
4302 |
+
'acfe_group_modal' => 0,
|
4303 |
+
'conditional_logic' => array(
|
4304 |
+
array(
|
4305 |
+
array(
|
4306 |
+
'field' => 'field_acfe_form_form_element',
|
4307 |
+
'operator' => '==',
|
4308 |
+
'value' => '1',
|
4309 |
+
),
|
4310 |
+
),
|
4311 |
+
),
|
4312 |
+
'sub_fields' => array(
|
4313 |
+
array(
|
4314 |
+
'key' => 'field_acfe_form_attributes_class',
|
4315 |
+
'label' => '',
|
4316 |
+
'name' => 'acfe_form_attributes_class',
|
4317 |
+
'type' => 'text',
|
4318 |
+
'instructions' => '',
|
4319 |
+
'required' => 0,
|
4320 |
+
'conditional_logic' => array(),
|
4321 |
+
'wrapper' => array(
|
4322 |
+
'width' => '33',
|
4323 |
+
'class' => '',
|
4324 |
+
'id' => '',
|
4325 |
+
),
|
4326 |
+
'acfe_permissions' => '',
|
4327 |
+
'default_value' => 'acf-form',
|
4328 |
+
'placeholder' => '',
|
4329 |
+
'prepend' => 'class',
|
4330 |
+
'append' => '',
|
4331 |
+
'maxlength' => '',
|
4332 |
+
),
|
4333 |
+
array(
|
4334 |
+
'key' => 'field_acfe_form_attributes_id',
|
4335 |
+
'label' => '',
|
4336 |
+
'name' => 'acfe_form_attributes_id',
|
4337 |
+
'type' => 'text',
|
4338 |
+
'instructions' => '',
|
4339 |
+
'required' => 0,
|
4340 |
+
'conditional_logic' => array(),
|
4341 |
+
'wrapper' => array(
|
4342 |
+
'width' => '33',
|
4343 |
+
'class' => '',
|
4344 |
+
'id' => '',
|
4345 |
+
),
|
4346 |
+
'acfe_permissions' => '',
|
4347 |
+
'default_value' => '',
|
4348 |
+
'placeholder' => '',
|
4349 |
+
'prepend' => 'id',
|
4350 |
+
'append' => '',
|
4351 |
+
'maxlength' => '',
|
4352 |
+
),
|
4353 |
+
|
4354 |
+
/*
|
4355 |
+
array(
|
4356 |
+
'key' => 'field_acfe_form_attributes_action',
|
4357 |
+
'label' => '',
|
4358 |
+
'name' => 'acfe_form_attributes_action',
|
4359 |
+
'type' => 'text',
|
4360 |
+
'instructions' => '',
|
4361 |
+
'required' => 0,
|
4362 |
+
'conditional_logic' => array(),
|
4363 |
+
'wrapper' => array(
|
4364 |
+
'width' => '25',
|
4365 |
+
'class' => '',
|
4366 |
+
'id' => '',
|
4367 |
+
),
|
4368 |
+
'acfe_permissions' => '',
|
4369 |
+
'default_value' => '',
|
4370 |
+
'placeholder' => '',
|
4371 |
+
'prepend' => 'action',
|
4372 |
+
'append' => '',
|
4373 |
+
'maxlength' => '',
|
4374 |
+
),
|
4375 |
+
array(
|
4376 |
+
'key' => 'field_acfe_form_attributes_method',
|
4377 |
+
'label' => '',
|
4378 |
+
'name' => 'acfe_form_attributes_method',
|
4379 |
+
'type' => 'text',
|
4380 |
+
'instructions' => '',
|
4381 |
+
'required' => 0,
|
4382 |
+
'conditional_logic' => array(),
|
4383 |
+
'wrapper' => array(
|
4384 |
+
'width' => '25',
|
4385 |
+
'class' => '',
|
4386 |
+
'id' => '',
|
4387 |
+
),
|
4388 |
+
'acfe_permissions' => '',
|
4389 |
+
'default_value' => 'post',
|
4390 |
+
'placeholder' => '',
|
4391 |
+
'prepend' => 'method',
|
4392 |
+
'append' => '',
|
4393 |
+
'maxlength' => '',
|
4394 |
+
),
|
4395 |
+
*/
|
4396 |
+
|
4397 |
+
),
|
4398 |
+
),
|
4399 |
+
array(
|
4400 |
+
'key' => 'field_acfe_form_fields_attributes',
|
4401 |
+
'label' => 'Fields class',
|
4402 |
+
'name' => 'acfe_form_fields_attributes',
|
4403 |
+
'type' => 'group',
|
4404 |
+
'instructions' => 'Add class to all fields',
|
4405 |
+
'required' => 0,
|
4406 |
+
'wrapper' => array(
|
4407 |
+
'width' => '',
|
4408 |
+
'class' => '',
|
4409 |
+
'id' => '',
|
4410 |
+
),
|
4411 |
+
'acfe_permissions' => '',
|
4412 |
+
'layout' => 'block',
|
4413 |
+
'acfe_seamless_style' => true,
|
4414 |
+
'acfe_group_modal' => 0,
|
4415 |
+
'conditional_logic' => array(),
|
4416 |
+
'sub_fields' => array(
|
4417 |
+
array(
|
4418 |
+
'key' => 'field_acfe_form_fields_wrapper_class',
|
4419 |
+
'label' => '',
|
4420 |
+
'name' => 'acfe_form_fields_wrapper_class',
|
4421 |
+
'type' => 'text',
|
4422 |
+
'instructions' => '',
|
4423 |
+
'required' => 0,
|
4424 |
+
'conditional_logic' => array(),
|
4425 |
+
'wrapper' => array(
|
4426 |
+
'width' => '33',
|
4427 |
+
'class' => '',
|
4428 |
+
'id' => '',
|
4429 |
+
),
|
4430 |
+
'acfe_permissions' => '',
|
4431 |
+
'default_value' => '',
|
4432 |
+
'placeholder' => '',
|
4433 |
+
'prepend' => 'wrapper class',
|
4434 |
+
'append' => '',
|
4435 |
+
'maxlength' => '',
|
4436 |
+
),
|
4437 |
+
array(
|
4438 |
+
'key' => 'field_acfe_form_fields_class',
|
4439 |
+
'label' => '',
|
4440 |
+
'name' => 'acfe_form_fields_class',
|
4441 |
+
'type' => 'text',
|
4442 |
+
'instructions' => '',
|
4443 |
+
'required' => 0,
|
4444 |
+
'conditional_logic' => array(),
|
4445 |
+
'wrapper' => array(
|
4446 |
+
'width' => '33',
|
4447 |
+
'class' => '',
|
4448 |
+
'id' => '',
|
4449 |
+
),
|
4450 |
+
'acfe_permissions' => '',
|
4451 |
+
'default_value' => '',
|
4452 |
+
'placeholder' => '',
|
4453 |
+
'prepend' => 'input class',
|
4454 |
+
'append' => '',
|
4455 |
+
'maxlength' => '',
|
4456 |
+
),
|
4457 |
+
),
|
4458 |
+
),
|
4459 |
+
array(
|
4460 |
+
'key' => 'field_acfe_form_form_submit',
|
4461 |
+
'label' => 'Submit button',
|
4462 |
+
'name' => 'acfe_form_form_submit',
|
4463 |
+
'type' => 'true_false',
|
4464 |
+
'instructions' => 'Whether or not to create a form submit button. Defaults to true',
|
4465 |
+
'required' => 0,
|
4466 |
+
'conditional_logic' => 0,
|
4467 |
+
'wrapper' => array(
|
4468 |
+
'width' => '',
|
4469 |
+
'class' => '',
|
4470 |
+
'id' => '',
|
4471 |
+
),
|
4472 |
+
'acfe_permissions' => '',
|
4473 |
+
'message' => '',
|
4474 |
+
'default_value' => 1,
|
4475 |
+
'ui' => 1,
|
4476 |
+
'ui_on_text' => '',
|
4477 |
+
'ui_off_text' => '',
|
4478 |
+
),
|
4479 |
+
array(
|
4480 |
+
'key' => 'field_acfe_form_submit_value',
|
4481 |
+
'label' => 'Submit value',
|
4482 |
+
'name' => 'acfe_form_submit_value',
|
4483 |
+
'type' => 'text',
|
4484 |
+
'instructions' => 'The text displayed on the submit button',
|
4485 |
+
'required' => 0,
|
4486 |
+
'conditional_logic' => array(
|
4487 |
+
array(
|
4488 |
+
array(
|
4489 |
+
'field' => 'field_acfe_form_form_submit',
|
4490 |
+
'operator' => '==',
|
4491 |
+
'value' => '1',
|
4492 |
+
),
|
4493 |
+
),
|
4494 |
+
),
|
4495 |
+
'wrapper' => array(
|
4496 |
+
'width' => '',
|
4497 |
+
'class' => '',
|
4498 |
+
'id' => '',
|
4499 |
+
),
|
4500 |
+
'acfe_permissions' => '',
|
4501 |
+
'default_value' => 'Submit',
|
4502 |
+
'placeholder' => '',
|
4503 |
+
'prepend' => '',
|
4504 |
+
'append' => '',
|
4505 |
+
'maxlength' => '',
|
4506 |
+
),
|
4507 |
+
array(
|
4508 |
+
'key' => 'field_acfe_form_html_submit_button',
|
4509 |
+
'label' => 'Submit button',
|
4510 |
+
'name' => 'acfe_form_html_submit_button',
|
4511 |
+
'type' => 'acfe_code_editor',
|
4512 |
+
'instructions' => 'HTML used to render the submit button.',
|
4513 |
+
'required' => 0,
|
4514 |
+
'conditional_logic' => array(
|
4515 |
+
array(
|
4516 |
+
array(
|
4517 |
+
'field' => 'field_acfe_form_form_submit',
|
4518 |
+
'operator' => '==',
|
4519 |
+
'value' => '1',
|
4520 |
+
),
|
4521 |
+
),
|
4522 |
+
),
|
4523 |
+
'wrapper' => array(
|
4524 |
+
'width' => '',
|
4525 |
+
'class' => '',
|
4526 |
+
'id' => '',
|
4527 |
+
),
|
4528 |
+
'acfe_permissions' => '',
|
4529 |
+
'default_value' => '<input type="submit" class="acf-button button button-primary button-large" value="%s" />',
|
4530 |
+
'placeholder' => '',
|
4531 |
+
'maxlength' => '',
|
4532 |
+
'rows' => 2,
|
4533 |
+
),
|
4534 |
+
array(
|
4535 |
+
'key' => 'field_acfe_form_html_submit_spinner',
|
4536 |
+
'label' => 'Submit spinner',
|
4537 |
+
'name' => 'acfe_form_html_submit_spinner',
|
4538 |
+
'type' => 'acfe_code_editor',
|
4539 |
+
'instructions' => 'HTML used to render the submit button loading spinner.',
|
4540 |
+
'required' => 0,
|
4541 |
+
'conditional_logic' => array(
|
4542 |
+
array(
|
4543 |
+
array(
|
4544 |
+
'field' => 'field_acfe_form_form_submit',
|
4545 |
+
'operator' => '==',
|
4546 |
+
'value' => '1',
|
4547 |
+
),
|
4548 |
+
),
|
4549 |
+
),
|
4550 |
+
'wrapper' => array(
|
4551 |
+
'width' => '',
|
4552 |
+
'class' => '',
|
4553 |
+
'id' => '',
|
4554 |
+
),
|
4555 |
+
'acfe_permissions' => '',
|
4556 |
+
'default_value' => '<span class="acf-spinner"></span>',
|
4557 |
+
'placeholder' => '',
|
4558 |
+
'maxlength' => '',
|
4559 |
+
'rows' => 2,
|
4560 |
+
),
|
4561 |
+
/*
|
4562 |
+
array(
|
4563 |
+
'key' => 'field_acfe_form_post_field_groups',
|
4564 |
+
'label' => 'Post field groups',
|
4565 |
+
'name' => 'acfe_form_post_field_groups',
|
4566 |
+
'type' => 'post_object',
|
4567 |
+
'instructions' => 'Override rendered field groups with a specific post field groups.<br /><br/>Note: Make sure to set the related field groups in the "General" tab in order to map fields in the actions tab',
|
4568 |
+
'required' => 0,
|
4569 |
+
'conditional_logic' => 0,
|
4570 |
+
'wrapper' => array(
|
4571 |
+
'width' => '',
|
4572 |
+
'class' => '',
|
4573 |
+
'id' => '',
|
4574 |
+
),
|
4575 |
+
'acfe_permissions' => '',
|
4576 |
+
'allow_null' => 1,
|
4577 |
+
'multiple' => 0,
|
4578 |
+
'return_format' => 'value',
|
4579 |
+
'placeholder' => '',
|
4580 |
+
),
|
4581 |
+
*/
|
4582 |
+
array(
|
4583 |
+
'key' => 'field_acfe_form_honeypot',
|
4584 |
+
'label' => 'Honeypot',
|
4585 |
+
'name' => 'acfe_form_honeypot',
|
4586 |
+
'type' => 'true_false',
|
4587 |
+
'instructions' => 'Whether to include a hidden input field to capture non human form submission. Defaults to true.',
|
4588 |
+
'required' => 0,
|
4589 |
+
'conditional_logic' => 0,
|
4590 |
+
'wrapper' => array(
|
4591 |
+
'width' => '',
|
4592 |
+
'class' => '',
|
4593 |
+
'id' => '',
|
4594 |
+
),
|
4595 |
+
'acfe_permissions' => '',
|
4596 |
+
'message' => '',
|
4597 |
+
'default_value' => 1,
|
4598 |
+
'ui' => 1,
|
4599 |
+
'ui_on_text' => '',
|
4600 |
+
'ui_off_text' => '',
|
4601 |
+
),
|
4602 |
+
array(
|
4603 |
+
'key' => 'field_acfe_form_kses',
|
4604 |
+
'label' => 'Kses',
|
4605 |
+
'name' => 'acfe_form_kses',
|
4606 |
+
'type' => 'true_false',
|
4607 |
+
'instructions' => 'Whether or not to sanitize all $_POST data with the wp_kses_post() function. Defaults to true.',
|
4608 |
+
'required' => 0,
|
4609 |
+
'conditional_logic' => 0,
|
4610 |
+
'wrapper' => array(
|
4611 |
+
'width' => '',
|
4612 |
+
'class' => '',
|
4613 |
+
'id' => '',
|
4614 |
+
),
|
4615 |
+
'acfe_permissions' => '',
|
4616 |
+
'message' => '',
|
4617 |
+
'default_value' => 1,
|
4618 |
+
'ui' => 1,
|
4619 |
+
'ui_on_text' => '',
|
4620 |
+
'ui_off_text' => '',
|
4621 |
+
),
|
4622 |
+
array(
|
4623 |
+
'key' => 'field_acfe_form_uploader',
|
4624 |
+
'label' => 'Uploader',
|
4625 |
+
'name' => 'acfe_form_uploader',
|
4626 |
+
'type' => 'radio',
|
4627 |
+
'instructions' => 'Whether to use the WP uploader or a basic input for image and file fields. Defaults to \'wp\'
|
4628 |
+
Choices of \'wp\' or \'basic\'.',
|
4629 |
+
'required' => 0,
|
4630 |
+
'conditional_logic' => 0,
|
4631 |
+
'wrapper' => array(
|
4632 |
+
'width' => '',
|
4633 |
+
'class' => '',
|
4634 |
+
'id' => '',
|
4635 |
+
),
|
4636 |
+
'acfe_permissions' => '',
|
4637 |
+
'choices' => array(
|
4638 |
+
'default' => 'Default (Field based)',
|
4639 |
+
'wp' => 'Media modal',
|
4640 |
+
'basic' => 'Basic',
|
4641 |
+
),
|
4642 |
+
'allow_null' => 0,
|
4643 |
+
'other_choice' => 0,
|
4644 |
+
'default_value' => 'default',
|
4645 |
+
'layout' => 'vertical',
|
4646 |
+
'return_format' => 'value',
|
4647 |
+
'save_other_choice' => 0,
|
4648 |
+
),
|
4649 |
+
array(
|
4650 |
+
'key' => 'field_acfe_form_form_field_el',
|
4651 |
+
'label' => 'Field element',
|
4652 |
+
'name' => 'acfe_form_form_field_el',
|
4653 |
+
'type' => 'radio',
|
4654 |
+
'instructions' => 'Determines element used to wrap a field. Defaults to \'div\'',
|
4655 |
+
'required' => 0,
|
4656 |
+
'conditional_logic' => 0,
|
4657 |
+
'wrapper' => array(
|
4658 |
+
'width' => '',
|
4659 |
+
'class' => '',
|
4660 |
+
'id' => '',
|
4661 |
),
|
4662 |
+
'acfe_permissions' => '',
|
4663 |
+
'choices' => array(
|
4664 |
+
'div' => '<div>',
|
4665 |
+
'tr' => '<tr>',
|
4666 |
+
'td' => '<td>',
|
4667 |
+
'ul' => '<ul>',
|
4668 |
+
'ol' => '<ol>',
|
4669 |
+
'dl' => '<dl>',
|
4670 |
+
),
|
4671 |
+
'allow_null' => 0,
|
4672 |
+
'other_choice' => 0,
|
4673 |
+
'default_value' => 'div',
|
4674 |
+
'layout' => 'vertical',
|
4675 |
+
'return_format' => 'value',
|
4676 |
+
'save_other_choice' => 0,
|
4677 |
+
),
|
4678 |
+
array(
|
4679 |
+
'key' => 'field_acfe_form_label_placement',
|
4680 |
+
'label' => 'Label placement',
|
4681 |
+
'name' => 'acfe_form_label_placement',
|
4682 |
+
'type' => 'radio',
|
4683 |
+
'instructions' => 'Determines where field labels are places in relation to fields. Defaults to \'top\'. <br />
|
4684 |
+
Choices of \'top\' (Above fields) or \'left\' (Beside fields)',
|
4685 |
+
'required' => 0,
|
4686 |
+
'conditional_logic' => 0,
|
4687 |
+
'wrapper' => array(
|
4688 |
+
'width' => '',
|
4689 |
+
'class' => '',
|
4690 |
+
'id' => '',
|
4691 |
+
),
|
4692 |
+
'acfe_permissions' => '',
|
4693 |
+
'choices' => array(
|
4694 |
+
'top' => 'Top',
|
4695 |
+
'left' => 'Left',
|
4696 |
+
'hidden' => 'Hidden',
|
4697 |
+
),
|
4698 |
+
'allow_null' => 0,
|
4699 |
+
'other_choice' => 0,
|
4700 |
+
'default_value' => 'top',
|
4701 |
+
'layout' => 'vertical',
|
4702 |
+
'return_format' => 'value',
|
4703 |
+
'save_other_choice' => 0,
|
4704 |
+
),
|
4705 |
+
array(
|
4706 |
+
'key' => 'field_acfe_form_instruction_placement',
|
4707 |
+
'label' => 'Instruction placement',
|
4708 |
+
'name' => 'acfe_form_instruction_placement',
|
4709 |
+
'type' => 'radio',
|
4710 |
+
'instructions' => 'Determines where field instructions are places in relation to fields. Defaults to \'label\'. <br />
|
4711 |
+
Choices of \'label\' (Below labels) or \'field\' (Below fields)',
|
4712 |
+
'required' => 0,
|
4713 |
+
'conditional_logic' => 0,
|
4714 |
+
'wrapper' => array(
|
4715 |
+
'width' => '',
|
4716 |
+
'class' => '',
|
4717 |
+
'id' => '',
|
4718 |
+
),
|
4719 |
+
'acfe_permissions' => '',
|
4720 |
+
'choices' => array(
|
4721 |
+
'label' => 'Label',
|
4722 |
+
'field' => 'Field',
|
4723 |
+
),
|
4724 |
+
'allow_null' => 0,
|
4725 |
+
'other_choice' => 0,
|
4726 |
+
'default_value' => 'label',
|
4727 |
+
'layout' => 'vertical',
|
4728 |
+
'return_format' => 'value',
|
4729 |
+
'save_other_choice' => 0,
|
4730 |
),
|
4731 |
|
4732 |
/*
|
4733 |
+
* HTML
|
4734 |
*/
|
4735 |
array(
|
4736 |
+
'key' => 'field_acfe_form_tab_html',
|
4737 |
+
'label' => 'HTML',
|
4738 |
'name' => '',
|
4739 |
'type' => 'tab',
|
4740 |
'instructions' => '',
|
4750 |
'endpoint' => 0,
|
4751 |
),
|
4752 |
array(
|
4753 |
+
'key' => 'field_acfe_form_custom_html_enable',
|
4754 |
+
'label' => 'Override Form render',
|
4755 |
+
'name' => 'acfe_form_custom_html_enable',
|
4756 |
'type' => 'true_false',
|
4757 |
+
'instructions' => 'Override the native field groups HTML render',
|
4758 |
+
'required' => 0,
|
4759 |
+
'conditional_logic' => 0,
|
4760 |
+
'wrapper' => array(
|
4761 |
+
'width' => '',
|
4762 |
+
'class' => '',
|
4763 |
+
'id' => '',
|
4764 |
+
),
|
4765 |
+
'acfe_permissions' => '',
|
4766 |
+
'message' => '',
|
4767 |
+
'default_value' => false,
|
4768 |
+
'ui' => 1,
|
4769 |
+
'ui_on_text' => '',
|
4770 |
+
'ui_off_text' => '',
|
4771 |
+
),
|
4772 |
+
array(
|
4773 |
+
'key' => 'field_acfe_form_custom_html',
|
4774 |
+
'label' => 'HTML Form render',
|
4775 |
+
'name' => 'acfe_form_custom_html',
|
4776 |
+
'type' => 'acfe_code_editor',
|
4777 |
+
'instructions' => 'Render your own customized HTML.<br /><br />
|
4778 |
+
Field groups may be included using <code>{field_group:group_key}</code><br/><code>{field_group:Group title}</code><br/><br/>
|
4779 |
+
Fields may be included using <code>{field:field_key}</code><br/><code>{field:field_name}</code>',
|
4780 |
+
'required' => 0,
|
4781 |
+
'wrapper' => array(
|
4782 |
+
'width' => '',
|
4783 |
+
'class' => '',
|
4784 |
+
'id' => '',
|
4785 |
+
),
|
4786 |
+
'acfe_permissions' => '',
|
4787 |
+
'default_value' => '',
|
4788 |
+
'placeholder' => '',
|
4789 |
+
'maxlength' => '',
|
4790 |
+
'rows' => 12,
|
4791 |
+
'conditional_logic' => array(
|
4792 |
+
array(
|
4793 |
+
array(
|
4794 |
+
'field' => 'field_acfe_form_custom_html_enable',
|
4795 |
+
'operator' => '==',
|
4796 |
+
'value' => '1',
|
4797 |
+
),
|
4798 |
+
),
|
4799 |
+
),
|
4800 |
+
),
|
4801 |
+
array(
|
4802 |
+
'key' => 'field_acfe_form_html_before_fields',
|
4803 |
+
'label' => 'HTML Before render',
|
4804 |
+
'name' => 'acfe_form_html_before_fields',
|
4805 |
+
'type' => 'acfe_code_editor',
|
4806 |
+
'instructions' => 'Extra HTML to add before the fields',
|
4807 |
+
'required' => 0,
|
4808 |
+
'conditional_logic' => 0,
|
4809 |
+
'wrapper' => array(
|
4810 |
+
'width' => '',
|
4811 |
+
'class' => '',
|
4812 |
+
'id' => '',
|
4813 |
+
),
|
4814 |
+
'acfe_permissions' => '',
|
4815 |
+
'default_value' => '',
|
4816 |
+
'placeholder' => '',
|
4817 |
+
'maxlength' => '',
|
4818 |
+
'rows' => 2,
|
4819 |
+
),
|
4820 |
+
array(
|
4821 |
+
'key' => 'field_acfe_form_html_after_fields',
|
4822 |
+
'label' => 'HTML After render',
|
4823 |
+
'name' => 'acfe_form_html_after_fields',
|
4824 |
+
'type' => 'acfe_code_editor',
|
4825 |
+
'instructions' => 'Extra HTML to add after the fields',
|
4826 |
+
'required' => 0,
|
4827 |
+
'conditional_logic' => 0,
|
4828 |
+
'wrapper' => array(
|
4829 |
+
'width' => '',
|
4830 |
+
'class' => '',
|
4831 |
+
'id' => '',
|
4832 |
+
),
|
4833 |
+
'acfe_permissions' => '',
|
4834 |
+
'default_value' => '',
|
4835 |
+
'placeholder' => '',
|
4836 |
+
'maxlength' => '',
|
4837 |
+
'rows' => 2,
|
4838 |
+
),
|
4839 |
+
|
4840 |
+
/*
|
4841 |
+
* Validation
|
4842 |
+
*/
|
4843 |
+
array(
|
4844 |
+
'key' => 'field_acfe_form_tab_validation',
|
4845 |
+
'label' => 'Validation',
|
4846 |
+
'name' => '',
|
4847 |
+
'type' => 'tab',
|
4848 |
+
'instructions' => '',
|
4849 |
+
'required' => 0,
|
4850 |
+
'conditional_logic' => 0,
|
4851 |
+
'wrapper' => array(
|
4852 |
+
'width' => '',
|
4853 |
+
'class' => '',
|
4854 |
+
'id' => '',
|
4855 |
+
),
|
4856 |
+
'acfe_permissions' => '',
|
4857 |
+
'placement' => 'top',
|
4858 |
+
'endpoint' => 0,
|
4859 |
+
),
|
4860 |
+
array(
|
4861 |
+
'key' => 'field_acfe_form_hide_error',
|
4862 |
+
'label' => 'Hide general error',
|
4863 |
+
'name' => 'acfe_form_hide_error',
|
4864 |
+
'type' => 'true_false',
|
4865 |
+
'instructions' => 'Hide the general error message: "Validation failed. 1 field requires attention"',
|
4866 |
+
'required' => 0,
|
4867 |
+
'conditional_logic' => 0,
|
4868 |
+
'wrapper' => array(
|
4869 |
+
'width' => '',
|
4870 |
+
'class' => '',
|
4871 |
+
'id' => '',
|
4872 |
+
),
|
4873 |
+
'acfe_permissions' => '',
|
4874 |
+
'message' => '',
|
4875 |
+
'default_value' => 0,
|
4876 |
+
'ui' => 1,
|
4877 |
+
'ui_on_text' => '',
|
4878 |
+
'ui_off_text' => '',
|
4879 |
+
),
|
4880 |
+
array(
|
4881 |
+
'key' => 'field_acfe_form_hide_revalidation',
|
4882 |
+
'label' => 'Hide successful re-validation',
|
4883 |
+
'name' => 'acfe_form_hide_revalidation',
|
4884 |
+
'type' => 'true_false',
|
4885 |
+
'instructions' => 'Hide the successful notice when an error has been thrown',
|
4886 |
+
'required' => 0,
|
4887 |
+
'conditional_logic' => 0,
|
4888 |
+
'wrapper' => array(
|
4889 |
+
'width' => '',
|
4890 |
+
'class' => '',
|
4891 |
+
'id' => '',
|
4892 |
+
),
|
4893 |
+
'acfe_permissions' => '',
|
4894 |
+
'message' => '',
|
4895 |
+
'default_value' => 0,
|
4896 |
+
'ui' => 1,
|
4897 |
+
'ui_on_text' => '',
|
4898 |
+
'ui_off_text' => '',
|
4899 |
+
),
|
4900 |
+
array(
|
4901 |
+
'key' => 'field_acfe_form_hide_unload',
|
4902 |
+
'label' => 'Hide confirmation on exit',
|
4903 |
+
'name' => 'acfe_form_hide_unload',
|
4904 |
+
'type' => 'true_false',
|
4905 |
+
'instructions' => 'Do not prompt user on page refresh',
|
4906 |
+
'required' => 0,
|
4907 |
+
'conditional_logic' => 0,
|
4908 |
+
'wrapper' => array(
|
4909 |
+
'width' => '',
|
4910 |
+
'class' => '',
|
4911 |
+
'id' => '',
|
4912 |
+
),
|
4913 |
+
'acfe_permissions' => '',
|
4914 |
+
'message' => '',
|
4915 |
+
'default_value' => 0,
|
4916 |
+
'ui' => 1,
|
4917 |
+
'ui_on_text' => '',
|
4918 |
+
'ui_off_text' => '',
|
4919 |
+
),
|
4920 |
+
array(
|
4921 |
+
'key' => 'field_acfe_form_errors_position',
|
4922 |
+
'label' => 'Fields errors position',
|
4923 |
+
'name' => 'acfe_form_errors_position',
|
4924 |
+
'type' => 'radio',
|
4925 |
+
'instructions' => 'Choose where to display field errors',
|
4926 |
'required' => 0,
|
4927 |
+
'conditional_logic' => 0,
|
4928 |
'wrapper' => array(
|
4929 |
'width' => '',
|
4930 |
'class' => '',
|
4931 |
'id' => '',
|
4932 |
),
|
4933 |
'acfe_permissions' => '',
|
4934 |
+
'choices' => array(
|
4935 |
+
'above' => 'Above fields',
|
4936 |
+
'below' => 'Below fields',
|
4937 |
+
'group' => 'Group errors',
|
4938 |
+
'hide' => 'Hide errors',
|
4939 |
+
),
|
4940 |
+
'allow_null' => 0,
|
4941 |
+
'other_choice' => 0,
|
4942 |
+
'default_value' => 'above',
|
4943 |
+
'layout' => 'vertical',
|
4944 |
+
'return_format' => 'value',
|
4945 |
+
'save_other_choice' => 0,
|
4946 |
),
|
4947 |
array(
|
4948 |
+
'key' => 'field_acfe_form_errors_class',
|
4949 |
+
'label' => 'Fields errors class',
|
4950 |
+
'name' => 'acfe_form_errors_class',
|
4951 |
'type' => 'text',
|
4952 |
+
'instructions' => 'Add class to error message',
|
4953 |
'required' => 0,
|
4954 |
+
'conditional_logic' => array(
|
4955 |
+
array(
|
4956 |
+
array(
|
4957 |
+
'field' => 'field_acfe_form_errors_position',
|
4958 |
+
'operator' => '!=',
|
4959 |
+
'value' => 'group',
|
4960 |
+
),
|
4961 |
+
array(
|
4962 |
+
'field' => 'field_acfe_form_errors_position',
|
4963 |
+
'operator' => '!=',
|
4964 |
+
'value' => 'hide',
|
4965 |
+
),
|
4966 |
+
)
|
4967 |
+
),
|
4968 |
'wrapper' => array(
|
4969 |
'width' => '',
|
4970 |
'class' => '',
|
4978 |
'maxlength' => '',
|
4979 |
),
|
4980 |
array(
|
4981 |
+
'key' => 'field_acfe_form_validation_advanced_field_validation',
|
4982 |
+
'label' => 'PHP Field Validation',
|
4983 |
+
'name' => 'acfe_form_validation_advanced_field_validation',
|
4984 |
+
'type' => 'acfe_dynamic_message',
|
4985 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
4986 |
+
'instructions' => 'Native ACF field validation example',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4987 |
'required' => 0,
|
4988 |
'conditional_logic' => 0,
|
4989 |
'wrapper' => array(
|
4992 |
'id' => '',
|
4993 |
),
|
4994 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
4995 |
),
|
4996 |
array(
|
4997 |
+
'key' => 'field_acfe_form_validation_advanced_form_validation',
|
4998 |
+
'label' => 'PHP Form Validation',
|
4999 |
+
'name' => 'acfe_form_validation_advanced_form_validation',
|
5000 |
'type' => 'acfe_dynamic_message',
|
5001 |
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
5002 |
+
'instructions' => 'Global form validation example',
|
5003 |
'required' => 0,
|
5004 |
'conditional_logic' => 0,
|
5005 |
'wrapper' => array(
|
5011 |
),
|
5012 |
|
5013 |
/*
|
5014 |
+
* Actions
|
5015 |
*/
|
5016 |
+
/*
|
5017 |
array(
|
5018 |
+
'key' => 'field_acfe_form_tab_actions',
|
5019 |
+
'label' => 'Actions',
|
5020 |
'name' => '',
|
5021 |
'type' => 'tab',
|
5022 |
'instructions' => '',
|
5031 |
'placement' => 'top',
|
5032 |
'endpoint' => 0,
|
5033 |
),
|
5034 |
+
*/
|
5035 |
+
|
5036 |
/*
|
5037 |
+
* Submission
|
5038 |
+
*/
|
5039 |
array(
|
5040 |
+
'key' => 'field_acfe_form_tab_submission',
|
5041 |
+
'label' => 'Submission',
|
5042 |
+
'name' => '',
|
5043 |
+
'type' => 'tab',
|
5044 |
+
'instructions' => '',
|
5045 |
'required' => 0,
|
5046 |
'conditional_logic' => 0,
|
5047 |
'wrapper' => array(
|
5050 |
'id' => '',
|
5051 |
),
|
5052 |
'acfe_permissions' => '',
|
5053 |
+
'placement' => 'top',
|
5054 |
+
'endpoint' => 0,
|
|
|
|
|
5055 |
),
|
|
|
5056 |
array(
|
5057 |
+
'key' => 'field_acfe_form_updated_hide_form',
|
5058 |
+
'label' => 'Hide form',
|
5059 |
+
'name' => 'acfe_form_updated_hide_form',
|
5060 |
'type' => 'true_false',
|
5061 |
+
'instructions' => 'Hide form on successful submission',
|
5062 |
'required' => 0,
|
5063 |
+
'conditional_logic' => array(),
|
5064 |
'wrapper' => array(
|
5065 |
'width' => '',
|
5066 |
'class' => '',
|
5068 |
),
|
5069 |
'acfe_permissions' => '',
|
5070 |
'message' => '',
|
5071 |
+
'default_value' => 0,
|
5072 |
'ui' => 1,
|
5073 |
'ui_on_text' => '',
|
5074 |
'ui_off_text' => '',
|
5075 |
),
|
5076 |
array(
|
5077 |
+
'key' => 'field_acfe_form_return',
|
5078 |
+
'label' => 'Redirection',
|
5079 |
+
'name' => 'acfe_form_return',
|
5080 |
+
'type' => 'text',
|
5081 |
+
'instructions' => 'The URL to be redirected to after the form is submitted. Defaults to the current URL.<br /><br />You may use <code>{field:field_name}</code> <code>{field:field_key}</code> <code>{query_var:name}</code> <code>{query_var:name:key}</code>.',
|
5082 |
'required' => 0,
|
5083 |
'conditional_logic' => 0,
|
5084 |
'wrapper' => array(
|
5087 |
'id' => '',
|
5088 |
),
|
5089 |
'acfe_permissions' => '',
|
5090 |
+
'default_value' => '',
|
5091 |
+
'placeholder' => '',
|
5092 |
+
'prepend' => '',
|
5093 |
+
'append' => '',
|
5094 |
+
'maxlength' => '',
|
5095 |
),
|
5096 |
array(
|
5097 |
+
'key' => 'field_acfe_form_updated_message',
|
5098 |
+
'label' => 'Success message',
|
5099 |
+
'name' => 'acfe_form_updated_message',
|
5100 |
+
'type' => 'wysiwyg',
|
5101 |
+
'instructions' => 'A message displayed above the form after being redirected. Can also be empty for no message.<br /><br />You may use <code>{field:field_name}</code> <code>{field:field_key}</code> <code>{query_var:name}</code> <code>{query_var:name:key}</code>.',
|
|
|
5102 |
'required' => 0,
|
5103 |
'conditional_logic' => 0,
|
5104 |
'wrapper' => array(
|
5107 |
'id' => '',
|
5108 |
),
|
5109 |
'acfe_permissions' => '',
|
5110 |
+
'default_value' => __('Post updated', 'acf'),
|
5111 |
+
'tabs' => 'all',
|
5112 |
+
'toolbar' => 'full',
|
5113 |
+
'media_upload' => 1,
|
5114 |
+
'delay' => 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
5115 |
),
|
5116 |
array(
|
5117 |
+
'key' => 'field_acfe_form_html_updated_message',
|
5118 |
+
'label' => 'Success wrapper HTML',
|
5119 |
+
'name' => 'acfe_form_html_updated_message',
|
5120 |
+
'type' => 'acfe_code_editor',
|
5121 |
+
'instructions' => 'HTML used to render the updated message.<br /><br />
|
5122 |
+
If used, you have to include the following code <code>%s</code> to print the actual \'Success message\' above.',
|
5123 |
'required' => 0,
|
5124 |
'conditional_logic' => 0,
|
5125 |
'wrapper' => array(
|
5128 |
'id' => '',
|
5129 |
),
|
5130 |
'acfe_permissions' => '',
|
5131 |
+
'default_value' => '<div id="message" class="updated">%s</div>',
|
5132 |
+
'placeholder' => '',
|
5133 |
+
'maxlength' => '',
|
5134 |
+
'rows' => 2,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5135 |
),
|
5136 |
array(
|
5137 |
+
'key' => 'field_acfe_form_submission_advanced_submission_php',
|
5138 |
+
'label' => 'PHP Form Submit: Custom Action',
|
5139 |
+
'name' => 'acfe_form_submission_advanced_submission_php',
|
5140 |
+
'type' => 'acfe_dynamic_message',
|
5141 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
5142 |
+
'instructions' => 'Trigger a custom action on form submission',
|
5143 |
'required' => 0,
|
5144 |
'conditional_logic' => 0,
|
5145 |
'wrapper' => array(
|
5148 |
'id' => '',
|
5149 |
),
|
5150 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5151 |
),
|
5152 |
array(
|
5153 |
+
'key' => 'field_acfe_form_submission_advanced_submission_js',
|
5154 |
+
'label' => 'Javascript Form Submit: Custom Action',
|
5155 |
+
'name' => 'acfe_form_submission_advanced_submission_js',
|
5156 |
+
'type' => 'acfe_dynamic_message',
|
5157 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
5158 |
+
'instructions' => 'Trigger a custom JS action on form submission',
|
5159 |
'required' => 0,
|
5160 |
'conditional_logic' => 0,
|
5161 |
'wrapper' => array(
|
5164 |
'id' => '',
|
5165 |
),
|
5166 |
'acfe_permissions' => '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5167 |
),
|
5168 |
|
5169 |
/*
|
5248 |
),
|
5249 |
),
|
5250 |
array(
|
5251 |
+
'key' => 'field_acfe_form_cheatsheet_request',
|
5252 |
+
'label' => 'Request',
|
5253 |
+
'name' => 'acfe_form_cheatsheet_request',
|
5254 |
'type' => 'acfe_dynamic_message',
|
5255 |
+
'value' => '',
|
5256 |
+
'instructions' => 'Retrieve <code>$_REQUEST</code> value',
|
5257 |
'required' => 0,
|
5258 |
'conditional_logic' => 0,
|
5259 |
'wrapper' => array(
|
5263 |
),
|
5264 |
),
|
5265 |
array(
|
5266 |
+
'key' => 'field_acfe_form_cheatsheet_query_var',
|
5267 |
+
'label' => 'Query Var',
|
5268 |
+
'name' => 'acfe_form_cheatsheet_query_var',
|
5269 |
'type' => 'acfe_dynamic_message',
|
5270 |
+
'value' => isset($_REQUEST['post']) ? $_REQUEST['post'] : '',
|
5271 |
+
'instructions' => 'Retrieve query var values. Can be used to get data from previous action',
|
5272 |
'required' => 0,
|
5273 |
'conditional_logic' => 0,
|
5274 |
'wrapper' => array(
|
5370 |
'hide_on_screen' => '',
|
5371 |
'active' => true,
|
5372 |
'description' => '',
|
|
|
5373 |
'acfe_permissions' => '',
|
5374 |
'acfe_form' => 0,
|
5375 |
'acfe_meta' => '',
|
includes/modules/form/form-front.php
CHANGED
@@ -38,6 +38,9 @@ class acfe_form_front{
|
|
38 |
|
39 |
if(!acfe_form_is_front())
|
40 |
return;
|
|
|
|
|
|
|
41 |
|
42 |
$form = acfe_form_decrypt_args();
|
43 |
|
@@ -76,26 +79,24 @@ class acfe_form_front{
|
|
76 |
if(have_rows('acfe_form_actions', $form_id)):
|
77 |
|
78 |
while(have_rows('acfe_form_actions', $form_id)): the_row();
|
79 |
-
|
80 |
$action = get_row_layout();
|
|
|
81 |
$alias = get_sub_field('acfe_form_custom_alias');
|
82 |
-
|
83 |
// Custom Action
|
84 |
if($action === 'custom'){
|
85 |
-
|
86 |
$action = get_sub_field('acfe_form_custom_action');
|
87 |
$alias = '';
|
88 |
-
|
89 |
}
|
90 |
-
|
91 |
do_action('acfe/form/validation/' . $action, $form, $post_id, $alias);
|
92 |
do_action('acfe/form/validation/' . $action . '/form=' . $form_name, $form, $post_id, $alias);
|
93 |
-
|
94 |
-
if(!empty($alias))
|
95 |
-
|
96 |
-
do_action('acfe/form/validation/' . $action . '/action=' . $alias, $form, $post_id, $alias);
|
97 |
-
|
98 |
-
}
|
99 |
|
100 |
endwhile;
|
101 |
endif;
|
@@ -153,28 +154,12 @@ class acfe_form_front{
|
|
153 |
if(have_rows('acfe_form_actions', $form_id)):
|
154 |
|
155 |
while(have_rows('acfe_form_actions', $form_id)): the_row();
|
156 |
-
|
157 |
$action = get_row_layout();
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
$custom_action = get_sub_field('acfe_form_custom_action');
|
163 |
-
|
164 |
-
do_action('acfe/form/submit/' . $custom_action, $form, $post_id);
|
165 |
-
do_action('acfe/form/submit/' . $custom_action . '/form=' . $form_name, $form, $post_id);
|
166 |
-
|
167 |
-
}
|
168 |
-
|
169 |
-
// ACFE Actions
|
170 |
-
else{
|
171 |
-
|
172 |
-
$alias = get_sub_field('acfe_form_custom_alias');
|
173 |
-
|
174 |
-
do_action('acfe/form/prepare/' . $action, $form, $post_id, $alias);
|
175 |
-
do_action('acfe/form/prepare/' . $action . '/form=' . $form_name, $form, $post_id, $alias);
|
176 |
-
|
177 |
-
}
|
178 |
|
179 |
endwhile;
|
180 |
endif;
|
@@ -387,28 +372,25 @@ class acfe_form_front{
|
|
387 |
// Load
|
388 |
if(have_rows('acfe_form_actions', $form_id)):
|
389 |
while(have_rows('acfe_form_actions', $form_id)): the_row();
|
390 |
-
|
391 |
$action = get_row_layout();
|
392 |
|
393 |
$alias = get_sub_field('acfe_form_custom_alias');
|
394 |
-
|
395 |
// Custom Action
|
396 |
if($action === 'custom'){
|
397 |
-
|
398 |
$action = get_sub_field('acfe_form_custom_action');
|
399 |
$alias = '';
|
400 |
-
|
401 |
-
}
|
402 |
-
|
403 |
-
$args = apply_filters('acfe/form/load/' . $action, $args, $args['post_id'], $alias);
|
404 |
-
$args = apply_filters('acfe/form/load/' . $action . '/form=' . $form_name, $args, $args['post_id'], $alias);
|
405 |
-
|
406 |
-
if(!empty($alias)){
|
407 |
-
|
408 |
-
$args = apply_filters('acfe/form/load/action=' . $alias, $args, $args['post_id']);
|
409 |
-
|
410 |
}
|
411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
endwhile;
|
413 |
endif;
|
414 |
|
@@ -451,48 +433,44 @@ class acfe_form_front{
|
|
451 |
|
452 |
}
|
453 |
|
454 |
-
//
|
455 |
-
if(
|
456 |
|
457 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
|
459 |
-
|
460 |
-
|
461 |
-
?><div class="acfe-form-success" data-form-name="<?php echo $args['form_name']; ?>" data-form-id="<?php echo $args['form_id']; ?>"></div><?php
|
462 |
|
463 |
-
if(!empty($args['updated_message'])){
|
464 |
-
|
465 |
-
$message = $args['updated_message'];
|
466 |
-
|
467 |
-
if(acf_maybe_get_POST('acf')){
|
468 |
-
|
469 |
-
$message = acfe_form_map_field_value($args['updated_message'], $args['post_id'], $args);
|
470 |
-
|
471 |
-
}
|
472 |
-
|
473 |
-
if(!empty($args['html_updated_message'])){
|
474 |
-
|
475 |
-
printf($args['html_updated_message'], wp_unslash($message));
|
476 |
-
|
477 |
-
}else{
|
478 |
-
|
479 |
-
echo $message;
|
480 |
-
|
481 |
-
}
|
482 |
-
|
483 |
}
|
484 |
-
|
485 |
-
if($args['
|
486 |
-
|
487 |
-
|
488 |
-
|
|
|
|
|
|
|
|
|
489 |
}
|
|
|
|
|
490 |
|
|
|
|
|
|
|
|
|
|
|
491 |
}
|
492 |
|
493 |
}
|
494 |
|
495 |
-
if(!empty($args['fields_attributes']['wrapper_class']) || !empty($args['fields_attributes']['class'])){
|
496 |
|
497 |
add_filter('acf/prepare_field', function($field) use($args){
|
498 |
|
@@ -504,6 +482,9 @@ class acfe_form_front{
|
|
504 |
|
505 |
if(!empty($args['fields_attributes']['class']))
|
506 |
$field['class'] .= ' ' . $args['fields_attributes']['class'];
|
|
|
|
|
|
|
507 |
|
508 |
return $field;
|
509 |
|
@@ -560,8 +541,12 @@ class acfe_form_front{
|
|
560 |
'form' => acf_encrypt(json_encode($args))
|
561 |
));
|
562 |
|
|
|
|
|
|
|
|
|
563 |
?>
|
564 |
-
<div class="acf-fields acf-form-fields
|
565 |
|
566 |
<?php
|
567 |
|
38 |
|
39 |
if(!acfe_form_is_front())
|
40 |
return;
|
41 |
+
|
42 |
+
if(acf_maybe_get_POST('_acf_screen') !== 'acfe_form')
|
43 |
+
return;
|
44 |
|
45 |
$form = acfe_form_decrypt_args();
|
46 |
|
79 |
if(have_rows('acfe_form_actions', $form_id)):
|
80 |
|
81 |
while(have_rows('acfe_form_actions', $form_id)): the_row();
|
82 |
+
|
83 |
$action = get_row_layout();
|
84 |
+
|
85 |
$alias = get_sub_field('acfe_form_custom_alias');
|
86 |
+
|
87 |
// Custom Action
|
88 |
if($action === 'custom'){
|
89 |
+
|
90 |
$action = get_sub_field('acfe_form_custom_action');
|
91 |
$alias = '';
|
92 |
+
|
93 |
}
|
94 |
+
|
95 |
do_action('acfe/form/validation/' . $action, $form, $post_id, $alias);
|
96 |
do_action('acfe/form/validation/' . $action . '/form=' . $form_name, $form, $post_id, $alias);
|
97 |
+
|
98 |
+
if(!empty($alias))
|
99 |
+
do_action('acfe/form/validation/' . $action . '/action=' . $alias, $form, $post_id, $alias);
|
|
|
|
|
|
|
100 |
|
101 |
endwhile;
|
102 |
endif;
|
154 |
if(have_rows('acfe_form_actions', $form_id)):
|
155 |
|
156 |
while(have_rows('acfe_form_actions', $form_id)): the_row();
|
157 |
+
|
158 |
$action = get_row_layout();
|
159 |
+
|
160 |
+
$alias = get_sub_field('acfe_form_custom_alias');
|
161 |
+
|
162 |
+
do_action('acfe/form/make/' . $action, $form, $post_id, $alias);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
|
164 |
endwhile;
|
165 |
endif;
|
372 |
// Load
|
373 |
if(have_rows('acfe_form_actions', $form_id)):
|
374 |
while(have_rows('acfe_form_actions', $form_id)): the_row();
|
375 |
+
|
376 |
$action = get_row_layout();
|
377 |
|
378 |
$alias = get_sub_field('acfe_form_custom_alias');
|
379 |
+
|
380 |
// Custom Action
|
381 |
if($action === 'custom'){
|
382 |
+
|
383 |
$action = get_sub_field('acfe_form_custom_action');
|
384 |
$alias = '';
|
385 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
}
|
387 |
+
|
388 |
+
$args = apply_filters('acfe/form/load/' . $action, $args, $args['post_id'], $alias);
|
389 |
+
$args = apply_filters('acfe/form/load/' . $action . '/form=' . $form_name, $args, $args['post_id'], $alias);
|
390 |
+
|
391 |
+
if(!empty($alias))
|
392 |
+
$args = apply_filters('acfe/form/load/' . $action . '/action=' . $alias, $args, $args['post_id']);
|
393 |
+
|
394 |
endwhile;
|
395 |
endif;
|
396 |
|
433 |
|
434 |
}
|
435 |
|
436 |
+
// Updated message
|
437 |
+
if(acfe_form_is_submitted($args['form_name'])){
|
438 |
|
439 |
+
// Trigger Success JS
|
440 |
+
echo '<div class="acfe-form-success" data-form-name="' . $args['form_name'] . '" data-form-id="' . $args['form_id'] . '"></div>';
|
441 |
+
|
442 |
+
if(!empty($args['updated_message'])){
|
443 |
+
|
444 |
+
$message = $args['updated_message'];
|
445 |
+
|
446 |
+
if(acf_maybe_get_POST('acf')){
|
447 |
|
448 |
+
$message = acfe_form_map_field_value($args['updated_message'], $args['post_id'], $args);
|
|
|
|
|
449 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
}
|
451 |
+
|
452 |
+
if(!empty($args['html_updated_message'])){
|
453 |
+
|
454 |
+
printf($args['html_updated_message'], wp_unslash($message));
|
455 |
+
|
456 |
+
}else{
|
457 |
+
|
458 |
+
echo $message;
|
459 |
+
|
460 |
}
|
461 |
+
|
462 |
+
}
|
463 |
|
464 |
+
// Hide form
|
465 |
+
if($args['updated_hide_form']){
|
466 |
+
|
467 |
+
return false;
|
468 |
+
|
469 |
}
|
470 |
|
471 |
}
|
472 |
|
473 |
+
if(!empty($args['fields_attributes']['wrapper_class']) || !empty($args['fields_attributes']['class']) || $args['label_placement'] === 'hidden'){
|
474 |
|
475 |
add_filter('acf/prepare_field', function($field) use($args){
|
476 |
|
482 |
|
483 |
if(!empty($args['fields_attributes']['class']))
|
484 |
$field['class'] .= ' ' . $args['fields_attributes']['class'];
|
485 |
+
|
486 |
+
if($args['label_placement'] === 'hidden')
|
487 |
+
$field['label'] = false;
|
488 |
|
489 |
return $field;
|
490 |
|
541 |
'form' => acf_encrypt(json_encode($args))
|
542 |
));
|
543 |
|
544 |
+
$label_placement = false;
|
545 |
+
if($args['label_placement'] !== 'hidden')
|
546 |
+
$label_placement = '-' . $args['label_placement'];
|
547 |
+
|
548 |
?>
|
549 |
+
<div class="acf-fields acf-form-fields <?php echo $label_placement; ?>">
|
550 |
|
551 |
<?php
|
552 |
|
includes/modules/single-meta.php
CHANGED
@@ -28,6 +28,9 @@ class acfe_single_meta{
|
|
28 |
$this->taxonomies = apply_filters('acfe/modules/single_meta/taxonomies', array());
|
29 |
$this->options = apply_filters('acfe/modules/single_meta/options', false);
|
30 |
|
|
|
|
|
|
|
31 |
// Values
|
32 |
add_filter('acf/pre_load_metadata', array($this, 'load_metadata'), 999, 4);
|
33 |
add_filter('acf/update_value', array($this, 'update_value'), 999, 3);
|
@@ -55,7 +58,26 @@ class acfe_single_meta{
|
|
55 |
add_action('load-profile.php', array($this, 'load_user'));
|
56 |
|
57 |
// Options
|
58 |
-
add_action('acf/options_page/submitbox_before_major_actions', array($this, 'load_options'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
}
|
61 |
|
@@ -99,12 +121,12 @@ class acfe_single_meta{
|
|
99 |
* Update Value
|
100 |
*/
|
101 |
function update_value($value, $post_id, $field){
|
102 |
-
|
103 |
-
|
104 |
|
105 |
if(acf_maybe_get($field, 'acfe_save_meta')){
|
106 |
|
107 |
-
|
108 |
|
109 |
}
|
110 |
|
@@ -141,43 +163,38 @@ class acfe_single_meta{
|
|
141 |
|
142 |
// Update store
|
143 |
$store->set("$post_id:acf", $acf);
|
144 |
-
|
145 |
-
// Single field update: Save to ACF meta
|
146 |
-
if(!acf_maybe_get_POST('acf') || acf_is_filter_enabled('acfe/bidirectional')){
|
147 |
-
|
148 |
-
// Update option
|
149 |
-
if($type === 'option'){
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
update_option($id, $acf, $autoload);
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
162 |
|
163 |
}
|
164 |
-
|
165 |
-
//
|
166 |
if(acf_is_filter_enabled('acfe/save')){
|
167 |
|
168 |
-
|
|
|
|
|
169 |
|
170 |
-
|
|
|
171 |
|
172 |
-
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
// Save normally
|
180 |
-
return null;
|
181 |
|
182 |
}
|
183 |
|
@@ -231,7 +248,6 @@ class acfe_single_meta{
|
|
231 |
acf_update_metadata($post_id, 'acf', $acf);
|
232 |
|
233 |
}
|
234 |
-
|
235 |
|
236 |
}
|
237 |
|
@@ -240,94 +256,72 @@ class acfe_single_meta{
|
|
240 |
}
|
241 |
|
242 |
/*
|
243 |
-
*
|
244 |
*/
|
245 |
function pre_save_post($post_id = 0){
|
246 |
|
|
|
|
|
|
|
247 |
// Validate Post ID
|
248 |
$validate = $this->validate_post_id($post_id);
|
249 |
|
250 |
if(!$validate)
|
251 |
return;
|
252 |
|
253 |
-
|
|
|
254 |
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
// Set store as empty
|
259 |
-
$store->set("$post_id:acf", array());
|
260 |
-
|
261 |
-
}
|
262 |
|
263 |
}
|
264 |
|
265 |
/*
|
266 |
-
* acf/save_post
|
267 |
*/
|
268 |
function save_post($post_id = 0){
|
269 |
|
|
|
|
|
|
|
270 |
// Validate Post ID
|
271 |
$validate = $this->validate_post_id($post_id);
|
272 |
-
|
273 |
if(!$validate)
|
274 |
return;
|
275 |
-
|
276 |
-
// Get store
|
277 |
-
$store = acf_get_store('acfe/meta');
|
278 |
-
|
279 |
-
// Store found
|
280 |
-
if(!$store->has("$post_id:acf"))
|
281 |
-
return;
|
282 |
-
|
283 |
-
// Get Store: ACF meta
|
284 |
-
$acf = $store->get("$post_id:acf");
|
285 |
-
|
286 |
-
// Type + ID
|
287 |
-
extract(acf_decode_post_id($post_id));
|
288 |
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
$acf = wp_unslash($acf);
|
293 |
-
$autoload = (bool) acf_get_setting('autoload');
|
294 |
-
|
295 |
-
update_option($id, $acf, $autoload);
|
296 |
|
297 |
-
|
298 |
-
}else{
|
299 |
|
300 |
-
|
301 |
|
302 |
-
|
|
|
|
|
|
|
|
|
|
|
303 |
|
304 |
-
|
305 |
|
306 |
-
|
|
|
|
|
307 |
|
308 |
-
if
|
309 |
-
|
310 |
-
|
311 |
-
|
|
|
|
|
312 |
|
313 |
-
foreach($meta as $key => $value){
|
314 |
-
|
315 |
-
// bail if not ACF field
|
316 |
-
if(!isset($meta["_$key"]))
|
317 |
-
continue;
|
318 |
-
|
319 |
-
// Bail early if exists in Single Value array
|
320 |
-
if(isset($acf[$key]))
|
321 |
-
continue;
|
322 |
-
|
323 |
-
acf_delete_metadata($post_id, $key);
|
324 |
-
acf_delete_metadata($post_id, $key, true);
|
325 |
-
|
326 |
-
}
|
327 |
-
|
328 |
-
acf_disable_filter('acfe/delete');
|
329 |
-
|
330 |
}
|
|
|
|
|
331 |
|
332 |
}
|
333 |
|
@@ -509,6 +503,7 @@ class acfe_single_meta{
|
|
509 |
|
510 |
}
|
511 |
|
|
|
512 |
function load_options($page){
|
513 |
|
514 |
if($this->options === false)
|
@@ -520,7 +515,8 @@ class acfe_single_meta{
|
|
520 |
add_meta_box('acfe-clean-meta', 'ACF Single Meta', array($this, 'render_metabox'), 'acf_options_page', 'side', 'default');
|
521 |
|
522 |
}
|
523 |
-
|
|
|
524 |
function render_metabox($post, $metabox){
|
525 |
|
526 |
$field = array(
|
28 |
$this->taxonomies = apply_filters('acfe/modules/single_meta/taxonomies', array());
|
29 |
$this->options = apply_filters('acfe/modules/single_meta/options', false);
|
30 |
|
31 |
+
// Field Objects
|
32 |
+
add_filter('acf/pre_load_meta', array($this, 'load_meta'), 999, 2);
|
33 |
+
|
34 |
// Values
|
35 |
add_filter('acf/pre_load_metadata', array($this, 'load_metadata'), 999, 4);
|
36 |
add_filter('acf/update_value', array($this, 'update_value'), 999, 3);
|
58 |
add_action('load-profile.php', array($this, 'load_user'));
|
59 |
|
60 |
// Options
|
61 |
+
//add_action('acf/options_page/submitbox_before_major_actions', array($this, 'load_options'));
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
function load_meta($return, $post_id){
|
66 |
+
|
67 |
+
if(acf_is_filter_enabled('acfe/load_meta'))
|
68 |
+
return $return;
|
69 |
+
|
70 |
+
// Validate Post ID
|
71 |
+
$validate = $this->validate_post_id($post_id);
|
72 |
+
|
73 |
+
if(!$validate)
|
74 |
+
return $return;
|
75 |
+
|
76 |
+
// Get store
|
77 |
+
$store = $this->get_store($post_id);
|
78 |
+
$acf = $store->get("$post_id:acf");
|
79 |
+
|
80 |
+
return $acf;
|
81 |
|
82 |
}
|
83 |
|
121 |
* Update Value
|
122 |
*/
|
123 |
function update_value($value, $post_id, $field){
|
124 |
+
|
125 |
+
acf_disable_filter('acfe/save');
|
126 |
|
127 |
if(acf_maybe_get($field, 'acfe_save_meta')){
|
128 |
|
129 |
+
acf_enable_filter('acfe/save');
|
130 |
|
131 |
}
|
132 |
|
163 |
|
164 |
// Update store
|
165 |
$store->set("$post_id:acf", $acf);
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
+
// Update option
|
168 |
+
if($type === 'option'){
|
|
|
|
|
169 |
|
170 |
+
$acf = wp_unslash($acf);
|
171 |
+
$autoload = (bool) acf_get_setting('autoload');
|
172 |
+
|
173 |
+
update_option($id, $acf, $autoload);
|
174 |
+
|
175 |
+
// Update meta
|
176 |
+
}else{
|
177 |
+
|
178 |
+
acf_update_metadata($post_id, 'acf', $acf);
|
179 |
|
180 |
}
|
181 |
+
|
182 |
+
// Save normally
|
183 |
if(acf_is_filter_enabled('acfe/save')){
|
184 |
|
185 |
+
return null;
|
186 |
+
|
187 |
+
}
|
188 |
|
189 |
+
// Delete Native ACF field
|
190 |
+
acf_enable_filter('acfe/delete');
|
191 |
|
192 |
+
acf_delete_metadata($post_id, $name, $hidden);
|
193 |
|
194 |
+
acf_disable_filter('acfe/delete');
|
195 |
+
|
196 |
+
// Do not save as meta
|
197 |
+
return true;
|
|
|
|
|
|
|
198 |
|
199 |
}
|
200 |
|
248 |
acf_update_metadata($post_id, 'acf', $acf);
|
249 |
|
250 |
}
|
|
|
251 |
|
252 |
}
|
253 |
|
256 |
}
|
257 |
|
258 |
/*
|
259 |
+
* acf/save_post:0
|
260 |
*/
|
261 |
function pre_save_post($post_id = 0){
|
262 |
|
263 |
+
if(!acf_maybe_get_POST('acfe_clean_meta'))
|
264 |
+
return;
|
265 |
+
|
266 |
// Validate Post ID
|
267 |
$validate = $this->validate_post_id($post_id);
|
268 |
|
269 |
if(!$validate)
|
270 |
return;
|
271 |
|
272 |
+
// Reset ACF
|
273 |
+
$acf = array();
|
274 |
|
275 |
+
// Check store.
|
276 |
+
$store = acf_get_store('acfe/meta');
|
277 |
+
$store->set("$post_id:acf", $acf);
|
|
|
|
|
|
|
|
|
278 |
|
279 |
}
|
280 |
|
281 |
/*
|
282 |
+
* acf/save_post:999
|
283 |
*/
|
284 |
function save_post($post_id = 0){
|
285 |
|
286 |
+
if(!acf_maybe_get_POST('acfe_clean_meta'))
|
287 |
+
return;
|
288 |
+
|
289 |
// Validate Post ID
|
290 |
$validate = $this->validate_post_id($post_id);
|
291 |
+
|
292 |
if(!$validate)
|
293 |
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
|
295 |
+
$store = $this->get_store($post_id);
|
296 |
+
$acf = $store->get("$post_id:acf");
|
|
|
|
|
|
|
|
|
|
|
297 |
|
298 |
+
acf_enable_filter('acfe/load_meta');
|
|
|
299 |
|
300 |
+
$meta = acf_get_meta($post_id);
|
301 |
|
302 |
+
acf_disable_filter('acfe/load_meta');
|
303 |
+
|
304 |
+
if(empty($meta))
|
305 |
+
return;
|
306 |
+
|
307 |
+
acf_enable_filter('acfe/delete');
|
308 |
|
309 |
+
foreach($meta as $key => $value){
|
310 |
|
311 |
+
// bail if not ACF field
|
312 |
+
if(!isset($meta["_$key"]))
|
313 |
+
continue;
|
314 |
|
315 |
+
// Bail early if exists in Single Value array
|
316 |
+
if(isset($acf[$key]))
|
317 |
+
continue;
|
318 |
+
|
319 |
+
acf_delete_metadata($post_id, $key);
|
320 |
+
acf_delete_metadata($post_id, $key, true);
|
321 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
}
|
323 |
+
|
324 |
+
acf_disable_filter('acfe/delete');
|
325 |
|
326 |
}
|
327 |
|
503 |
|
504 |
}
|
505 |
|
506 |
+
/*
|
507 |
function load_options($page){
|
508 |
|
509 |
if($this->options === false)
|
515 |
add_meta_box('acfe-clean-meta', 'ACF Single Meta', array($this, 'render_metabox'), 'acf_options_page', 'side', 'default');
|
516 |
|
517 |
}
|
518 |
+
*/
|
519 |
+
|
520 |
function render_metabox($post, $metabox){
|
521 |
|
522 |
$field = array(
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: acf, custom fields, meta, admin, fields, form, repeater, content
|
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.4
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 0.8.6.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -30,6 +30,7 @@ All-in-one enhancement suite that improves WordPress & Advanced Custom Fields.
|
|
30 |
* WordPress Post Types / Taxonomies Manager
|
31 |
* WordPress Options Manager
|
32 |
* WordPress Admin Enhancements
|
|
|
33 |
* ... And many more features
|
34 |
|
35 |
== 🤟 Philosophy ==
|
@@ -64,7 +65,7 @@ If you don't already own [ACF Pro](https://www.advancedcustomfields.com/pro/), y
|
|
64 |
|
65 |
== 🏷️ Features ==
|
66 |
|
67 |
-
|
68 |
|
69 |
* **Auto Sync PHP**
|
70 |
Automatically synchronize field groups with local PHP files upon field group updates. This feature will create, include and update a local PHP file for each field group (just like the native Json sync feature).
|
@@ -115,7 +116,7 @@ Display field group on taxonomies admin list screen. Fields are saved in the opt
|
|
115 |
* **New field group location: Post type Archive**
|
116 |
Display field group on the post type archive (option page). The post type argument `acfe_admin_archive` must be set to `true`. This feature is also available in the Dynamic Post Type UI. Fields are saved in the option: `{post_type}_archive`
|
117 |
|
118 |
-
|
119 |
|
120 |
* **Column: Category**
|
121 |
Display and filter field groups categories
|
@@ -135,7 +136,7 @@ One-click export for each field groups
|
|
135 |
* **Row action: Field group key**
|
136 |
Quick view of field groups keys
|
137 |
|
138 |
-
|
139 |
|
140 |
* **Local**
|
141 |
Display local field groups that are loaded by ACF, but not available in the ACF field group administration. Example: a field group is registered locally in the `functions.php` file, but not in ACF
|
@@ -146,7 +147,7 @@ Export local field groups into PHP or Json
|
|
146 |
* **Sync**
|
147 |
Sync local field groups back to the database and edit their fields just like any other field group
|
148 |
|
149 |
-
|
150 |
|
151 |
* **Bidirectional fields**
|
152 |
An advanced bidirectional setting (also called post-to-post) is available for the following fields: Relationship, Post object, User & Taxonomy terms.
|
@@ -170,7 +171,7 @@ Exclude the field from the "Single Meta Save" compression feature. The global AC
|
|
170 |
* **View raw data**
|
171 |
Display raw field data in a modal to check your configuration & settings
|
172 |
|
173 |
-
|
174 |
|
175 |
* **Field Clone: Edit in modal**
|
176 |
Allow users to edit clone fields in a modal. Choose the edit button text, display close button and the modal size
|
@@ -211,7 +212,7 @@ Allow user to enter custom value which will be saved
|
|
211 |
* **Field Textarea: Code mode**
|
212 |
Switch font family to monospace and allow tab indent
|
213 |
|
214 |
-
|
215 |
|
216 |
* **New Field: Advanced Link**
|
217 |
Display a modern Link Selection in a modal. Posts, Post Types Archives & terms selection can be filtered in the field administration. Add custom sub fields using `filter('acfe/fields/advanced_link/sub_fields', $sub_fields, $field, $value)`
|
@@ -255,7 +256,7 @@ Select any terms of any taxonomies, allow specific terms, level or childrens (fo
|
|
255 |
* **New Field: User roles selection**
|
256 |
Select any user role (format: checkbox, radio or select)
|
257 |
|
258 |
-
|
259 |
|
260 |
Create and manage post types from your WordPress administration (Tools > Post Types). All WordPress post types arguments can be set and managed. But also:
|
261 |
|
@@ -266,7 +267,7 @@ Create and manage post types from your WordPress administration (Tools > Post Ty
|
|
266 |
* Add an Archive Option Page under the post type menu and set your field groups
|
267 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
268 |
|
269 |
-
|
270 |
|
271 |
Create and manage taxonomies from your WordPress administration (Tools > Taxonomies). All WordPress taxonomies arguments can be set and managed. But also:
|
272 |
|
@@ -275,22 +276,22 @@ Create and manage taxonomies from your WordPress administration (Tools > Taxonom
|
|
275 |
* Set custom taxonomy template (ie: `my-taxonomy.php`) instead of the native `taxonomy-{taxonomy}.php`
|
276 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
277 |
|
278 |
-
|
279 |
|
280 |
The native WP Author Metabox has been replaced with a dynamic version allowing to manage thousands of users without slowing down the post administration.
|
281 |
|
282 |
-
|
283 |
|
284 |
Taxonomies list/edit, User edit/add and General Settings views have been enhanced for a more consistent administration experience, using CSS/JS only.
|
285 |
|
286 |
-
|
287 |
|
288 |
Manage WordPress options from Settings > Options.
|
289 |
|
290 |
* View, add, edit and delete options
|
291 |
* Working with strings, serialized & Json values
|
292 |
|
293 |
-
|
294 |
|
295 |
* **ACF: Settings page**
|
296 |
Display all ACF settings in one page.
|
@@ -298,7 +299,7 @@ Display all ACF settings in one page.
|
|
298 |
* **ACF Extended: Settings page**
|
299 |
Display all ACF Extended settings in one page.
|
300 |
|
301 |
-
|
302 |
|
303 |
View all custom Posts, Terms, Users & Options meta in a readable format
|
304 |
|
@@ -309,7 +310,7 @@ View all custom Posts, Terms, Users & Options meta in a readable format
|
|
309 |
* Dev mode also enable `SCRIPT_DEBUG`
|
310 |
* Activate using `acf_update_setting('acfe/dev', true)` or `define('ACFE_dev', true)`
|
311 |
|
312 |
-
|
313 |
|
314 |
Manage ACF Options Pages from ACF > Options.
|
315 |
|
@@ -317,7 +318,7 @@ Manage ACF Options Pages from ACF > Options.
|
|
317 |
* All arguments are available
|
318 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
319 |
|
320 |
-
|
321 |
|
322 |
Manage ACF Block Types from ACF > Block Types.
|
323 |
|
@@ -326,7 +327,7 @@ Manage ACF Block Types from ACF > Block Types.
|
|
326 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
327 |
* Requires ACF Pro 5.8
|
328 |
|
329 |
-
|
330 |
|
331 |
* Controls: Inline Layout Title Edition
|
332 |
* Controls: Copy, Paste & Duplicate Layouts on the fly
|
@@ -344,6 +345,7 @@ Manage ACF Block Types from ACF > Block Types.
|
|
344 |
* Modal Selection Columns: Change the layout modal columns grid. 1, 2, 3, 4, 5 or 6 columns available
|
345 |
* Modal Selection Categories: Add category for each layout in the layout modal
|
346 |
* Modal Settings: Clone field groups and display them as a layout settings modal
|
|
|
347 |
* Layouts State: Force layouts to be collapsed or opened by default
|
348 |
* Layouts Collapse: Remove collapse action
|
349 |
* Layouts: Hide "Add Layout" buttons
|
@@ -354,7 +356,7 @@ Manage ACF Block Types from ACF > Block Types.
|
|
354 |
* Asynchronous Layouts: Add layouts using Ajax method. This setting increase performance on complex Flexible Content
|
355 |
* Disable Legacy Layout Title Ajax: Disable the native ACF Layout Title Ajax call on `acf/fields/flexible_content/layout_title`.
|
356 |
|
357 |
-
|
358 |
|
359 |
Manage ACF Forms from your WordPress administration. All ACF Form settings are available. But also:
|
360 |
|
@@ -376,7 +378,23 @@ Manage ACF Forms from your WordPress administration. All ACF Form settings are a
|
|
376 |
* The function `acf_form_head()` is not needed anymore
|
377 |
* Manual Import & Export is available in the ACF > Tools page
|
378 |
|
379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
|
381 |
Compress all fields values from the current post, term, user or options into one single meta data. This process lighten the database load as values are saved and read from one single row. Once activated and after saving a post/term/user in the administration, all old meta data will be removed and packed together in a meta called `acf`.
|
382 |
|
@@ -437,7 +455,7 @@ function my_acfe_single_meta_options($options_ids){
|
|
437 |
|
438 |
Note: It is possible to revert back to the native ACF save process. To do so, keep the feature enabled, get in the post administration you want to revert back. Disable the feature in your code, and save the post. All data will be saved back to individual meta data.
|
439 |
|
440 |
-
== ❤️ Supporters ==
|
441 |
|
442 |
* Thanks to [Brandon A.](https://twitter.com/AsmussenBrandon) for his support & tests
|
443 |
* Thanks to [Damien C.](https://twitter.com/DamChtlv) for his support & tests
|
@@ -446,6 +464,20 @@ Note: It is possible to revert back to the native ACF save process. To do so, ke
|
|
446 |
* Thanks to [Jaakko S.](https://twitter.com/jsaarenk) for his support & tests
|
447 |
* Thanks to [Renan A.](https://twitter.com/altendorfme) for his support & tests
|
448 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
449 |
== Installation ==
|
450 |
|
451 |
= Wordpress Install =
|
@@ -501,6 +533,53 @@ Usage example:
|
|
501 |
|
502 |
* The page is now also saved in the said post relationship field
|
503 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
= How to use Flexible Content: Templates, Styles & Scripts render? =
|
505 |
|
506 |
Templates, styles & scripts settings are saved in each layouts. They can be accessed manually via `get_field('my_flexible')` for example.
|
@@ -687,7 +766,7 @@ PHP AutoSync settings are very similar to the native ACF Json settings. To alter
|
|
687 |
|
688 |
`
|
689 |
// PHP Autosync: Save path
|
690 |
-
add_filter('
|
691 |
function my_acfe_php_save_point($path){
|
692 |
|
693 |
// update path
|
@@ -699,7 +778,7 @@ function my_acfe_php_save_point($path){
|
|
699 |
}
|
700 |
|
701 |
// PHP Autosync: Load paths
|
702 |
-
add_filter('
|
703 |
function my_acfe_php_load_point($paths){
|
704 |
|
705 |
// remove original path (optional)
|
@@ -745,6 +824,9 @@ function my_acfe_modules(){
|
|
745 |
|
746 |
// Disable Enhanced UI (Taxonomies, Users, Settings)
|
747 |
acf_update_setting('acfe/modules/ui', false);
|
|
|
|
|
|
|
748 |
|
749 |
}
|
750 |
`
|
@@ -764,6 +846,49 @@ function my_acfe_modules(){
|
|
764 |
|
765 |
== Changelog ==
|
766 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
767 |
= 0.8.6.3 =
|
768 |
* Module - Enhanced UI - Added WP User & WP Settings UI enhancements
|
769 |
* Module - Enhanced UI - Taxonomies UI enhancements were moved in the to general Enhancement module. The setting `acf_update_setting('acfe/modules/taxonomies')` has been replaced by `acf_update_setting('acfe/modules/ui')`
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.4
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 0.8.6.5
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
30 |
* WordPress Post Types / Taxonomies Manager
|
31 |
* WordPress Options Manager
|
32 |
* WordPress Admin Enhancements
|
33 |
+
* WPML & Polylang Multilingual support
|
34 |
* ... And many more features
|
35 |
|
36 |
== 🤟 Philosophy ==
|
65 |
|
66 |
== 🏷️ Features ==
|
67 |
|
68 |
+
== ACF: Field Groups Settings ==
|
69 |
|
70 |
* **Auto Sync PHP**
|
71 |
Automatically synchronize field groups with local PHP files upon field group updates. This feature will create, include and update a local PHP file for each field group (just like the native Json sync feature).
|
116 |
* **New field group location: Post type Archive**
|
117 |
Display field group on the post type archive (option page). The post type argument `acfe_admin_archive` must be set to `true`. This feature is also available in the Dynamic Post Type UI. Fields are saved in the option: `{post_type}_archive`
|
118 |
|
119 |
+
== ACF: Field Groups List ==
|
120 |
|
121 |
* **Column: Category**
|
122 |
Display and filter field groups categories
|
136 |
* **Row action: Field group key**
|
137 |
Quick view of field groups keys
|
138 |
|
139 |
+
== ACF: Field Groups - Local ==
|
140 |
|
141 |
* **Local**
|
142 |
Display local field groups that are loaded by ACF, but not available in the ACF field group administration. Example: a field group is registered locally in the `functions.php` file, but not in ACF
|
147 |
* **Sync**
|
148 |
Sync local field groups back to the database and edit their fields just like any other field group
|
149 |
|
150 |
+
== ACF: Fields Settings ==
|
151 |
|
152 |
* **Bidirectional fields**
|
153 |
An advanced bidirectional setting (also called post-to-post) is available for the following fields: Relationship, Post object, User & Taxonomy terms.
|
171 |
* **View raw data**
|
172 |
Display raw field data in a modal to check your configuration & settings
|
173 |
|
174 |
+
== ACF: Fields ==
|
175 |
|
176 |
* **Field Clone: Edit in modal**
|
177 |
Allow users to edit clone fields in a modal. Choose the edit button text, display close button and the modal size
|
212 |
* **Field Textarea: Code mode**
|
213 |
Switch font family to monospace and allow tab indent
|
214 |
|
215 |
+
== ACF: New Fields ==
|
216 |
|
217 |
* **New Field: Advanced Link**
|
218 |
Display a modern Link Selection in a modal. Posts, Post Types Archives & terms selection can be filtered in the field administration. Add custom sub fields using `filter('acfe/fields/advanced_link/sub_fields', $sub_fields, $field, $value)`
|
256 |
* **New Field: User roles selection**
|
257 |
Select any user role (format: checkbox, radio or select)
|
258 |
|
259 |
+
== WordPress: Dynamic Post Types ==
|
260 |
|
261 |
Create and manage post types from your WordPress administration (Tools > Post Types). All WordPress post types arguments can be set and managed. But also:
|
262 |
|
267 |
* Add an Archive Option Page under the post type menu and set your field groups
|
268 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
269 |
|
270 |
+
== WordPress: Dynamic Taxonomies ==
|
271 |
|
272 |
Create and manage taxonomies from your WordPress administration (Tools > Taxonomies). All WordPress taxonomies arguments can be set and managed. But also:
|
273 |
|
276 |
* Set custom taxonomy template (ie: `my-taxonomy.php`) instead of the native `taxonomy-{taxonomy}.php`
|
277 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
278 |
|
279 |
+
== WordPress: Ajax Author Box ==
|
280 |
|
281 |
The native WP Author Metabox has been replaced with a dynamic version allowing to manage thousands of users without slowing down the post administration.
|
282 |
|
283 |
+
== WordPress: Enhanced UI ==
|
284 |
|
285 |
Taxonomies list/edit, User edit/add and General Settings views have been enhanced for a more consistent administration experience, using CSS/JS only.
|
286 |
|
287 |
+
== WordPress: Options ==
|
288 |
|
289 |
Manage WordPress options from Settings > Options.
|
290 |
|
291 |
* View, add, edit and delete options
|
292 |
* Working with strings, serialized & Json values
|
293 |
|
294 |
+
== ACF: Settings ==
|
295 |
|
296 |
* **ACF: Settings page**
|
297 |
Display all ACF settings in one page.
|
299 |
* **ACF Extended: Settings page**
|
300 |
Display all ACF Extended settings in one page.
|
301 |
|
302 |
+
== ACF: Dev Mode ==
|
303 |
|
304 |
View all custom Posts, Terms, Users & Options meta in a readable format
|
305 |
|
310 |
* Dev mode also enable `SCRIPT_DEBUG`
|
311 |
* Activate using `acf_update_setting('acfe/dev', true)` or `define('ACFE_dev', true)`
|
312 |
|
313 |
+
== ACF: Options Pages ==
|
314 |
|
315 |
Manage ACF Options Pages from ACF > Options.
|
316 |
|
318 |
* All arguments are available
|
319 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
320 |
|
321 |
+
== ACF: Block Types (Gutenberg) ==
|
322 |
|
323 |
Manage ACF Block Types from ACF > Block Types.
|
324 |
|
327 |
* Manual PHP/Json Import & Export is available in the ACF > Tools page
|
328 |
* Requires ACF Pro 5.8
|
329 |
|
330 |
+
== ACF: Flexible Content Enhancement ==
|
331 |
|
332 |
* Controls: Inline Layout Title Edition
|
333 |
* Controls: Copy, Paste & Duplicate Layouts on the fly
|
345 |
* Modal Selection Columns: Change the layout modal columns grid. 1, 2, 3, 4, 5 or 6 columns available
|
346 |
* Modal Selection Categories: Add category for each layout in the layout modal
|
347 |
* Modal Settings: Clone field groups and display them as a layout settings modal
|
348 |
+
* Layouts Toggle: Hide specific layouts from the front-end
|
349 |
* Layouts State: Force layouts to be collapsed or opened by default
|
350 |
* Layouts Collapse: Remove collapse action
|
351 |
* Layouts: Hide "Add Layout" buttons
|
356 |
* Asynchronous Layouts: Add layouts using Ajax method. This setting increase performance on complex Flexible Content
|
357 |
* Disable Legacy Layout Title Ajax: Disable the native ACF Layout Title Ajax call on `acf/fields/flexible_content/layout_title`.
|
358 |
|
359 |
+
== ACF: Dynamic Forms ==
|
360 |
|
361 |
Manage ACF Forms from your WordPress administration. All ACF Form settings are available. But also:
|
362 |
|
378 |
* The function `acf_form_head()` is not needed anymore
|
379 |
* Manual Import & Export is available in the ACF > Tools page
|
380 |
|
381 |
+
== WPML & Polylang Multilangual ==
|
382 |
+
|
383 |
+
Advanced Custom Fields comes with a WPML compatibility module for Fields, Field Groups & Options Page ID. However, it will only take care of Options Pages with the default `options` post id. When WPML is enabled, ACF will translate the post id to `options_{lang}`. ie: `options_en`.
|
384 |
+
|
385 |
+
ACF Extended adds a new layer of compatibility for both WPML & Polylang. Options Pages post ids and all ACF Extended Modules (Dynamic Post Type, Taxonomy, Options Pages, Block Type) are now compatible.
|
386 |
+
|
387 |
+
= WPML =
|
388 |
+
Options Pages with custom post id are automatically translated. ie: `my-theme` will become `my-theme_en` when switching language. If an Options Page was manually registered with a custom post id including a language code at the end, then the post id won't be translated.
|
389 |
+
|
390 |
+
Dynamic Post Type, Taxonomy, Options Pages & Block Type items are automatically registered as WPML string, and can be translated using the WPML String Translation module.
|
391 |
+
|
392 |
+
= Polylang =
|
393 |
+
Options Pages with custom post id are automatically translated. ie: `my-theme` will become `my-theme_en_US` when switching language. If an Options Page was manually registered with a custom post id including a language code at the end, then the post id won't be translated. The module is also compatible with the [ACF Options for Polylang](https://wordpress.org/plugins/acf-options-for-polylang/) plugin.
|
394 |
+
|
395 |
+
Dynamic Post Type, Taxonomy, Options Pages & Block Type items are automatically registered as Polylang strings, and can be translated using the Polylang String Translation module.
|
396 |
+
|
397 |
+
== ACF: Single Meta Save (Beta) ==
|
398 |
|
399 |
Compress all fields values from the current post, term, user or options into one single meta data. This process lighten the database load as values are saved and read from one single row. Once activated and after saving a post/term/user in the administration, all old meta data will be removed and packed together in a meta called `acf`.
|
400 |
|
455 |
|
456 |
Note: It is possible to revert back to the native ACF save process. To do so, keep the feature enabled, get in the post administration you want to revert back. Disable the feature in your code, and save the post. All data will be saved back to individual meta data.
|
457 |
|
458 |
+
== ❤️ Early Supporters ==
|
459 |
|
460 |
* Thanks to [Brandon A.](https://twitter.com/AsmussenBrandon) for his support & tests
|
461 |
* Thanks to [Damien C.](https://twitter.com/DamChtlv) for his support & tests
|
464 |
* Thanks to [Jaakko S.](https://twitter.com/jsaarenk) for his support & tests
|
465 |
* Thanks to [Renan A.](https://twitter.com/altendorfme) for his support & tests
|
466 |
|
467 |
+
== 🥰 Donators ==
|
468 |
+
|
469 |
+
* Thanks to RavenSays
|
470 |
+
* Thanks to Dave A.
|
471 |
+
* Thanks to Rob H.
|
472 |
+
* Thanks to Valentin P.
|
473 |
+
* Thanks to Alan A.
|
474 |
+
* Thanks to Damian C.
|
475 |
+
* Thanks to Andrew
|
476 |
+
* Thanks to Kimantis
|
477 |
+
* Thanks to Anonymous
|
478 |
+
* Thanks to Chris
|
479 |
+
* Thanks to Dennis D.
|
480 |
+
|
481 |
== Installation ==
|
482 |
|
483 |
= Wordpress Install =
|
533 |
|
534 |
* The page is now also saved in the said post relationship field
|
535 |
|
536 |
+
= How to migrate existing data with the bidirectional field setting? =
|
537 |
+
|
538 |
+
The bidirectional setting has been designed to be optimized in terms of performance. Which means that it checks if the old value is different from the new one, to avoid saving and re-saving the same existing value on each update.
|
539 |
+
|
540 |
+
If there is already existing data before the activation of the setting, you'll have to perform a maintenance on the concerned posts.
|
541 |
+
|
542 |
+
First, enable the filter to force update on both side. This will bypass the existing value check.
|
543 |
+
|
544 |
+
`
|
545 |
+
add_filter('acfe/bidirectional/force_update/name=my_field', '__return_true');
|
546 |
+
`
|
547 |
+
|
548 |
+
You can then head over the admin, and save each one of the posts. Additionally, you can create a script in order to populate all the values automatically. Here is a code example:
|
549 |
+
|
550 |
+
`
|
551 |
+
add_action('admin_init', 'my_update_all_post_meta');
|
552 |
+
function my_update_all_post_meta(){
|
553 |
+
|
554 |
+
// Retrieve all pages
|
555 |
+
$get_posts = get_posts(array(
|
556 |
+
'post_type' => 'page', // Post Type: page
|
557 |
+
'posts_per_page' => -1,
|
558 |
+
'fields' => 'ids',
|
559 |
+
));
|
560 |
+
|
561 |
+
// Bail early if no post was found
|
562 |
+
if(empty($get_posts))
|
563 |
+
return;
|
564 |
+
|
565 |
+
// Force bidirectional update
|
566 |
+
add_filter('acfe/bidirectional/force_update/name=my_field', '__return_true');
|
567 |
+
|
568 |
+
foreach($get_posts as $post_id){
|
569 |
+
|
570 |
+
// Retrieve Data
|
571 |
+
$my_field = get_field('my_field', $post_id, false);
|
572 |
+
|
573 |
+
// Update Data
|
574 |
+
update_field('my_field', $my_field, $post_id);
|
575 |
+
|
576 |
+
}
|
577 |
+
|
578 |
+
add_filter('acfe/bidirectional/force_update/name=my_field', '__return_false');
|
579 |
+
|
580 |
+
}
|
581 |
+
`
|
582 |
+
|
583 |
= How to use Flexible Content: Templates, Styles & Scripts render? =
|
584 |
|
585 |
Templates, styles & scripts settings are saved in each layouts. They can be accessed manually via `get_field('my_flexible')` for example.
|
766 |
|
767 |
`
|
768 |
// PHP Autosync: Save path
|
769 |
+
add_filter('acfe/settings/php_save', 'my_acfe_php_save_point');
|
770 |
function my_acfe_php_save_point($path){
|
771 |
|
772 |
// update path
|
778 |
}
|
779 |
|
780 |
// PHP Autosync: Load paths
|
781 |
+
add_filter('acfe/settings/php_load', 'my_acfe_php_load_point');
|
782 |
function my_acfe_php_load_point($paths){
|
783 |
|
784 |
// remove original path (optional)
|
824 |
|
825 |
// Disable Enhanced UI (Taxonomies, Users, Settings)
|
826 |
acf_update_setting('acfe/modules/ui', false);
|
827 |
+
|
828 |
+
// Disable Multilangual Compatibility
|
829 |
+
acf_update_setting('acfe/modules/multilang', false);
|
830 |
|
831 |
}
|
832 |
`
|
846 |
|
847 |
== Changelog ==
|
848 |
|
849 |
+
= 0.8.6.5 =
|
850 |
+
* General: Added WPML & Polylang compatibility for Options Pages with custom post ids. ie: `my-theme` post id will be translated to `my-theme_en` with WPML & `my-theme_en_US` with Polylang
|
851 |
+
* Modules: Dynamic Post Types, Taxonomies, Options Pages & Block Types - Added Multilingual compatibility for WPML & Polylang. Items are automatically registered as strings for both WPML & Polylang plugins
|
852 |
+
* Modules: Dynamic Post Types, Taxonomies, Options Pages & Block Types - Added l10n support for the ACF Exporting Tools
|
853 |
+
* Module: Dynamic Post Type Archive - Added "Edit Archive Page" in the Admin Bar in the front-end when visiting an Archive Page
|
854 |
+
* Module: Dynamic Post Type Archive - Added l10n on the Label
|
855 |
+
* Module: Dynamic Post Type - Fixed Typo in UI
|
856 |
+
* Module: Single Meta Save - Enhanced code logic & compatibility
|
857 |
+
* Module: Single Meta Save - Added `get_fields()` support
|
858 |
+
* Module: Single Meta Save - Removed the "Delete Orphan Meta" feature from Options Pages
|
859 |
+
* Module: Dev Mode - Fixed Bulk Actions being displayed when the Postboxes were hidden by user
|
860 |
+
* Module: Dev Mode - Added Clone in Sub Fields support (previously displayed as `Undefined`)
|
861 |
+
* Module: Dev Mode - Fixed PHP 7.4 notices
|
862 |
+
* Module: Dynamic Forms - Query Var setting has been removed
|
863 |
+
* Module: Dynamic Forms - Query vars are now always generated. If no action name has been set, the query var will be named `{form_name}-{action}`. ie: `my-form-post`. The next post action will be named `my-form-post-2`
|
864 |
+
* Module: Dynamic Forms - Added "Label Placement: Hidden" setting
|
865 |
+
* Module: Dynamic Forms - Added `{current:post:post_author_data}` template tags in the "Cheatsheet" tab
|
866 |
+
* Module: Dynamic Forms - Added all available `{query_var}` template tags in the "Cheatsheet" tab
|
867 |
+
* Module: Dynamic Forms - Form Fields Groups, E-mail Action From/To/Subject fields are not required anymore
|
868 |
+
* Module: Dynamic Forms - Added JS Form Submit Action code example in the "Submission" tab
|
869 |
+
* Module: Dynamic Forms - Tweaked UI
|
870 |
+
* Field: Flexible Content - Added "Layout Toggle" setting allowing the user to hide specific layout from the front-end
|
871 |
+
* Field: Flexible Content - Fixed "Layout State" setting which incorrectly forced it as "Closed" when using the "Dynamic Render" setting
|
872 |
+
* Field: Flexible Content - Fixed "Layout Title" CSS
|
873 |
+
* Field: WYSIWYG - Fixed the Smart Delayed Init in the Flexible Content when the layout had the "Layout State" on "Opened"
|
874 |
+
* Fields: Advanced Validation - Added `count()`, `is_array()`, `is_string()`, `is_numeric()`, `get_post_type()`, `get_post_by_id()`, `get_post_by_title()` rules and `Matches regex`, `Doesn't matches regex`, `!= true`, `!= false`, `!= null` operators
|
875 |
+
* Field: Date Picker - Added `==`, `!=`, `>`, `<`, `Pattern match` & `Contains` conditional logic
|
876 |
+
* Field: Image - "Use as Featured Image" setting now loads the Featured Image if it was already set
|
877 |
+
* Field: Taxonomy Terms - Added Async Load setting support
|
878 |
+
* Field: Taxonomy Terms - Fixed "Level" filter input CSS width
|
879 |
+
* Field: Post Object - Merged "Allow Custom" & "Save Custom Value as New Post" settings
|
880 |
+
* Field: Post Object - Fixed the "Save as New Post" setting when allowing "Multiple Values"
|
881 |
+
* Field: Post Object - Added instructions & code examples to alter the New Post arguments programmatically
|
882 |
+
* Field: Code Editor - Added border radius to match WP admin input style
|
883 |
+
* Field: Group - Fixed "Edit in Modal" settings which weren't displayed
|
884 |
+
* Field Groups: Location Column - Fixed potential consuming query when using the `Post == ID` Conditional Rule
|
885 |
+
* General: Introduced `acfe_update_setting()`, `acfe_get_setting()` functions and `acfe/settings/{name}` filter
|
886 |
+
* General: Compatibility - Fixed WPML PHP notices in Field Groups
|
887 |
+
* General: Compatibility - Fixed Advanced Forms PHP notice during ACF Extended: Forms submission
|
888 |
+
* General: Readme - Added Field Bi-directional instructions to migrate already existing data
|
889 |
+
* General: Readme - Added Multilangual section
|
890 |
+
* General: Readme - Added Donators section
|
891 |
+
|
892 |
= 0.8.6.3 =
|
893 |
* Module - Enhanced UI - Added WP User & WP Settings UI enhancements
|
894 |
* Module - Enhanced UI - Taxonomies UI enhancements were moved in the to general Enhancement module. The setting `acf_update_setting('acfe/modules/taxonomies')` has been replaced by `acf_update_setting('acfe/modules/ui')`
|