Version Description
ACF Extended Pro 0.8.8:
* Field: Flexible Content - Added Grid System setting, get_flexible_grid()
& get_flexible_grid_class()
helpers
* Field: Added Menus Selector
* Field: Added Menu Locations Selector
* Field: File - Added "Button Label" setting to customize the "Add File" text
* Field: File Multiupload - The field now always return an array when multiupload is enabled
* Field: File Multiupload - Fixed missing ID format value
* Field: Post Field - Added "Taxonomies" field type allowing to move Taxonomies metaboxes
* Field: Post Field - Fixed "Content" field type width when used inside a modal
* Field: Relationship/Post Object - Fixed Inline Post Creation/Edit which wasn't working correctly with Gutenberg
* Field: Relationship/Post Object - Fixed Inline Post Creation/Edit which wasn't working correctly with Attachment post type
* Field: WYSIWYG - Fixed source code textarea border flickering during modal initialization
* Field Groups: Added Menu Item Depth Location
* Field Groups: Added Menu Item Type Location
* Module: Settings - Enhanced UI, description, tabs. Settings now display default and registered values difference
* Module: Settings - Added Enable/Disable features allowing to switch modules directly from the UI
* Module: Settings - Added Export (PHP & Json) / Import tools
* Module: Developer Mode - Added Post / Term / User / Options Page Object Data overview
* Module: Dynamic Block Types - Added "Active" setting allowing to enable/disable one specific block type
* Module: Dynamic Forms - Added "Active" setting allowing to enable/disable one specific form
* Module: Dynamic Options Pages - Added "Active" setting allowing to enable/disable one specific options page
* Module: Dynamic Post Types - Added "Active" setting allowing to enable/disable one specific post type
* Module: Dynamic Taxonomies - Added "Active" setting allowing to enable/disable one specific taxonomy
* Module: Dynamic Templates - Added "Active" setting allowing to enable/disable one specific template
* Module: Dynamic Templates - Fixed required fields which weren't always disabled in the template view
* Module: Dynamic Templates - Fixed a bug with Flexible Content Preview when preloading values
* Module: Dynamic Templates - Removed Field Group Hide on Screen effects in the Template UI
* Module: Dynamic Templates - Added Export (PHP & Json) / Import tools
* Module: Dynamic Templates - Added acfe_add_local_template()
function to locally register template values
* Module: Dynamic Forms - Option Action - Fixed code example labels
* Module: Global Field Condition - Fixed duplicated operators
ACF Extended Basic 0.8.8:
* Field: Flexible Content - Added Modal Select size setting
* Field: Flexible Content - Added Modal Edit size setting
* Field: Flexible Content - Added Modal Edit size setting for each layouts
* Field: Flexible Content - Reworked code base & Enhanced Field Settings UI
* Field: Flexible Content - Fixed placeholder height when the layout is toggeled and the preview is reloaded
* Field: Flexible Content - Added modal Select/Edit CSS classes with field name, key & layout name for developers
* Field: Advanced Link - Fixed error if the field was using a Term which has been deleted
* Field: Button - Added name field attribute to be able to retrieve the button click during acf/save_post
* Field: Checkbox/Radio - Fixed ## Title
Group Options not working on the front-end
* Field: Code Editor - Fixed CSS break-work
property when used in repeater
* Field: Columns - Re-introduced the field in Terms/Users views when Enhanced UI module is enabled
* Field: Conditional Logic - Fixed "contains" operator which would not work properly on Forms/Post Statuses/Post Types/Taxonomies/Taxonomy Terms/User Roles fields when using Checkbox/Radio field type
* Field: Dynamic Message - Added render
field setting to be used as a callback to write content in PHP
* Field: Forms/Post Statuses/Post Types/Taxonomies/Taxonomy Terms/User Roles - Fixed Multiple Lines "Default Value" setting now working correctly
* Field: Group/Clone - Fixed modal edit which included the instruction in the modal title when using the Modal Edit setting
* Field: Image/File - Added file upload validation when using Basic Upload (temporary fix while waiting for ACF to fix officially)
* Field: Image/File - Added "Default" option in the "Uploader Type" setting to fallback to the native behavior
* Field: Image - Fixed "use as Featured Image" which was wrongly saved during page preview
* Field: Select2 - Added dropdown CSS classes with field name & key for developers
* Module: Enhanced UI - Fixed WPMU missing "Add User" button in "Add User" view
* Module: Enhanced UI - Fixed Woocommerce Product Category CSS when using Enhanced UI
* Module: Renamed acfe/modules/dynamic_block_types
setting to acfe/modules/block_types
* Module: Renamed acfe/modules/dynamic_forms
setting to acfe/modules/forms
* Module: Renamed acfe/modules/dynamic_options_pages
setting to acfe/modules/options_pages
* Module: Renamed acfe/modules/dynamic_post_types
setting to acfe/modules/post_types
* Module: Renamed acfe/modules/dynamic_taxonomies
setting to acfe/modules/taxonomies
* Module: Dynamic Block Types/Forms/Options Pages/Post Types/Taxonomies - Enhanced code base & UI
* Module: Dynamic Block Types/Forms/Options Pages/Post Types/Taxonomies - Added Export Json / PHP in the row action
* Module: Dynamic Block Types/Forms/Options Pages/Post Types/Taxonomies - Added Export Json / PHP bulk actions
* Module: Dynamic Block Types/Forms/Options Pages/Post Types/Taxonomies - Fixed possible desync when switching to draft post status
* Module: Dynamic Post Types/Taxonomies - Added "View" in the row action
* Module: Dynamic Post Types/Taxonomies/WP Options/Dev Mode now correctly use the ACF show_admin
setting
* Module: Dynamic Forms - Fixed Clone Fields filter when using Custom HTML Render
* Module: Dynamic Forms - Deprecated {current:post|term|user|author}
Template Tags for a more simple version {post|term|user|author}
* Module: Dynamic Forms - Added compatibility with Flexible Content Preview Mode & Gutenberg/ACF Block Type Preview mode
* Module: Dynamic Forms - Added a 2nd parameter to acfe_form_get_action()
to directly retrieve the key value
* Module: Dynamic Forms - Fixed acfe_add_validation_error()
which wasn't working correctly with field names in the Action Validation Hooks
* Module: Dynamic Forms - User Login Action - Added acfe/form/validation/user/login_errors
filter to change the default error messages
* Module: Dynamic Forms - Fixed acfe_import_dynamic_form()
function to programmatically import a form
* Module: Settings - Enhanced UI and updated the module list
* General: Helpers - Deprecated acfe_form_is_front()
& acfe_form_is_admin()
in favor of acfe_is_front()
& acfe_is_admin()
* General: Helpers - Added acfe_get_post_id()
function as an universal solution to always retrieve the correct ACF Post ID in front-end and back-end
* General: Hooks - Added acfe/save_post
hook and variations on page submission. Compatible with get_field()
, have_rows()
etc...
* General: Hooks - Added acfe/validate_save_post
hook and variations to validate the whole page. Compatible with get_field()
, have_rows()
etc...
* General: Hooks - Deprecated acfe/load_field_front
. acfe/load_field
should be used with acfe_is_front()
instead
* General: Hooks - Deprecated acfe/load_field_admin
. acfe/load_field
should be used with acfe_is_admin()
instead
* General: Modal - Fixed CSS z-index
overlay when using "Edit in Modal" feature inside a WordPress Widget
* General: Updated acfe
option data structure
* General: Compatibility - Fixed Elementor which list all private ACF Extended Field Groups in the "Dynamic ACF tags" dropdown
* General: Compatibility - Fixed Error in Field Groups UI when trying to use ACF Extended with ACF Free
* General: Compatibility - Fixed Gutenberg "seamless" class on "Seamless" Field Group style to match WP/ACF style
* General: Compatibility - Fixed PHP 8 deprecated notices
* General: Compatibility - Fixed YOAST Rewrite & Republish feature when using the Authorbox UI
Release Info
Developer | hwk-fr |
Plugin | Advanced Custom Fields: Extended |
Version | 0.8.8 |
Comparing to | |
See all releases |
Code changes from version 0.8.7.6 to 0.8.8
- acf-extended.php +83 -49
- assets/css/acfe-admin.css +591 -423
- assets/css/acfe-admin.min.css +1 -1
- assets/css/acfe-field-group.css +231 -178
- assets/css/acfe-field-group.min.css +1 -1
- assets/css/acfe-input.css +740 -673
- assets/css/acfe-input.min.css +1 -1
- assets/css/acfe-ui.css +436 -417
- assets/css/acfe-ui.min.css +1 -1
- assets/css/acfe.css +463 -432
- assets/css/acfe.min.css +1 -1
- assets/js/acfe-admin.js +136 -127
- assets/js/acfe-admin.min.js +1 -1
- assets/js/acfe-field-group.js +46 -46
- assets/js/acfe-input.js +1296 -1277
- assets/js/acfe-input.min.js +1 -1
- assets/js/acfe-ui.js +43 -43
- assets/js/acfe.js +117 -60
- assets/js/acfe.min.js +1 -1
- includes/admin/options.php +4 -7
- includes/admin/settings.php +668 -421
- includes/admin/tools/block-types-export.php +39 -0
- includes/admin/tools/block-types-import.php +33 -0
- includes/admin/tools/dbt-export.php +0 -397
- includes/admin/tools/dbt-import.php +0 -209
- includes/admin/tools/dop-export.php +0 -395
- includes/admin/tools/dop-import.php +0 -207
- includes/admin/tools/dpt-export.php +0 -401
- includes/admin/tools/dpt-import.php +0 -242
- includes/admin/tools/dt-export.php +0 -411
- includes/admin/tools/dt-import.php +0 -240
- includes/admin/tools/{fg-export.php → field-groups-export.php} +18 -20
- includes/admin/tools/{fg-local.php → field-groups-local.php} +93 -111
- includes/admin/tools/form-export.php +0 -239
- includes/admin/tools/form-import.php +0 -459
- includes/admin/tools/forms-export.php +39 -0
- includes/admin/tools/forms-import.php +33 -0
- includes/admin/tools/module-export.php +303 -0
- includes/admin/tools/module-import.php +142 -0
- includes/admin/tools/options-pages-export.php +39 -0
- includes/admin/tools/options-pages-import.php +33 -0
- includes/admin/tools/post-types-export.php +39 -0
- includes/admin/tools/post-types-import.php +33 -0
- includes/admin/tools/taxonomies-export.php +39 -0
- includes/admin/tools/taxonomies-import.php +33 -0
- includes/core/compatibility.php +292 -5
- includes/core/helpers.php +419 -77
- includes/core/hooks.php +311 -26
- includes/core/menu.php +0 -2
- includes/core/multilang.php +1 -0
- includes/core/settings.php +47 -305
- includes/core/upgrades.php +273 -114
- includes/field-groups/field-groups-local.php +1 -1
- includes/field-groups/field-groups.php +9 -3
- includes/fields-settings/bidirectional.php +1 -1
- includes/fields-settings/settings.php +6 -6
- includes/fields-settings/validation.php +2 -2
- includes/fields/field-advanced-link.php +11 -8
- includes/fields/field-button.php +10 -70
- includes/fields/field-checkbox.php +14 -25
- includes/fields/field-column.php +6 -2
- includes/fields/field-dynamic-message.php +9 -0
- includes/fields/field-file.php +10 -1
- includes/fields/field-flexible-content-actions.php +424 -0
- includes/fields/field-flexible-content-async.php +166 -0
- includes/fields/field-flexible-content-controls.php +238 -0
- includes/fields/field-flexible-content-edit.php +273 -0
- includes/fields/field-flexible-content-hide.php +136 -0
- includes/fields/field-flexible-content-preview.php +402 -0
- includes/fields/field-flexible-content-select.php +267 -0
- includes/fields/field-flexible-content-settings.php +249 -0
- includes/fields/field-flexible-content-state.php +148 -0
- includes/fields/field-flexible-content-thumbnail.php +23 -0
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Advanced Custom Fields: Extended
|
4 |
* Description: All-in-one enhancement suite that improves WordPress & Advanced Custom Fields.
|
5 |
-
* Version: 0.8.
|
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 |
// Vars
|
19 |
-
var $version = '0.8.
|
20 |
var $acf = false;
|
21 |
|
22 |
/*
|
@@ -43,12 +43,13 @@ class ACFE{
|
|
43 |
// Init
|
44 |
include_once(ACFE_PATH . 'init.php');
|
45 |
|
|
|
|
|
|
|
|
|
46 |
// Load
|
47 |
add_action('acf/include_field_types', array($this, 'load'));
|
48 |
|
49 |
-
// Compatibility
|
50 |
-
acfe_include('includes/core/compatibility.php');
|
51 |
-
|
52 |
}
|
53 |
|
54 |
/*
|
@@ -67,36 +68,54 @@ class ACFE{
|
|
67 |
$this->settings(array(
|
68 |
|
69 |
// General
|
70 |
-
'url'
|
71 |
-
'theme_path'
|
72 |
-
'theme_url'
|
73 |
-
'theme_folder'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
// Php
|
76 |
-
'php'
|
77 |
-
'php_save'
|
78 |
-
'php_load'
|
79 |
-
'php_found'
|
80 |
|
81 |
// Json
|
82 |
-
'json'
|
83 |
-
'json_save'
|
84 |
-
'json_load'
|
85 |
-
'json_found'
|
86 |
|
87 |
// Modules
|
88 |
-
'dev'
|
89 |
-
'modules/author'
|
90 |
-
'modules/categories'
|
91 |
-
'modules/
|
92 |
-
'modules/
|
93 |
-
'modules/
|
94 |
-
'modules/
|
95 |
-
'modules/
|
96 |
-
'modules/multilang'
|
97 |
-
'modules/options'
|
98 |
-
'modules/single_meta'
|
99 |
-
'modules/ui'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
));
|
102 |
|
@@ -111,12 +130,15 @@ class ACFE{
|
|
111 |
|
112 |
// Tools
|
113 |
add_action('acf/include_admin_tools', array($this, 'tools'));
|
|
|
114 |
|
115 |
// Additional
|
116 |
-
acfe_include('includes/core/helpers.php');
|
117 |
acfe_include('includes/core/multilang.php');
|
118 |
acfe_include('includes/core/settings.php');
|
119 |
acfe_include('includes/core/upgrades.php');
|
|
|
|
|
|
|
120 |
|
121 |
}
|
122 |
|
@@ -142,7 +164,6 @@ class ACFE{
|
|
142 |
*/
|
143 |
acfe_include('includes/admin/options.php');
|
144 |
acfe_include('includes/admin/plugins.php');
|
145 |
-
acfe_include('includes/admin/settings.php');
|
146 |
|
147 |
/*
|
148 |
* Fields
|
@@ -193,13 +214,14 @@ class ACFE{
|
|
193 |
/*
|
194 |
* Modules
|
195 |
*/
|
|
|
196 |
acfe_include('includes/modules/author.php');
|
197 |
acfe_include('includes/modules/dev.php');
|
198 |
-
acfe_include('includes/modules/
|
199 |
-
acfe_include('includes/modules/
|
200 |
-
acfe_include('includes/modules/
|
201 |
-
acfe_include('includes/modules/
|
202 |
-
acfe_include('includes/modules/
|
203 |
acfe_include('includes/modules/single-meta.php');
|
204 |
acfe_include('includes/modules/ui.php');
|
205 |
|
@@ -241,19 +263,31 @@ class ACFE{
|
|
241 |
*/
|
242 |
function tools(){
|
243 |
|
244 |
-
|
245 |
-
acfe_include('includes/admin/tools/
|
246 |
-
acfe_include('includes/admin/tools/
|
247 |
-
|
248 |
-
acfe_include('includes/admin/tools/
|
249 |
-
acfe_include('includes/admin/tools/
|
250 |
-
acfe_include('includes/admin/tools/
|
251 |
-
acfe_include('includes/admin/tools/
|
252 |
-
|
253 |
-
acfe_include('includes/admin/tools/
|
254 |
-
acfe_include('includes/admin/tools/
|
255 |
-
acfe_include('includes/admin/tools/
|
256 |
-
acfe_include('includes/admin/tools/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
|
258 |
}
|
259 |
|
2 |
/**
|
3 |
* Plugin Name: Advanced Custom Fields: Extended
|
4 |
* Description: All-in-one enhancement suite that improves WordPress & Advanced Custom Fields.
|
5 |
+
* Version: 0.8.8
|
6 |
* Author: ACF Extended
|
7 |
* Author URI: https://www.acf-extended.com
|
8 |
* Text Domain: acfe
|
16 |
class ACFE{
|
17 |
|
18 |
// Vars
|
19 |
+
var $version = '0.8.8';
|
20 |
var $acf = false;
|
21 |
|
22 |
/*
|
43 |
// Init
|
44 |
include_once(ACFE_PATH . 'init.php');
|
45 |
|
46 |
+
// Essentials
|
47 |
+
acfe_include('includes/core/helpers.php');
|
48 |
+
acfe_include('includes/core/compatibility.php');
|
49 |
+
|
50 |
// Load
|
51 |
add_action('acf/include_field_types', array($this, 'load'));
|
52 |
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
/*
|
68 |
$this->settings(array(
|
69 |
|
70 |
// General
|
71 |
+
'url' => plugin_dir_url(__FILE__),
|
72 |
+
'theme_path' => $theme_path,
|
73 |
+
'theme_url' => $theme_url,
|
74 |
+
'theme_folder' => parse_url($theme_url, PHP_URL_PATH),
|
75 |
+
'reserved_post_types' => array('acf-field', 'acf-field-group', 'acfe-dbt', 'acfe-form', 'acfe-dop', 'acfe-dpt', 'acfe-dt'),
|
76 |
+
'reserved_taxonomies' => array('acf-field-group-category'),
|
77 |
+
'reserved_field_groups' => array(
|
78 |
+
'group_acfe_author',
|
79 |
+
'group_acfe_dynamic_block_type',
|
80 |
+
'group_acfe_dynamic_form',
|
81 |
+
'group_acfe_dynamic_options_page',
|
82 |
+
'group_acfe_dynamic_post_type',
|
83 |
+
'group_acfe_dynamic_taxonomy',
|
84 |
+
),
|
85 |
|
86 |
// Php
|
87 |
+
'php' => true,
|
88 |
+
'php_save' => "{$theme_path}/acfe-php",
|
89 |
+
'php_load' => array("{$theme_path}/acfe-php"),
|
90 |
+
'php_found' => false,
|
91 |
|
92 |
// Json
|
93 |
+
'json' => acf_get_setting('json'),
|
94 |
+
'json_save' => acf_get_setting('save_json'),
|
95 |
+
'json_load' => acf_get_setting('load_json'),
|
96 |
+
'json_found' => false,
|
97 |
|
98 |
// Modules
|
99 |
+
'dev' => false,
|
100 |
+
'modules/author' => true,
|
101 |
+
'modules/categories' => true,
|
102 |
+
'modules/block_types' => true,
|
103 |
+
'modules/forms' => true,
|
104 |
+
'modules/options_pages' => true,
|
105 |
+
'modules/post_types' => true,
|
106 |
+
'modules/taxonomies' => true,
|
107 |
+
'modules/multilang' => true,
|
108 |
+
'modules/options' => true,
|
109 |
+
'modules/single_meta' => false,
|
110 |
+
'modules/ui' => true,
|
111 |
+
|
112 |
+
// Fields
|
113 |
+
'field/recaptcha/site_key' => '',
|
114 |
+
'field/recaptcha/secret_key' => '',
|
115 |
+
'field/recaptcha/version' => 'v2',
|
116 |
+
'field/recaptcha/v2/theme' => 'light',
|
117 |
+
'field/recaptcha/v2/size' => 'small',
|
118 |
+
'field/recaptcha/v3/hide_logo' => false,
|
119 |
|
120 |
));
|
121 |
|
130 |
|
131 |
// Tools
|
132 |
add_action('acf/include_admin_tools', array($this, 'tools'));
|
133 |
+
add_action('acf/include_admin_tools', array($this, 'tools_field_groups'), 20);
|
134 |
|
135 |
// Additional
|
|
|
136 |
acfe_include('includes/core/multilang.php');
|
137 |
acfe_include('includes/core/settings.php');
|
138 |
acfe_include('includes/core/upgrades.php');
|
139 |
+
|
140 |
+
// Admin
|
141 |
+
acfe_include('includes/admin/settings.php');
|
142 |
|
143 |
}
|
144 |
|
164 |
*/
|
165 |
acfe_include('includes/admin/options.php');
|
166 |
acfe_include('includes/admin/plugins.php');
|
|
|
167 |
|
168 |
/*
|
169 |
* Fields
|
214 |
/*
|
215 |
* Modules
|
216 |
*/
|
217 |
+
acfe_include('includes/modules/module.php');
|
218 |
acfe_include('includes/modules/author.php');
|
219 |
acfe_include('includes/modules/dev.php');
|
220 |
+
acfe_include('includes/modules/block-types.php');
|
221 |
+
acfe_include('includes/modules/forms.php');
|
222 |
+
acfe_include('includes/modules/options-pages.php');
|
223 |
+
acfe_include('includes/modules/post-types.php');
|
224 |
+
acfe_include('includes/modules/taxonomies.php');
|
225 |
acfe_include('includes/modules/single-meta.php');
|
226 |
acfe_include('includes/modules/ui.php');
|
227 |
|
263 |
*/
|
264 |
function tools(){
|
265 |
|
266 |
+
// Modules
|
267 |
+
acfe_include('includes/admin/tools/module-export.php');
|
268 |
+
acfe_include('includes/admin/tools/module-import.php');
|
269 |
+
|
270 |
+
acfe_include('includes/admin/tools/post-types-export.php');
|
271 |
+
acfe_include('includes/admin/tools/post-types-import.php');
|
272 |
+
acfe_include('includes/admin/tools/taxonomies-export.php');
|
273 |
+
acfe_include('includes/admin/tools/taxonomies-import.php');
|
274 |
+
acfe_include('includes/admin/tools/options-pages-export.php');
|
275 |
+
acfe_include('includes/admin/tools/options-pages-import.php');
|
276 |
+
acfe_include('includes/admin/tools/block-types-export.php');
|
277 |
+
acfe_include('includes/admin/tools/block-types-import.php');
|
278 |
+
acfe_include('includes/admin/tools/forms-export.php');
|
279 |
+
acfe_include('includes/admin/tools/forms-import.php');
|
280 |
+
|
281 |
+
}
|
282 |
+
|
283 |
+
/*
|
284 |
+
* Tools Field Groups
|
285 |
+
*/
|
286 |
+
function tools_field_groups(){
|
287 |
+
|
288 |
+
// Field Groups
|
289 |
+
acfe_include('includes/admin/tools/field-groups-local.php');
|
290 |
+
acfe_include('includes/admin/tools/field-groups-export.php');
|
291 |
|
292 |
}
|
293 |
|
@@ -2,362 +2,495 @@ code,
|
|
2 |
kbd,
|
3 |
pre,
|
4 |
samp {
|
5 |
-
|
6 |
-
|
7 |
}
|
8 |
|
9 |
pre {
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
}
|
23 |
|
24 |
code {
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
}
|
29 |
|
30 |
-
pre
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
}
|
41 |
|
42 |
-
.code-codemirror
|
43 |
-
.pre-codemirror
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
}
|
50 |
|
51 |
.code-codemirror {
|
52 |
-
|
53 |
-
|
54 |
}
|
55 |
|
56 |
-
.code-codemirror
|
57 |
-
|
58 |
-
|
59 |
}
|
60 |
|
61 |
-
.code-codemirror
|
62 |
-
.pre-codemirror
|
63 |
-
|
64 |
}
|
65 |
|
66 |
-
.code-codemirror
|
67 |
-
.pre-codemirror
|
68 |
-
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
|
71 |
.acfe-pre-highlight {
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
}
|
85 |
|
86 |
-
.acf-postbox.seamless
|
87 |
-
|
88 |
}
|
89 |
|
90 |
-
.acf-flexible-content .layout.ui-sortable-helper:first-child
|
91 |
-
|
92 |
}
|
93 |
|
94 |
.acfe-postbox.acfe-postbox-no-handle h2.hndle {
|
95 |
-
|
96 |
}
|
97 |
|
98 |
.acfe-postbox.acfe-postbox-no-handle .handlediv {
|
99 |
-
|
100 |
}
|
101 |
|
102 |
-
.acfe-postbox-top
|
103 |
-
|
104 |
}
|
105 |
|
106 |
-
.acfe-postbox-top
|
107 |
-
|
108 |
-
|
109 |
}
|
110 |
|
111 |
-
.acfe-postbox-top
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
}
|
117 |
|
118 |
-
.acfe-postbox-top
|
119 |
-
|
120 |
-
|
121 |
}
|
122 |
|
123 |
-
.acfe-postbox-left
|
124 |
-
|
125 |
}
|
126 |
|
127 |
-
.acfe-postbox-left
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
}
|
132 |
|
133 |
-
.acfe-postbox-left
|
134 |
-
|
135 |
-
|
136 |
}
|
137 |
|
138 |
-
.acfe-postbox-left
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
}
|
144 |
|
145 |
-
.acfe-postbox-left
|
146 |
-
|
147 |
-
|
148 |
}
|
149 |
|
150 |
-
.acfe-postbox-left
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
}
|
155 |
|
156 |
-
.acfe-postbox-left
|
157 |
-
|
158 |
}
|
159 |
|
160 |
-
.acfe-postbox-left
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
}
|
165 |
|
166 |
-
.acfe-postbox-left
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
178 |
}
|
179 |
|
180 |
.acfe-postbox-left>.inside>.acf-field[data-width] {
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
}
|
186 |
|
187 |
-
.acfe-postbox-left
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
}
|
193 |
|
194 |
-
.acfe-postbox-left
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
}
|
200 |
|
201 |
html[dir=rtl] .acfe-postbox-left>.inside>.acf-field:before {
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
}
|
206 |
|
207 |
-
html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-input,
|
208 |
html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-label {
|
209 |
-
|
210 |
}
|
211 |
|
212 |
-
|
213 |
-
|
214 |
}
|
215 |
|
216 |
-
#side-sortables .acfe-postbox-left
|
217 |
-
|
218 |
-
margin-bottom: 10px;
|
219 |
}
|
220 |
|
221 |
-
#side-sortables .acfe-postbox-left
|
222 |
-
|
|
|
223 |
}
|
224 |
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
}
|
229 |
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
|
235 |
-
|
236 |
-
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
238 |
}
|
239 |
|
240 |
.wrap .acfe-dop-admin-config,
|
241 |
-
.wrap .acfe-dop-admin-config:active,
|
242 |
.wrap .acfe-dpt-admin-config,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
.wrap .acfe-dpt-admin-config:active,
|
244 |
-
.wrap .acfe-dt-admin-config,
|
245 |
.wrap .acfe-dt-admin-config:active {
|
246 |
-
|
247 |
-
|
248 |
}
|
249 |
|
250 |
.wrap .acfe-dop-admin-config span,
|
251 |
.wrap .acfe-dpt-admin-config span,
|
252 |
.wrap .acfe-dt-admin-config span {
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
}
|
259 |
|
260 |
-
.
|
261 |
-
|
|
|
262 |
}
|
263 |
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
body.post-type-acfe-dpt.post-new-php #misc-publishing-actions {
|
268 |
-
display: none;
|
269 |
}
|
270 |
|
271 |
-
|
272 |
-
|
273 |
}
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
|
|
|
|
|
|
|
|
280 |
}
|
281 |
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
|
|
|
|
284 |
}
|
285 |
|
286 |
-
|
287 |
-
|
288 |
-
body.post-type-acfe-dop.post-new-php #minor-publishing-actions,
|
289 |
-
body.post-type-acfe-dop.post-new-php #misc-publishing-actions {
|
290 |
-
display: none;
|
291 |
}
|
292 |
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
295 |
}
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
display: none;
|
302 |
}
|
303 |
|
304 |
-
|
305 |
-
|
|
|
|
|
306 |
}
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
|
|
313 |
}
|
314 |
|
315 |
-
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
317 |
}
|
318 |
|
319 |
-
.acf-field
|
320 |
-
|
321 |
}
|
322 |
|
323 |
-
.
|
324 |
-
|
325 |
-
|
|
|
|
|
|
|
|
|
326 |
}
|
327 |
|
328 |
-
|
329 |
-
|
330 |
-
border: 1px solid #e1e1e1;
|
331 |
}
|
332 |
|
333 |
-
|
334 |
-
|
335 |
}
|
336 |
|
337 |
-
#
|
338 |
-
#
|
339 |
-
|
340 |
-
#acf-admin-tool-acfe_tool_form_export ul {
|
341 |
-
-webkit-column-width: 200px;
|
342 |
-
-moz-column-width: 200px;
|
343 |
-
column-width: 200px;
|
344 |
}
|
345 |
|
346 |
-
|
347 |
-
|
|
|
|
|
|
|
|
|
|
|
348 |
}
|
349 |
|
350 |
.settings_page_acfe-options .column-option_id {
|
351 |
-
|
352 |
}
|
353 |
|
354 |
.settings_page_acfe-options .column-option_name {
|
355 |
-
|
356 |
}
|
357 |
|
358 |
.settings_page_acfe-options .column-autoload {
|
359 |
-
|
360 |
-
|
361 |
}
|
362 |
|
363 |
.acf-field[data-name=acfe_form_post_save_post_content_custom],
|
@@ -375,341 +508,376 @@ body.post-type-acfe-form.post-new-php #major-publishing-actions {
|
|
375 |
.acf-field[data-name=acfe_form_user_save_password_custom],
|
376 |
.acf-field[data-name=acfe_form_user_save_username_custom],
|
377 |
.acf-field[data-name=acfe_form_user_save_website_custom] {
|
378 |
-
|
379 |
-
|
380 |
}
|
381 |
|
382 |
-
.acf-field.acf-field-acfe-form-attributes
|
383 |
-
|
384 |
-
border-left-width: 0;
|
385 |
}
|
386 |
|
387 |
-
.acf-field
|
388 |
-
|
389 |
-
text-align: left;
|
390 |
}
|
391 |
|
392 |
-
.
|
393 |
-
.
|
394 |
-
|
395 |
-
margin: 0;
|
396 |
}
|
397 |
|
398 |
-
.postbox#acfe-acf-custom-fields
|
399 |
-
.postbox#acfe-wp-custom-fields
|
400 |
-
|
401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
}
|
403 |
|
404 |
.postbox#acfe-acf-custom-fields em,
|
405 |
-
.postbox#acfe-wp-custom-fields em
|
406 |
-
|
|
|
407 |
}
|
408 |
|
409 |
.postbox#acfe-acf-custom-fields .acfe_dev_meta_count,
|
410 |
-
.postbox#acfe-wp-custom-fields .acfe_dev_meta_count
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
display: -webkit-box;
|
429 |
-
display: -ms-flexbox;
|
430 |
-
display: flex;
|
431 |
-
-ms-flex-wrap: wrap;
|
432 |
-
flex-wrap: wrap;
|
433 |
-
}
|
434 |
-
|
435 |
-
.postbox#acfe-acf-custom-fields tbody td,
|
436 |
-
.postbox#acfe-acf-custom-fields tbody th,
|
437 |
-
.postbox#acfe-wp-custom-fields tbody td,
|
438 |
-
.postbox#acfe-wp-custom-fields tbody th {
|
439 |
-
display: block;
|
440 |
-
}
|
441 |
|
442 |
-
|
443 |
-
|
444 |
-
-
|
445 |
-
|
446 |
-
|
447 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
|
449 |
-
@media only screen and (max-width: 850px) {
|
450 |
.postbox#acfe-acf-custom-fields tbody td:first-of-type,
|
451 |
-
.postbox#acfe-wp-custom-fields tbody td:first-of-type
|
452 |
-
|
|
|
|
|
|
|
453 |
}
|
454 |
-
}
|
455 |
|
456 |
-
|
457 |
-
.postbox#acfe-wp-custom-fields tbody td:first-of-type strong {
|
458 |
-
display: inline-block;
|
459 |
-
word-break: break-all;
|
460 |
-
}
|
461 |
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
|
469 |
-
@media only screen and (max-width: 850px) {
|
470 |
.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions,
|
471 |
-
.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions
|
472 |
-
|
|
|
|
|
|
|
473 |
}
|
474 |
-
}
|
475 |
|
476 |
-
|
477 |
-
.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions a,
|
478 |
-
.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions .delete,
|
479 |
-
.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions a {
|
480 |
-
padding: 0;
|
481 |
-
}
|
482 |
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
}
|
490 |
|
491 |
-
body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection,
|
492 |
-
body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection__choice,
|
493 |
body:not(.acf-admin-5-3) .acf-field .select2-dropdown {
|
494 |
-
|
495 |
-
|
496 |
}
|
497 |
|
498 |
body:not(.acf-admin-5-3) .acf-field .select2-container .select2-search--inline .select2-search__field {
|
499 |
-
|
500 |
}
|
501 |
|
502 |
.acf-field .select2-container .select2-selection--single {
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
}
|
507 |
|
508 |
.acf-field .select2-container.select2-container--open .select2-selection--single,
|
509 |
.acf-field .select2-container:focus .select2-selection--single {
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
}
|
515 |
|
516 |
.acf-field .select2-container .select2-selection--single .select2-selection__rendered {
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
}
|
522 |
|
523 |
.acf-field .select2-container .select2-selection--single .select2-selection__clear {
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
}
|
528 |
|
529 |
.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow {
|
530 |
-
|
531 |
}
|
532 |
|
533 |
.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow b {
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
}
|
542 |
|
543 |
.acf-field .select2-container .select2-search--inline .select2-search__field {
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
}
|
548 |
|
549 |
.acf-field .select2-container .select2-selection--multiple {
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
}
|
554 |
|
555 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
556 |
-
|
557 |
}
|
558 |
|
559 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice {
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
}
|
566 |
|
567 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
568 |
-
|
569 |
-
|
570 |
}
|
571 |
|
572 |
.acf-field .select2-container--default.select2-container--focus .select2-selection--multiple {
|
573 |
-
|
574 |
}
|
575 |
|
576 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__clear {
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
}
|
581 |
|
582 |
-
.acf-field
|
583 |
-
|
584 |
}
|
585 |
|
586 |
.select2-container .select2-dropdown .select2-search__field {
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
}
|
592 |
|
593 |
.acf-tab-group li a .acfe-tab-badge {
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
}
|
606 |
|
607 |
-
.acf-tab-group li
|
608 |
-
.acf-tab-group li a
|
609 |
-
|
610 |
}
|
611 |
|
612 |
.menu-item-settings {
|
613 |
-
|
614 |
}
|
615 |
|
616 |
-
@media screen and (min-width:
|
617 |
-
.postbox .handle-order-higher,
|
618 |
-
.postbox .handle-order-lower {
|
619 |
-
visibility: hidden;
|
620 |
-
}
|
621 |
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
|
|
|
|
|
|
|
|
|
|
626 |
}
|
627 |
|
628 |
.postbox .handle-order-higher,
|
629 |
.postbox .handle-order-lower {
|
630 |
-
|
631 |
-
|
632 |
}
|
633 |
|
634 |
-
.postbox .handle-order-higher .order-higher-indicator
|
635 |
-
.postbox .handle-order-lower .order-lower-indicator
|
636 |
-
|
637 |
-
|
638 |
}
|
639 |
|
640 |
.postbox .handlediv {
|
641 |
-
|
642 |
}
|
643 |
|
644 |
-
.postbox .handlediv .toggle-indicator
|
645 |
-
|
646 |
-
|
647 |
}
|
648 |
|
649 |
-
#poststuff .stuffbox
|
650 |
#poststuff h2,
|
651 |
#poststuff h3.hndle {
|
652 |
-
|
653 |
}
|
654 |
|
655 |
.acf-settings-wrap .acf-box {
|
656 |
-
|
657 |
}
|
658 |
|
659 |
.acf-box .title {
|
660 |
-
|
661 |
}
|
662 |
|
663 |
.acf-box .title h3 {
|
664 |
-
|
665 |
}
|
666 |
|
667 |
.acf-columns-2 {
|
668 |
-
|
669 |
-
|
670 |
}
|
671 |
|
672 |
.acf-columns-2:after {
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
}
|
677 |
|
678 |
html[dir=rtl] .acf-columns-2 {
|
679 |
-
|
680 |
-
|
681 |
}
|
682 |
|
683 |
.acf-columns-2 .acf-column-1 {
|
684 |
-
|
685 |
-
|
686 |
}
|
687 |
|
688 |
html[dir=rtl] .acf-columns-2 .acf-column-1 {
|
689 |
-
|
690 |
}
|
691 |
|
692 |
.acf-columns-2 .acf-column-2 {
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
}
|
697 |
|
698 |
html[dir=rtl] .acf-columns-2 .acf-column-2 {
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
}
|
703 |
|
704 |
-
@media only screen and (max-width:
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
|
|
|
|
|
|
|
|
715 |
}
|
2 |
kbd,
|
3 |
pre,
|
4 |
samp {
|
5 |
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
6 |
+
font-size: 1em
|
7 |
}
|
8 |
|
9 |
pre {
|
10 |
+
display: block;
|
11 |
+
padding: 9.5px;
|
12 |
+
margin: 0;
|
13 |
+
line-height: 1.42857143;
|
14 |
+
color: #333;
|
15 |
+
word-break: break-all;
|
16 |
+
word-wrap: break-word;
|
17 |
+
background-color: #f9f9f9;
|
18 |
+
border: 1px solid #ccc;
|
19 |
+
border-radius: 1px;
|
20 |
+
white-space: pre-wrap;
|
21 |
+
overflow: auto
|
22 |
}
|
23 |
|
24 |
code {
|
25 |
+
-webkit-user-select: all;
|
26 |
+
-moz-user-select: all;
|
27 |
+
user-select: all
|
28 |
}
|
29 |
|
30 |
+
pre>code {
|
31 |
+
-webkit-user-select: inherit;
|
32 |
+
-moz-user-select: inherit;
|
33 |
+
-ms-user-select: inherit;
|
34 |
+
user-select: inherit;
|
35 |
+
padding: 0;
|
36 |
+
margin: 0;
|
37 |
+
background: 0 0;
|
38 |
+
font-size: 1em;
|
39 |
+
display: block
|
40 |
}
|
41 |
|
42 |
+
.code-codemirror>.CodeMirror,
|
43 |
+
.pre-codemirror>.CodeMirror {
|
44 |
+
border: 1px solid #ccc;
|
45 |
+
height: auto;
|
46 |
+
width: auto;
|
47 |
+
background: #f9f9f9;
|
48 |
+
padding: 9px 6px
|
49 |
}
|
50 |
|
51 |
.code-codemirror {
|
52 |
+
display: inline;
|
53 |
+
vertical-align: middle
|
54 |
}
|
55 |
|
56 |
+
.code-codemirror>.CodeMirror {
|
57 |
+
display: inline-block;
|
58 |
+
padding: 0
|
59 |
}
|
60 |
|
61 |
+
.code-codemirror>.CodeMirror .CodeMirror-selected,
|
62 |
+
.pre-codemirror>.CodeMirror .CodeMirror-selected {
|
63 |
+
background: #ddd !important
|
64 |
}
|
65 |
|
66 |
+
.code-codemirror>.CodeMirror .CodeMirror-lines,
|
67 |
+
.pre-codemirror>.CodeMirror .CodeMirror-lines {
|
68 |
+
padding: 0
|
69 |
+
}
|
70 |
+
|
71 |
+
.widget.open {
|
72 |
+
z-index: inherit !important
|
73 |
}
|
74 |
|
75 |
.acfe-pre-highlight {
|
76 |
+
display: block;
|
77 |
+
padding: 9.5px;
|
78 |
+
margin: 0;
|
79 |
+
line-height: 1.42857143;
|
80 |
+
color: #333;
|
81 |
+
background-color: #f9f9f9;
|
82 |
+
border: 1px solid #ccc;
|
83 |
+
border-radius: 1px;
|
84 |
+
overflow: auto;
|
85 |
+
font-family: Menlo, Monaco, Consolas, Courier New, monospace;
|
86 |
+
font-size: 1em;
|
87 |
+
white-space: nowrap
|
88 |
}
|
89 |
|
90 |
+
.acf-postbox.seamless>.inside>.acf-field {
|
91 |
+
padding: 15px 12px
|
92 |
}
|
93 |
|
94 |
+
.acf-flexible-content .layout.ui-sortable-helper:first-child+.layout.ui-sortable-placeholder {
|
95 |
+
margin-top: 0
|
96 |
}
|
97 |
|
98 |
.acfe-postbox.acfe-postbox-no-handle h2.hndle {
|
99 |
+
cursor: initial
|
100 |
}
|
101 |
|
102 |
.acfe-postbox.acfe-postbox-no-handle .handlediv {
|
103 |
+
display: none
|
104 |
}
|
105 |
|
106 |
+
.acfe-postbox-top>.inside {
|
107 |
+
position: relative
|
108 |
}
|
109 |
|
110 |
+
.acfe-postbox-top>.inside.-border {
|
111 |
+
border: #ccd0d4 solid 1px;
|
112 |
+
background: #fff
|
113 |
}
|
114 |
|
115 |
+
.acfe-postbox-top>.inside>.acf-field {
|
116 |
+
position: relative;
|
117 |
+
margin: 0;
|
118 |
+
padding: 15px 12px;
|
119 |
+
border-top: #eee solid 1px
|
120 |
}
|
121 |
|
122 |
+
.acfe-postbox-top>.inside>.acf-field:first-child {
|
123 |
+
border-top: none;
|
124 |
+
margin-top: 0
|
125 |
}
|
126 |
|
127 |
+
.acfe-postbox-left>.inside {
|
128 |
+
position: relative
|
129 |
}
|
130 |
|
131 |
+
.acfe-postbox-left>.inside:after {
|
132 |
+
display: block;
|
133 |
+
clear: both;
|
134 |
+
content: ""
|
135 |
}
|
136 |
|
137 |
+
.acfe-postbox-left>.inside.-border {
|
138 |
+
border: #ccd0d4 solid 1px;
|
139 |
+
background: #fff
|
140 |
}
|
141 |
|
142 |
+
.acfe-postbox-left>.inside>.acf-field {
|
143 |
+
position: relative;
|
144 |
+
margin: 0;
|
145 |
+
padding: 15px 12px;
|
146 |
+
border-top: #eee solid 1px
|
147 |
}
|
148 |
|
149 |
+
.acfe-postbox-left>.inside>.acf-field:first-child {
|
150 |
+
border-top: none;
|
151 |
+
margin-top: 0
|
152 |
}
|
153 |
|
154 |
+
.acfe-postbox-left>.inside.-clear>.acf-field {
|
155 |
+
border: none;
|
156 |
+
padding: 0;
|
157 |
+
margin: 15px 0
|
158 |
}
|
159 |
|
160 |
+
.acfe-postbox-left>.inside>.acf-field {
|
161 |
+
padding: 15px 0
|
162 |
}
|
163 |
|
164 |
+
.acfe-postbox-left>.inside>.acf-field:after {
|
165 |
+
display: block;
|
166 |
+
clear: both;
|
167 |
+
content: ""
|
168 |
}
|
169 |
|
170 |
+
.acfe-postbox-left>.inside>.acf-field:before {
|
171 |
+
content: "";
|
172 |
+
display: block;
|
173 |
+
position: absolute;
|
174 |
+
z-index: 0;
|
175 |
+
background: #f9f9f9;
|
176 |
+
border-color: #e1e1e1;
|
177 |
+
border-style: solid;
|
178 |
+
border-width: 0 1px 0 0;
|
179 |
+
top: 0;
|
180 |
+
bottom: 0;
|
181 |
+
left: 0;
|
182 |
+
width: 20%
|
183 |
}
|
184 |
|
185 |
.acfe-postbox-left>.inside>.acf-field[data-width] {
|
186 |
+
float: none;
|
187 |
+
width: auto !important;
|
188 |
+
border-left-width: 0 !important;
|
189 |
+
border-right-width: 0 !important
|
190 |
}
|
191 |
|
192 |
+
.acfe-postbox-left>.inside>.acf-field>.acf-label {
|
193 |
+
float: left;
|
194 |
+
width: 20%;
|
195 |
+
margin: 0;
|
196 |
+
padding: 0 12px
|
197 |
}
|
198 |
|
199 |
+
.acfe-postbox-left>.inside>.acf-field>.acf-input {
|
200 |
+
float: left;
|
201 |
+
width: 80%;
|
202 |
+
margin: 0;
|
203 |
+
padding: 0 12px
|
204 |
}
|
205 |
|
206 |
html[dir=rtl] .acfe-postbox-left>.inside>.acf-field:before {
|
207 |
+
border-width: 0 0 0 1px;
|
208 |
+
left: auto;
|
209 |
+
right: 0
|
210 |
}
|
211 |
|
|
|
212 |
html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-label {
|
213 |
+
float: right
|
214 |
}
|
215 |
|
216 |
+
html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-input {
|
217 |
+
float: right
|
218 |
}
|
219 |
|
220 |
+
#side-sortables .acfe-postbox-left>.inside>.acf-field:before {
|
221 |
+
display: none
|
|
|
222 |
}
|
223 |
|
224 |
+
#side-sortables .acfe-postbox-left>.inside>.acf-field>.acf-label {
|
225 |
+
width: 100%;
|
226 |
+
margin-bottom: 10px
|
227 |
}
|
228 |
|
229 |
+
#side-sortables .acfe-postbox-left>.inside>.acf-field>.acf-input {
|
230 |
+
width: 100%
|
231 |
+
}
|
|
|
232 |
|
233 |
+
@media screen and (max-width:640px) {
|
234 |
+
.acfe-postbox-left>.inside>.acf-field:before {
|
235 |
+
display: none
|
236 |
+
}
|
237 |
|
238 |
+
.acfe-postbox-left>.inside>.acf-field>.acf-label {
|
239 |
+
width: 100%;
|
240 |
+
margin-bottom: 10px
|
241 |
+
}
|
242 |
+
|
243 |
+
.acfe-postbox-left>.inside>.acf-field>.acf-input {
|
244 |
+
width: 100%
|
245 |
+
}
|
246 |
}
|
247 |
|
248 |
.wrap .acfe-dop-admin-config,
|
|
|
249 |
.wrap .acfe-dpt-admin-config,
|
250 |
+
.wrap .acfe-dt-admin-config {
|
251 |
+
display: inline-block;
|
252 |
+
padding-left: 4px;
|
253 |
+
padding-right: 4px
|
254 |
+
}
|
255 |
+
|
256 |
+
.wrap .acfe-dop-admin-config:active,
|
257 |
.wrap .acfe-dpt-admin-config:active,
|
|
|
258 |
.wrap .acfe-dt-admin-config:active {
|
259 |
+
padding-left: 4px;
|
260 |
+
padding-right: 4px
|
261 |
}
|
262 |
|
263 |
.wrap .acfe-dop-admin-config span,
|
264 |
.wrap .acfe-dpt-admin-config span,
|
265 |
.wrap .acfe-dt-admin-config span {
|
266 |
+
font-size: 16px;
|
267 |
+
vertical-align: text-top;
|
268 |
+
height: 15px;
|
269 |
+
width: 19px;
|
270 |
+
line-height: 19px
|
271 |
+
}
|
272 |
+
|
273 |
+
body.post-type-acfe-dbt #minor-publishing-actions,
|
274 |
+
body.post-type-acfe-dbt #misc-publishing-actions #visibility,
|
275 |
+
body.post-type-acfe-dbt #misc-publishing-actions .edit-post-status,
|
276 |
+
body.post-type-acfe-dbt #misc-publishing-actions .edit-timestamp,
|
277 |
+
body.post-type-acfe-dop #minor-publishing-actions,
|
278 |
+
body.post-type-acfe-dop #misc-publishing-actions #visibility,
|
279 |
+
body.post-type-acfe-dop #misc-publishing-actions .edit-post-status,
|
280 |
+
body.post-type-acfe-dop #misc-publishing-actions .edit-timestamp,
|
281 |
+
body.post-type-acfe-dpt #minor-publishing-actions,
|
282 |
+
body.post-type-acfe-dpt #misc-publishing-actions #visibility,
|
283 |
+
body.post-type-acfe-dpt #misc-publishing-actions .edit-post-status,
|
284 |
+
body.post-type-acfe-dpt #misc-publishing-actions .edit-timestamp,
|
285 |
+
body.post-type-acfe-dt #minor-publishing-actions,
|
286 |
+
body.post-type-acfe-dt #misc-publishing-actions #visibility,
|
287 |
+
body.post-type-acfe-dt #misc-publishing-actions .edit-post-status,
|
288 |
+
body.post-type-acfe-dt #misc-publishing-actions .edit-timestamp,
|
289 |
+
body.post-type-acfe-form #minor-publishing-actions,
|
290 |
+
body.post-type-acfe-form #misc-publishing-actions #visibility,
|
291 |
+
body.post-type-acfe-form #misc-publishing-actions .edit-post-status,
|
292 |
+
body.post-type-acfe-form #misc-publishing-actions .edit-timestamp,
|
293 |
+
body.post-type-acfe-template #minor-publishing-actions,
|
294 |
+
body.post-type-acfe-template #misc-publishing-actions #visibility,
|
295 |
+
body.post-type-acfe-template #misc-publishing-actions .edit-post-status,
|
296 |
+
body.post-type-acfe-template #misc-publishing-actions .edit-timestamp {
|
297 |
+
display: none !important
|
298 |
+
}
|
299 |
+
|
300 |
+
body.post-type-acfe-dbt .acfe-misc-export,
|
301 |
+
body.post-type-acfe-dop .acfe-misc-export,
|
302 |
+
body.post-type-acfe-dpt .acfe-misc-export,
|
303 |
+
body.post-type-acfe-dt .acfe-misc-export,
|
304 |
+
body.post-type-acfe-form .acfe-misc-export,
|
305 |
+
body.post-type-acfe-template .acfe-misc-export {
|
306 |
+
padding-top: 2px
|
307 |
+
}
|
308 |
+
|
309 |
+
body.post-type-acfe-dbt .acfe-misc-export span.dashicons,
|
310 |
+
body.post-type-acfe-dop .acfe-misc-export span.dashicons,
|
311 |
+
body.post-type-acfe-dpt .acfe-misc-export span.dashicons,
|
312 |
+
body.post-type-acfe-dt .acfe-misc-export span.dashicons,
|
313 |
+
body.post-type-acfe-form .acfe-misc-export span.dashicons,
|
314 |
+
body.post-type-acfe-template .acfe-misc-export span.dashicons {
|
315 |
+
font-size: 18px;
|
316 |
+
color: #82878c;
|
317 |
+
line-height: 1.2;
|
318 |
+
width: 18px;
|
319 |
+
margin-right: 4px
|
320 |
+
}
|
321 |
+
|
322 |
+
body.post-type-acfe-dbt.post-new-php .acfe-misc-export,
|
323 |
+
body.post-type-acfe-dop.post-new-php .acfe-misc-export,
|
324 |
+
body.post-type-acfe-dpt.post-new-php .acfe-misc-export,
|
325 |
+
body.post-type-acfe-dt.post-new-php .acfe-misc-export,
|
326 |
+
body.post-type-acfe-form.post-new-php .acfe-misc-export,
|
327 |
+
body.post-type-acfe-template.post-new-php .acfe-misc-export {
|
328 |
+
display: none
|
329 |
+
}
|
330 |
+
|
331 |
+
body.post-type-acfe-dbt .status-acf-disabled .column-title a,
|
332 |
+
body.post-type-acfe-dbt .status-acf-disabled .column-title code,
|
333 |
+
body.post-type-acfe-dop .status-acf-disabled .column-title a,
|
334 |
+
body.post-type-acfe-dop .status-acf-disabled .column-title code,
|
335 |
+
body.post-type-acfe-dpt .status-acf-disabled .column-title a,
|
336 |
+
body.post-type-acfe-dpt .status-acf-disabled .column-title code,
|
337 |
+
body.post-type-acfe-dt .status-acf-disabled .column-title a,
|
338 |
+
body.post-type-acfe-dt .status-acf-disabled .column-title code,
|
339 |
+
body.post-type-acfe-form .status-acf-disabled .column-title a,
|
340 |
+
body.post-type-acfe-form .status-acf-disabled .column-title code,
|
341 |
+
body.post-type-acfe-template .status-acf-disabled .column-title a,
|
342 |
+
body.post-type-acfe-template .status-acf-disabled .column-title code {
|
343 |
+
color: #555 !important
|
344 |
+
}
|
345 |
+
|
346 |
+
body.post-type-acfe-dbt .status-acf-disabled .column-title strong,
|
347 |
+
body.post-type-acfe-dop .status-acf-disabled .column-title strong,
|
348 |
+
body.post-type-acfe-dpt .status-acf-disabled .column-title strong,
|
349 |
+
body.post-type-acfe-dt .status-acf-disabled .column-title strong,
|
350 |
+
body.post-type-acfe-form .status-acf-disabled .column-title strong,
|
351 |
+
body.post-type-acfe-template .status-acf-disabled .column-title strong {
|
352 |
+
color: #a0a5aa
|
353 |
+
}
|
354 |
+
|
355 |
+
body.post-type-acfe-dbt .column-acfe-posts,
|
356 |
+
body.post-type-acfe-dbt .column-acfe-terms,
|
357 |
+
body.post-type-acfe-dop .column-acfe-posts,
|
358 |
+
body.post-type-acfe-dop .column-acfe-terms,
|
359 |
+
body.post-type-acfe-dpt .column-acfe-posts,
|
360 |
+
body.post-type-acfe-dpt .column-acfe-terms,
|
361 |
+
body.post-type-acfe-dt .column-acfe-posts,
|
362 |
+
body.post-type-acfe-dt .column-acfe-terms,
|
363 |
+
body.post-type-acfe-form .column-acfe-posts,
|
364 |
+
body.post-type-acfe-form .column-acfe-terms,
|
365 |
+
body.post-type-acfe-template .column-acfe-posts,
|
366 |
+
body.post-type-acfe-template .column-acfe-terms {
|
367 |
+
width: 120px
|
368 |
+
}
|
369 |
+
|
370 |
+
.acf-field.acf-field-acfe-author>.acf-label {
|
371 |
+
display: none
|
372 |
}
|
373 |
|
374 |
+
.edit-post-layout__metaboxes:not(:empty) {
|
375 |
+
background: #f3f4f5;
|
376 |
+
padding: 10px 10px 0 10px !important
|
377 |
}
|
378 |
|
379 |
+
.edit-post-layout__metaboxes .edit-post-meta-boxes-area .postbox {
|
380 |
+
margin-bottom: 10px;
|
381 |
+
border: 1px solid #e1e1e1
|
|
|
|
|
382 |
}
|
383 |
|
384 |
+
.edit-post-layout__metaboxes .edit-post-meta-boxes-area .postbox>.inside {
|
385 |
+
border-bottom: 0
|
386 |
}
|
387 |
|
388 |
+
#acf-admin-tool-acfe_dynamic_block_types_export ul,
|
389 |
+
#acf-admin-tool-acfe_dynamic_forms_export ul,
|
390 |
+
#acf-admin-tool-acfe_dynamic_options_pages_export ul,
|
391 |
+
#acf-admin-tool-acfe_dynamic_post_types_export ul,
|
392 |
+
#acf-admin-tool-acfe_dynamic_taxonomies_export ul,
|
393 |
+
#acf-admin-tool-acfe_dynamic_templates_export ul {
|
394 |
+
-webkit-column-width: 200px;
|
395 |
+
-moz-column-width: 200px;
|
396 |
+
column-width: 200px
|
397 |
}
|
398 |
|
399 |
+
#acf-admin-tool-acfe_dynamic_block_types_export .acf-postbox-columns,
|
400 |
+
#acf-admin-tool-acfe_dynamic_forms_export .acf-postbox-columns,
|
401 |
+
#acf-admin-tool-acfe_dynamic_options_pages_export .acf-postbox-columns,
|
402 |
+
#acf-admin-tool-acfe_dynamic_post_types_export .acf-postbox-columns,
|
403 |
+
#acf-admin-tool-acfe_dynamic_taxonomies_export .acf-postbox-columns,
|
404 |
+
#acf-admin-tool-acfe_dynamic_templates_export .acf-postbox-columns {
|
405 |
+
margin-right: 0
|
406 |
}
|
407 |
|
408 |
+
.acf-meta-box-wrap.-grid #acf-admin-tool-acfe-fg-local {
|
409 |
+
display: none
|
|
|
|
|
|
|
410 |
}
|
411 |
|
412 |
+
#acfe-admin-settings .inside>.acf-field {
|
413 |
+
display: -webkit-box;
|
414 |
+
display: -ms-flexbox;
|
415 |
+
display: flex;
|
416 |
+
padding: 0
|
417 |
}
|
418 |
|
419 |
+
#acfe-admin-settings .inside>.acf-field>.acf-label {
|
420 |
+
padding-top: 15px;
|
421 |
+
padding-bottom: 15px;
|
422 |
+
float: none
|
|
|
423 |
}
|
424 |
|
425 |
+
#acfe-admin-settings .inside>.acf-field>.acf-label label span.acf-js-tooltip {
|
426 |
+
float: right;
|
427 |
+
font-size: 14px;
|
428 |
+
color: #ccc
|
429 |
}
|
430 |
|
431 |
+
#acfe-admin-settings .inside>.acf-field>.acf-input {
|
432 |
+
display: -webkit-box;
|
433 |
+
display: -ms-flexbox;
|
434 |
+
display: flex;
|
435 |
+
float: none;
|
436 |
+
padding: 0
|
437 |
}
|
438 |
|
439 |
+
#acfe-admin-settings .inside>.acf-field>.acf-input>div {
|
440 |
+
-webkit-box-flex: 1;
|
441 |
+
-ms-flex: 1 1 50%;
|
442 |
+
flex: 1 1 50%;
|
443 |
+
max-width: 50%;
|
444 |
+
padding: 8px;
|
445 |
+
min-width: 0
|
446 |
}
|
447 |
|
448 |
+
#acfe-admin-settings .inside>.acf-field>.acf-input>div:nth-child(2) {
|
449 |
+
border-left: 1px solid #eee
|
450 |
}
|
451 |
|
452 |
+
#acfe-admin-settings .inside>.acf-field>.acf-input .acfe-settings-text {
|
453 |
+
overflow: hidden;
|
454 |
+
-o-text-overflow: ellipsis;
|
455 |
+
text-overflow: ellipsis;
|
456 |
+
white-space: nowrap;
|
457 |
+
max-width: 100%;
|
458 |
+
display: inline-block
|
459 |
}
|
460 |
|
461 |
+
#acfe-admin-settings .inside>.acf-field>.acf-input .acfe-settings-text>code {
|
462 |
+
font-size: 12px
|
|
|
463 |
}
|
464 |
|
465 |
+
#acfe-admin-settings .inside>.acf-field>.acf-input .dashicons-saved {
|
466 |
+
font-size: 21px
|
467 |
}
|
468 |
|
469 |
+
#acfe-admin-settings .inside>.acf-field>.acf-input .dashicons-no-alt {
|
470 |
+
color: #ccc;
|
471 |
+
font-size: 21px
|
|
|
|
|
|
|
|
|
472 |
}
|
473 |
|
474 |
+
#acfe-admin-settings .inside>.acf-field[data-key=field_acfe_settings_thead]>.acf-input {
|
475 |
+
padding: 0;
|
476 |
+
border-bottom: 1px solid #eee
|
477 |
+
}
|
478 |
+
|
479 |
+
#acfe-admin-settings .inside>.acf-field[data-key=field_acfe_settings_thead]+.acf-field {
|
480 |
+
border-top: 0
|
481 |
}
|
482 |
|
483 |
.settings_page_acfe-options .column-option_id {
|
484 |
+
width: 65px
|
485 |
}
|
486 |
|
487 |
.settings_page_acfe-options .column-option_name {
|
488 |
+
width: 435px
|
489 |
}
|
490 |
|
491 |
.settings_page_acfe-options .column-autoload {
|
492 |
+
width: 100px;
|
493 |
+
text-align: center
|
494 |
}
|
495 |
|
496 |
.acf-field[data-name=acfe_form_post_save_post_content_custom],
|
508 |
.acf-field[data-name=acfe_form_user_save_password_custom],
|
509 |
.acf-field[data-name=acfe_form_user_save_username_custom],
|
510 |
.acf-field[data-name=acfe_form_user_save_website_custom] {
|
511 |
+
border-top: 0;
|
512 |
+
padding-top: 0
|
513 |
}
|
514 |
|
515 |
+
.acf-field.acf-field-acfe-form-attributes>.acf-input>.acf-fields>.acf-field {
|
516 |
+
border-left-width: 0
|
|
|
517 |
}
|
518 |
|
519 |
+
.acf-field.acf-field-acfe-form-fields-attributes>.acf-input>.acf-fields>.acf-field {
|
520 |
+
border-left-width: 0
|
|
|
521 |
}
|
522 |
|
523 |
+
.acf-field-repeater.acf-field-acfe-form-email-files-static>.acf-input>.acf-repeater>.acf-actions,
|
524 |
+
.acf-field-repeater.acf-field-acfe-form-email-files>.acf-input>.acf-repeater>.acf-actions {
|
525 |
+
text-align: left
|
|
|
526 |
}
|
527 |
|
528 |
+
.postbox#acfe-acf-custom-fields>.inside,
|
529 |
+
.postbox#acfe-wp-custom-fields>.inside,
|
530 |
+
.postbox#acfe-wp-object>.inside {
|
531 |
+
padding: 0;
|
532 |
+
margin: 0
|
533 |
+
}
|
534 |
+
|
535 |
+
.postbox#acfe-acf-custom-fields+.tablenav,
|
536 |
+
.postbox#acfe-wp-custom-fields+.tablenav,
|
537 |
+
.postbox#acfe-wp-object+.tablenav {
|
538 |
+
padding-top: 0;
|
539 |
+
margin-top: -8px
|
540 |
}
|
541 |
|
542 |
.postbox#acfe-acf-custom-fields em,
|
543 |
+
.postbox#acfe-wp-custom-fields em,
|
544 |
+
.postbox#acfe-wp-object em {
|
545 |
+
color: #aaa
|
546 |
}
|
547 |
|
548 |
.postbox#acfe-acf-custom-fields .acfe_dev_meta_count,
|
549 |
+
.postbox#acfe-wp-custom-fields .acfe_dev_meta_count,
|
550 |
+
.postbox#acfe-wp-object .acfe_dev_meta_count {
|
551 |
+
background: #72777c;
|
552 |
+
padding: 1px 5px;
|
553 |
+
border-radius: 4px;
|
554 |
+
color: #fff;
|
555 |
+
margin-left: 7px;
|
556 |
+
font-size: 12px;
|
557 |
+
margin-right: auto
|
558 |
+
}
|
559 |
+
|
560 |
+
@media only screen and (max-width:1100px) {
|
561 |
+
|
562 |
+
.postbox#acfe-acf-custom-fields thead,
|
563 |
+
.postbox#acfe-wp-custom-fields thead,
|
564 |
+
.postbox#acfe-wp-object thead {
|
565 |
+
display: none
|
566 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
567 |
|
568 |
+
.postbox#acfe-acf-custom-fields tbody tr,
|
569 |
+
.postbox#acfe-wp-custom-fields tbody tr,
|
570 |
+
.postbox#acfe-wp-object tbody tr {
|
571 |
+
display: -webkit-box;
|
572 |
+
display: -ms-flexbox;
|
573 |
+
display: flex;
|
574 |
+
-ms-flex-wrap: wrap;
|
575 |
+
flex-wrap: wrap
|
576 |
+
}
|
577 |
+
|
578 |
+
.postbox#acfe-acf-custom-fields tbody td,
|
579 |
+
.postbox#acfe-acf-custom-fields tbody th,
|
580 |
+
.postbox#acfe-wp-custom-fields tbody td,
|
581 |
+
.postbox#acfe-wp-custom-fields tbody th,
|
582 |
+
.postbox#acfe-wp-object tbody td,
|
583 |
+
.postbox#acfe-wp-object tbody th {
|
584 |
+
display: block
|
585 |
+
}
|
586 |
|
|
|
587 |
.postbox#acfe-acf-custom-fields tbody td:first-of-type,
|
588 |
+
.postbox#acfe-wp-custom-fields tbody td:first-of-type,
|
589 |
+
.postbox#acfe-wp-object tbody td:first-of-type {
|
590 |
+
-webkit-box-flex: 1;
|
591 |
+
-ms-flex: 1;
|
592 |
+
flex: 1
|
593 |
}
|
|
|
594 |
|
595 |
+
@media only screen and (max-width:850px) {
|
|
|
|
|
|
|
|
|
596 |
|
597 |
+
.postbox#acfe-acf-custom-fields tbody td:first-of-type,
|
598 |
+
.postbox#acfe-wp-custom-fields tbody td:first-of-type,
|
599 |
+
.postbox#acfe-wp-object tbody td:first-of-type {
|
600 |
+
line-height: 2.2
|
601 |
+
}
|
602 |
+
}
|
603 |
+
|
604 |
+
.postbox#acfe-acf-custom-fields tbody td:first-of-type strong,
|
605 |
+
.postbox#acfe-wp-custom-fields tbody td:first-of-type strong,
|
606 |
+
.postbox#acfe-wp-object tbody td:first-of-type strong {
|
607 |
+
display: inline-block;
|
608 |
+
word-break: break-all
|
609 |
+
}
|
610 |
|
|
|
611 |
.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions,
|
612 |
+
.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions,
|
613 |
+
.postbox#acfe-wp-object tbody td:first-of-type .row-actions {
|
614 |
+
display: inline-block;
|
615 |
+
padding: 0;
|
616 |
+
float: right
|
617 |
}
|
|
|
618 |
|
619 |
+
@media only screen and (max-width:850px) {
|
|
|
|
|
|
|
|
|
|
|
620 |
|
621 |
+
.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions,
|
622 |
+
.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions,
|
623 |
+
.postbox#acfe-wp-object tbody td:first-of-type .row-actions {
|
624 |
+
left: auto
|
625 |
+
}
|
626 |
+
}
|
627 |
+
|
628 |
+
.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions .delete,
|
629 |
+
.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions a,
|
630 |
+
.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions .delete,
|
631 |
+
.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions a,
|
632 |
+
.postbox#acfe-wp-object tbody td:first-of-type .row-actions .delete,
|
633 |
+
.postbox#acfe-wp-object tbody td:first-of-type .row-actions a {
|
634 |
+
padding: 0
|
635 |
+
}
|
636 |
+
|
637 |
+
.postbox#acfe-acf-custom-fields tbody td:nth-child(3),
|
638 |
+
.postbox#acfe-wp-custom-fields tbody td:nth-child(3),
|
639 |
+
.postbox#acfe-wp-object tbody td:nth-child(3) {
|
640 |
+
-webkit-box-flex: 1;
|
641 |
+
-ms-flex: 1 1 100%;
|
642 |
+
flex: 1 1 100%
|
643 |
+
}
|
644 |
+
}
|
645 |
+
|
646 |
+
body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection {
|
647 |
+
border-color: #dfdfdf !important;
|
648 |
+
border-radius: 0 !important
|
649 |
+
}
|
650 |
+
|
651 |
+
body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection__choice {
|
652 |
+
border-color: #dfdfdf !important;
|
653 |
+
border-radius: 0 !important
|
654 |
}
|
655 |
|
|
|
|
|
656 |
body:not(.acf-admin-5-3) .acf-field .select2-dropdown {
|
657 |
+
border-color: #dfdfdf !important;
|
658 |
+
border-radius: 0 !important
|
659 |
}
|
660 |
|
661 |
body:not(.acf-admin-5-3) .acf-field .select2-container .select2-search--inline .select2-search__field {
|
662 |
+
margin-top: 0 !important
|
663 |
}
|
664 |
|
665 |
.acf-field .select2-container .select2-selection--single {
|
666 |
+
border-radius: 3px !important;
|
667 |
+
height: 30px !important;
|
668 |
+
outline: 0
|
669 |
}
|
670 |
|
671 |
.acf-field .select2-container.select2-container--open .select2-selection--single,
|
672 |
.acf-field .select2-container:focus .select2-selection--single {
|
673 |
+
border-color: #007cba !important;
|
674 |
+
color: #016087 !important;
|
675 |
+
-webkit-box-shadow: 0 0 0 1px #007cba !important;
|
676 |
+
box-shadow: 0 0 0 1px #007cba !important
|
677 |
}
|
678 |
|
679 |
.acf-field .select2-container .select2-selection--single .select2-selection__rendered {
|
680 |
+
font-size: 14px;
|
681 |
+
height: 28px;
|
682 |
+
line-height: 27px !important;
|
683 |
+
padding-right: 23px !important
|
684 |
}
|
685 |
|
686 |
.acf-field .select2-container .select2-selection--single .select2-selection__clear {
|
687 |
+
line-height: 26px;
|
688 |
+
height: 28px;
|
689 |
+
font-size: 16px
|
690 |
}
|
691 |
|
692 |
.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow {
|
693 |
+
height: 28px !important
|
694 |
}
|
695 |
|
696 |
.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow b {
|
697 |
+
background: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat;
|
698 |
+
background-size: 16px 16px;
|
699 |
+
border: 0 !important;
|
700 |
+
width: 16px !important;
|
701 |
+
height: 16px !important;
|
702 |
+
margin-left: -11px !important;
|
703 |
+
margin-top: -7px !important
|
704 |
}
|
705 |
|
706 |
.acf-field .select2-container .select2-search--inline .select2-search__field {
|
707 |
+
margin-top: 4px !important;
|
708 |
+
font-size: 14px !important;
|
709 |
+
padding-left: 2px !important
|
710 |
}
|
711 |
|
712 |
.acf-field .select2-container .select2-selection--multiple {
|
713 |
+
min-height: 30px !important;
|
714 |
+
line-height: 1;
|
715 |
+
border-radius: 3px !important
|
716 |
}
|
717 |
|
718 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
719 |
+
padding: 0 2px !important
|
720 |
}
|
721 |
|
722 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice {
|
723 |
+
margin-right: 2px !important;
|
724 |
+
margin-top: 2px !important;
|
725 |
+
line-height: 1.6;
|
726 |
+
border-radius: 3px !important;
|
727 |
+
font-size: 14px
|
728 |
}
|
729 |
|
730 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
731 |
+
line-height: 15px;
|
732 |
+
font-size: 15px
|
733 |
}
|
734 |
|
735 |
.acf-field .select2-container--default.select2-container--focus .select2-selection--multiple {
|
736 |
+
border-color: #7e8993 !important
|
737 |
}
|
738 |
|
739 |
.acf-field .select2-container--default .select2-selection--multiple .select2-selection__clear {
|
740 |
+
margin-top: 5px !important;
|
741 |
+
margin-right: 5px !important;
|
742 |
+
font-size: 16px
|
743 |
}
|
744 |
|
745 |
+
.acf-field>.acf-input>.select2 .select2-search {
|
746 |
+
width: auto
|
747 |
}
|
748 |
|
749 |
.select2-container .select2-dropdown .select2-search__field {
|
750 |
+
min-height: 30px !important;
|
751 |
+
border: 0 !important;
|
752 |
+
-webkit-box-shadow: none !important;
|
753 |
+
box-shadow: none !important
|
754 |
}
|
755 |
|
756 |
.acf-tab-group li a .acfe-tab-badge {
|
757 |
+
border-radius: 100px;
|
758 |
+
background: #ddd;
|
759 |
+
width: 18px;
|
760 |
+
height: 18px;
|
761 |
+
font-size: 12px;
|
762 |
+
display: inline-block;
|
763 |
+
vertical-align: text-bottom;
|
764 |
+
padding: 0;
|
765 |
+
text-align: center;
|
766 |
+
margin-left: 5px;
|
767 |
+
line-height: 18px
|
768 |
}
|
769 |
|
770 |
+
.acf-tab-group li a:hover .acfe-tab-badge,
|
771 |
+
.acf-tab-group li.active a .acfe-tab-badge {
|
772 |
+
background: #f1f1f1
|
773 |
}
|
774 |
|
775 |
.menu-item-settings {
|
776 |
+
position: initial
|
777 |
}
|
778 |
|
779 |
+
@media screen and (min-width:783px) {
|
|
|
|
|
|
|
|
|
780 |
|
781 |
+
.postbox .handle-order-higher,
|
782 |
+
.postbox .handle-order-lower {
|
783 |
+
visibility: hidden
|
784 |
+
}
|
785 |
+
|
786 |
+
.postbox:hover .handle-order-higher,
|
787 |
+
.postbox:hover .handle-order-lower {
|
788 |
+
visibility: visible
|
789 |
+
}
|
790 |
}
|
791 |
|
792 |
.postbox .handle-order-higher,
|
793 |
.postbox .handle-order-lower {
|
794 |
+
vertical-align: bottom;
|
795 |
+
width: 1.42rem
|
796 |
}
|
797 |
|
798 |
+
.postbox .handle-order-higher .order-higher-indicator::before,
|
799 |
+
.postbox .handle-order-lower .order-lower-indicator::before {
|
800 |
+
font-size: 15px;
|
801 |
+
top: .23rem
|
802 |
}
|
803 |
|
804 |
.postbox .handlediv {
|
805 |
+
width: 1.62rem
|
806 |
}
|
807 |
|
808 |
+
.postbox .handlediv .toggle-indicator::before {
|
809 |
+
text-indent: -7px;
|
810 |
+
top: .1rem
|
811 |
}
|
812 |
|
813 |
+
#poststuff .stuffbox>h3,
|
814 |
#poststuff h2,
|
815 |
#poststuff h3.hndle {
|
816 |
+
line-height: 1.48
|
817 |
}
|
818 |
|
819 |
.acf-settings-wrap .acf-box {
|
820 |
+
margin: 16px 0
|
821 |
}
|
822 |
|
823 |
.acf-box .title {
|
824 |
+
padding: 8px 15px
|
825 |
}
|
826 |
|
827 |
.acf-box .title h3 {
|
828 |
+
line-height: 1.4
|
829 |
}
|
830 |
|
831 |
.acf-columns-2 {
|
832 |
+
margin-right: 300px;
|
833 |
+
clear: both
|
834 |
}
|
835 |
|
836 |
.acf-columns-2:after {
|
837 |
+
display: block;
|
838 |
+
clear: both;
|
839 |
+
content: ""
|
840 |
}
|
841 |
|
842 |
html[dir=rtl] .acf-columns-2 {
|
843 |
+
margin-right: 0;
|
844 |
+
margin-left: 300px
|
845 |
}
|
846 |
|
847 |
.acf-columns-2 .acf-column-1 {
|
848 |
+
float: left;
|
849 |
+
width: 100%
|
850 |
}
|
851 |
|
852 |
html[dir=rtl] .acf-columns-2 .acf-column-1 {
|
853 |
+
float: right
|
854 |
}
|
855 |
|
856 |
.acf-columns-2 .acf-column-2 {
|
857 |
+
float: right;
|
858 |
+
margin-right: -300px;
|
859 |
+
width: 280px
|
860 |
}
|
861 |
|
862 |
html[dir=rtl] .acf-columns-2 .acf-column-2 {
|
863 |
+
float: left;
|
864 |
+
margin-right: 0;
|
865 |
+
margin-left: -300px
|
866 |
}
|
867 |
|
868 |
+
@media only screen and (max-width:850px) {
|
869 |
+
.acf-columns-2 {
|
870 |
+
margin-right: 0
|
871 |
+
}
|
872 |
|
873 |
+
.acf-columns-2 .acf-column-1,
|
874 |
+
.acf-columns-2 .acf-column-2 {
|
875 |
+
float: none;
|
876 |
+
width: auto;
|
877 |
+
margin: 0
|
878 |
+
}
|
879 |
+
}
|
880 |
+
|
881 |
+
.acf-input-wrap .acf-is-prepended+.select2>.selection>.select2-selection {
|
882 |
+
border-radius: 0 3px 3px 0 !important
|
883 |
}
|
@@ -1 +1 @@
|
|
1 |
-
code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:1em}pre{display:block;padding:9.5px;margin:0;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f9f9f9;border:1px solid #ccc;border-radius:1px;white-space:pre-wrap;overflow:auto}code{-webkit-user-select:all;-moz-user-select:all;user-select:all}pre>code{-webkit-user-select:inherit;-moz-user-select:inherit;-ms-user-select:inherit;user-select:inherit;padding:0;margin:0;background:none;font-size:1em;display:block}.code-codemirror>.CodeMirror,.pre-codemirror>.CodeMirror{border:1px solid #ccc;height:auto;width:auto;background:#f9f9f9;padding:9px 6px}.code-codemirror{display:inline;vertical-align:middle}.code-codemirror>.CodeMirror{display:inline-block;padding:0}.code-codemirror>.CodeMirror .CodeMirror-selected,.pre-codemirror>.CodeMirror .CodeMirror-selected{background:#ddd!important}.code-codemirror>.CodeMirror .CodeMirror-lines,.pre-codemirror>.CodeMirror .CodeMirror-lines{padding:0}.acfe-pre-highlight{display:block;padding:9.5px;margin:0;line-height:1.42857143;color:#333;background-color:#f9f9f9;border:1px solid #ccc;border-radius:1px;overflow:auto;font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:1em;white-space:nowrap}.acf-postbox.seamless>.inside>.acf-field{padding:15px 12px}.acf-flexible-content .layout.ui-sortable-helper:first-child+.layout.ui-sortable-placeholder{margin-top:0}.acfe-postbox.acfe-postbox-no-handle h2.hndle{cursor:auto}.acfe-postbox.acfe-postbox-no-handle .handlediv{display:none}.acfe-postbox-top>.inside{position:relative}.acfe-postbox-top>.inside.-border{border:1px solid #ccd0d4;background:#fff}.acfe-postbox-top>.inside>.acf-field{position:relative;margin:0;padding:15px 12px;border-top:1px solid #eee}.acfe-postbox-top>.inside>.acf-field:first-child{border-top:none;margin-top:0}.acfe-postbox-left>.inside{position:relative}.acfe-postbox-left>.inside:after{display:block;clear:both;content:""}.acfe-postbox-left>.inside.-border{border:1px solid #ccd0d4;background:#fff}.acfe-postbox-left>.inside>.acf-field{position:relative;margin:0;padding:15px 12px;border-top:1px solid #eee}.acfe-postbox-left>.inside>.acf-field:first-child{border-top:none;margin-top:0}.acfe-postbox-left>.inside.-clear>.acf-field{border:none;padding:0;margin:15px 0}.acfe-postbox-left>.inside>.acf-field{padding:15px 0}.acfe-postbox-left>.inside>.acf-field:after{display:block;clear:both;content:""}.acfe-postbox-left>.inside>.acf-field:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border:solid #e1e1e1;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acfe-postbox-left>.inside>.acf-field[data-width]{float:none;width:auto!important;border-left-width:0!important;border-right-width:0!important}.acfe-postbox-left>.inside>.acf-field>.acf-label{float:left;width:20%;margin:0;padding:0 12px}.acfe-postbox-left>.inside>.acf-field>.acf-input{float:left;width:80%;margin:0;padding:0 12px}html[dir=rtl] .acfe-postbox-left>.inside>.acf-field:before{border-width:0 0 0 1px;left:auto;right:0}html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-input,html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-label{float:right}#side-sortables .acfe-postbox-left>.inside>.acf-field:before{display:none}#side-sortables .acfe-postbox-left>.inside>.acf-field>.acf-label{width:100%;margin-bottom:10px}#side-sortables .acfe-postbox-left>.inside>.acf-field>.acf-input{width:100%}@media screen and (max-width:640px){.acfe-postbox-left>.inside>.acf-field:before{display:none}.acfe-postbox-left>.inside>.acf-field>.acf-label{width:100%;margin-bottom:10px}.acfe-postbox-left>.inside>.acf-field>.acf-input{width:100%}}.wrap .acfe-dop-admin-config,.wrap .acfe-dop-admin-config:active,.wrap .acfe-dpt-admin-config,.wrap .acfe-dpt-admin-config:active,.wrap .acfe-dt-admin-config,.wrap .acfe-dt-admin-config:active{padding-left:4px;padding-right:4px}.wrap .acfe-dop-admin-config span,.wrap .acfe-dpt-admin-config span,.wrap .acfe-dt-admin-config span{font-size:16px;vertical-align:text-top;height:15px;width:19px;line-height:19px}.wrap .acfe-dop-admin-config{display:inline-block}body.post-type-acfe-dpt .misc-pub-post-status,body.post-type-acfe-dpt .misc-pub-visibility,body.post-type-acfe-dpt.post-new-php #minor-publishing-actions,body.post-type-acfe-dpt.post-new-php #misc-publishing-actions{display:none}body.post-type-acfe-dpt.post-new-php #major-publishing-actions{border-top:0}body.post-type-acfe-dt .misc-pub-post-status,body.post-type-acfe-dt .misc-pub-visibility,body.post-type-acfe-dt.post-new-php #minor-publishing-actions,body.post-type-acfe-dt.post-new-php #misc-publishing-actions{display:none}body.post-type-acfe-dt.post-new-php #major-publishing-actions{border-top:0}body.post-type-acfe-dop .misc-pub-post-status,body.post-type-acfe-dop .misc-pub-visibility,body.post-type-acfe-dop.post-new-php #minor-publishing-actions,body.post-type-acfe-dop.post-new-php #misc-publishing-actions{display:none}body.post-type-acfe-dop.post-new-php #major-publishing-actions{border-top:0}body.post-type-acfe-dbt .misc-pub-post-status,body.post-type-acfe-dbt .misc-pub-visibility,body.post-type-acfe-dbt.post-new-php #minor-publishing-actions,body.post-type-acfe-dbt.post-new-php #misc-publishing-actions{display:none}body.post-type-acfe-dbt.post-new-php #major-publishing-actions{border-top:0}body.post-type-acfe-form .misc-pub-post-status,body.post-type-acfe-form .misc-pub-visibility,body.post-type-acfe-form.post-new-php #minor-publishing-actions,body.post-type-acfe-form.post-new-php #misc-publishing-actions{display:none}body.post-type-acfe-form.post-new-php #major-publishing-actions{border-top:0}.acf-field.acf-field-acfe-author>.acf-label{display:none}.edit-post-layout__metaboxes:not(:empty){background:#f3f4f5;padding:10px 10px 0!important}.edit-post-layout__metaboxes .edit-post-meta-boxes-area .postbox{margin-bottom:10px;border:1px solid #e1e1e1}.edit-post-layout__metaboxes .edit-post-meta-boxes-area .postbox>.inside{border-bottom:0}#acf-admin-tool-acfe_tool_dbt_export ul,#acf-admin-tool-acfe_tool_dpt_export ul,#acf-admin-tool-acfe_tool_dt_export ul,#acf-admin-tool-acfe_tool_form_export ul{-webkit-column-width:200px;-moz-column-width:200px;column-width:200px}.acf-meta-box-wrap.-grid #acf-admin-tool-acfe-fg-local{display:none}.settings_page_acfe-options .column-option_id{width:65px}.settings_page_acfe-options .column-option_name{width:435px}.settings_page_acfe-options .column-autoload{width:100px;text-align:center}.acf-field[data-name=acfe_form_post_save_post_content_custom],.acf-field[data-name=acfe_form_post_save_post_name_custom],.acf-field[data-name=acfe_form_post_save_post_title_custom],.acf-field[data-name=acfe_form_term_save_description_custom],.acf-field[data-name=acfe_form_term_save_name_custom],.acf-field[data-name=acfe_form_term_save_slug_custom],.acf-field[data-name=acfe_form_user_save_description_custom],.acf-field[data-name=acfe_form_user_save_display_name_custom],.acf-field[data-name=acfe_form_user_save_email_custom],.acf-field[data-name=acfe_form_user_save_first_name_custom],.acf-field[data-name=acfe_form_user_save_last_name_custom],.acf-field[data-name=acfe_form_user_save_nickname_custom],.acf-field[data-name=acfe_form_user_save_password_custom],.acf-field[data-name=acfe_form_user_save_username_custom],.acf-field[data-name=acfe_form_user_save_website_custom]{border-top:0;padding-top:0}.acf-field.acf-field-acfe-form-attributes>.acf-input>.acf-fields>.acf-field,.acf-field.acf-field-acfe-form-fields-attributes>.acf-input>.acf-fields>.acf-field{border-left-width:0}.acf-field-repeater.acf-field-acfe-form-email-files-static>.acf-input>.acf-repeater>.acf-actions,.acf-field-repeater.acf-field-acfe-form-email-files>.acf-input>.acf-repeater>.acf-actions{text-align:left}.postbox#acfe-acf-custom-fields>.inside,.postbox#acfe-wp-custom-fields>.inside{padding:0;margin:0}.postbox#acfe-acf-custom-fields+.tablenav,.postbox#acfe-wp-custom-fields+.tablenav{padding-top:0;margin-top:-8px}.postbox#acfe-acf-custom-fields em,.postbox#acfe-wp-custom-fields em{color:#aaa}.postbox#acfe-acf-custom-fields .acfe_dev_meta_count,.postbox#acfe-wp-custom-fields .acfe_dev_meta_count{background:#72777c;padding:1px 5px;border-radius:4px;color:#fff;margin-left:7px;font-size:12px;margin-right:auto}@media only screen and (max-width:1100px){.postbox#acfe-acf-custom-fields thead,.postbox#acfe-wp-custom-fields thead{display:none}.postbox#acfe-acf-custom-fields tbody tr,.postbox#acfe-wp-custom-fields tbody tr{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.postbox#acfe-acf-custom-fields tbody td,.postbox#acfe-acf-custom-fields tbody th,.postbox#acfe-wp-custom-fields tbody td,.postbox#acfe-wp-custom-fields tbody th{display:block}.postbox#acfe-acf-custom-fields tbody td:first-of-type,.postbox#acfe-wp-custom-fields tbody td:first-of-type{-webkit-box-flex:1;-ms-flex:1;flex:1}@media only screen and (max-width:850px){.postbox#acfe-acf-custom-fields tbody td:first-of-type,.postbox#acfe-wp-custom-fields tbody td:first-of-type{line-height:2.2}}.postbox#acfe-acf-custom-fields tbody td:first-of-type strong,.postbox#acfe-wp-custom-fields tbody td:first-of-type strong{display:inline-block;word-break:break-all}.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions{display:inline-block;padding:0;float:right}@media only screen and (max-width:850px){.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions{left:auto}}.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions .delete,.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions a,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions .delete,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions a{padding:0}.postbox#acfe-acf-custom-fields tbody td:nth-child(3),.postbox#acfe-wp-custom-fields tbody td:nth-child(3){-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}}body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection,body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection__choice,body:not(.acf-admin-5-3) .acf-field .select2-dropdown{border-color:#dfdfdf!important;border-radius:0!important}body:not(.acf-admin-5-3) .acf-field .select2-container .select2-search--inline .select2-search__field{margin-top:0!important}.acf-field .select2-container .select2-selection--single{border-radius:3px!important;height:30px!important;outline:none}.acf-field .select2-container.select2-container--open .select2-selection--single,.acf-field .select2-container:focus .select2-selection--single{border-color:#007cba!important;color:#016087!important;-webkit-box-shadow:0 0 0 1px #007cba!important;box-shadow:0 0 0 1px #007cba!important}.acf-field .select2-container .select2-selection--single .select2-selection__rendered{font-size:14px;height:28px;line-height:27px!important;padding-right:23px!important}.acf-field .select2-container .select2-selection--single .select2-selection__clear{line-height:26px;height:28px;font-size:16px}.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow{height:28px!important}.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow b{background:url("data:image/svg+xml;charset=US-ASCII, %3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat;background-size:16px 16px;border:0!important;width:16px!important;height:16px!important;margin-left:-11px!important;margin-top:-7px!important}.acf-field .select2-container .select2-search--inline .select2-search__field{margin-top:4px!important;font-size:14px!important;padding-left:2px!important}.acf-field .select2-container .select2-selection--multiple{min-height:30px!important;line-height:1;border-radius:3px!important}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding:0 2px!important}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice{margin-right:2px!important;margin-top:2px!important;line-height:1.6;border-radius:3px!important;font-size:14px}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice__remove{line-height:15px;font-size:15px}.acf-field .select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#7e8993!important}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__clear{margin-top:5px!important;margin-right:5px!important;font-size:16px}.acf-field>.acf-input>.select2 .select2-search{width:auto}.select2-container .select2-dropdown .select2-search__field{min-height:30px!important;border:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.acf-tab-group li a .acfe-tab-badge{border-radius:100px;background:#ddd;width:18px;height:18px;font-size:12px;display:inline-block;vertical-align:text-bottom;padding:0;text-align:center;margin-left:5px;line-height:18px}.acf-tab-group li.active a .acfe-tab-badge,.acf-tab-group li a:hover .acfe-tab-badge{background:#f1f1f1}.menu-item-settings{position:static}@media screen and (min-width:783px){.postbox .handle-order-higher,.postbox .handle-order-lower{visibility:hidden}.postbox:hover .handle-order-higher,.postbox:hover .handle-order-lower{visibility:visible}}.postbox .handle-order-higher,.postbox .handle-order-lower{vertical-align:bottom;width:1.42rem}.postbox .handle-order-higher .order-higher-indicator:before,.postbox .handle-order-lower .order-lower-indicator:before{font-size:15px;top:.23rem}.postbox .handlediv{width:1.62rem}.postbox .handlediv .toggle-indicator:before{text-indent:-7px;top:.1rem}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{line-height:1.48}.acf-settings-wrap .acf-box{margin:16px 0}.acf-box .title{padding:8px 15px}.acf-box .title h3{line-height:1.4}.acf-columns-2{margin-right:300px;clear:both}.acf-columns-2:after{display:block;clear:both;content:""}html[dir=rtl] .acf-columns-2{margin-right:0;margin-left:300px}.acf-columns-2 .acf-column-1{float:left;width:100%}html[dir=rtl] .acf-columns-2 .acf-column-1{float:right}.acf-columns-2 .acf-column-2{float:right;margin-right:-300px;width:280px}html[dir=rtl] .acf-columns-2 .acf-column-2{float:left;margin-right:0;margin-left:-300px}@media only screen and (max-width:850px){.acf-columns-2{margin-right:0}.acf-columns-2 .acf-column-1,.acf-columns-2 .acf-column-2{float:none;width:auto;margin:0}}
|
1 |
+
code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:1em}pre{display:block;padding:9.5px;margin:0;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f9f9f9;border:1px solid #ccc;border-radius:1px;white-space:pre-wrap;overflow:auto}code{-webkit-user-select:all;-moz-user-select:all;user-select:all}pre>code{-webkit-user-select:inherit;-moz-user-select:inherit;-ms-user-select:inherit;user-select:inherit;padding:0;margin:0;background:0 0;font-size:1em;display:block}.code-codemirror>.CodeMirror,.pre-codemirror>.CodeMirror{border:1px solid #ccc;height:auto;width:auto;background:#f9f9f9;padding:9px 6px}.code-codemirror{display:inline;vertical-align:middle}.code-codemirror>.CodeMirror{display:inline-block;padding:0}.code-codemirror>.CodeMirror .CodeMirror-selected,.pre-codemirror>.CodeMirror .CodeMirror-selected{background:#ddd!important}.code-codemirror>.CodeMirror .CodeMirror-lines,.pre-codemirror>.CodeMirror .CodeMirror-lines{padding:0}.widget.open{z-index:inherit!important}.acfe-pre-highlight{display:block;padding:9.5px;margin:0;line-height:1.42857143;color:#333;background-color:#f9f9f9;border:1px solid #ccc;border-radius:1px;overflow:auto;font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:1em;white-space:nowrap}.acf-postbox.seamless>.inside>.acf-field{padding:15px 12px}.acf-flexible-content .layout.ui-sortable-helper:first-child+.layout.ui-sortable-placeholder{margin-top:0}.acfe-postbox.acfe-postbox-no-handle h2.hndle{cursor:initial}.acfe-postbox.acfe-postbox-no-handle .handlediv{display:none}.acfe-postbox-top>.inside{position:relative}.acfe-postbox-top>.inside.-border{border:1px solid #ccd0d4;background:#fff}.acfe-postbox-top>.inside>.acf-field{position:relative;margin:0;padding:15px 12px;border-top:1px solid #eee}.acfe-postbox-top>.inside>.acf-field:first-child{border-top:none;margin-top:0}.acfe-postbox-left>.inside{position:relative}.acfe-postbox-left>.inside:after{display:block;clear:both;content:""}.acfe-postbox-left>.inside.-border{border:1px solid #ccd0d4;background:#fff}.acfe-postbox-left>.inside>.acf-field{position:relative;margin:0;border-top:1px solid #eee;padding:15px 0}.acfe-postbox-left>.inside>.acf-field:first-child{border-top:none;margin-top:0}.acfe-postbox-left>.inside.-clear>.acf-field{border:none;padding:0;margin:15px 0}.acfe-postbox-left>.inside>.acf-field:after{display:block;clear:both;content:""}.acfe-postbox-left>.inside>.acf-field:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border-color:#e1e1e1;border-style:solid;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acfe-postbox-left>.inside>.acf-field[data-width]{float:none;width:auto!important;border-left-width:0!important;border-right-width:0!important}.acfe-postbox-left>.inside>.acf-field>.acf-label{float:left;width:20%;margin:0;padding:0 12px}.acfe-postbox-left>.inside>.acf-field>.acf-input{float:left;width:80%;margin:0;padding:0 12px}html[dir=rtl] .acfe-postbox-left>.inside>.acf-field:before{border-width:0 0 0 1px;left:auto;right:0}html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-input,html[dir=rtl] .acfe-postbox-left>.inside>.acf-field>.acf-label{float:right}#side-sortables .acfe-postbox-left>.inside>.acf-field:before{display:none}#side-sortables .acfe-postbox-left>.inside>.acf-field>.acf-label{width:100%;margin-bottom:10px}#side-sortables .acfe-postbox-left>.inside>.acf-field>.acf-input{width:100%}@media screen and (max-width:640px){.acfe-postbox-left>.inside>.acf-field:before{display:none}.acfe-postbox-left>.inside>.acf-field>.acf-label{width:100%;margin-bottom:10px}.acfe-postbox-left>.inside>.acf-field>.acf-input{width:100%}}.wrap .acfe-dop-admin-config,.wrap .acfe-dpt-admin-config,.wrap .acfe-dt-admin-config{display:inline-block;padding-left:4px;padding-right:4px}.wrap .acfe-dop-admin-config:active,.wrap .acfe-dpt-admin-config:active,.wrap .acfe-dt-admin-config:active{padding-left:4px;padding-right:4px}.wrap .acfe-dop-admin-config span,.wrap .acfe-dpt-admin-config span,.wrap .acfe-dt-admin-config span{font-size:16px;vertical-align:text-top;height:15px;width:19px;line-height:19px}body.post-type-acfe-dbt #minor-publishing-actions,body.post-type-acfe-dbt #misc-publishing-actions #visibility,body.post-type-acfe-dbt #misc-publishing-actions .edit-post-status,body.post-type-acfe-dbt #misc-publishing-actions .edit-timestamp,body.post-type-acfe-dop #minor-publishing-actions,body.post-type-acfe-dop #misc-publishing-actions #visibility,body.post-type-acfe-dop #misc-publishing-actions .edit-post-status,body.post-type-acfe-dop #misc-publishing-actions .edit-timestamp,body.post-type-acfe-dpt #minor-publishing-actions,body.post-type-acfe-dpt #misc-publishing-actions #visibility,body.post-type-acfe-dpt #misc-publishing-actions .edit-post-status,body.post-type-acfe-dpt #misc-publishing-actions .edit-timestamp,body.post-type-acfe-dt #minor-publishing-actions,body.post-type-acfe-dt #misc-publishing-actions #visibility,body.post-type-acfe-dt #misc-publishing-actions .edit-post-status,body.post-type-acfe-dt #misc-publishing-actions .edit-timestamp,body.post-type-acfe-form #minor-publishing-actions,body.post-type-acfe-form #misc-publishing-actions #visibility,body.post-type-acfe-form #misc-publishing-actions .edit-post-status,body.post-type-acfe-form #misc-publishing-actions .edit-timestamp,body.post-type-acfe-template #minor-publishing-actions,body.post-type-acfe-template #misc-publishing-actions #visibility,body.post-type-acfe-template #misc-publishing-actions .edit-post-status,body.post-type-acfe-template #misc-publishing-actions .edit-timestamp{display:none!important}body.post-type-acfe-dbt .acfe-misc-export,body.post-type-acfe-dop .acfe-misc-export,body.post-type-acfe-dpt .acfe-misc-export,body.post-type-acfe-dt .acfe-misc-export,body.post-type-acfe-form .acfe-misc-export,body.post-type-acfe-template .acfe-misc-export{padding-top:2px}body.post-type-acfe-dbt .acfe-misc-export span.dashicons,body.post-type-acfe-dop .acfe-misc-export span.dashicons,body.post-type-acfe-dpt .acfe-misc-export span.dashicons,body.post-type-acfe-dt .acfe-misc-export span.dashicons,body.post-type-acfe-form .acfe-misc-export span.dashicons,body.post-type-acfe-template .acfe-misc-export span.dashicons{font-size:18px;color:#82878c;line-height:1.2;width:18px;margin-right:4px}body.post-type-acfe-dbt.post-new-php .acfe-misc-export,body.post-type-acfe-dop.post-new-php .acfe-misc-export,body.post-type-acfe-dpt.post-new-php .acfe-misc-export,body.post-type-acfe-dt.post-new-php .acfe-misc-export,body.post-type-acfe-form.post-new-php .acfe-misc-export,body.post-type-acfe-template.post-new-php .acfe-misc-export{display:none}body.post-type-acfe-dbt .status-acf-disabled .column-title a,body.post-type-acfe-dbt .status-acf-disabled .column-title code,body.post-type-acfe-dop .status-acf-disabled .column-title a,body.post-type-acfe-dop .status-acf-disabled .column-title code,body.post-type-acfe-dpt .status-acf-disabled .column-title a,body.post-type-acfe-dpt .status-acf-disabled .column-title code,body.post-type-acfe-dt .status-acf-disabled .column-title a,body.post-type-acfe-dt .status-acf-disabled .column-title code,body.post-type-acfe-form .status-acf-disabled .column-title a,body.post-type-acfe-form .status-acf-disabled .column-title code,body.post-type-acfe-template .status-acf-disabled .column-title a,body.post-type-acfe-template .status-acf-disabled .column-title code{color:#555!important}body.post-type-acfe-dbt .status-acf-disabled .column-title strong,body.post-type-acfe-dop .status-acf-disabled .column-title strong,body.post-type-acfe-dpt .status-acf-disabled .column-title strong,body.post-type-acfe-dt .status-acf-disabled .column-title strong,body.post-type-acfe-form .status-acf-disabled .column-title strong,body.post-type-acfe-template .status-acf-disabled .column-title strong{color:#a0a5aa}body.post-type-acfe-dbt .column-acfe-posts,body.post-type-acfe-dbt .column-acfe-terms,body.post-type-acfe-dop .column-acfe-posts,body.post-type-acfe-dop .column-acfe-terms,body.post-type-acfe-dpt .column-acfe-posts,body.post-type-acfe-dpt .column-acfe-terms,body.post-type-acfe-dt .column-acfe-posts,body.post-type-acfe-dt .column-acfe-terms,body.post-type-acfe-form .column-acfe-posts,body.post-type-acfe-form .column-acfe-terms,body.post-type-acfe-template .column-acfe-posts,body.post-type-acfe-template .column-acfe-terms{width:120px}.acf-field.acf-field-acfe-author>.acf-label{display:none}.edit-post-layout__metaboxes:not(:empty){background:#f3f4f5;padding:10px 10px 0!important}.edit-post-layout__metaboxes .edit-post-meta-boxes-area .postbox{margin-bottom:10px;border:1px solid #e1e1e1}.edit-post-layout__metaboxes .edit-post-meta-boxes-area .postbox>.inside{border-bottom:0}#acf-admin-tool-acfe_dynamic_block_types_export ul,#acf-admin-tool-acfe_dynamic_forms_export ul,#acf-admin-tool-acfe_dynamic_options_pages_export ul,#acf-admin-tool-acfe_dynamic_post_types_export ul,#acf-admin-tool-acfe_dynamic_taxonomies_export ul,#acf-admin-tool-acfe_dynamic_templates_export ul{-webkit-column-width:200px;-moz-column-width:200px;column-width:200px}#acf-admin-tool-acfe_dynamic_block_types_export .acf-postbox-columns,#acf-admin-tool-acfe_dynamic_forms_export .acf-postbox-columns,#acf-admin-tool-acfe_dynamic_options_pages_export .acf-postbox-columns,#acf-admin-tool-acfe_dynamic_post_types_export .acf-postbox-columns,#acf-admin-tool-acfe_dynamic_taxonomies_export .acf-postbox-columns,#acf-admin-tool-acfe_dynamic_templates_export .acf-postbox-columns{margin-right:0}.acf-meta-box-wrap.-grid #acf-admin-tool-acfe-fg-local{display:none}#acfe-admin-settings .inside>.acf-field{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0}#acfe-admin-settings .inside>.acf-field>.acf-label{padding-top:15px;padding-bottom:15px;float:none}#acfe-admin-settings .inside>.acf-field>.acf-label label span.acf-js-tooltip{float:right;font-size:14px;color:#ccc}#acfe-admin-settings .inside>.acf-field>.acf-input{display:-webkit-box;display:-ms-flexbox;display:flex;float:none;padding:0}#acfe-admin-settings .inside>.acf-field>.acf-input>div{-webkit-box-flex:1;-ms-flex:1 1 50%;flex:1 1 50%;max-width:50%;padding:8px;min-width:0}#acfe-admin-settings .inside>.acf-field>.acf-input>div:nth-child(2){border-left:1px solid #eee}#acfe-admin-settings .inside>.acf-field>.acf-input .acfe-settings-text{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;max-width:100%;display:inline-block}#acfe-admin-settings .inside>.acf-field>.acf-input .acfe-settings-text>code{font-size:12px}#acfe-admin-settings .inside>.acf-field>.acf-input .dashicons-saved{font-size:21px}#acfe-admin-settings .inside>.acf-field>.acf-input .dashicons-no-alt{color:#ccc;font-size:21px}#acfe-admin-settings .inside>.acf-field[data-key=field_acfe_settings_thead]>.acf-input{padding:0;border-bottom:1px solid #eee}#acfe-admin-settings .inside>.acf-field[data-key=field_acfe_settings_thead]+.acf-field{border-top:0}.settings_page_acfe-options .column-option_id{width:65px}.settings_page_acfe-options .column-option_name{width:435px}.settings_page_acfe-options .column-autoload{width:100px;text-align:center}.acf-field[data-name=acfe_form_post_save_post_content_custom],.acf-field[data-name=acfe_form_post_save_post_name_custom],.acf-field[data-name=acfe_form_post_save_post_title_custom],.acf-field[data-name=acfe_form_term_save_description_custom],.acf-field[data-name=acfe_form_term_save_name_custom],.acf-field[data-name=acfe_form_term_save_slug_custom],.acf-field[data-name=acfe_form_user_save_description_custom],.acf-field[data-name=acfe_form_user_save_display_name_custom],.acf-field[data-name=acfe_form_user_save_email_custom],.acf-field[data-name=acfe_form_user_save_first_name_custom],.acf-field[data-name=acfe_form_user_save_last_name_custom],.acf-field[data-name=acfe_form_user_save_nickname_custom],.acf-field[data-name=acfe_form_user_save_password_custom],.acf-field[data-name=acfe_form_user_save_username_custom],.acf-field[data-name=acfe_form_user_save_website_custom]{border-top:0;padding-top:0}.acf-field.acf-field-acfe-form-attributes>.acf-input>.acf-fields>.acf-field,.acf-field.acf-field-acfe-form-fields-attributes>.acf-input>.acf-fields>.acf-field{border-left-width:0}.acf-field-repeater.acf-field-acfe-form-email-files-static>.acf-input>.acf-repeater>.acf-actions,.acf-field-repeater.acf-field-acfe-form-email-files>.acf-input>.acf-repeater>.acf-actions{text-align:left}.postbox#acfe-acf-custom-fields>.inside,.postbox#acfe-wp-custom-fields>.inside,.postbox#acfe-wp-object>.inside{padding:0;margin:0}.postbox#acfe-acf-custom-fields+.tablenav,.postbox#acfe-wp-custom-fields+.tablenav,.postbox#acfe-wp-object+.tablenav{padding-top:0;margin-top:-8px}.postbox#acfe-acf-custom-fields em,.postbox#acfe-wp-custom-fields em,.postbox#acfe-wp-object em{color:#aaa}.postbox#acfe-acf-custom-fields .acfe_dev_meta_count,.postbox#acfe-wp-custom-fields .acfe_dev_meta_count,.postbox#acfe-wp-object .acfe_dev_meta_count{background:#72777c;padding:1px 5px;border-radius:4px;color:#fff;margin-left:7px;font-size:12px;margin-right:auto}@media only screen and (max-width:1100px){.postbox#acfe-acf-custom-fields thead,.postbox#acfe-wp-custom-fields thead,.postbox#acfe-wp-object thead{display:none}.postbox#acfe-acf-custom-fields tbody tr,.postbox#acfe-wp-custom-fields tbody tr,.postbox#acfe-wp-object tbody tr{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.postbox#acfe-acf-custom-fields tbody td,.postbox#acfe-acf-custom-fields tbody th,.postbox#acfe-wp-custom-fields tbody td,.postbox#acfe-wp-custom-fields tbody th,.postbox#acfe-wp-object tbody td,.postbox#acfe-wp-object tbody th{display:block}.postbox#acfe-acf-custom-fields tbody td:first-of-type,.postbox#acfe-wp-custom-fields tbody td:first-of-type,.postbox#acfe-wp-object tbody td:first-of-type{-webkit-box-flex:1;-ms-flex:1;flex:1}.postbox#acfe-acf-custom-fields tbody td:first-of-type strong,.postbox#acfe-wp-custom-fields tbody td:first-of-type strong,.postbox#acfe-wp-object tbody td:first-of-type strong{display:inline-block;word-break:break-all}.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions,.postbox#acfe-wp-object tbody td:first-of-type .row-actions{display:inline-block;padding:0;float:right}@media only screen and (max-width:850px){.postbox#acfe-acf-custom-fields tbody td:first-of-type,.postbox#acfe-wp-custom-fields tbody td:first-of-type,.postbox#acfe-wp-object tbody td:first-of-type{line-height:2.2}.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions,.postbox#acfe-wp-object tbody td:first-of-type .row-actions{left:auto}}.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions .delete,.postbox#acfe-acf-custom-fields tbody td:first-of-type .row-actions a,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions .delete,.postbox#acfe-wp-custom-fields tbody td:first-of-type .row-actions a,.postbox#acfe-wp-object tbody td:first-of-type .row-actions .delete,.postbox#acfe-wp-object tbody td:first-of-type .row-actions a{padding:0}.postbox#acfe-acf-custom-fields tbody td:nth-child(3),.postbox#acfe-wp-custom-fields tbody td:nth-child(3),.postbox#acfe-wp-object tbody td:nth-child(3){-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}}body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection,body:not(.acf-admin-5-3) .acf-field .select2-container .select2-selection__choice,body:not(.acf-admin-5-3) .acf-field .select2-dropdown{border-color:#dfdfdf!important;border-radius:0!important}body:not(.acf-admin-5-3) .acf-field .select2-container .select2-search--inline .select2-search__field{margin-top:0!important}.acf-field .select2-container .select2-selection--single{border-radius:3px!important;height:30px!important;outline:0}.acf-field .select2-container.select2-container--open .select2-selection--single,.acf-field .select2-container:focus .select2-selection--single{border-color:#007cba!important;color:#016087!important;-webkit-box-shadow:0 0 0 1px #007cba!important;box-shadow:0 0 0 1px #007cba!important}.acf-field .select2-container .select2-selection--single .select2-selection__rendered{font-size:14px;height:28px;line-height:27px!important;padding-right:23px!important}.acf-field .select2-container .select2-selection--single .select2-selection__clear{line-height:26px;height:28px;font-size:16px}.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow{height:28px!important}.acf-field .select2-container--default .select2-selection--single .select2-selection__arrow b{background:url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') 0 0/16px 16px no-repeat;border:0!important;width:16px!important;height:16px!important;margin-left:-11px!important;margin-top:-7px!important}.acf-field .select2-container .select2-search--inline .select2-search__field{margin-top:4px!important;font-size:14px!important;padding-left:2px!important}.acf-field .select2-container .select2-selection--multiple{min-height:30px!important;line-height:1;border-radius:3px!important}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding:0 2px!important}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice{margin-right:2px!important;margin-top:2px!important;line-height:1.6;border-radius:3px!important;font-size:14px}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__choice__remove{line-height:15px;font-size:15px}.acf-field .select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#7e8993!important}.acf-field .select2-container--default .select2-selection--multiple .select2-selection__clear{margin-top:5px!important;margin-right:5px!important;font-size:16px}.acf-field>.acf-input>.select2 .select2-search{width:auto}.select2-container .select2-dropdown .select2-search__field{min-height:30px!important;border:0!important;-webkit-box-shadow:none!important;box-shadow:none!important}.acf-tab-group li a .acfe-tab-badge{border-radius:100px;background:#ddd;width:18px;height:18px;font-size:12px;display:inline-block;vertical-align:text-bottom;padding:0;text-align:center;margin-left:5px;line-height:18px}.acf-tab-group li a:hover .acfe-tab-badge,.acf-tab-group li.active a .acfe-tab-badge{background:#f1f1f1}.menu-item-settings{position:initial}@media screen and (min-width:783px){.postbox .handle-order-higher,.postbox .handle-order-lower{visibility:hidden}.postbox:hover .handle-order-higher,.postbox:hover .handle-order-lower{visibility:visible}}.postbox .handle-order-higher,.postbox .handle-order-lower{vertical-align:bottom;width:1.42rem}.postbox .handle-order-higher .order-higher-indicator::before,.postbox .handle-order-lower .order-lower-indicator::before{font-size:15px;top:.23rem}.postbox .handlediv{width:1.62rem}.postbox .handlediv .toggle-indicator::before{text-indent:-7px;top:.1rem}#poststuff .stuffbox>h3,#poststuff h2,#poststuff h3.hndle{line-height:1.48}.acf-settings-wrap .acf-box{margin:16px 0}.acf-box .title{padding:8px 15px}.acf-box .title h3{line-height:1.4}.acf-columns-2{margin-right:300px;clear:both}.acf-columns-2:after{display:block;clear:both;content:""}html[dir=rtl] .acf-columns-2{margin-right:0;margin-left:300px}.acf-columns-2 .acf-column-1{float:left;width:100%}html[dir=rtl] .acf-columns-2 .acf-column-1{float:right}.acf-columns-2 .acf-column-2{float:right;margin-right:-300px;width:280px}html[dir=rtl] .acf-columns-2 .acf-column-2{float:left;margin-right:0;margin-left:-300px}@media only screen and (max-width:850px){.acf-columns-2{margin-right:0}.acf-columns-2 .acf-column-1,.acf-columns-2 .acf-column-2{float:none;width:auto;margin:0}}.acf-input-wrap .acf-is-prepended+.select2>.selection>.select2-selection{border-radius:0 3px 3px 0!important}
|
@@ -1,311 +1,364 @@
|
|
1 |
.submitbox .misc-pub-acfe-field-group-key {
|
2 |
-
|
3 |
}
|
4 |
|
5 |
.submitbox .misc-pub-acfe-field-group-key span {
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
}
|
11 |
|
12 |
.submitbox .misc-pub-acfe-field-group-key code {
|
13 |
-
|
14 |
}
|
15 |
|
16 |
.submitbox .misc-pub-acfe-field-group-export {
|
17 |
-
|
18 |
}
|
19 |
|
20 |
.submitbox .misc-pub-acfe-field-group-export span {
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
}
|
27 |
|
28 |
.acf-fields .acf-field-tab {
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
}
|
35 |
-
|
36 |
-
.acf-field-setting-acfe_bidirectional
|
37 |
-
.acf-field-setting-acfe_hide
|
38 |
-
.acf-field-setting-acfe_permissions
|
39 |
-
.acf-field-setting-acfe_settings
|
40 |
-
.acf-field-setting-acfe_settings
|
41 |
-
.acf-field-setting-acfe_update
|
42 |
-
.acf-field-setting-acfe_update
|
43 |
-
.acf-field-setting-acfe_validate
|
44 |
-
.acf-field-setting-acfe_validate
|
45 |
-
|
46 |
-
}
|
47 |
-
|
48 |
-
.acf-field-setting-acfe_bidirectional
|
49 |
-
.acf-field-setting-acfe_hide
|
50 |
-
.acf-field-setting-acfe_permissions
|
51 |
-
.acf-field-setting-acfe_settings
|
52 |
-
.acf-field-setting-acfe_update
|
53 |
-
.acf-field-setting-acfe_validate
|
54 |
-
|
55 |
}
|
56 |
|
57 |
.acf-field-setting-acfe_field_data {
|
58 |
-
|
59 |
}
|
60 |
|
61 |
.acf-field-hide-front.acfe_width_auto {
|
62 |
-
|
63 |
}
|
64 |
|
65 |
-
.acf-field-setting-acfe_bidirectional
|
66 |
-
.acf-field-setting-acfe_bidirectional
|
67 |
-
.acf-field-setting-acfe_settings
|
68 |
-
.acf-field-setting-acfe_update
|
69 |
-
.acf-field-setting-acfe_validate
|
70 |
-
|
71 |
}
|
72 |
|
73 |
-
.acf-field-acfe-meta
|
74 |
-
.acf-field-setting-acfe_settings
|
75 |
-
.acf-field-setting-acfe_update
|
76 |
-
.acf-field-setting-acfe_validate
|
77 |
-
|
78 |
-
|
79 |
}
|
80 |
|
81 |
-
.acf-field-acfe-meta
|
82 |
-
.acf-field-setting-acfe_settings
|
83 |
-
.acf-field-setting-acfe_update
|
84 |
-
.acf-field-setting-acfe_validate
|
85 |
-
|
86 |
}
|
87 |
|
88 |
-
.acf-field-acfe-meta
|
89 |
-
.acf-field-setting-acfe_settings
|
90 |
-
.acf-field-setting-acfe_update
|
91 |
-
.acf-field-setting-acfe_validate
|
92 |
-
|
93 |
}
|
94 |
|
95 |
-
.acf-repeater.-block
|
96 |
-
.acf-repeater.-row
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
}
|
104 |
|
105 |
-
.acf-repeater.-block
|
106 |
-
.acf-repeater.-row
|
107 |
-
|
108 |
-
|
109 |
}
|
110 |
|
111 |
-
.acf-repeater.-block
|
112 |
-
.acf-repeater.-row
|
113 |
-
|
114 |
-
|
115 |
}
|
116 |
|
117 |
-
.acf-repeater.-block
|
118 |
-
.acf-repeater.-row
|
119 |
-
|
120 |
}
|
121 |
|
122 |
-
.acf-repeater.-block
|
123 |
-
.acf-repeater.-row
|
124 |
-
|
125 |
}
|
126 |
|
127 |
-
body:not(.acf-admin-5-3) .acf-repeater.-block
|
128 |
-
body:not(.acf-admin-5-3) .acf-repeater.-row
|
129 |
-
|
130 |
-
|
131 |
}
|
132 |
|
133 |
-
body:not(.acf-admin-5-3) .acf-repeater.-block
|
134 |
-
body:not(.acf-admin-5-3) .acf-repeater.-row
|
135 |
-
|
136 |
}
|
137 |
|
138 |
-
body:not(.acf-admin-5-3) .acf-repeater.-block
|
139 |
-
body:not(.acf-admin-5-3) .acf-repeater.-row
|
140 |
-
|
141 |
}
|
142 |
|
143 |
-
.acf-field-setting-acfe_bidirectional
|
144 |
-
|
145 |
}
|
146 |
|
147 |
.acfe_width_auto {
|
148 |
-
|
149 |
}
|
150 |
|
151 |
.status-acf-disabled .column-title a,
|
152 |
.status-acf-disabled .column-title code {
|
153 |
-
|
154 |
}
|
155 |
|
156 |
.status-acf-disabled .column-title strong {
|
157 |
-
|
158 |
}
|
159 |
|
160 |
.column-acf-field-group-category {
|
161 |
-
|
162 |
}
|
163 |
|
164 |
td.acf-field-group-category a {
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
}
|
172 |
|
173 |
.column-acfe-location {
|
174 |
-
|
175 |
}
|
176 |
|
177 |
.column-acf-description,
|
178 |
.column-acf-location {
|
179 |
-
|
180 |
}
|
181 |
|
182 |
#acf-field-group-wrap .wp-list-table .column-acf-fg-status {
|
183 |
-
|
184 |
}
|
185 |
|
186 |
#acf-field-group-wrap .wp-list-table .column-acf-fg-count,
|
187 |
.post-type-acf-field-group .wp-list-table .column-acf-count {
|
188 |
-
|
189 |
}
|
190 |
|
191 |
.post-type-acf-field-group .wp-list-table .column-title .post-state {
|
192 |
-
|
193 |
}
|
194 |
|
195 |
.column-title .acfe-key {
|
196 |
-
|
197 |
-
|
198 |
}
|
199 |
|
200 |
.column-acfe-load {
|
201 |
-
|
202 |
}
|
203 |
|
204 |
.column-acfe-source {
|
205 |
-
|
206 |
}
|
207 |
|
208 |
.column-acfe-autosync-json,
|
209 |
.column-acfe-autosync-php {
|
210 |
-
|
211 |
-
|
212 |
}
|
213 |
|
214 |
.column-acfe-autosync-json .secondary,
|
215 |
.column-acfe-autosync-php .secondary {
|
216 |
-
|
217 |
}
|
218 |
|
219 |
.column-acfe-autosync-json .dashicons-warning,
|
220 |
.column-acfe-autosync-php .dashicons-warning {
|
221 |
-
|
222 |
-
|
223 |
}
|
224 |
|
225 |
.acf-field[data-name=acfe_autosync] .dashicons-warning {
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
}
|
231 |
|
232 |
.column-acfe-autosync-json .dashicons-update,
|
233 |
.column-acfe-autosync-php .dashicons-update {
|
234 |
-
|
235 |
}
|
236 |
|
237 |
-
.column-acfe-autosync-json .dashicons
|
238 |
-
.column-acfe-autosync-php .dashicons
|
239 |
-
|
240 |
}
|
241 |
|
242 |
.acf-field-image[data-name=acfe_flexible_thumbnail]>.acf-input>.acf-image-uploader.has-value>.show-if-value.image-wrap {
|
243 |
-
|
244 |
}
|
245 |
|
246 |
.acf-diff-content table.diff tbody tr td:nth-child(2) {
|
247 |
-
|
248 |
}
|
249 |
|
250 |
body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select {
|
251 |
-
|
252 |
}
|
253 |
|
254 |
body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select select {
|
255 |
-
|
256 |
}
|
257 |
|
258 |
-
.
|
259 |
-
|
|
|
|
|
|
|
260 |
}
|
261 |
|
262 |
-
.
|
263 |
-
|
|
|
264 |
}
|
265 |
|
266 |
-
.
|
267 |
-
|
268 |
}
|
269 |
|
270 |
-
.
|
271 |
-
|
|
|
|
|
|
|
|
|
272 |
}
|
273 |
|
274 |
-
.
|
275 |
-
|
276 |
-
.acf-field-acfe-flexible-modal > .acf-input > .acf-fields .acf-field-acfe-flexible-modal-title {
|
277 |
-
padding-top: 0;
|
278 |
-
padding-bottom: 0;
|
279 |
-
padding-left: 0;
|
280 |
-
border-top: 0;
|
281 |
-
border-left: 0 !important;
|
282 |
-
min-height: 55px;
|
283 |
}
|
284 |
|
285 |
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_category],
|
286 |
-
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings],
|
287 |
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_label],
|
288 |
-
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_size],
|
289 |
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_thumbnail] {
|
290 |
-
|
291 |
}
|
292 |
|
293 |
-
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta
|
294 |
-
|
295 |
-
margin-right: 10px;
|
296 |
}
|
297 |
|
298 |
-
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field
|
299 |
-
|
|
|
300 |
}
|
301 |
|
302 |
-
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field
|
303 |
-
.acf-field-setting-fc_layout
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
306 |
|
307 |
.acf-field-setting-fc_layout .select2-container--default .select2-selection--multiple li {
|
308 |
-
|
309 |
}
|
310 |
|
311 |
.acf-field-object-acfe-column .acf-field-setting-instructions,
|
@@ -314,38 +367,38 @@ body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select select {
|
|
314 |
.acf-field-object-acfe-column .acf-field-setting-required,
|
315 |
.acf-field-object-acfe-column .acf-field-setting-warning,
|
316 |
.acf-field-object-acfe-column .acf-field-setting-wrapper {
|
317 |
-
|
318 |
}
|
319 |
|
320 |
-
.acf-field-object
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
}
|
328 |
|
329 |
.acf-field-object-acfe-column .li-field-name {
|
330 |
-
|
331 |
}
|
332 |
|
333 |
-
.acf-field-setting-allow_terms
|
334 |
-
|
335 |
}
|
336 |
|
337 |
-
.acf-field-setting-allow_terms
|
338 |
-
|
339 |
}
|
340 |
|
341 |
-
#acf-field-group-locations .rule-groups
|
342 |
-
|
343 |
}
|
344 |
|
345 |
.acf-hl[data-cols="5"]>li {
|
346 |
-
|
347 |
}
|
348 |
|
349 |
.acf-hl[data-cols="6"]>li {
|
350 |
-
|
351 |
}
|
1 |
.submitbox .misc-pub-acfe-field-group-key {
|
2 |
+
padding-top: 2px
|
3 |
}
|
4 |
|
5 |
.submitbox .misc-pub-acfe-field-group-key span {
|
6 |
+
font-size: 16px;
|
7 |
+
color: #82878c;
|
8 |
+
width: 20px;
|
9 |
+
margin-right: 2px
|
10 |
}
|
11 |
|
12 |
.submitbox .misc-pub-acfe-field-group-key code {
|
13 |
+
font-size: 12px
|
14 |
}
|
15 |
|
16 |
.submitbox .misc-pub-acfe-field-group-export {
|
17 |
+
padding-top: 2px
|
18 |
}
|
19 |
|
20 |
.submitbox .misc-pub-acfe-field-group-export span {
|
21 |
+
font-size: 17px;
|
22 |
+
color: #82878c;
|
23 |
+
line-height: 1.3;
|
24 |
+
width: 20px;
|
25 |
+
margin-right: 2px
|
26 |
}
|
27 |
|
28 |
.acf-fields .acf-field-tab {
|
29 |
+
display: block !important;
|
30 |
+
height: 0;
|
31 |
+
overflow: hidden;
|
32 |
+
padding: 0 !important;
|
33 |
+
border: 0 !important
|
34 |
+
}
|
35 |
+
|
36 |
+
.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields,
|
37 |
+
.acf-field-setting-acfe_hide>.acf-input>.acf-fields,
|
38 |
+
.acf-field-setting-acfe_permissions>.acf-input>.acf-fields,
|
39 |
+
.acf-field-setting-acfe_settings>.acf-input>.acf-fields,
|
40 |
+
.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field.acf-field-acfe-settings-rules-or,
|
41 |
+
.acf-field-setting-acfe_update>.acf-input>.acf-fields,
|
42 |
+
.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field.acf-field-acfe-update-functions,
|
43 |
+
.acf-field-setting-acfe_validate>.acf-input>.acf-fields,
|
44 |
+
.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field.acf-field-acfe-validate-rules-or {
|
45 |
+
border: 0
|
46 |
+
}
|
47 |
+
|
48 |
+
.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field,
|
49 |
+
.acf-field-setting-acfe_hide>.acf-input>.acf-fields>.acf-field,
|
50 |
+
.acf-field-setting-acfe_permissions>.acf-input>.acf-fields>.acf-field,
|
51 |
+
.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field,
|
52 |
+
.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field,
|
53 |
+
.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field {
|
54 |
+
padding: 0
|
55 |
}
|
56 |
|
57 |
.acf-field-setting-acfe_field_data {
|
58 |
+
display: none
|
59 |
}
|
60 |
|
61 |
.acf-field-hide-front.acfe_width_auto {
|
62 |
+
margin-right: 30px
|
63 |
}
|
64 |
|
65 |
+
.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-enabled>.acf-label,
|
66 |
+
.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-related>.acf-label,
|
67 |
+
.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field.acf-field-acfe-settings-activate>.acf-label,
|
68 |
+
.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field.acf-field-acfe-update-activate>.acf-label,
|
69 |
+
.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field.acf-field-acfe-validate-activate>.acf-label {
|
70 |
+
display: none
|
71 |
}
|
72 |
|
73 |
+
.acf-field-acfe-meta>.acf-input .acf-repeater.-empty.-table>table,
|
74 |
+
.acf-field-setting-acfe_settings>.acf-input .acf-repeater.-empty.-table>table,
|
75 |
+
.acf-field-setting-acfe_update>.acf-input .acf-repeater.-empty.-table>table,
|
76 |
+
.acf-field-setting-acfe_validate>.acf-input .acf-repeater.-empty.-table>table {
|
77 |
+
border: 0;
|
78 |
+
display: none
|
79 |
}
|
80 |
|
81 |
+
.acf-field-acfe-meta>.acf-input .acf-repeater.-empty.-table>table>thead,
|
82 |
+
.acf-field-setting-acfe_settings>.acf-input .acf-repeater.-empty.-table>table>thead,
|
83 |
+
.acf-field-setting-acfe_update>.acf-input .acf-repeater.-empty.-table>table>thead,
|
84 |
+
.acf-field-setting-acfe_validate>.acf-input .acf-repeater.-empty.-table>table>thead {
|
85 |
+
display: none
|
86 |
}
|
87 |
|
88 |
+
.acf-field-acfe-meta>.acf-input>.acf-repeater .acf-actions,
|
89 |
+
.acf-field-setting-acfe_settings>.acf-input>.acf-repeater .acf-actions,
|
90 |
+
.acf-field-setting-acfe_update>.acf-input>.acf-repeater .acf-actions,
|
91 |
+
.acf-field-setting-acfe_validate>.acf-input>.acf-repeater .acf-actions {
|
92 |
+
text-align: left
|
93 |
}
|
94 |
|
95 |
+
.acf-repeater.-block>table,
|
96 |
+
.acf-repeater.-row>table {
|
97 |
+
border-collapse: separate;
|
98 |
+
border-spacing: 0 15px;
|
99 |
+
background: 0 0;
|
100 |
+
border: 0;
|
101 |
+
margin-top: -15px;
|
102 |
+
margin-bottom: -7px
|
103 |
}
|
104 |
|
105 |
+
.acf-repeater.-block>table>*,
|
106 |
+
.acf-repeater.-row>table>* {
|
107 |
+
border-collapse: collapse;
|
108 |
+
border-spacing: 0
|
109 |
}
|
110 |
|
111 |
+
.acf-repeater.-block>table>tbody>tr>td,
|
112 |
+
.acf-repeater.-row>table>tbody>tr>td {
|
113 |
+
border-top: 1px solid #ccd0d4 !important;
|
114 |
+
border-bottom: 1px solid #ccd0d4 !important
|
115 |
}
|
116 |
|
117 |
+
.acf-repeater.-block>table>tbody>tr>td:first-of-type,
|
118 |
+
.acf-repeater.-row>table>tbody>tr>td:first-of-type {
|
119 |
+
border-left: 1px solid #ccd0d4 !important
|
120 |
}
|
121 |
|
122 |
+
.acf-repeater.-block>table>tbody>tr>td:last-of-type,
|
123 |
+
.acf-repeater.-row>table>tbody>tr>td:last-of-type {
|
124 |
+
border-right: 1px solid #ccd0d4 !important
|
125 |
}
|
126 |
|
127 |
+
body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td,
|
128 |
+
body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td {
|
129 |
+
border-top: 1px solid #e1e1e1;
|
130 |
+
border-bottom: 1px solid #e1e1e1
|
131 |
}
|
132 |
|
133 |
+
body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:first-of-type,
|
134 |
+
body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:first-of-type {
|
135 |
+
border-left: 1px solid #e1e1e1
|
136 |
}
|
137 |
|
138 |
+
body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:last-of-type,
|
139 |
+
body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:last-of-type {
|
140 |
+
border-right: 1px solid #e1e1e1
|
141 |
}
|
142 |
|
143 |
+
.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-related {
|
144 |
+
margin-left: 10px
|
145 |
}
|
146 |
|
147 |
.acfe_width_auto {
|
148 |
+
width: auto !important
|
149 |
}
|
150 |
|
151 |
.status-acf-disabled .column-title a,
|
152 |
.status-acf-disabled .column-title code {
|
153 |
+
color: #555 !important
|
154 |
}
|
155 |
|
156 |
.status-acf-disabled .column-title strong {
|
157 |
+
color: #a0a5aa
|
158 |
}
|
159 |
|
160 |
.column-acf-field-group-category {
|
161 |
+
width: 125px
|
162 |
}
|
163 |
|
164 |
td.acf-field-group-category a {
|
165 |
+
word-wrap: break-word;
|
166 |
+
padding: 2px 5px;
|
167 |
+
margin: 0 1px;
|
168 |
+
border-radius: 2px;
|
169 |
+
background: rgba(0, 0, 0, .06);
|
170 |
+
color: #23282d
|
171 |
}
|
172 |
|
173 |
.column-acfe-location {
|
174 |
+
width: 100px
|
175 |
}
|
176 |
|
177 |
.column-acf-description,
|
178 |
.column-acf-location {
|
179 |
+
width: 230px
|
180 |
}
|
181 |
|
182 |
#acf-field-group-wrap .wp-list-table .column-acf-fg-status {
|
183 |
+
width: 70px
|
184 |
}
|
185 |
|
186 |
#acf-field-group-wrap .wp-list-table .column-acf-fg-count,
|
187 |
.post-type-acf-field-group .wp-list-table .column-acf-count {
|
188 |
+
width: 80px
|
189 |
}
|
190 |
|
191 |
.post-type-acf-field-group .wp-list-table .column-title .post-state {
|
192 |
+
color: #a0a5aa
|
193 |
}
|
194 |
|
195 |
.column-title .acfe-key {
|
196 |
+
color: #555;
|
197 |
+
font-size: 12px
|
198 |
}
|
199 |
|
200 |
.column-acfe-load {
|
201 |
+
width: 70px
|
202 |
}
|
203 |
|
204 |
.column-acfe-source {
|
205 |
+
width: 150px
|
206 |
}
|
207 |
|
208 |
.column-acfe-autosync-json,
|
209 |
.column-acfe-autosync-php {
|
210 |
+
width: 90px;
|
211 |
+
text-align: center !important
|
212 |
}
|
213 |
|
214 |
.column-acfe-autosync-json .secondary,
|
215 |
.column-acfe-autosync-php .secondary {
|
216 |
+
color: #ccc
|
217 |
}
|
218 |
|
219 |
.column-acfe-autosync-json .dashicons-warning,
|
220 |
.column-acfe-autosync-php .dashicons-warning {
|
221 |
+
font-size: 15px;
|
222 |
+
vertical-align: middle
|
223 |
}
|
224 |
|
225 |
.acf-field[data-name=acfe_autosync] .dashicons-warning {
|
226 |
+
color: #ccc;
|
227 |
+
font-size: 15px;
|
228 |
+
height: 15px;
|
229 |
+
vertical-align: text-bottom
|
230 |
}
|
231 |
|
232 |
.column-acfe-autosync-json .dashicons-update,
|
233 |
.column-acfe-autosync-php .dashicons-update {
|
234 |
+
font-size: 18px
|
235 |
}
|
236 |
|
237 |
+
.column-acfe-autosync-json .dashicons+.dashicons-warning,
|
238 |
+
.column-acfe-autosync-php .dashicons+.dashicons-warning {
|
239 |
+
margin-left: -3px
|
240 |
}
|
241 |
|
242 |
.acf-field-image[data-name=acfe_flexible_thumbnail]>.acf-input>.acf-image-uploader.has-value>.show-if-value.image-wrap {
|
243 |
+
max-width: 85px !important
|
244 |
}
|
245 |
|
246 |
.acf-diff-content table.diff tbody tr td:nth-child(2) {
|
247 |
+
width: auto
|
248 |
}
|
249 |
|
250 |
body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select {
|
251 |
+
border-color: #7e8993
|
252 |
}
|
253 |
|
254 |
body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select select {
|
255 |
+
min-height: 28px
|
256 |
}
|
257 |
|
258 |
+
.acfe-field-setting-flex>.acf-input>.acf-fields {
|
259 |
+
display: -webkit-box;
|
260 |
+
display: -ms-flexbox;
|
261 |
+
display: flex;
|
262 |
+
border: 0
|
263 |
}
|
264 |
|
265 |
+
.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child {
|
266 |
+
padding: 0;
|
267 |
+
margin-right: 10px
|
268 |
}
|
269 |
|
270 |
+
.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child .acf-label {
|
271 |
+
display: none
|
272 |
}
|
273 |
|
274 |
+
.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child~.acf-field {
|
275 |
+
padding-top: 0;
|
276 |
+
padding-bottom: 0;
|
277 |
+
padding-left: 0;
|
278 |
+
border-top: 0;
|
279 |
+
border-left: 0 !important
|
280 |
}
|
281 |
|
282 |
+
.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child~.acf-field[data-type=true_false] {
|
283 |
+
padding-top: 2px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
}
|
285 |
|
286 |
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_category],
|
|
|
287 |
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_label],
|
|
|
288 |
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_thumbnail] {
|
289 |
+
margin: 0
|
290 |
}
|
291 |
|
292 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta>.acf-fc-meta-label:first-of-type {
|
293 |
+
margin: 0
|
|
|
294 |
}
|
295 |
|
296 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting {
|
297 |
+
margin: 0;
|
298 |
+
margin-top: 15px
|
299 |
}
|
300 |
|
301 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-input,
|
302 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-label {
|
303 |
+
margin: 0
|
304 |
+
}
|
305 |
+
|
306 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-input label,
|
307 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-label label {
|
308 |
+
margin: 0
|
309 |
+
}
|
310 |
+
|
311 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li {
|
312 |
+
display: -webkit-box;
|
313 |
+
display: -ms-flexbox;
|
314 |
+
display: flex;
|
315 |
+
-webkit-box-orient: horizontal;
|
316 |
+
-webkit-box-direction: normal;
|
317 |
+
-ms-flex-direction: row;
|
318 |
+
flex-direction: row;
|
319 |
+
margin-bottom: 0;
|
320 |
+
margin-top: 10px
|
321 |
+
}
|
322 |
+
|
323 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li>ul {
|
324 |
+
margin: 0;
|
325 |
+
width: 50%
|
326 |
+
}
|
327 |
+
|
328 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li>ul:first-child+ul {
|
329 |
+
border-left: 0;
|
330 |
+
margin-left: 10px
|
331 |
+
}
|
332 |
+
|
333 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li>ul>.acf-input {
|
334 |
+
margin-bottom: 0
|
335 |
+
}
|
336 |
+
|
337 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li {
|
338 |
+
-webkit-box-orient: vertical;
|
339 |
+
-webkit-box-direction: normal;
|
340 |
+
-ms-flex-direction: column;
|
341 |
+
flex-direction: column
|
342 |
+
}
|
343 |
+
|
344 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li>ul {
|
345 |
+
-webkit-box-flex: 1;
|
346 |
+
-ms-flex: 1;
|
347 |
+
flex: 1;
|
348 |
+
margin: 10px 0 0 0;
|
349 |
+
width: 100%
|
350 |
+
}
|
351 |
+
|
352 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li>ul:first-child {
|
353 |
+
margin-top: 0
|
354 |
+
}
|
355 |
+
|
356 |
+
.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li>ul:first-child+ul {
|
357 |
+
margin-left: 0
|
358 |
}
|
359 |
|
360 |
.acf-field-setting-fc_layout .select2-container--default .select2-selection--multiple li {
|
361 |
+
margin-bottom: 0
|
362 |
}
|
363 |
|
364 |
.acf-field-object-acfe-column .acf-field-setting-instructions,
|
367 |
.acf-field-object-acfe-column .acf-field-setting-required,
|
368 |
.acf-field-object-acfe-column .acf-field-setting-warning,
|
369 |
.acf-field-object-acfe-column .acf-field-setting-wrapper {
|
370 |
+
display: none
|
371 |
}
|
372 |
|
373 |
+
.acf-field-object+.acf-field-object-acfe-column:before {
|
374 |
+
display: block;
|
375 |
+
content: "";
|
376 |
+
height: 5px;
|
377 |
+
width: 100%;
|
378 |
+
background: #f9f9f9;
|
379 |
+
border-bottom: #f0f0f0 solid 1px
|
380 |
}
|
381 |
|
382 |
.acf-field-object-acfe-column .li-field-name {
|
383 |
+
visibility: hidden
|
384 |
}
|
385 |
|
386 |
+
.acf-field-setting-allow_terms>.acf-input>ul>li:first-of-type {
|
387 |
+
width: calc(100% - 125px)
|
388 |
}
|
389 |
|
390 |
+
.acf-field-setting-allow_terms>.acf-input>ul>li:last-of-type {
|
391 |
+
width: 125px
|
392 |
}
|
393 |
|
394 |
+
#acf-field-group-locations .rule-groups>.rule-group>table>tbody>tr>td.value>.acf-field {
|
395 |
+
margin: 0
|
396 |
}
|
397 |
|
398 |
.acf-hl[data-cols="5"]>li {
|
399 |
+
width: 20%
|
400 |
}
|
401 |
|
402 |
.acf-hl[data-cols="6"]>li {
|
403 |
+
width: 16.667%
|
404 |
}
|
@@ -1 +1 @@
|
|
1 |
-
.submitbox .misc-pub-acfe-field-group-key{padding-top:2px}.submitbox .misc-pub-acfe-field-group-key span{font-size:16px;color:#82878c;width:20px;margin-right:2px}.submitbox .misc-pub-acfe-field-group-key code{font-size:12px}.submitbox .misc-pub-acfe-field-group-export{padding-top:2px}.submitbox .misc-pub-acfe-field-group-export span{font-size:17px;color:#82878c;line-height:1.3;width:20px;margin-right:2px}.acf-fields .acf-field-tab{display:block!important;height:0;overflow:hidden;padding:0!important;border:0!important}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields,.acf-field-setting-acfe_hide>.acf-input>.acf-fields,.acf-field-setting-acfe_permissions>.acf-input>.acf-fields,.acf-field-setting-acfe_settings>.acf-input>.acf-fields,.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field.acf-field-acfe-settings-rules-or,.acf-field-setting-acfe_update>.acf-input>.acf-fields,.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field.acf-field-acfe-update-functions,.acf-field-setting-acfe_validate>.acf-input>.acf-fields,.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field.acf-field-acfe-validate-rules-or{border:0}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_hide>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_permissions>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field{padding:0}.acf-field-setting-acfe_field_data{display:none}.acf-field-hide-front.acfe_width_auto{margin-right:30px}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-enabled>.acf-label,.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-related>.acf-label,.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field.acf-field-acfe-settings-activate>.acf-label,.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field.acf-field-acfe-update-activate>.acf-label,.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field.acf-field-acfe-validate-activate>.acf-label{display:none}.acf-field-acfe-meta>.acf-input .acf-repeater.-empty.-table>table,.acf-field-setting-acfe_settings>.acf-input .acf-repeater.-empty.-table>table,.acf-field-setting-acfe_update>.acf-input .acf-repeater.-empty.-table>table,.acf-field-setting-acfe_validate>.acf-input .acf-repeater.-empty.-table>table{border:0;display:none}.acf-field-acfe-meta>.acf-input .acf-repeater.-empty.-table>table>thead,.acf-field-setting-acfe_settings>.acf-input .acf-repeater.-empty.-table>table>thead,.acf-field-setting-acfe_update>.acf-input .acf-repeater.-empty.-table>table>thead,.acf-field-setting-acfe_validate>.acf-input .acf-repeater.-empty.-table>table>thead{display:none}.acf-field-acfe-meta>.acf-input>.acf-repeater .acf-actions,.acf-field-setting-acfe_settings>.acf-input>.acf-repeater .acf-actions,.acf-field-setting-acfe_update>.acf-input>.acf-repeater .acf-actions,.acf-field-setting-acfe_validate>.acf-input>.acf-repeater .acf-actions{text-align:left}.acf-repeater.-block>table,.acf-repeater.-row>table{border-collapse:separate;border-spacing:0 15px;background:none;border:0;margin-top:-15px;margin-bottom:-7px}.acf-repeater.-block>table>*,.acf-repeater.-row>table>*{border-collapse:collapse;border-spacing:0}.acf-repeater.-block>table>tbody>tr>td,.acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #ccd0d4!important;border-bottom:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:first-of-type,.acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:last-of-type,.acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #ccd0d4!important}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #e1e1e1;border-bottom:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:first-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:last-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #e1e1e1}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-related{margin-left:10px}.acfe_width_auto{width:auto!important}.status-acf-disabled .column-title a,.status-acf-disabled .column-title code{color:#555!important}.status-acf-disabled .column-title strong{color:#a0a5aa}.column-acf-field-group-category{width:125px}td.acf-field-group-category a{word-wrap:break-word;padding:2px 5px;margin:0 1px;border-radius:2px;background:rgba(0,0,0,.06);color:#23282d}.column-acfe-location{width:100px}.column-acf-description,.column-acf-location{width:230px}#acf-field-group-wrap .wp-list-table .column-acf-fg-status{width:70px}#acf-field-group-wrap .wp-list-table .column-acf-fg-count,.post-type-acf-field-group .wp-list-table .column-acf-count{width:80px}.post-type-acf-field-group .wp-list-table .column-title .post-state{color:#a0a5aa}.column-title .acfe-key{color:#555;font-size:12px}.column-acfe-load{width:70px}.column-acfe-source{width:150px}.column-acfe-autosync-json,.column-acfe-autosync-php{width:90px;text-align:center!important}.column-acfe-autosync-json .secondary,.column-acfe-autosync-php .secondary{color:#ccc}.column-acfe-autosync-json .dashicons-warning,.column-acfe-autosync-php .dashicons-warning{font-size:15px;vertical-align:middle}.acf-field[data-name=acfe_autosync] .dashicons-warning{color:#ccc;font-size:15px;height:15px;vertical-align:text-bottom}.column-acfe-autosync-json .dashicons-update,.column-acfe-autosync-php .dashicons-update{font-size:18px}.column-acfe-autosync-json .dashicons+.dashicons-warning,.column-acfe-autosync-php .dashicons+.dashicons-warning{margin-left:-3px}.acf-field-image[data-name=acfe_flexible_thumbnail]>.acf-input>.acf-image-uploader.has-value>.show-if-value.image-wrap{max-width:85px!important}.acf-diff-content table.diff tbody tr td:nth-child(2){width:auto}body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select{border-color:#7e8993}body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select select{min-height:28px}.acf-field-acfe-flexible-modal>.acf-input>.acf-fields{border:0}.acf-field-acfe-flexible-modal>.acf-input>.acf-fields .acf-field-acfe-flexible-modal-enabled{padding:0}.acf-field-acfe-flexible-modal>.acf-input>.acf-fields .acf-field-acfe-flexible-modal-enabled .acf-label{display:none}.acf-field-acfe-flexible-modal>.acf-input>.acf-fields .acf-field-acfe-flexible-modal-enabled{margin-right:10px}.acf-field-acfe-flexible-modal>.acf-input>.acf-fields .acf-field-acfe-flexible-modal-categories,.acf-field-acfe-flexible-modal>.acf-input>.acf-fields .acf-field-acfe-flexible-modal-col,.acf-field-acfe-flexible-modal>.acf-input>.acf-fields .acf-field-acfe-flexible-modal-title{padding-top:0;padding-bottom:0;padding-left:0;border-top:0;border-left:0!important;min-height:55px}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_category],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_label],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_size],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_thumbnail]{margin:0}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_size]{margin-right:10px}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_size]{border-left:0}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_label]>.acf-input,.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta>.acf-fc-meta-label:first-of-type{margin:0}.acf-field-setting-fc_layout .select2-container--default .select2-selection--multiple li{margin-bottom:0}.acf-field-object-acfe-column .acf-field-setting-instructions,.acf-field-object-acfe-column .acf-field-setting-label,.acf-field-object-acfe-column .acf-field-setting-name,.acf-field-object-acfe-column .acf-field-setting-required,.acf-field-object-acfe-column .acf-field-setting-warning,.acf-field-object-acfe-column .acf-field-setting-wrapper{display:none}.acf-field-object+.acf-field-object-acfe-column:before{display:block;content:"";height:5px;width:100%;background:#f9f9f9;border-bottom:1px solid #f0f0f0}.acf-field-object-acfe-column .li-field-name{visibility:hidden}.acf-field-setting-allow_terms>.acf-input>ul>li:first-of-type{width:calc(100% - 125px)}.acf-field-setting-allow_terms>.acf-input>ul>li:last-of-type{width:125px}#acf-field-group-locations .rule-groups>.rule-group>table>tbody>tr>td.value>.acf-field{margin:0}.acf-hl[data-cols="5"]>li{width:20%}.acf-hl[data-cols="6"]>li{width:16.667%}
|
1 |
+
.submitbox .misc-pub-acfe-field-group-key{padding-top:2px}.submitbox .misc-pub-acfe-field-group-key span{font-size:16px;color:#82878c;width:20px;margin-right:2px}.submitbox .misc-pub-acfe-field-group-key code{font-size:12px}.submitbox .misc-pub-acfe-field-group-export{padding-top:2px}.submitbox .misc-pub-acfe-field-group-export span{font-size:17px;color:#82878c;line-height:1.3;width:20px;margin-right:2px}.acf-fields .acf-field-tab{display:block!important;height:0;overflow:hidden;padding:0!important;border:0!important}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields,.acf-field-setting-acfe_hide>.acf-input>.acf-fields,.acf-field-setting-acfe_permissions>.acf-input>.acf-fields,.acf-field-setting-acfe_settings>.acf-input>.acf-fields,.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field.acf-field-acfe-settings-rules-or,.acf-field-setting-acfe_update>.acf-input>.acf-fields,.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field.acf-field-acfe-update-functions,.acf-field-setting-acfe_validate>.acf-input>.acf-fields,.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field.acf-field-acfe-validate-rules-or{border:0}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_hide>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_permissions>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field,.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field{padding:0}.acf-field-setting-acfe_field_data{display:none}.acf-field-hide-front.acfe_width_auto{margin-right:30px}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-enabled>.acf-label,.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-related>.acf-label,.acf-field-setting-acfe_settings>.acf-input>.acf-fields>.acf-field.acf-field-acfe-settings-activate>.acf-label,.acf-field-setting-acfe_update>.acf-input>.acf-fields>.acf-field.acf-field-acfe-update-activate>.acf-label,.acf-field-setting-acfe_validate>.acf-input>.acf-fields>.acf-field.acf-field-acfe-validate-activate>.acf-label{display:none}.acf-field-acfe-meta>.acf-input .acf-repeater.-empty.-table>table,.acf-field-setting-acfe_settings>.acf-input .acf-repeater.-empty.-table>table,.acf-field-setting-acfe_update>.acf-input .acf-repeater.-empty.-table>table,.acf-field-setting-acfe_validate>.acf-input .acf-repeater.-empty.-table>table{border:0;display:none}.acf-field-acfe-meta>.acf-input .acf-repeater.-empty.-table>table>thead,.acf-field-setting-acfe_settings>.acf-input .acf-repeater.-empty.-table>table>thead,.acf-field-setting-acfe_update>.acf-input .acf-repeater.-empty.-table>table>thead,.acf-field-setting-acfe_validate>.acf-input .acf-repeater.-empty.-table>table>thead{display:none}.acf-field-acfe-meta>.acf-input>.acf-repeater .acf-actions,.acf-field-setting-acfe_settings>.acf-input>.acf-repeater .acf-actions,.acf-field-setting-acfe_update>.acf-input>.acf-repeater .acf-actions,.acf-field-setting-acfe_validate>.acf-input>.acf-repeater .acf-actions{text-align:left}.acf-repeater.-block>table,.acf-repeater.-row>table{border-collapse:separate;border-spacing:0 15px;background:0 0;border:0;margin-top:-15px;margin-bottom:-7px}.acf-repeater.-block>table>*,.acf-repeater.-row>table>*{border-collapse:collapse;border-spacing:0}.acf-repeater.-block>table>tbody>tr>td,.acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #ccd0d4!important;border-bottom:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:first-of-type,.acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:last-of-type,.acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #ccd0d4!important}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #e1e1e1;border-bottom:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:first-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:last-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #e1e1e1}.acf-field-setting-acfe_bidirectional>.acf-input>.acf-fields>.acf-field.acf-field-acfe-bidirectional-related{margin-left:10px}.acfe_width_auto{width:auto!important}.status-acf-disabled .column-title a,.status-acf-disabled .column-title code{color:#555!important}.status-acf-disabled .column-title strong{color:#a0a5aa}.column-acf-field-group-category{width:125px}td.acf-field-group-category a{word-wrap:break-word;padding:2px 5px;margin:0 1px;border-radius:2px;background:rgba(0,0,0,.06);color:#23282d}.column-acfe-location{width:100px}.column-acf-description,.column-acf-location{width:230px}#acf-field-group-wrap .wp-list-table .column-acf-fg-status{width:70px}#acf-field-group-wrap .wp-list-table .column-acf-fg-count,.post-type-acf-field-group .wp-list-table .column-acf-count{width:80px}.post-type-acf-field-group .wp-list-table .column-title .post-state{color:#a0a5aa}.column-title .acfe-key{color:#555;font-size:12px}.column-acfe-load{width:70px}.column-acfe-source{width:150px}.column-acfe-autosync-json,.column-acfe-autosync-php{width:90px;text-align:center!important}.column-acfe-autosync-json .secondary,.column-acfe-autosync-php .secondary{color:#ccc}.column-acfe-autosync-json .dashicons-warning,.column-acfe-autosync-php .dashicons-warning{font-size:15px;vertical-align:middle}.acf-field[data-name=acfe_autosync] .dashicons-warning{color:#ccc;font-size:15px;height:15px;vertical-align:text-bottom}.column-acfe-autosync-json .dashicons-update,.column-acfe-autosync-php .dashicons-update{font-size:18px}.column-acfe-autosync-json .dashicons+.dashicons-warning,.column-acfe-autosync-php .dashicons+.dashicons-warning{margin-left:-3px}.acf-field-image[data-name=acfe_flexible_thumbnail]>.acf-input>.acf-image-uploader.has-value>.show-if-value.image-wrap{max-width:85px!important}.acf-diff-content table.diff tbody tr td:nth-child(2){width:auto}body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select{border-color:#7e8993}body.acf-admin-5-3 .acf-field-setting-fc_layout .acf-input-wrap.select select{min-height:28px}.acfe-field-setting-flex>.acf-input>.acf-fields{display:-webkit-box;display:-ms-flexbox;display:flex;border:0}.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child{padding:0;margin-right:10px}.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child .acf-label{display:none}.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child~.acf-field{padding-top:0;padding-bottom:0;padding-left:0;border-top:0;border-left:0!important}.acfe-field-setting-flex>.acf-input>.acf-fields>.acf-field:first-child~.acf-field[data-type=true_false]{padding-top:2px}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_category],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_settings_label],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field[data-name=acfe_flexible_thumbnail],.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta>.acf-fc-meta-label:first-of-type{margin:0}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting{margin:15px 0 0}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-input,.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-input label,.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-label,.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting>.acf-label label{margin:0}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-bottom:0;margin-top:10px}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li>ul{margin:0;width:50%}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li>ul:first-child+ul{border-left:0;margin-left:10px}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting+li>ul>.acf-input{margin-bottom:0}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li>ul{-webkit-box-flex:1;-ms-flex:1;flex:1;margin:10px 0 0;width:100%}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li>ul:first-child{margin-top:0}.acf-field-setting-fc_layout>.acf-input>.acf-fc-meta .acf-field.acfe-flexible-field-setting.acfe-flexible-field-setting-row+li>ul:first-child+ul{margin-left:0}.acf-field-setting-fc_layout .select2-container--default .select2-selection--multiple li{margin-bottom:0}.acf-field-object-acfe-column .acf-field-setting-instructions,.acf-field-object-acfe-column .acf-field-setting-label,.acf-field-object-acfe-column .acf-field-setting-name,.acf-field-object-acfe-column .acf-field-setting-required,.acf-field-object-acfe-column .acf-field-setting-warning,.acf-field-object-acfe-column .acf-field-setting-wrapper{display:none}.acf-field-object+.acf-field-object-acfe-column:before{display:block;content:"";height:5px;width:100%;background:#f9f9f9;border-bottom:1px solid #f0f0f0}.acf-field-object-acfe-column .li-field-name{visibility:hidden}.acf-field-setting-allow_terms>.acf-input>ul>li:first-of-type{width:calc(100% - 125px)}.acf-field-setting-allow_terms>.acf-input>ul>li:last-of-type{width:125px}#acf-field-group-locations .rule-groups>.rule-group>table>tbody>tr>td.value>.acf-field{margin:0}.acf-hl[data-cols="5"]>li{width:20%}.acf-hl[data-cols="6"]>li{width:16.667%}
|
@@ -1,328 +1,337 @@
|
|
1 |
-
.acf-flexible-content
|
2 |
-
|
3 |
-
|
4 |
}
|
5 |
|
6 |
.acf-flexible-content .layout .acf-fc-layout-handle {
|
7 |
-
|
8 |
-
|
9 |
}
|
10 |
|
11 |
-
.layout.acfe-flexible-modal-edit-error
|
12 |
-
|
13 |
}
|
14 |
|
15 |
-
.layout.acfe-flexible-modal-edit-error
|
16 |
-
|
17 |
-
|
18 |
}
|
19 |
|
20 |
.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]:not([data-acfe-flexible-placeholder="1"]):not([data-acfe-flexible-preview="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle {
|
21 |
-
|
22 |
}
|
23 |
|
24 |
.acf-field-flexible-content[data-acfe-flexible-placeholder="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle,
|
25 |
.acf-field-flexible-content[data-acfe-flexible-preview="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle {
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
-
.acf-field-flexible-content[data-acfe-flexible-lock="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle,
|
30 |
.acf-field-flexible-content[data-acfe-flexible-remove-collapse="1"]:not([data-acfe-flexible-lock="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle {
|
31 |
-
|
32 |
}
|
33 |
|
34 |
.acf-fc-popup.top.acfe-fc-popup-grey:before {
|
35 |
-
|
36 |
}
|
37 |
|
38 |
.acf-tooltip.bottom.acfe-fc-popup-grey:before {
|
39 |
-
|
40 |
}
|
41 |
|
42 |
.acf-fc-popup.acfe-fc-popup-grey {
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
}
|
49 |
|
50 |
.acf-tooltip.top.acfe-fc-popup-grey {
|
51 |
-
|
52 |
}
|
53 |
|
54 |
.acf-tooltip.bottom.acfe-fc-popup-grey {
|
55 |
-
|
56 |
}
|
57 |
|
58 |
.acf-fc-popup.acfe-fc-popup-grey a {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
.acf-fc-popup.acfe-fc-popup-grey a:hover {
|
63 |
-
|
64 |
}
|
65 |
|
66 |
-
.layout
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
}
|
74 |
|
75 |
-
.layout
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
}
|
80 |
|
81 |
-
.layout
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
}
|
86 |
|
87 |
-
.layout
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
}
|
107 |
|
108 |
-
body:not(.acf-admin-5-3) .layout
|
109 |
-
|
110 |
}
|
111 |
|
112 |
-
.acfe-modal.-open.acfe-modal-sub
|
113 |
-
|
114 |
}
|
115 |
|
116 |
-
.layout
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
}
|
121 |
|
122 |
-
.layout
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
}
|
127 |
|
128 |
-
.layout
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
}
|
135 |
|
136 |
-
body:not(.acf-admin-5-3) .layout
|
137 |
-
|
138 |
-
|
139 |
}
|
140 |
|
141 |
-
.layout
|
142 |
-
|
143 |
}
|
144 |
|
145 |
-
.layout
|
146 |
-
|
147 |
-
|
148 |
}
|
149 |
|
150 |
-
.layout
|
151 |
-
|
152 |
}
|
153 |
|
154 |
-
.layout
|
155 |
-
|
156 |
}
|
157 |
|
158 |
-
.layout
|
159 |
-
|
160 |
-
|
161 |
}
|
162 |
|
163 |
-
.layout
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
}
|
175 |
|
176 |
-
.layout
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
}
|
186 |
|
187 |
-
.layout
|
188 |
-
.layout
|
189 |
-
|
190 |
-
|
191 |
}
|
192 |
|
193 |
-
.layout
|
194 |
-
|
195 |
}
|
196 |
|
197 |
-
.layout
|
198 |
-
.layout
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
}
|
205 |
|
206 |
.acfe-flexible-layout-thumbnail {
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
}
|
217 |
|
218 |
.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-not-found:after {
|
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 |
.acfe-col-2 .acfe-flexible-layout-thumbnail {
|
244 |
-
|
245 |
}
|
246 |
|
247 |
.acfe-col-3 .acfe-flexible-layout-thumbnail {
|
248 |
-
|
249 |
}
|
250 |
|
251 |
.acfe-col-5 .acfe-flexible-layout-thumbnail {
|
252 |
-
|
253 |
}
|
254 |
|
255 |
.acfe-col-6 .acfe-flexible-layout-thumbnail {
|
256 |
-
|
257 |
}
|
258 |
|
259 |
-
@media only screen and (max-width:
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
264 |
}
|
265 |
|
266 |
-
@media only screen and (max-width:
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
|
|
271 |
}
|
272 |
|
273 |
.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal {
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
}
|
279 |
|
280 |
.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal.acfe-flexible-layout-thumbnail-not-found:after {
|
281 |
-
|
282 |
}
|
283 |
|
284 |
.acf-field.acf-field-flexible-content[data-acfe-flexible-stylised-button="1"]>.acf-input>.acf-flexible-content:not(.empty)>.values {
|
285 |
-
|
286 |
}
|
287 |
|
288 |
-
.acf-field.acf-field-flexible-content
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
}
|
293 |
|
294 |
-
.acf-field.acf-field-flexible-content
|
295 |
-
|
296 |
}
|
297 |
|
298 |
-
.acf-field.acf-field-flexible-content
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
}
|
303 |
|
304 |
.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content>.no-value-message {
|
305 |
-
|
306 |
}
|
307 |
|
308 |
.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content.-empty>.values {
|
309 |
-
|
310 |
}
|
|
|
311 |
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons:before {
|
312 |
-
|
313 |
}
|
314 |
|
315 |
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons {
|
316 |
-
|
|
|
|
|
|
|
|
|
317 |
}
|
318 |
|
319 |
-
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic
|
320 |
-
|
321 |
-
visibility: visible;
|
322 |
}
|
323 |
|
324 |
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic:before {
|
325 |
-
|
326 |
}
|
327 |
|
328 |
.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-duplicate,
|
@@ -331,882 +340,940 @@ body:not(.acf-admin-5-3) .layout > .acfe-fc-placeholder > a span {
|
|
331 |
.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-duplicate,
|
332 |
.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-minus,
|
333 |
.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-plus {
|
334 |
-
|
335 |
}
|
336 |
|
337 |
-
.acf-flexible-content .layout.-hover
|
338 |
-
.acf-flexible-content .layout.-hover
|
339 |
-
.acf-flexible-content .layout.-hover
|
340 |
-
.acf-flexible-content .layout:hover
|
341 |
-
.acf-flexible-content .layout:hover
|
342 |
-
.acf-flexible-content .layout:hover
|
343 |
-
|
344 |
}
|
345 |
|
346 |
-
.acf-flexible-content .layout
|
347 |
-
|
348 |
-
|
349 |
}
|
350 |
|
351 |
-
.acf-flexible-content .layout
|
352 |
-
|
353 |
-
|
354 |
}
|
355 |
|
356 |
.acf-flexible-content[data-acfe-flexible-lock="1"] .layout .acf-fc-layout-handle {
|
357 |
-
|
358 |
}
|
359 |
|
360 |
.acf-field-acfe-flexible-layout-title {
|
361 |
-
|
362 |
}
|
363 |
|
364 |
input.acfe-flexible-control-title {
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
}
|
379 |
|
380 |
-
.layout
|
381 |
-
|
382 |
-
|
383 |
}
|
384 |
|
385 |
-
.layout:not(.acfe-flexible-title-edition)
|
386 |
-
|
387 |
}
|
388 |
|
389 |
-
.layout.acfe-flexible-title-edition
|
390 |
-
|
391 |
-
|
392 |
}
|
393 |
|
394 |
-
.layout.acfe-flexible-title-edition
|
395 |
-
|
396 |
}
|
397 |
|
398 |
-
.layout.acfe-flexible-layout-hidden
|
399 |
-
.layout.acfe-flexible-layout-hidden
|
400 |
-
.layout.acfe-flexible-layout-hidden
|
401 |
-
.layout.acfe-flexible-layout-hidden
|
402 |
-
|
403 |
-
opacity: .5;
|
404 |
}
|
|
|
405 |
.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-controls>a.-collapse {
|
406 |
-
|
407 |
}
|
|
|
408 |
body.-loading * {
|
409 |
-
|
410 |
}
|
411 |
|
412 |
.acf-field .acf-label label {
|
413 |
-
|
414 |
}
|
415 |
|
416 |
.acf-field p.description {
|
417 |
-
|
418 |
}
|
419 |
|
420 |
-
.acf-fields.-left
|
421 |
-
.acfe-postbox-left
|
422 |
-
|
423 |
}
|
424 |
|
425 |
-
.acf-field.acfe-no-label
|
426 |
-
|
427 |
}
|
428 |
|
429 |
-
.acf-field.acfe-no-label
|
430 |
-
|
431 |
}
|
432 |
|
433 |
-
.acf-field.acfe-no-label
|
434 |
-
|
435 |
}
|
436 |
|
437 |
.acfe-field-tooltip {
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
}
|
442 |
|
443 |
-
.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-input>p.description,
|
444 |
.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-label>p.description {
|
445 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
}
|
447 |
|
448 |
-
.acf-field
|
449 |
-
|
450 |
-
margin-bottom: 5px;
|
451 |
}
|
452 |
|
453 |
-
.acf-field-acfe-hidden
|
454 |
-
|
455 |
-
.acf-field p.description > .more {
|
456 |
-
display: none;
|
457 |
}
|
458 |
|
459 |
.acf-field-textarea[data-acfe-textarea-code="1"]>.acf-input>textarea {
|
460 |
-
|
461 |
-
|
|
|
|
|
|
|
|
|
462 |
}
|
463 |
|
464 |
-
.acf-field-acfe-code-editor
|
465 |
-
|
|
|
466 |
}
|
467 |
|
468 |
-
.acf-field-acfe-code-editor
|
469 |
-
|
470 |
-
border-radius: 4px;
|
471 |
}
|
472 |
|
473 |
-
.acf-field-acfe-code-editor
|
474 |
-
|
475 |
}
|
476 |
|
477 |
-
|
478 |
-
|
479 |
}
|
480 |
|
481 |
-
.acf-field-acfe-code-editor
|
482 |
-
|
483 |
}
|
484 |
|
485 |
-
.acf-field-acfe-code-editor
|
486 |
-
|
487 |
}
|
488 |
|
489 |
-
|
490 |
-
|
491 |
}
|
492 |
|
493 |
-
.acf-field-acfe-code-editor
|
494 |
-
|
495 |
}
|
496 |
|
497 |
.acf-accordion {
|
498 |
-
|
499 |
}
|
500 |
|
501 |
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,
|
502 |
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input {
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
}
|
507 |
|
508 |
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input,
|
509 |
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input {
|
510 |
-
|
511 |
}
|
512 |
|
513 |
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description,
|
514 |
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description {
|
515 |
-
|
516 |
}
|
517 |
|
518 |
-
.acf-fields
|
519 |
-
|
520 |
}
|
521 |
|
522 |
-
.acf-fields
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
}
|
527 |
|
528 |
-
.acf-fields
|
529 |
-
|
530 |
}
|
531 |
|
532 |
-
.acf-fields.-left
|
533 |
-
|
534 |
}
|
535 |
|
536 |
-
.acf-fields.-left
|
537 |
-
|
538 |
}
|
539 |
|
540 |
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,
|
541 |
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input {
|
542 |
-
|
543 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
}
|
545 |
|
546 |
-
.acf-fields.-left > .acf-field-group.acfe-field-group-layout-block.acfe-seamless-style > .acf-input > .acf-fields,
|
547 |
-
.acf-fields.-left > .acf-field-group.acfe-field-group-layout-table.acfe-seamless-style > .acf-input > .acf-table,
|
548 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
549 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
550 |
-
|
551 |
}
|
552 |
|
553 |
-
.acf-postbox.seamless
|
554 |
-
.acf-postbox.seamless
|
555 |
-
.acf-postbox.seamless
|
556 |
-
|
557 |
}
|
558 |
|
559 |
-
.acf-postbox.seamless
|
560 |
-
.acf-postbox.seamless
|
561 |
-
.acf-postbox.seamless
|
562 |
-
|
563 |
}
|
564 |
|
565 |
-
.acf-postbox.seamless
|
566 |
-
.acf-postbox.seamless
|
567 |
-
.acf-postbox.seamless
|
568 |
-
|
569 |
}
|
570 |
|
571 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-fields,
|
572 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-table {
|
573 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
}
|
575 |
|
576 |
-
tr.acf-field.acf-field-group.acfe-seamless-style
|
577 |
-
|
578 |
-
|
|
|
|
|
|
|
579 |
}
|
580 |
|
581 |
-
tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table
|
582 |
-
|
583 |
-
margin: -15px 0;
|
584 |
}
|
585 |
|
586 |
-
tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table > td.acf-input > .acf-table,
|
587 |
tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
588 |
tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
589 |
-
|
590 |
}
|
591 |
|
592 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,
|
593 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input {
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
}
|
598 |
|
599 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,
|
600 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input {
|
601 |
-
|
602 |
}
|
603 |
|
604 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description,
|
605 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description {
|
606 |
-
|
607 |
}
|
608 |
|
609 |
-
.acf-fields
|
610 |
-
|
611 |
}
|
612 |
|
613 |
-
.acf-fields
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
}
|
618 |
|
619 |
-
.acf-fields
|
620 |
-
|
621 |
}
|
622 |
|
623 |
-
.acf-fields.-left
|
624 |
-
|
625 |
}
|
626 |
|
627 |
-
.acf-fields.-left
|
628 |
-
|
629 |
}
|
630 |
|
631 |
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,
|
632 |
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input {
|
633 |
-
|
634 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
}
|
636 |
|
637 |
-
.acf-fields.-left > .acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style > .acf-input > .acf-fields,
|
638 |
-
.acf-fields.-left > .acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style > .acf-input > .acf-table,
|
639 |
.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
640 |
.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
}
|
643 |
|
644 |
-
.acf-postbox.seamless
|
645 |
-
.acf-postbox.seamless
|
646 |
-
.acf-postbox.seamless
|
647 |
-
|
648 |
}
|
649 |
|
650 |
-
.acf-postbox.seamless
|
651 |
-
.acf-postbox.seamless
|
652 |
-
.acf-postbox.seamless
|
653 |
-
|
654 |
}
|
655 |
|
656 |
-
.acf-
|
657 |
-
|
658 |
-
|
659 |
-
|
|
|
|
|
660 |
}
|
661 |
|
662 |
-
tr.acf-field.acf-field-clone.acfe-seamless-style
|
663 |
-
|
664 |
-
|
|
|
|
|
|
|
665 |
}
|
666 |
|
667 |
-
tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table
|
668 |
-
|
669 |
-
margin: -15px 0;
|
670 |
}
|
671 |
|
672 |
-
tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table > td.acf-input > .acf-table,
|
673 |
tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
674 |
tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
675 |
-
|
676 |
}
|
677 |
|
678 |
.acfe-modal-content .acf-color-picker .wp-picker-holder {
|
679 |
-
|
680 |
}
|
681 |
|
682 |
-
.acf-field-checkbox .acf-input .acf-checkbox-list.acf-bl li
|
683 |
-
|
684 |
-
|
685 |
}
|
686 |
|
687 |
-
.acf-field-radio .acf-input .acf-radio-list.acf-bl li > strong,
|
688 |
.acf-field-radio[data-acfe-labels] .acf-input .acf-radio-list.acf-hl li>strong {
|
689 |
-
|
|
|
|
|
|
|
|
|
690 |
}
|
691 |
|
692 |
-
.acf-field-radio .acf-input .acf-radio-list.acf-bl li
|
693 |
-
|
694 |
}
|
695 |
|
696 |
.acf-range-wrap input[type=number] {
|
697 |
-
|
698 |
}
|
699 |
|
700 |
.acf-link.-value .acfe-modal .button {
|
701 |
-
|
702 |
}
|
703 |
|
704 |
.acf-editor-wrap iframe {
|
705 |
-
|
706 |
}
|
707 |
|
708 |
-
.acf-editor-wrap .mce-top-part
|
709 |
-
|
710 |
-
|
711 |
}
|
712 |
|
713 |
.acf-editor-wrap div.mce-statusbar {
|
714 |
-
|
715 |
}
|
716 |
|
717 |
.acf-editor-wrap .mce-divider,
|
718 |
.acf-editor-wrap .mce-path-item {
|
719 |
-
|
|
|
|
|
|
|
|
|
720 |
}
|
721 |
|
722 |
-
form.acfe-form.is-invalid[data-hide-error="1"]>.acf-error-message.-dismiss,
|
723 |
form.acfe-form.is-valid[data-hide-revalidation="1"]>.acf-notice.-success {
|
724 |
-
|
725 |
}
|
726 |
|
727 |
form.acfe-form.is-invalid[data-errors-position=below] .acf-field .acf-notice {
|
728 |
-
|
729 |
}
|
730 |
|
731 |
-
.acf-fields
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
}
|
739 |
|
740 |
-
.acf-fields.-left
|
741 |
-
|
742 |
}
|
743 |
|
744 |
-
.acf-fields.-left
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
}
|
752 |
|
753 |
-
.acf-fields.-left
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
}
|
759 |
|
760 |
-
.acf-fields
|
761 |
-
|
762 |
}
|
763 |
|
764 |
.acf-fields>.acf-field.acf-field-acfe-column[data-endpoint="1"] {
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
}
|
769 |
|
770 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"] {
|
771 |
-
|
772 |
}
|
773 |
|
774 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"] {
|
775 |
-
|
776 |
}
|
777 |
|
778 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"] {
|
779 |
-
|
780 |
}
|
781 |
|
782 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"] {
|
783 |
-
|
784 |
}
|
785 |
|
786 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"] {
|
787 |
-
|
788 |
}
|
789 |
|
790 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"] {
|
791 |
-
|
792 |
}
|
793 |
|
794 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"] {
|
795 |
-
|
796 |
}
|
797 |
|
798 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"] {
|
799 |
-
|
800 |
}
|
801 |
|
802 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"] {
|
803 |
-
|
804 |
}
|
805 |
|
806 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"] {
|
807 |
-
|
808 |
}
|
809 |
|
810 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"] {
|
811 |
-
|
812 |
}
|
813 |
|
814 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"] {
|
815 |
-
width: 100%;
|
816 |
-
border-right: 0;
|
817 |
-
}
|
818 |
-
|
819 |
-
@media only screen and (max-width: 1024px) {
|
820 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],
|
821 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],
|
822 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],
|
823 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],
|
824 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],
|
825 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],
|
826 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],
|
827 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"],
|
828 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],
|
829 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"] {
|
830 |
-
width: 50%;
|
831 |
-
}
|
832 |
-
}
|
833 |
-
|
834 |
-
@media only screen and (max-width: 640px) {
|
835 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],
|
836 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],
|
837 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],
|
838 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],
|
839 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],
|
840 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"],
|
841 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],
|
842 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],
|
843 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"],
|
844 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],
|
845 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"],
|
846 |
-
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"] {
|
847 |
width: 100%;
|
848 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
849 |
}
|
850 |
|
851 |
.acf-media-modal .screen-reader-text,
|
852 |
.acf-media-modal .screen-reader-text span,
|
853 |
.acf-media-modal .ui-helper-hidden-accessible {
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
}
|
866 |
|
867 |
.acf-ui-datepicker .ui-datepicker {
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
}
|
875 |
|
876 |
.acf-ui-datepicker select {
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
}
|
893 |
|
894 |
.acf-ui-datepicker .ui-datepicker table {
|
895 |
-
|
896 |
-
|
|
|
897 |
}
|
898 |
|
899 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-header {
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
}
|
906 |
|
907 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-header .ui-state-hover {
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
}
|
913 |
|
914 |
.acf-ui-datepicker .ui-datepicker thead {
|
915 |
-
|
916 |
-
|
917 |
}
|
918 |
|
919 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-title {
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
}
|
925 |
|
926 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next,
|
927 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,
|
928 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev,
|
929 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover {
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
}
|
937 |
|
938 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,
|
939 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover {
|
940 |
-
|
941 |
-
|
942 |
}
|
943 |
|
944 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next {
|
945 |
-
|
946 |
}
|
947 |
|
948 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev {
|
949 |
-
|
950 |
}
|
951 |
|
952 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span,
|
953 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span {
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
}
|
963 |
|
964 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before,
|
965 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before {
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
}
|
984 |
|
985 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before {
|
986 |
-
|
987 |
}
|
988 |
|
989 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before {
|
990 |
-
|
991 |
}
|
992 |
|
993 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-title select {
|
994 |
-
|
995 |
}
|
996 |
|
997 |
.acf-ui-datepicker .ui-datepicker th {
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
}
|
1005 |
|
1006 |
.acf-ui-datepicker .ui-datepicker td {
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
}
|
1011 |
|
1012 |
.acf-ui-datepicker .ui-datepicker td .ui-state-default {
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
}
|
1021 |
|
1022 |
.acf-ui-datepicker .ui-datepicker td .ui-state-active,
|
1023 |
.acf-ui-datepicker .ui-datepicker td .ui-state-hover {
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
}
|
1029 |
|
1030 |
.acf-ui-datepicker .ui-datepicker td.ui-state-disabled,
|
1031 |
.acf-ui-datepicker .ui-datepicker td.ui-state-disabled .ui-state-default {
|
1032 |
-
|
1033 |
-
|
1034 |
}
|
1035 |
|
1036 |
.acf-ui-datepicker .ui-datepicker-today .ui-state-highlight {
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
}
|
1042 |
|
1043 |
.acf-ui-datepicker .ui-state-highlight.ui-state-active,
|
1044 |
.acf-ui-datepicker .ui-state-highlight.ui-state-hover {
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
}
|
1050 |
|
1051 |
.acf-ui-datepicker .ui-state-highlight.ui-state-hover.ui-state-active {
|
1052 |
-
|
1053 |
}
|
1054 |
|
1055 |
.acf-ui-datepicker .ui-timepicker-div {
|
1056 |
-
|
1057 |
}
|
1058 |
|
1059 |
.acf-ui-datepicker .ui-timepicker-div .ui-widget-header {
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
}
|
1064 |
|
1065 |
.acf-ui-datepicker .ui-timepicker-div .ui-widget-header .ui-datepicker-title {
|
1066 |
-
|
1067 |
-
|
1068 |
}
|
1069 |
|
1070 |
.acf-ui-datepicker .ui-timepicker-div dl {
|
1071 |
-
|
1072 |
-
|
1073 |
}
|
1074 |
|
1075 |
.acf-ui-datepicker .ui-timepicker-div .ui_tpicker_time_label {
|
1076 |
-
|
1077 |
}
|
1078 |
|
1079 |
.acf-ui-datepicker .ui-timepicker-div select {
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
}
|
1085 |
|
1086 |
.acf-ui-datepicker .ui-datepicker-buttonpane {
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
}
|
1094 |
|
1095 |
.acf-ui-datepicker .ui-datepicker-buttonpane:after {
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
}
|
1100 |
|
1101 |
.acf-ui-datepicker .ui-datepicker-buttonpane button {
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
|
|
|
|
1126 |
}
|
1127 |
|
1128 |
.acf-ui-datepicker .ui-datepicker-buttonpane button:hover {
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
}
|
1133 |
|
1134 |
.mce-toolbar .mce-btn-group:not(:first-child) {
|
1135 |
-
|
1136 |
-
|
1137 |
}
|
1138 |
|
1139 |
body .medium-editor-toolbar {
|
1140 |
-
|
1141 |
}
|
|
|
1142 |
.acf-field-repeater[data-acfe-repeater-lock="1"]>.acf-input>.acf-repeater>.acf-table>tbody>.acf-row>.acf-row-handle {
|
1143 |
-
|
1144 |
}
|
1145 |
|
1146 |
-
.acf-repeater.-block
|
1147 |
-
.acf-repeater.-row
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
}
|
1155 |
|
1156 |
-
.acf-repeater.-block
|
1157 |
-
.acf-repeater.-row
|
1158 |
-
|
1159 |
-
|
1160 |
}
|
1161 |
|
1162 |
-
.acf-repeater.-block
|
1163 |
-
.acf-repeater.-row
|
1164 |
-
|
1165 |
-
|
1166 |
}
|
1167 |
|
1168 |
-
.acf-repeater.-block
|
1169 |
-
.acf-repeater.-row
|
1170 |
-
|
1171 |
}
|
1172 |
|
1173 |
-
.acf-repeater.-block
|
1174 |
-
.acf-repeater.-row
|
1175 |
-
|
1176 |
}
|
1177 |
|
1178 |
-
body:not(.acf-admin-5-3) .acf-repeater.-block
|
1179 |
-
body:not(.acf-admin-5-3) .acf-repeater.-row
|
1180 |
-
|
1181 |
-
|
1182 |
}
|
1183 |
|
1184 |
-
body:not(.acf-admin-5-3) .acf-repeater.-block
|
1185 |
-
body:not(.acf-admin-5-3) .acf-repeater.-row
|
1186 |
-
|
1187 |
}
|
1188 |
|
1189 |
-
body:not(.acf-admin-5-3) .acf-repeater.-block
|
1190 |
-
body:not(.acf-admin-5-3) .acf-repeater.-row
|
1191 |
-
|
1192 |
}
|
1193 |
|
1194 |
-
.acf-repeater.-table.-empty
|
1195 |
-
|
1196 |
}
|
1197 |
|
1198 |
-
.acf-field-repeater
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
}
|
1203 |
|
1204 |
-
.acf-field-repeater
|
1205 |
-
|
1206 |
}
|
1207 |
|
1208 |
-
.acf-field-flexible-content
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
}
|
1 |
+
.acf-flexible-content>.values>.ui-sortable-placeholder {
|
2 |
+
border-width: 2px;
|
3 |
+
border-color: #ccc
|
4 |
}
|
5 |
|
6 |
.acf-flexible-content .layout .acf-fc-layout-handle {
|
7 |
+
color: #444;
|
8 |
+
font-weight: 600
|
9 |
}
|
10 |
|
11 |
+
.layout.acfe-flexible-modal-edit-error>.acf-fc-layout-handle {
|
12 |
+
color: #f33b28
|
13 |
}
|
14 |
|
15 |
+
.layout.acfe-flexible-modal-edit-error>.acf-fc-layout-handle>.acf-fc-layout-order {
|
16 |
+
background: #f33b28;
|
17 |
+
color: #fff
|
18 |
}
|
19 |
|
20 |
.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]:not([data-acfe-flexible-placeholder="1"]):not([data-acfe-flexible-preview="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle {
|
21 |
+
border-bottom-width: 0
|
22 |
}
|
23 |
|
24 |
.acf-field-flexible-content[data-acfe-flexible-placeholder="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle,
|
25 |
.acf-field-flexible-content[data-acfe-flexible-preview="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle {
|
26 |
+
border-bottom-width: 1px
|
27 |
+
}
|
28 |
+
|
29 |
+
.acf-field-flexible-content[data-acfe-flexible-lock="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle {
|
30 |
+
cursor: initial
|
31 |
}
|
32 |
|
|
|
33 |
.acf-field-flexible-content[data-acfe-flexible-remove-collapse="1"]:not([data-acfe-flexible-lock="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle {
|
34 |
+
cursor: initial
|
35 |
}
|
36 |
|
37 |
.acf-fc-popup.top.acfe-fc-popup-grey:before {
|
38 |
+
border-top-color: #e1e1e1
|
39 |
}
|
40 |
|
41 |
.acf-tooltip.bottom.acfe-fc-popup-grey:before {
|
42 |
+
border-bottom-color: #e1e1e1
|
43 |
}
|
44 |
|
45 |
.acf-fc-popup.acfe-fc-popup-grey {
|
46 |
+
background: #fcfcfc;
|
47 |
+
border-radius: 3px;
|
48 |
+
color: #444;
|
49 |
+
border: 1px solid #e1e1e1;
|
50 |
+
font-size: 13px
|
51 |
}
|
52 |
|
53 |
.acf-tooltip.top.acfe-fc-popup-grey {
|
54 |
+
margin-top: -16px
|
55 |
}
|
56 |
|
57 |
.acf-tooltip.bottom.acfe-fc-popup-grey {
|
58 |
+
margin-bottom: -16px
|
59 |
}
|
60 |
|
61 |
.acf-fc-popup.acfe-fc-popup-grey a {
|
62 |
+
color: #444
|
63 |
}
|
64 |
|
65 |
.acf-fc-popup.acfe-fc-popup-grey a:hover {
|
66 |
+
color: #fff
|
67 |
}
|
68 |
|
69 |
+
.layout>.acfe-fc-placeholder {
|
70 |
+
text-align: center;
|
71 |
+
background: #f9f9f9;
|
72 |
+
display: block;
|
73 |
+
text-decoration: none;
|
74 |
+
position: relative;
|
75 |
+
cursor: pointer
|
76 |
}
|
77 |
|
78 |
+
.layout>.acfe-fc-placeholder:focus {
|
79 |
+
border-color: #ccc;
|
80 |
+
-webkit-box-shadow: none;
|
81 |
+
box-shadow: none
|
82 |
}
|
83 |
|
84 |
+
.layout>.acfe-fc-placeholder>.acfe-flexible-placeholder {
|
85 |
+
height: 110px;
|
86 |
+
overflow: hidden;
|
87 |
+
text-align: initial
|
88 |
}
|
89 |
|
90 |
+
.layout>.acfe-fc-placeholder>a {
|
91 |
+
z-index: 2;
|
92 |
+
position: absolute;
|
93 |
+
top: 50%;
|
94 |
+
left: 50%;
|
95 |
+
-webkit-transform: translate(-50%, -50%);
|
96 |
+
-ms-transform: translate(-50%, -50%);
|
97 |
+
transform: translate(-50%, -50%);
|
98 |
+
border-color: #ccd0d4;
|
99 |
+
color: #23282d;
|
100 |
+
border-radius: 100px;
|
101 |
+
-webkit-box-shadow: none;
|
102 |
+
box-shadow: none;
|
103 |
+
background: #fff;
|
104 |
+
width: 30px;
|
105 |
+
min-height: 30px;
|
106 |
+
height: 30px;
|
107 |
+
padding: 0;
|
108 |
+
display: block
|
109 |
}
|
110 |
|
111 |
+
body:not(.acf-admin-5-3) .layout>.acfe-fc-placeholder>a {
|
112 |
+
border-color: #999
|
113 |
}
|
114 |
|
115 |
+
.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-flexible-content>.acf-input>.acf-flexible-content>.values>.layout>.acfe-fc-placeholder>a {
|
116 |
+
z-index: 0
|
117 |
}
|
118 |
|
119 |
+
.layout>.acfe-fc-placeholder>a:active {
|
120 |
+
-webkit-transform: translate(-50%, -50%);
|
121 |
+
-ms-transform: translate(-50%, -50%);
|
122 |
+
transform: translate(-50%, -50%)
|
123 |
}
|
124 |
|
125 |
+
.layout>.acfe-fc-placeholder>a:focus {
|
126 |
+
border-color: #ccc;
|
127 |
+
-webkit-box-shadow: none;
|
128 |
+
box-shadow: none
|
129 |
}
|
130 |
|
131 |
+
.layout>.acfe-fc-placeholder>a span {
|
132 |
+
width: 29px;
|
133 |
+
height: 30px;
|
134 |
+
vertical-align: top;
|
135 |
+
line-height: 28px;
|
136 |
+
font-size: 18px
|
137 |
}
|
138 |
|
139 |
+
body:not(.acf-admin-5-3) .layout>.acfe-fc-placeholder>a span {
|
140 |
+
width: 30px;
|
141 |
+
height: 30px
|
142 |
}
|
143 |
|
144 |
+
.layout>.acfe-fc-placeholder.acfe-fc-preview {
|
145 |
+
background: 0 0
|
146 |
}
|
147 |
|
148 |
+
.layout>.acfe-fc-placeholder.acfe-fc-preview>.acfe-flexible-placeholder {
|
149 |
+
min-height: 55px;
|
150 |
+
height: auto
|
151 |
}
|
152 |
|
153 |
+
.layout>.acfe-fc-placeholder.acfe-fc-preview>a {
|
154 |
+
display: none
|
155 |
}
|
156 |
|
157 |
+
.layout>.acfe-fc-placeholder.acfe-fc-preview:hover>a {
|
158 |
+
display: block
|
159 |
}
|
160 |
|
161 |
+
.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading {
|
162 |
+
background: #f9f9f9;
|
163 |
+
min-height: 110px
|
164 |
}
|
165 |
|
166 |
+
.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading>.acfe-flexible-placeholder>.spinner {
|
167 |
+
visibility: visible;
|
168 |
+
float: none;
|
169 |
+
position: absolute;
|
170 |
+
top: 50%;
|
171 |
+
left: 50%;
|
172 |
+
-webkit-transform: translate(-50%, -50%);
|
173 |
+
-ms-transform: translate(-50%, -50%);
|
174 |
+
transform: translate(-50%, -50%);
|
175 |
+
margin: 0;
|
176 |
+
z-index: 10000
|
177 |
}
|
178 |
|
179 |
+
.layout>.acfe-fc-placeholder .acfe-fc-overlay {
|
180 |
+
position: absolute;
|
181 |
+
width: 100%;
|
182 |
+
height: 100%;
|
183 |
+
padding: 0;
|
184 |
+
background-color: rgba(255, 255, 255, 0);
|
185 |
+
-webkit-transition: background-color .2s linear;
|
186 |
+
-o-transition: background-color .2s linear;
|
187 |
+
transition: background-color .2s linear
|
188 |
}
|
189 |
|
190 |
+
.layout>.acfe-fc-placeholder .acfe-fc-overlay.-hover,
|
191 |
+
.layout>.acfe-fc-placeholder:hover .acfe-fc-overlay {
|
192 |
+
background-color: rgba(255, 255, 255, .7);
|
193 |
+
z-index: 1
|
194 |
}
|
195 |
|
196 |
+
.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading>a span {
|
197 |
+
visibility: hidden
|
198 |
}
|
199 |
|
200 |
+
.layout>.acf-fields>.acfe-flexible-opened-actions,
|
201 |
+
.layout>.acf-table>.acfe-flexible-opened-actions {
|
202 |
+
background: #f9f9f9;
|
203 |
+
border-top: 1px solid #e1e1e1;
|
204 |
+
padding: 12px;
|
205 |
+
text-align: right;
|
206 |
+
clear: both
|
207 |
}
|
208 |
|
209 |
.acfe-flexible-layout-thumbnail {
|
210 |
+
display: block;
|
211 |
+
width: 100%;
|
212 |
+
height: 9.8vw;
|
213 |
+
background-color: #eee;
|
214 |
+
background-size: cover;
|
215 |
+
background-repeat: no-repeat;
|
216 |
+
background-position: center;
|
217 |
+
position: relative;
|
218 |
+
margin-bottom: 15px
|
219 |
}
|
220 |
|
221 |
.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-not-found:after {
|
222 |
+
content: "\f180";
|
223 |
+
font-family: dashicons;
|
224 |
+
display: inline-block;
|
225 |
+
line-height: 1;
|
226 |
+
font-weight: 400;
|
227 |
+
font-style: normal;
|
228 |
+
speak: none;
|
229 |
+
text-decoration: inherit;
|
230 |
+
text-transform: none;
|
231 |
+
text-rendering: auto;
|
232 |
+
-webkit-font-smoothing: antialiased;
|
233 |
+
-moz-osx-font-smoothing: grayscale;
|
234 |
+
vertical-align: top;
|
235 |
+
text-align: center;
|
236 |
+
position: absolute;
|
237 |
+
top: 50%;
|
238 |
+
left: 50%;
|
239 |
+
-webkit-transform: translate(-50%, -50%);
|
240 |
+
-ms-transform: translate(-50%, -50%);
|
241 |
+
transform: translate(-50%, -50%);
|
242 |
+
color: #ccc;
|
243 |
+
font-size: 110px
|
244 |
}
|
245 |
|
246 |
.acfe-col-2 .acfe-flexible-layout-thumbnail {
|
247 |
+
height: 20.5vw
|
248 |
}
|
249 |
|
250 |
.acfe-col-3 .acfe-flexible-layout-thumbnail {
|
251 |
+
height: 13.3vw
|
252 |
}
|
253 |
|
254 |
.acfe-col-5 .acfe-flexible-layout-thumbnail {
|
255 |
+
height: 7.65vw
|
256 |
}
|
257 |
|
258 |
.acfe-col-6 .acfe-flexible-layout-thumbnail {
|
259 |
+
height: 6.2vw
|
260 |
}
|
261 |
|
262 |
+
@media only screen and (max-width:960px) {
|
263 |
+
|
264 |
+
.acfe-flex-container .acfe-flexible-layout-thumbnail,
|
265 |
+
.acfe-flexible-layout-thumbnail {
|
266 |
+
height: 18.4vw
|
267 |
+
}
|
268 |
}
|
269 |
|
270 |
+
@media only screen and (max-width:720px) {
|
271 |
+
|
272 |
+
.acfe-flex-container .acfe-flexible-layout-thumbnail,
|
273 |
+
.acfe-flexible-layout-thumbnail {
|
274 |
+
height: 37.2vw
|
275 |
+
}
|
276 |
}
|
277 |
|
278 |
.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal {
|
279 |
+
display: block;
|
280 |
+
width: 230px;
|
281 |
+
height: 103px;
|
282 |
+
background-color: #1f2329
|
283 |
}
|
284 |
|
285 |
.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal.acfe-flexible-layout-thumbnail-not-found:after {
|
286 |
+
color: #2f353e
|
287 |
}
|
288 |
|
289 |
.acf-field.acf-field-flexible-content[data-acfe-flexible-stylised-button="1"]>.acf-input>.acf-flexible-content:not(.empty)>.values {
|
290 |
+
margin-bottom: 15px
|
291 |
}
|
292 |
|
293 |
+
.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content>.acfe-flexible-stylised-button {
|
294 |
+
padding: 40px 20px;
|
295 |
+
border: #ccc dashed 2px;
|
296 |
+
text-align: center
|
297 |
}
|
298 |
|
299 |
+
.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content>.acfe-flexible-stylised-button>.acf-actions {
|
300 |
+
text-align: center
|
301 |
}
|
302 |
|
303 |
+
.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content .acf-actions .acf-button .dashicons {
|
304 |
+
width: auto;
|
305 |
+
height: auto;
|
306 |
+
vertical-align: text-top
|
307 |
}
|
308 |
|
309 |
.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content>.no-value-message {
|
310 |
+
display: none
|
311 |
}
|
312 |
|
313 |
.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content.-empty>.values {
|
314 |
+
margin-bottom: 0
|
315 |
}
|
316 |
+
|
317 |
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons:before {
|
318 |
+
font-family: dashicons
|
319 |
}
|
320 |
|
321 |
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons {
|
322 |
+
visibility: hidden
|
323 |
+
}
|
324 |
+
|
325 |
+
.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.acfe-flexible-icon.dashicons {
|
326 |
+
visibility: visible
|
327 |
}
|
328 |
|
329 |
+
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic {
|
330 |
+
visibility: visible
|
|
|
331 |
}
|
332 |
|
333 |
.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic:before {
|
334 |
+
margin-left: 1px
|
335 |
}
|
336 |
|
337 |
.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-duplicate,
|
340 |
.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-duplicate,
|
341 |
.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-minus,
|
342 |
.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-plus {
|
343 |
+
visibility: hidden
|
344 |
}
|
345 |
|
346 |
+
.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-duplicate,
|
347 |
+
.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-minus,
|
348 |
+
.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-plus,
|
349 |
+
.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-duplicate,
|
350 |
+
.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-minus,
|
351 |
+
.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-plus {
|
352 |
+
visibility: visible
|
353 |
}
|
354 |
|
355 |
+
.acf-flexible-content .layout>.acf-fc-layout-controls .acf-icon.disabled {
|
356 |
+
color: #ccc;
|
357 |
+
cursor: initial
|
358 |
}
|
359 |
|
360 |
+
.acf-flexible-content .layout>.acf-fc-layout-controls .acf-icon.disabled:hover {
|
361 |
+
color: #ccc;
|
362 |
+
background: #f5f5f5
|
363 |
}
|
364 |
|
365 |
.acf-flexible-content[data-acfe-flexible-lock="1"] .layout .acf-fc-layout-handle {
|
366 |
+
cursor: initial
|
367 |
}
|
368 |
|
369 |
.acf-field-acfe-flexible-layout-title {
|
370 |
+
display: none
|
371 |
}
|
372 |
|
373 |
input.acfe-flexible-control-title {
|
374 |
+
border: none;
|
375 |
+
-webkit-box-shadow: none !important;
|
376 |
+
box-shadow: none !important;
|
377 |
+
outline: 0 !important;
|
378 |
+
border-radius: 0;
|
379 |
+
border-bottom: 1px solid transparent !important;
|
380 |
+
font-weight: 600;
|
381 |
+
width: auto !important;
|
382 |
+
padding: 0 !important;
|
383 |
+
display: none;
|
384 |
+
min-height: 20px;
|
385 |
+
vertical-align: unset;
|
386 |
+
background: 0 0
|
387 |
}
|
388 |
|
389 |
+
.layout>.acf-fc-layout-handle .acfe-layout-title {
|
390 |
+
cursor: text;
|
391 |
+
position: relative
|
392 |
}
|
393 |
|
394 |
+
.layout:not(.acfe-flexible-title-edition)>.acf-fc-layout-handle .acfe-layout-title:hover {
|
395 |
+
background: #f4f4f4
|
396 |
}
|
397 |
|
398 |
+
.layout.acfe-flexible-title-edition>.acf-fc-layout-handle .acfe-layout-title input.acfe-flexible-control-title {
|
399 |
+
display: inline-block;
|
400 |
+
border-bottom: 1px solid #ddd !important
|
401 |
}
|
402 |
|
403 |
+
.layout.acfe-flexible-title-edition>.acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text {
|
404 |
+
display: none
|
405 |
}
|
406 |
|
407 |
+
.layout.acfe-flexible-layout-hidden>.acf-fc-layout-controls,
|
408 |
+
.layout.acfe-flexible-layout-hidden>.acf-fc-layout-handle,
|
409 |
+
.layout.acfe-flexible-layout-hidden>.acf-fields,
|
410 |
+
.layout.acfe-flexible-layout-hidden>.acfe-fc-placeholder {
|
411 |
+
opacity: .5
|
|
|
412 |
}
|
413 |
+
|
414 |
.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-controls>a.-collapse {
|
415 |
+
display: none
|
416 |
}
|
417 |
+
|
418 |
body.-loading * {
|
419 |
+
cursor: wait !important
|
420 |
}
|
421 |
|
422 |
.acf-field .acf-label label {
|
423 |
+
font-weight: 600
|
424 |
}
|
425 |
|
426 |
.acf-field p.description {
|
427 |
+
word-break: break-word
|
428 |
}
|
429 |
|
430 |
+
.acf-fields.-left>.acf-field>.acf-label,
|
431 |
+
.acfe-postbox-left>.inside>.acf-field>.acf-label {
|
432 |
+
min-height: 1px
|
433 |
}
|
434 |
|
435 |
+
.acf-field.acfe-no-label>.acf-label {
|
436 |
+
margin: 0
|
437 |
}
|
438 |
|
439 |
+
.acf-field.acfe-no-label>.acf-label>label {
|
440 |
+
display: none
|
441 |
}
|
442 |
|
443 |
+
.acf-field.acfe-no-label>.acf-label>p.description {
|
444 |
+
margin-bottom: 10px
|
445 |
}
|
446 |
|
447 |
.acfe-field-tooltip {
|
448 |
+
float: right;
|
449 |
+
font-size: 16px;
|
450 |
+
color: #999
|
451 |
}
|
452 |
|
|
|
453 |
.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-label>p.description {
|
454 |
+
display: none
|
455 |
+
}
|
456 |
+
|
457 |
+
.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-input>p.description {
|
458 |
+
display: none
|
459 |
+
}
|
460 |
+
|
461 |
+
.acf-field .acf-input>p.description:first-child {
|
462 |
+
margin-top: 0;
|
463 |
+
margin-bottom: 5px
|
464 |
+
}
|
465 |
+
|
466 |
+
.acf-field[data-instruction-above-field]:not([data-instruction-placement])>.acf-label>p.description {
|
467 |
+
display: none
|
468 |
}
|
469 |
|
470 |
+
.acf-field p.description>.more {
|
471 |
+
display: none
|
|
|
472 |
}
|
473 |
|
474 |
+
.acf-field-acfe-hidden {
|
475 |
+
display: none
|
|
|
|
|
476 |
}
|
477 |
|
478 |
.acf-field-textarea[data-acfe-textarea-code="1"]>.acf-input>textarea {
|
479 |
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
480 |
+
font-size: 1em
|
481 |
+
}
|
482 |
+
|
483 |
+
.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap {
|
484 |
+
height: auto
|
485 |
}
|
486 |
|
487 |
+
.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default {
|
488 |
+
border: 1px solid #7e8993;
|
489 |
+
border-radius: 4px
|
490 |
}
|
491 |
|
492 |
+
.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-gutters {
|
493 |
+
border-right: 1px solid #7e8993
|
|
|
494 |
}
|
495 |
|
496 |
+
body:not(.acf-admin-5-3) .acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default {
|
497 |
+
border-color: #dfdfdf
|
498 |
}
|
499 |
|
500 |
+
.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-activeline-background {
|
501 |
+
background: #f9f9f9
|
502 |
}
|
503 |
|
504 |
+
.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-selected {
|
505 |
+
background: #f0f0f0 !important
|
506 |
}
|
507 |
|
508 |
+
.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-gutters {
|
509 |
+
background: #f9f9f9
|
510 |
}
|
511 |
|
512 |
+
body .CodeMirror-wrap pre {
|
513 |
+
word-break: break-all
|
514 |
}
|
515 |
|
516 |
+
.acf-field-acfe-code-editor>td.acf-input {
|
517 |
+
max-width: 1px
|
518 |
}
|
519 |
|
520 |
.acf-accordion {
|
521 |
+
z-index: initial
|
522 |
}
|
523 |
|
524 |
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,
|
525 |
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input {
|
526 |
+
margin-left: -12px;
|
527 |
+
margin-right: -12px;
|
528 |
+
margin-bottom: -15px
|
529 |
}
|
530 |
|
531 |
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input,
|
532 |
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input {
|
533 |
+
margin-top: -15px
|
534 |
}
|
535 |
|
536 |
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description,
|
537 |
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description {
|
538 |
+
margin-bottom: 15px
|
539 |
}
|
540 |
|
541 |
+
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label>.acf-input>.acf-fields {
|
542 |
+
border-width: 0
|
543 |
}
|
544 |
|
545 |
+
.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields {
|
546 |
+
border-left-width: 0;
|
547 |
+
border-right-width: 0;
|
548 |
+
border-bottom-width: 0
|
549 |
}
|
550 |
|
551 |
+
.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields {
|
552 |
+
border-width: 0
|
553 |
}
|
554 |
|
555 |
+
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input {
|
556 |
+
margin: 0
|
557 |
}
|
558 |
|
559 |
+
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields {
|
560 |
+
border-width: 1px
|
561 |
}
|
562 |
|
563 |
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,
|
564 |
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input {
|
565 |
+
padding: 0;
|
566 |
+
padding-left: 1px;
|
567 |
+
margin-top: -15px;
|
568 |
+
margin-bottom: -15px;
|
569 |
+
margin-left: 0;
|
570 |
+
margin-right: 0
|
571 |
+
}
|
572 |
+
|
573 |
+
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields,
|
574 |
+
.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input>.acf-table {
|
575 |
+
border-width: 0
|
576 |
}
|
577 |
|
|
|
|
|
578 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
579 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
580 |
+
border-width: 0
|
581 |
}
|
582 |
|
583 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input,
|
584 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input,
|
585 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-table {
|
586 |
+
margin: 0
|
587 |
}
|
588 |
|
589 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields,
|
590 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields,
|
591 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input>.acf-table {
|
592 |
+
border-width: 1px
|
593 |
}
|
594 |
|
595 |
+
.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input,
|
596 |
+
.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input,
|
597 |
+
.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input {
|
598 |
+
padding: 0 12px
|
599 |
}
|
600 |
|
601 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-fields,
|
602 |
.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-table {
|
603 |
+
display: none
|
604 |
+
}
|
605 |
+
|
606 |
+
tr.acf-field.acf-field-group.acfe-seamless-style>td.acf-input>.acf-fields {
|
607 |
+
border: 0;
|
608 |
+
margin-left: -10px;
|
609 |
+
margin-right: -10px;
|
610 |
+
margin-top: -15px;
|
611 |
+
margin-bottom: -15px
|
612 |
}
|
613 |
|
614 |
+
tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table>td.acf-input {
|
615 |
+
padding: 0;
|
616 |
+
margin-top: -15px;
|
617 |
+
margin-bottom: -15px;
|
618 |
+
margin-left: 0;
|
619 |
+
margin-right: 0
|
620 |
}
|
621 |
|
622 |
+
tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table>td.acf-input>.acf-table {
|
623 |
+
border-width: 0
|
|
|
624 |
}
|
625 |
|
|
|
626 |
tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
627 |
tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
628 |
+
border-width: 0
|
629 |
}
|
630 |
|
631 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,
|
632 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input {
|
633 |
+
margin-left: -12px;
|
634 |
+
margin-right: -12px;
|
635 |
+
margin-bottom: -15px
|
636 |
}
|
637 |
|
638 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,
|
639 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input {
|
640 |
+
margin-top: -15px
|
641 |
}
|
642 |
|
643 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description,
|
644 |
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description {
|
645 |
+
margin-bottom: 15px
|
646 |
}
|
647 |
|
648 |
+
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-no-label.acfe-seamless-style>.acf-input>.acf-fields {
|
649 |
+
border-width: 0
|
650 |
}
|
651 |
|
652 |
+
.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields {
|
653 |
+
border-left-width: 0;
|
654 |
+
border-right-width: 0;
|
655 |
+
border-bottom-width: 0
|
656 |
}
|
657 |
|
658 |
+
.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields {
|
659 |
+
border-width: 0
|
660 |
}
|
661 |
|
662 |
+
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input {
|
663 |
+
margin: 0
|
664 |
}
|
665 |
|
666 |
+
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields {
|
667 |
+
border-width: 1px
|
668 |
}
|
669 |
|
670 |
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,
|
671 |
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input {
|
672 |
+
padding: 0;
|
673 |
+
padding-left: 1px;
|
674 |
+
margin-top: -15px;
|
675 |
+
margin-bottom: -15px;
|
676 |
+
margin-left: 0;
|
677 |
+
margin-right: 0
|
678 |
+
}
|
679 |
+
|
680 |
+
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields,
|
681 |
+
.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input>.acf-table {
|
682 |
+
border-width: 0
|
683 |
}
|
684 |
|
|
|
|
|
685 |
.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
686 |
.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
687 |
+
border-width: 0
|
688 |
+
}
|
689 |
+
|
690 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input,
|
691 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input,
|
692 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-table {
|
693 |
+
margin: 0
|
694 |
}
|
695 |
|
696 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields,
|
697 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields,
|
698 |
+
.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input>.acf-table {
|
699 |
+
border-width: 1px
|
700 |
}
|
701 |
|
702 |
+
.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input,
|
703 |
+
.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input,
|
704 |
+
.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input {
|
705 |
+
padding: 0 12px
|
706 |
}
|
707 |
|
708 |
+
tr.acf-field.acf-field-clone.acfe-seamless-style>td.acf-input>.acf-fields {
|
709 |
+
border: 0;
|
710 |
+
margin-left: -10px;
|
711 |
+
margin-right: -10px;
|
712 |
+
margin-top: -15px;
|
713 |
+
margin-bottom: -15px
|
714 |
}
|
715 |
|
716 |
+
tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table>td.acf-input {
|
717 |
+
padding: 0;
|
718 |
+
margin-top: -15px;
|
719 |
+
margin-bottom: -15px;
|
720 |
+
margin-left: 0;
|
721 |
+
margin-right: 0
|
722 |
}
|
723 |
|
724 |
+
tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table>td.acf-input>.acf-table {
|
725 |
+
border-width: 0
|
|
|
726 |
}
|
727 |
|
|
|
728 |
tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
729 |
tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table {
|
730 |
+
border-width: 0
|
731 |
}
|
732 |
|
733 |
.acfe-modal-content .acf-color-picker .wp-picker-holder {
|
734 |
+
position: relative
|
735 |
}
|
736 |
|
737 |
+
.acf-field-checkbox .acf-input .acf-checkbox-list.acf-bl li+li>strong {
|
738 |
+
margin-top: 15px;
|
739 |
+
display: inline-block
|
740 |
}
|
741 |
|
|
|
742 |
.acf-field-radio[data-acfe-labels] .acf-input .acf-radio-list.acf-hl li>strong {
|
743 |
+
display: block
|
744 |
+
}
|
745 |
+
|
746 |
+
.acf-field-radio .acf-input .acf-radio-list.acf-bl li>strong {
|
747 |
+
display: block
|
748 |
}
|
749 |
|
750 |
+
.acf-field-radio .acf-input .acf-radio-list.acf-bl li+li>strong {
|
751 |
+
margin-top: 15px
|
752 |
}
|
753 |
|
754 |
.acf-range-wrap input[type=number] {
|
755 |
+
min-width: 3.5em
|
756 |
}
|
757 |
|
758 |
.acf-link.-value .acfe-modal .button {
|
759 |
+
display: inline-block
|
760 |
}
|
761 |
|
762 |
.acf-editor-wrap iframe {
|
763 |
+
min-height: 60px
|
764 |
}
|
765 |
|
766 |
+
.acf-editor-wrap .mce-top-part::before {
|
767 |
+
-webkit-box-shadow: none;
|
768 |
+
box-shadow: none
|
769 |
}
|
770 |
|
771 |
.acf-editor-wrap div.mce-statusbar {
|
772 |
+
border: 0
|
773 |
}
|
774 |
|
775 |
.acf-editor-wrap .mce-divider,
|
776 |
.acf-editor-wrap .mce-path-item {
|
777 |
+
color: #aaa
|
778 |
+
}
|
779 |
+
|
780 |
+
form.acfe-form.is-invalid[data-hide-error="1"]>.acf-error-message.-dismiss {
|
781 |
+
display: none
|
782 |
}
|
783 |
|
|
|
784 |
form.acfe-form.is-valid[data-hide-revalidation="1"]>.acf-notice.-success {
|
785 |
+
display: none
|
786 |
}
|
787 |
|
788 |
form.acfe-form.is-invalid[data-errors-position=below] .acf-field .acf-notice {
|
789 |
+
margin: 15px 0 0
|
790 |
}
|
791 |
|
792 |
+
.acf-fields>.acf-field.acf-field-acfe-column {
|
793 |
+
float: left;
|
794 |
+
clear: none;
|
795 |
+
-webkit-box-sizing: border-box;
|
796 |
+
box-sizing: border-box;
|
797 |
+
padding: 0;
|
798 |
+
border-top-width: 0
|
799 |
}
|
800 |
|
801 |
+
.acf-fields.-left>.acf-field.acf-field-acfe-column {
|
802 |
+
border-right: 1px solid #eee
|
803 |
}
|
804 |
|
805 |
+
.acf-fields.-left>.acf-field.acf-field-acfe-column:before {
|
806 |
+
content: "";
|
807 |
+
display: block;
|
808 |
+
position: initial;
|
809 |
+
background: 0 0;
|
810 |
+
border: 0;
|
811 |
+
width: auto
|
812 |
}
|
813 |
|
814 |
+
.acf-fields.-left>.acf-field.acf-field-acfe-column>.acf-input {
|
815 |
+
float: none;
|
816 |
+
width: auto;
|
817 |
+
margin: 0;
|
818 |
+
padding: 0
|
819 |
}
|
820 |
|
821 |
+
.acf-fields>.acf-field.acf-field-acfe-column>.acf-input>.acf-fields>.acf-field {
|
822 |
+
border-top-width: 0
|
823 |
}
|
824 |
|
825 |
.acf-fields>.acf-field.acf-field-acfe-column[data-endpoint="1"] {
|
826 |
+
clear: both;
|
827 |
+
border-top: 1px solid #eee;
|
828 |
+
width: 100%
|
829 |
}
|
830 |
|
831 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"] {
|
832 |
+
width: 8.333333%
|
833 |
}
|
834 |
|
835 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"] {
|
836 |
+
width: 16.66666%
|
837 |
}
|
838 |
|
839 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"] {
|
840 |
+
width: 25%
|
841 |
}
|
842 |
|
843 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"] {
|
844 |
+
width: 33.33333%
|
845 |
}
|
846 |
|
847 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"] {
|
848 |
+
width: 41.66667%
|
849 |
}
|
850 |
|
851 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"] {
|
852 |
+
width: 50%
|
853 |
}
|
854 |
|
855 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"] {
|
856 |
+
width: 58.33333%
|
857 |
}
|
858 |
|
859 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"] {
|
860 |
+
width: 66.66666%
|
861 |
}
|
862 |
|
863 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"] {
|
864 |
+
width: 75%
|
865 |
}
|
866 |
|
867 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"] {
|
868 |
+
width: 83.33333%
|
869 |
}
|
870 |
|
871 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"] {
|
872 |
+
width: 91.66667%
|
873 |
}
|
874 |
|
875 |
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"] {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
876 |
width: 100%;
|
877 |
+
border-right: 0
|
878 |
+
}
|
879 |
+
|
880 |
+
@media only screen and (max-width:1024px) {
|
881 |
+
|
882 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],
|
883 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],
|
884 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"],
|
885 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],
|
886 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],
|
887 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],
|
888 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],
|
889 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],
|
890 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],
|
891 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"] {
|
892 |
+
width: 50%
|
893 |
+
}
|
894 |
+
}
|
895 |
+
|
896 |
+
@media only screen and (max-width:640px) {
|
897 |
+
|
898 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],
|
899 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],
|
900 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"],
|
901 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"],
|
902 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],
|
903 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],
|
904 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],
|
905 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],
|
906 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"],
|
907 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],
|
908 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],
|
909 |
+
.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"] {
|
910 |
+
width: 100%
|
911 |
+
}
|
912 |
}
|
913 |
|
914 |
.acf-media-modal .screen-reader-text,
|
915 |
.acf-media-modal .screen-reader-text span,
|
916 |
.acf-media-modal .ui-helper-hidden-accessible {
|
917 |
+
border: 0;
|
918 |
+
clip: rect(1px, 1px, 1px, 1px);
|
919 |
+
-webkit-clip-path: inset(50%);
|
920 |
+
clip-path: inset(50%);
|
921 |
+
height: 1px;
|
922 |
+
margin: -1px;
|
923 |
+
overflow: hidden;
|
924 |
+
padding: 0;
|
925 |
+
position: absolute;
|
926 |
+
width: 1px;
|
927 |
+
word-wrap: normal !important
|
928 |
}
|
929 |
|
930 |
.acf-ui-datepicker .ui-datepicker {
|
931 |
+
padding: 0;
|
932 |
+
border-color: #7e8993 !important;
|
933 |
+
border-radius: 4px;
|
934 |
+
-webkit-box-sizing: border-box;
|
935 |
+
box-sizing: border-box;
|
936 |
+
background: #fff
|
937 |
}
|
938 |
|
939 |
.acf-ui-datepicker select {
|
940 |
+
font-size: 14px;
|
941 |
+
cursor: pointer;
|
942 |
+
vertical-align: middle;
|
943 |
+
line-height: 2;
|
944 |
+
color: #32373c;
|
945 |
+
border-color: #7e8993;
|
946 |
+
-webkit-box-shadow: none;
|
947 |
+
box-shadow: none;
|
948 |
+
border-radius: 3px;
|
949 |
+
padding: 0 24px 0 8px;
|
950 |
+
min-height: 30px;
|
951 |
+
max-width: 25rem;
|
952 |
+
-webkit-appearance: none;
|
953 |
+
background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55%;
|
954 |
+
background-size: 16px 16px
|
955 |
}
|
956 |
|
957 |
.acf-ui-datepicker .ui-datepicker table {
|
958 |
+
font-size: 13px;
|
959 |
+
margin: 0;
|
960 |
+
margin-bottom: 7px
|
961 |
}
|
962 |
|
963 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-header {
|
964 |
+
border: none;
|
965 |
+
background: #f9f9f9;
|
966 |
+
color: #222;
|
967 |
+
font-weight: 400;
|
968 |
+
border-radius: 4px 4px 0
|
969 |
}
|
970 |
|
971 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-header .ui-state-hover {
|
972 |
+
background: #f9f9f9;
|
973 |
+
cursor: pointer;
|
974 |
+
border-radius: 0;
|
975 |
+
border: 0
|
976 |
}
|
977 |
|
978 |
.acf-ui-datepicker .ui-datepicker thead {
|
979 |
+
background: #f9f9f9;
|
980 |
+
color: #222
|
981 |
}
|
982 |
|
983 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-title {
|
984 |
+
margin-top: .4em;
|
985 |
+
margin-bottom: .3em;
|
986 |
+
color: #222;
|
987 |
+
font-size: 14px
|
988 |
}
|
989 |
|
990 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next,
|
991 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,
|
992 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev,
|
993 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover {
|
994 |
+
height: 20px;
|
995 |
+
width: 20px;
|
996 |
+
border: none;
|
997 |
+
overflow: hidden;
|
998 |
+
margin-top: 15px;
|
999 |
+
top: 0
|
1000 |
}
|
1001 |
|
1002 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,
|
1003 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover {
|
1004 |
+
background: 0 0 !important;
|
1005 |
+
color: #007cba !important
|
1006 |
}
|
1007 |
|
1008 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next {
|
1009 |
+
right: 7px
|
1010 |
}
|
1011 |
|
1012 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev {
|
1013 |
+
left: 7px
|
1014 |
}
|
1015 |
|
1016 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span,
|
1017 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span {
|
1018 |
+
height: 20px;
|
1019 |
+
width: 20px;
|
1020 |
+
background: 0 0;
|
1021 |
+
position: relative;
|
1022 |
+
margin: 0;
|
1023 |
+
left: unset;
|
1024 |
+
top: unset;
|
1025 |
+
font-size: 1px
|
1026 |
}
|
1027 |
|
1028 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before,
|
1029 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before {
|
1030 |
+
display: block;
|
1031 |
+
font-family: dashicons;
|
1032 |
+
line-height: 1;
|
1033 |
+
font-weight: 400;
|
1034 |
+
text-indent: 0;
|
1035 |
+
font-style: normal;
|
1036 |
+
speak: none;
|
1037 |
+
text-decoration: inherit;
|
1038 |
+
text-transform: none;
|
1039 |
+
text-rendering: auto;
|
1040 |
+
-webkit-font-smoothing: antialiased;
|
1041 |
+
-moz-osx-font-smoothing: grayscale;
|
1042 |
+
width: 20px;
|
1043 |
+
height: 20px;
|
1044 |
+
font-size: 16px;
|
1045 |
+
vertical-align: top;
|
1046 |
+
text-align: center
|
1047 |
}
|
1048 |
|
1049 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before {
|
1050 |
+
content: "\f345"
|
1051 |
}
|
1052 |
|
1053 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before {
|
1054 |
+
content: "\f341"
|
1055 |
}
|
1056 |
|
1057 |
.acf-ui-datepicker .ui-datepicker .ui-datepicker-title select {
|
1058 |
+
margin: 0 3px
|
1059 |
}
|
1060 |
|
1061 |
.acf-ui-datepicker .ui-datepicker th {
|
1062 |
+
padding: .75em 0;
|
1063 |
+
color: #222;
|
1064 |
+
font-weight: 400;
|
1065 |
+
border: none;
|
1066 |
+
border-bottom: 1px solid #e1e1e1;
|
1067 |
+
background: #f9f9f9
|
1068 |
}
|
1069 |
|
1070 |
.acf-ui-datepicker .ui-datepicker td {
|
1071 |
+
background: #fff;
|
1072 |
+
border: none;
|
1073 |
+
padding: 0
|
1074 |
}
|
1075 |
|
1076 |
.acf-ui-datepicker .ui-datepicker td .ui-state-default {
|
1077 |
+
background: 0 0;
|
1078 |
+
border: none;
|
1079 |
+
text-align: center;
|
1080 |
+
padding: .5em;
|
1081 |
+
margin: 0;
|
1082 |
+
font-weight: 400;
|
1083 |
+
color: #333
|
1084 |
}
|
1085 |
|
1086 |
.acf-ui-datepicker .ui-datepicker td .ui-state-active,
|
1087 |
.acf-ui-datepicker .ui-datepicker td .ui-state-hover {
|
1088 |
+
background: #007cba;
|
1089 |
+
color: #fff;
|
1090 |
+
-webkit-box-shadow: none;
|
1091 |
+
box-shadow: none
|
1092 |
}
|
1093 |
|
1094 |
.acf-ui-datepicker .ui-datepicker td.ui-state-disabled,
|
1095 |
.acf-ui-datepicker .ui-datepicker td.ui-state-disabled .ui-state-default {
|
1096 |
+
opacity: 1;
|
1097 |
+
color: #999
|
1098 |
}
|
1099 |
|
1100 |
.acf-ui-datepicker .ui-datepicker-today .ui-state-highlight {
|
1101 |
+
border: none !important;
|
1102 |
+
background: #eee !important;
|
1103 |
+
font-weight: 400 !important;
|
1104 |
+
color: #222 !important
|
1105 |
}
|
1106 |
|
1107 |
.acf-ui-datepicker .ui-state-highlight.ui-state-active,
|
1108 |
.acf-ui-datepicker .ui-state-highlight.ui-state-hover {
|
1109 |
+
border: none !important;
|
1110 |
+
background: #007cba !important;
|
1111 |
+
font-weight: 400 !important;
|
1112 |
+
color: #fff !important
|
1113 |
}
|
1114 |
|
1115 |
.acf-ui-datepicker .ui-state-highlight.ui-state-hover.ui-state-active {
|
1116 |
+
background: #007cba !important
|
1117 |
}
|
1118 |
|
1119 |
.acf-ui-datepicker .ui-timepicker-div {
|
1120 |
+
padding: 10px 7px !important
|
1121 |
}
|
1122 |
|
1123 |
.acf-ui-datepicker .ui-timepicker-div .ui-widget-header {
|
1124 |
+
background: 0 0 !important;
|
1125 |
+
border: 0 !important;
|
1126 |
+
display: none !important
|
1127 |
}
|
1128 |
|
1129 |
.acf-ui-datepicker .ui-timepicker-div .ui-widget-header .ui-datepicker-title {
|
1130 |
+
font-size: 13px !important;
|
1131 |
+
font-weight: 600 !important
|
1132 |
}
|
1133 |
|
1134 |
.acf-ui-datepicker .ui-timepicker-div dl {
|
1135 |
+
margin: 0;
|
1136 |
+
text-align: center !important
|
1137 |
}
|
1138 |
|
1139 |
.acf-ui-datepicker .ui-timepicker-div .ui_tpicker_time_label {
|
1140 |
+
display: none !important
|
1141 |
}
|
1142 |
|
1143 |
.acf-ui-datepicker .ui-timepicker-div select {
|
1144 |
+
background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55% !important;
|
1145 |
+
background-size: 16px 16px !important;
|
1146 |
+
color: #32373c !important;
|
1147 |
+
border-color: #7e8993 !important
|
1148 |
}
|
1149 |
|
1150 |
.acf-ui-datepicker .ui-datepicker-buttonpane {
|
1151 |
+
border: 0 !important;
|
1152 |
+
padding: 7px !important;
|
1153 |
+
margin: 0 !important;
|
1154 |
+
background: #f9f9f9 !important;
|
1155 |
+
border-top: 1px solid #e1e1e1 !important;
|
1156 |
+
border-radius: 0 0 4px 4px !important
|
1157 |
}
|
1158 |
|
1159 |
.acf-ui-datepicker .ui-datepicker-buttonpane:after {
|
1160 |
+
content: '';
|
1161 |
+
display: block;
|
1162 |
+
clear: both
|
1163 |
}
|
1164 |
|
1165 |
.acf-ui-datepicker .ui-datepicker-buttonpane button {
|
1166 |
+
display: inline-block;
|
1167 |
+
text-decoration: none;
|
1168 |
+
font-size: 13px !important;
|
1169 |
+
line-height: 2.15384615;
|
1170 |
+
min-height: 30px;
|
1171 |
+
margin: 0 !important;
|
1172 |
+
padding: 0 10px !important;
|
1173 |
+
cursor: pointer !important;
|
1174 |
+
border-width: 1px !important;
|
1175 |
+
border-style: solid !important;
|
1176 |
+
-webkit-appearance: none;
|
1177 |
+
border-radius: 3px;
|
1178 |
+
font-weight: 400 !important;
|
1179 |
+
white-space: nowrap;
|
1180 |
+
-webkit-box-sizing: border-box;
|
1181 |
+
box-sizing: border-box;
|
1182 |
+
color: #0071a1 !important;
|
1183 |
+
border-color: #0071a1 !important;
|
1184 |
+
background: #f3f5f6 !important;
|
1185 |
+
vertical-align: top;
|
1186 |
+
-webkit-box-shadow: none !important;
|
1187 |
+
box-shadow: none !important;
|
1188 |
+
outline: 0 !important;
|
1189 |
+
opacity: unset !important;
|
1190 |
+
-webkit-filter: unset !important;
|
1191 |
+
filter: unset !important
|
1192 |
}
|
1193 |
|
1194 |
.acf-ui-datepicker .ui-datepicker-buttonpane button:hover {
|
1195 |
+
background: #f1f1f1 !important;
|
1196 |
+
border-color: #016087 !important;
|
1197 |
+
color: #016087 !important
|
1198 |
}
|
1199 |
|
1200 |
.mce-toolbar .mce-btn-group:not(:first-child) {
|
1201 |
+
margin-left: 6px;
|
1202 |
+
padding-left: 6px
|
1203 |
}
|
1204 |
|
1205 |
body .medium-editor-toolbar {
|
1206 |
+
z-index: 999999 !important
|
1207 |
}
|
1208 |
+
|
1209 |
.acf-field-repeater[data-acfe-repeater-lock="1"]>.acf-input>.acf-repeater>.acf-table>tbody>.acf-row>.acf-row-handle {
|
1210 |
+
cursor: initial
|
1211 |
}
|
1212 |
|
1213 |
+
.acf-repeater.-block>table,
|
1214 |
+
.acf-repeater.-row>table {
|
1215 |
+
border-collapse: separate;
|
1216 |
+
border-spacing: 0 15px;
|
1217 |
+
background: 0 0;
|
1218 |
+
border: 0;
|
1219 |
+
margin-top: -15px;
|
1220 |
+
margin-bottom: -7px
|
1221 |
}
|
1222 |
|
1223 |
+
.acf-repeater.-block>table>*,
|
1224 |
+
.acf-repeater.-row>table>* {
|
1225 |
+
border-collapse: collapse;
|
1226 |
+
border-spacing: 0
|
1227 |
}
|
1228 |
|
1229 |
+
.acf-repeater.-block>table>tbody>tr>td,
|
1230 |
+
.acf-repeater.-row>table>tbody>tr>td {
|
1231 |
+
border-top: 1px solid #ccd0d4 !important;
|
1232 |
+
border-bottom: 1px solid #ccd0d4 !important
|
1233 |
}
|
1234 |
|
1235 |
+
.acf-repeater.-block>table>tbody>tr>td:first-of-type,
|
1236 |
+
.acf-repeater.-row>table>tbody>tr>td:first-of-type {
|
1237 |
+
border-left: 1px solid #ccd0d4 !important
|
1238 |
}
|
1239 |
|
1240 |
+
.acf-repeater.-block>table>tbody>tr>td:last-of-type,
|
1241 |
+
.acf-repeater.-row>table>tbody>tr>td:last-of-type {
|
1242 |
+
border-right: 1px solid #ccd0d4 !important
|
1243 |
}
|
1244 |
|
1245 |
+
body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td,
|
1246 |
+
body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td {
|
1247 |
+
border-top: 1px solid #e1e1e1;
|
1248 |
+
border-bottom: 1px solid #e1e1e1
|
1249 |
}
|
1250 |
|
1251 |
+
body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:first-of-type,
|
1252 |
+
body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:first-of-type {
|
1253 |
+
border-left: 1px solid #e1e1e1
|
1254 |
}
|
1255 |
|
1256 |
+
body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:last-of-type,
|
1257 |
+
body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:last-of-type {
|
1258 |
+
border-right: 1px solid #e1e1e1
|
1259 |
}
|
1260 |
|
1261 |
+
.acf-repeater.-table.-empty>.acf-table {
|
1262 |
+
display: none
|
1263 |
}
|
1264 |
|
1265 |
+
.acf-field-repeater>.acf-input>.acf-repeater>.acfe-repeater-stylised-button {
|
1266 |
+
padding: 40px 20px;
|
1267 |
+
border: #ccc dashed 2px;
|
1268 |
+
text-align: center
|
1269 |
}
|
1270 |
|
1271 |
+
.acf-field-repeater>.acf-input>.acf-repeater>.acfe-repeater-stylised-button>.acf-actions {
|
1272 |
+
text-align: center
|
1273 |
}
|
1274 |
|
1275 |
+
.acf-field-flexible-content>.acf-input>.acf-repeater .acf-actions .acf-button .dashicons {
|
1276 |
+
width: auto;
|
1277 |
+
height: auto;
|
1278 |
+
vertical-align: text-top
|
1279 |
}
|
@@ -1 +1 @@
|
|
1 |
-
.acf-flexible-content>.values>.ui-sortable-placeholder{border-width:2px;border-color:#ccc}.acf-flexible-content .layout .acf-fc-layout-handle{color:#444;font-weight:600}.layout.acfe-flexible-modal-edit-error>.acf-fc-layout-handle{color:#f33b28}.layout.acfe-flexible-modal-edit-error>.acf-fc-layout-handle>.acf-fc-layout-order{background:#f33b28;color:#fff}.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]:not([data-acfe-flexible-placeholder="1"]):not([data-acfe-flexible-preview="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle{border-bottom-width:0}.acf-field-flexible-content[data-acfe-flexible-placeholder="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle,.acf-field-flexible-content[data-acfe-flexible-preview="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle{border-bottom-width:1px}.acf-field-flexible-content[data-acfe-flexible-lock="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle,.acf-field-flexible-content[data-acfe-flexible-remove-collapse="1"]:not([data-acfe-flexible-lock="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle{cursor:auto}.acf-fc-popup.top.acfe-fc-popup-grey:before{border-top-color:#e1e1e1}.acf-tooltip.bottom.acfe-fc-popup-grey:before{border-bottom-color:#e1e1e1}.acf-fc-popup.acfe-fc-popup-grey{background:#fcfcfc;border-radius:3px;color:#444;border:1px solid #e1e1e1;font-size:13px}.acf-tooltip.top.acfe-fc-popup-grey{margin-top:-16px}.acf-tooltip.bottom.acfe-fc-popup-grey{margin-bottom:-16px}.acf-fc-popup.acfe-fc-popup-grey a{color:#444}.acf-fc-popup.acfe-fc-popup-grey a:hover{color:#fff}.layout>.acfe-fc-placeholder{text-align:center;background:#f9f9f9;display:block;text-decoration:none;position:relative;cursor:pointer}.layout>.acfe-fc-placeholder:focus{border-color:#ccc;-webkit-box-shadow:none;box-shadow:none}.layout>.acfe-fc-placeholder>.acfe-flexible-placeholder{height:110px;overflow:hidden;text-align:initial}.layout>.acfe-fc-placeholder>a{z-index:2;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-color:#ccd0d4;color:#23282d;border-radius:100px;-webkit-box-shadow:none;box-shadow:none;background:#fff;width:30px;min-height:30px;height:30px;padding:0;display:block}body:not(.acf-admin-5-3) .layout>.acfe-fc-placeholder>a{border-color:#999}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-flexible-content>.acf-input>.acf-flexible-content>.values>.layout>.acfe-fc-placeholder>a{z-index:0}.layout>.acfe-fc-placeholder>a:active{-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.layout>.acfe-fc-placeholder>a:focus{border-color:#ccc;-webkit-box-shadow:none;box-shadow:none}.layout>.acfe-fc-placeholder>a span{width:29px;height:30px;vertical-align:top;line-height:28px;font-size:18px}body:not(.acf-admin-5-3) .layout>.acfe-fc-placeholder>a span{width:30px;height:30px}.layout>.acfe-fc-placeholder.acfe-fc-preview{background:none}.layout>.acfe-fc-placeholder.acfe-fc-preview>.acfe-flexible-placeholder{min-height:55px;height:auto}.layout>.acfe-fc-placeholder.acfe-fc-preview>a{display:none}.layout>.acfe-fc-placeholder.acfe-fc-preview:hover>a{display:block}.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading{background:#f9f9f9;min-height:110px}.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading>.acfe-flexible-placeholder>.spinner{visibility:visible;float:none;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);margin:0;z-index:10000}.layout>.acfe-fc-placeholder .acfe-fc-overlay{position:absolute;width:100%;height:100%;padding:0;background-color:hsla(0,0%,100%,0);-webkit-transition:background-color .2s linear;-o-transition:background-color .2s linear;transition:background-color .2s linear}.layout>.acfe-fc-placeholder .acfe-fc-overlay.-hover,.layout>.acfe-fc-placeholder:hover .acfe-fc-overlay{background-color:hsla(0,0%,100%,.7);z-index:1}.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading>a span{visibility:hidden}.layout>.acf-fields>.acfe-flexible-opened-actions,.layout>.acf-table>.acfe-flexible-opened-actions{background:#f9f9f9;border-top:1px solid #e1e1e1;padding:12px;text-align:right;clear:both}.acfe-flexible-layout-thumbnail{display:block;width:100%;height:9.8vw;background-color:#eee;background-size:cover;background-repeat:no-repeat;background-position:50%;position:relative;margin-bottom:15px}.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-not-found:after{content:"\f180";font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;text-align:center;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#ccc;font-size:110px}.acfe-col-2 .acfe-flexible-layout-thumbnail{height:20.5vw}.acfe-col-3 .acfe-flexible-layout-thumbnail{height:13.3vw}.acfe-col-5 .acfe-flexible-layout-thumbnail{height:7.65vw}.acfe-col-6 .acfe-flexible-layout-thumbnail{height:6.2vw}@media only screen and (max-width:960px){.acfe-flex-container .acfe-flexible-layout-thumbnail,.acfe-flexible-layout-thumbnail{height:18.4vw}}@media only screen and (max-width:720px){.acfe-flex-container .acfe-flexible-layout-thumbnail,.acfe-flexible-layout-thumbnail{height:37.2vw}}.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal{display:block;width:230px;height:103px;background-color:#1f2329}.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal.acfe-flexible-layout-thumbnail-not-found:after{color:#2f353e}.acf-field.acf-field-flexible-content[data-acfe-flexible-stylised-button="1"]>.acf-input>.acf-flexible-content:not(.empty)>.values{margin-bottom:15px}.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content>.acfe-flexible-stylised-button{padding:40px 20px;border:2px dashed #ccc;text-align:center}.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content>.acfe-flexible-stylised-button>.acf-actions{text-align:center}.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content .acf-actions .acf-button .dashicons{width:auto;height:auto;vertical-align:text-top}.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content>.no-value-message{display:none}.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content.-empty>.values{margin-bottom:0}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons:before{font-family:dashicons}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons{visibility:hidden}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.acfe-flexible-icon.dashicons{visibility:visible}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic:before{margin-left:1px}.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-plus,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-plus{visibility:hidden}.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-plus,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-plus{visibility:visible}.acf-flexible-content .layout>.acf-fc-layout-controls .acf-icon.disabled{color:#ccc;cursor:auto}.acf-flexible-content .layout>.acf-fc-layout-controls .acf-icon.disabled:hover{color:#ccc;background:#f5f5f5}.acf-flexible-content[data-acfe-flexible-lock="1"] .layout .acf-fc-layout-handle{cursor:auto}.acf-field-acfe-flexible-layout-title{display:none}input.acfe-flexible-control-title{border:none;-webkit-box-shadow:none!important;box-shadow:none!important;outline:none!important;border-radius:0;border-bottom:1px solid transparent!important;font-weight:600;width:auto!important;padding:0!important;display:none;min-height:20px;vertical-align:unset;background:none}.layout>.acf-fc-layout-handle .acfe-layout-title{cursor:text;position:relative}.layout:not(.acfe-flexible-title-edition)>.acf-fc-layout-handle .acfe-layout-title:hover{background:#f4f4f4}.layout.acfe-flexible-title-edition>.acf-fc-layout-handle .acfe-layout-title input.acfe-flexible-control-title{display:inline-block;border-bottom:1px solid #ddd!important}.layout.acfe-flexible-title-edition>.acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text{display:none}.layout.acfe-flexible-layout-hidden>.acf-fc-layout-controls,.layout.acfe-flexible-layout-hidden>.acf-fc-layout-handle,.layout.acfe-flexible-layout-hidden>.acf-fields,.layout.acfe-flexible-layout-hidden>.acfe-fc-placeholder{filter:alpha(opacity=50);opacity:.5}.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-controls>a.-collapse{display:none}body.-loading *{cursor:wait!important}.acf-field .acf-label label{font-weight:600}.acf-field p.description{word-break:break-word}.acf-fields.-left>.acf-field>.acf-label,.acfe-postbox-left>.inside>.acf-field>.acf-label{min-height:1px}.acf-field.acfe-no-label>.acf-label{margin:0}.acf-field.acfe-no-label>.acf-label>label{display:none}.acf-field.acfe-no-label>.acf-label>p.description{margin-bottom:10px}.acfe-field-tooltip{float:right;font-size:16px;color:#999}.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-input>p.description,.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-label>p.description{display:none}.acf-field .acf-input>p.description:first-child{margin-top:0;margin-bottom:5px}.acf-field-acfe-hidden,.acf-field[data-instruction-above-field]:not([data-instruction-placement])>.acf-label>p.description,.acf-field p.description>.more{display:none}.acf-field-textarea[data-acfe-textarea-code="1"]>.acf-input>textarea{font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:1em}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap{height:auto}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default{border:1px solid #7e8993;border-radius:4px}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-gutters{border-right:1px solid #7e8993}body:not(.acf-admin-5-3) .acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default{border-color:#dfdfdf}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-activeline-background{background:#f9f9f9}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-selected{background:#f0f0f0!important}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-gutters{background:#f9f9f9}.acf-field-acfe-code-editor>td.acf-input{max-width:1px}.acf-accordion{z-index:auto}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input{margin-left:-12px;margin-right:-12px;margin-bottom:-15px}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input,.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input{margin-top:-15px}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description,.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description{margin-bottom:15px}.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label>.acf-input>.acf-fields{border-width:0}.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-left-width:0;border-right-width:0;border-bottom-width:0}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields{border-width:0}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input{margin:0}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-width:1px}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input{padding:0 0 0 1px;margin:-15px 0}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input>.acf-table,.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-table{margin:0}.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input>.acf-table{border-width:1px}.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input{padding:0 12px}.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-fields,.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-table{display:none}tr.acf-field.acf-field-group.acfe-seamless-style>td.acf-input>.acf-fields{border:0;margin:-15px -10px}tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table>td.acf-input{padding:0;margin:-15px 0}tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table>td.acf-input>.acf-table,tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input{margin-left:-12px;margin-right:-12px;margin-bottom:-15px}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input{margin-top:-15px}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description,.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description{margin-bottom:15px}.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-no-label.acfe-seamless-style>.acf-input>.acf-fields{border-width:0}.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-left-width:0;border-right-width:0;border-bottom-width:0}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields{border-width:0}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input{margin:0}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-width:1px}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input{padding:0 0 0 1px;margin:-15px 0}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input>.acf-table,.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-table{margin:0}.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input>.acf-table{border-width:1px}.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input{padding:0 12px}tr.acf-field.acf-field-clone.acfe-seamless-style>td.acf-input>.acf-fields{border:0;margin:-15px -10px}tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table>td.acf-input{padding:0;margin:-15px 0}tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table>td.acf-input>.acf-table,tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acfe-modal-content .acf-color-picker .wp-picker-holder{position:relative}.acf-field-checkbox .acf-input .acf-checkbox-list.acf-bl li+li>strong{margin-top:15px;display:inline-block}.acf-field-radio .acf-input .acf-radio-list.acf-bl li>strong,.acf-field-radio[data-acfe-labels] .acf-input .acf-radio-list.acf-hl li>strong{display:block}.acf-field-radio .acf-input .acf-radio-list.acf-bl li+li>strong{margin-top:15px}.acf-range-wrap input[type=number]{min-width:3.5em}.acf-link.-value .acfe-modal .button{display:inline-block}.acf-editor-wrap iframe{min-height:60px}.acf-editor-wrap .mce-top-part:before{-webkit-box-shadow:none;box-shadow:none}.acf-editor-wrap div.mce-statusbar{border:0}.acf-editor-wrap .mce-divider,.acf-editor-wrap .mce-path-item{color:#aaa}form.acfe-form.is-invalid[data-hide-error="1"]>.acf-error-message.-dismiss,form.acfe-form.is-valid[data-hide-revalidation="1"]>.acf-notice.-success{display:none}form.acfe-form.is-invalid[data-errors-position=below] .acf-field .acf-notice{margin:15px 0 0}.acf-fields>.acf-field.acf-field-acfe-column{float:left;clear:none;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0;border-top-width:0}.acf-fields.-left>.acf-field.acf-field-acfe-column{border-right:1px solid #eee}.acf-fields.-left>.acf-field.acf-field-acfe-column:before{content:"";display:block;position:static;background:none;border:0;width:auto}.acf-fields.-left>.acf-field.acf-field-acfe-column>.acf-input{float:none;width:auto;margin:0;padding:0}.acf-fields>.acf-field.acf-field-acfe-column>.acf-input>.acf-fields>.acf-field{border-top-width:0}.acf-fields>.acf-field.acf-field-acfe-column[data-endpoint="1"]{clear:both;border-top:1px solid #eee;width:100%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"]{width:8.333333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"]{width:16.66666%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"]{width:25%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"]{width:33.33333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"]{width:41.66667%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"]{width:50%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"]{width:58.33333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"]{width:66.66666%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"]{width:75%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"]{width:83.33333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"]{width:91.66667%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"]{width:100%;border-right:0}@media only screen and (max-width:1024px){.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"]{width:50%}}@media only screen and (max-width:640px){.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"]{width:100%}}.acf-media-modal .screen-reader-text,.acf-media-modal .screen-reader-text span,.acf-media-modal .ui-helper-hidden-accessible{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.acf-ui-datepicker .ui-datepicker{padding:0;border-color:#7e8993!important;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fff}.acf-ui-datepicker select{font-size:14px;cursor:pointer;vertical-align:middle;line-height:2;color:#32373c;border-color:#7e8993;-webkit-box-shadow:none;box-shadow:none;border-radius:3px;padding:0 24px 0 8px;min-height:30px;max-width:25rem;-webkit-appearance:none;background:#fff url("data:image/svg+xml;charset=US-ASCII, %3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:16px 16px}.acf-ui-datepicker .ui-datepicker table{font-size:13px;margin:0 0 7px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-header{border:none;background:#f9f9f9;color:#222;font-weight:400;border-radius:4px 4px 0}.acf-ui-datepicker .ui-datepicker .ui-datepicker-header .ui-state-hover{background:#f9f9f9;cursor:pointer;border-radius:0;border:0}.acf-ui-datepicker .ui-datepicker thead{background:#f9f9f9;color:#222}.acf-ui-datepicker .ui-datepicker .ui-datepicker-title{margin-top:.4em;margin-bottom:.3em;color:#222;font-size:14px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next,.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover{height:20px;width:20px;border:none;overflow:hidden;margin-top:15px;top:0}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover{background:none!important;color:#007cba!important}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next{right:7px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev{left:7px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span{height:20px;width:20px;background:none;position:relative;margin:0;left:unset;top:unset;font-size:1px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before{display:block;font-family:dashicons;line-height:1;font-weight:400;text-indent:0;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px;height:20px;font-size:16px;vertical-align:top;text-align:center}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before{content:"\f345"}.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before{content:"\f341"}.acf-ui-datepicker .ui-datepicker .ui-datepicker-title select{margin:0 3px}.acf-ui-datepicker .ui-datepicker th{padding:.75em 0;color:#222;font-weight:400;border:none;border-bottom:1px solid #e1e1e1;background:#f9f9f9}.acf-ui-datepicker .ui-datepicker td{background:#fff;border:none;padding:0}.acf-ui-datepicker .ui-datepicker td .ui-state-default{background:transparent;border:none;text-align:center;padding:.5em;margin:0;font-weight:400;color:#333}.acf-ui-datepicker .ui-datepicker td .ui-state-active,.acf-ui-datepicker .ui-datepicker td .ui-state-hover{background:#007cba;color:#fff;-webkit-box-shadow:none;box-shadow:none}.acf-ui-datepicker .ui-datepicker td.ui-state-disabled,.acf-ui-datepicker .ui-datepicker td.ui-state-disabled .ui-state-default{opacity:1;color:#999}.acf-ui-datepicker .ui-datepicker-today .ui-state-highlight{border:none!important;background:#eee!important;font-weight:400!important;color:#222!important}.acf-ui-datepicker .ui-state-highlight.ui-state-active,.acf-ui-datepicker .ui-state-highlight.ui-state-hover{border:none!important;background:#007cba!important;font-weight:400!important;color:#fff!important}.acf-ui-datepicker .ui-state-highlight.ui-state-hover.ui-state-active{background:#007cba!important}.acf-ui-datepicker .ui-timepicker-div{padding:10px 7px!important}.acf-ui-datepicker .ui-timepicker-div .ui-widget-header{background:none!important;border:0!important;display:none!important}.acf-ui-datepicker .ui-timepicker-div .ui-widget-header .ui-datepicker-title{font-size:13px!important;font-weight:600!important}.acf-ui-datepicker .ui-timepicker-div dl{margin:0;text-align:center!important}.acf-ui-datepicker .ui-timepicker-div .ui_tpicker_time_label{display:none!important}.acf-ui-datepicker .ui-timepicker-div select{background:#fff url("data:image/svg+xml;charset=US-ASCII, %3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%!important;background-size:16px 16px!important;color:#32373c!important;border-color:#7e8993!important}.acf-ui-datepicker .ui-datepicker-buttonpane{border:0!important;padding:7px!important;margin:0!important;background:#f9f9f9!important;border-top:1px solid #e1e1e1!important;border-radius:0 0 4px 4px!important}.acf-ui-datepicker .ui-datepicker-buttonpane:after{content:"";display:block;clear:both}.acf-ui-datepicker .ui-datepicker-buttonpane button{display:inline-block;text-decoration:none;font-size:13px!important;line-height:2.15384615;min-height:30px;margin:0!important;padding:0 10px!important;cursor:pointer!important;-webkit-appearance:none;border-radius:3px;font-weight:400!important;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;color:#0071a1!important;border:1px solid #0071a1!important;background:#f3f5f6!important;vertical-align:top;-webkit-box-shadow:none!important;box-shadow:none!important;outline:none!important;opacity:unset!important;-webkit-filter:unset!important;filter:unset!important}.acf-ui-datepicker .ui-datepicker-buttonpane button:hover{background:#f1f1f1!important;border-color:#016087!important;color:#016087!important}.mce-toolbar .mce-btn-group:not(:first-child){margin-left:6px;padding-left:6px}body .medium-editor-toolbar{z-index:999999!important}.acf-field-repeater[data-acfe-repeater-lock="1"]>.acf-input>.acf-repeater>.acf-table>tbody>.acf-row>.acf-row-handle{cursor:auto}.acf-repeater.-block>table,.acf-repeater.-row>table{border-collapse:separate;border-spacing:0 15px;background:none;border:0;margin-top:-15px;margin-bottom:-7px}.acf-repeater.-block>table>*,.acf-repeater.-row>table>*{border-collapse:collapse;border-spacing:0}.acf-repeater.-block>table>tbody>tr>td,.acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #ccd0d4!important;border-bottom:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:first-of-type,.acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:last-of-type,.acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #ccd0d4!important}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #e1e1e1;border-bottom:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:first-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:last-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #e1e1e1}.acf-repeater.-table.-empty>.acf-table{display:none}.acf-field-repeater>.acf-input>.acf-repeater>.acfe-repeater-stylised-button{padding:40px 20px;border:2px dashed #ccc;text-align:center}.acf-field-repeater>.acf-input>.acf-repeater>.acfe-repeater-stylised-button>.acf-actions{text-align:center}.acf-field-flexible-content>.acf-input>.acf-repeater .acf-actions .acf-button .dashicons{width:auto;height:auto;vertical-align:text-top}
|
1 |
+
.acf-flexible-content>.values>.ui-sortable-placeholder{border-width:2px;border-color:#ccc}.acf-flexible-content .layout .acf-fc-layout-handle{color:#444;font-weight:600}.layout.acfe-flexible-modal-edit-error>.acf-fc-layout-handle{color:#f33b28}.layout.acfe-flexible-modal-edit-error>.acf-fc-layout-handle>.acf-fc-layout-order{background:#f33b28;color:#fff}.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]:not([data-acfe-flexible-placeholder="1"]):not([data-acfe-flexible-preview="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle{border-bottom-width:0}.acf-field-flexible-content[data-acfe-flexible-placeholder="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle,.acf-field-flexible-content[data-acfe-flexible-preview="1"]>.acf-input>.acf-flexible-content>.values>.layout.-collapsed>.acf-fc-layout-handle{border-bottom-width:1px}.acf-field-flexible-content[data-acfe-flexible-lock="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle,.acf-field-flexible-content[data-acfe-flexible-remove-collapse="1"]:not([data-acfe-flexible-lock="1"])>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-handle{cursor:initial}.acf-fc-popup.top.acfe-fc-popup-grey:before{border-top-color:#e1e1e1}.acf-tooltip.bottom.acfe-fc-popup-grey:before{border-bottom-color:#e1e1e1}.acf-fc-popup.acfe-fc-popup-grey{background:#fcfcfc;border-radius:3px;color:#444;border:1px solid #e1e1e1;font-size:13px}.acf-tooltip.top.acfe-fc-popup-grey{margin-top:-16px}.acf-tooltip.bottom.acfe-fc-popup-grey{margin-bottom:-16px}.acf-fc-popup.acfe-fc-popup-grey a{color:#444}.acf-fc-popup.acfe-fc-popup-grey a:hover{color:#fff}.layout>.acfe-fc-placeholder{text-align:center;background:#f9f9f9;display:block;text-decoration:none;position:relative;cursor:pointer}.layout>.acfe-fc-placeholder:focus{border-color:#ccc;-webkit-box-shadow:none;box-shadow:none}.layout>.acfe-fc-placeholder>.acfe-flexible-placeholder{height:110px;overflow:hidden;text-align:initial}.layout>.acfe-fc-placeholder>a{z-index:2;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-color:#ccd0d4;color:#23282d;border-radius:100px;-webkit-box-shadow:none;box-shadow:none;background:#fff;width:30px;min-height:30px;height:30px;padding:0;display:block}body:not(.acf-admin-5-3) .layout>.acfe-fc-placeholder>a{border-color:#999}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-flexible-content>.acf-input>.acf-flexible-content>.values>.layout>.acfe-fc-placeholder>a{z-index:0}.layout>.acfe-fc-placeholder>a:active{-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.layout>.acfe-fc-placeholder>a:focus{border-color:#ccc;-webkit-box-shadow:none;box-shadow:none}.layout>.acfe-fc-placeholder>a span{width:29px;height:30px;vertical-align:top;line-height:28px;font-size:18px}body:not(.acf-admin-5-3) .layout>.acfe-fc-placeholder>a span{width:30px;height:30px}.layout>.acfe-fc-placeholder.acfe-fc-preview{background:0 0}.layout>.acfe-fc-placeholder.acfe-fc-preview>.acfe-flexible-placeholder{min-height:55px;height:auto}.layout>.acfe-fc-placeholder.acfe-fc-preview>a{display:none}.layout>.acfe-fc-placeholder.acfe-fc-preview:hover>a{display:block}.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading{background:#f9f9f9;min-height:110px}.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading>.acfe-flexible-placeholder>.spinner{visibility:visible;float:none;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);margin:0;z-index:10000}.layout>.acfe-fc-placeholder .acfe-fc-overlay{position:absolute;width:100%;height:100%;padding:0;background-color:rgba(255,255,255,0);-webkit-transition:background-color .2s linear;-o-transition:background-color .2s linear;transition:background-color .2s linear}.layout>.acfe-fc-placeholder .acfe-fc-overlay.-hover,.layout>.acfe-fc-placeholder:hover .acfe-fc-overlay{background-color:rgba(255,255,255,.7);z-index:1}.layout>.acfe-fc-placeholder.acfe-fc-preview.-loading>a span{visibility:hidden}.layout>.acf-fields>.acfe-flexible-opened-actions,.layout>.acf-table>.acfe-flexible-opened-actions{background:#f9f9f9;border-top:1px solid #e1e1e1;padding:12px;text-align:right;clear:both}.acfe-flexible-layout-thumbnail{display:block;width:100%;height:9.8vw;background-color:#eee;background-size:cover;background-repeat:no-repeat;background-position:center;position:relative;margin-bottom:15px}.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-not-found:after{content:"\f180";font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;text-align:center;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#ccc;font-size:110px}.acfe-col-2 .acfe-flexible-layout-thumbnail{height:20.5vw}.acfe-col-3 .acfe-flexible-layout-thumbnail{height:13.3vw}.acfe-col-5 .acfe-flexible-layout-thumbnail{height:7.65vw}.acfe-col-6 .acfe-flexible-layout-thumbnail{height:6.2vw}@media only screen and (max-width:960px){.acfe-flex-container .acfe-flexible-layout-thumbnail,.acfe-flexible-layout-thumbnail{height:18.4vw}}@media only screen and (max-width:720px){.acfe-flex-container .acfe-flexible-layout-thumbnail,.acfe-flexible-layout-thumbnail{height:37.2vw}}.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal{display:block;width:230px;height:103px;background-color:#1f2329}.acfe-flexible-layout-thumbnail.acfe-flexible-layout-thumbnail-no-modal.acfe-flexible-layout-thumbnail-not-found:after{color:#2f353e}.acf-field.acf-field-flexible-content[data-acfe-flexible-stylised-button="1"]>.acf-input>.acf-flexible-content:not(.empty)>.values{margin-bottom:15px}.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content>.acfe-flexible-stylised-button{padding:40px 20px;border:2px dashed #ccc;text-align:center}.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content>.acfe-flexible-stylised-button>.acf-actions{text-align:center}.acf-field.acf-field-flexible-content>.acf-input>.acf-flexible-content .acf-actions .acf-button .dashicons{width:auto;height:auto;vertical-align:text-top}.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content>.no-value-message{display:none}.acf-field.acf-field-flexible-content[data-acfe-flexible-hide-empty-message="1"]>.acf-input>.acf-flexible-content.-empty>.values{margin-bottom:0}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons:before{font-family:dashicons}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons{visibility:hidden}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.acfe-flexible-icon.dashicons{visibility:visible}.acf-flexible-content .layout .acf-icon.acfe-flexible-icon.dashicons.dashicons-admin-generic:before{margin-left:1px}.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout.-hover .acf-fc-layout-controls .acf-icon.-plus,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout:hover .acf-fc-layout-controls .acf-icon.-plus{visibility:hidden}.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout.-hover>.acf-fc-layout-controls .acf-icon.-plus,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-duplicate,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-minus,.acf-flexible-content .layout:hover>.acf-fc-layout-controls .acf-icon.-plus{visibility:visible}.acf-flexible-content .layout>.acf-fc-layout-controls .acf-icon.disabled{color:#ccc;cursor:initial}.acf-flexible-content .layout>.acf-fc-layout-controls .acf-icon.disabled:hover{color:#ccc;background:#f5f5f5}.acf-flexible-content[data-acfe-flexible-lock="1"] .layout .acf-fc-layout-handle{cursor:initial}.acf-field-acfe-flexible-layout-title{display:none}input.acfe-flexible-control-title{border:none;-webkit-box-shadow:none!important;box-shadow:none!important;outline:0!important;border-radius:0;border-bottom:1px solid transparent!important;font-weight:600;width:auto!important;padding:0!important;display:none;min-height:20px;vertical-align:unset;background:0 0}.layout>.acf-fc-layout-handle .acfe-layout-title{cursor:text;position:relative}.layout:not(.acfe-flexible-title-edition)>.acf-fc-layout-handle .acfe-layout-title:hover{background:#f4f4f4}.layout.acfe-flexible-title-edition>.acf-fc-layout-handle .acfe-layout-title input.acfe-flexible-control-title{display:inline-block;border-bottom:1px solid #ddd!important}.layout.acfe-flexible-title-edition>.acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text{display:none}.layout.acfe-flexible-layout-hidden>.acf-fc-layout-controls,.layout.acfe-flexible-layout-hidden>.acf-fc-layout-handle,.layout.acfe-flexible-layout-hidden>.acf-fields,.layout.acfe-flexible-layout-hidden>.acfe-fc-placeholder{opacity:.5}.acf-field-flexible-content[data-acfe-flexible-modal-edition="1"]>.acf-input>.acf-flexible-content>.values>.layout>.acf-fc-layout-controls>a.-collapse{display:none}body.-loading *{cursor:wait!important}.acf-field .acf-label label{font-weight:600}.acf-field p.description{word-break:break-word}.acf-fields.-left>.acf-field>.acf-label,.acfe-postbox-left>.inside>.acf-field>.acf-label{min-height:1px}.acf-field.acfe-no-label>.acf-label{margin:0}.acf-field.acfe-no-label>.acf-label>label{display:none}.acf-field.acfe-no-label>.acf-label>p.description{margin-bottom:10px}.acfe-field-tooltip{float:right;font-size:16px;color:#999}.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-input>p.description,.acf-field[data-instruction-tooltip]:not([data-instruction-placement])>.acf-label>p.description{display:none}.acf-field .acf-input>p.description:first-child{margin-top:0;margin-bottom:5px}.acf-field p.description>.more,.acf-field-acfe-hidden,.acf-field[data-instruction-above-field]:not([data-instruction-placement])>.acf-label>p.description{display:none}.acf-field-textarea[data-acfe-textarea-code="1"]>.acf-input>textarea{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:1em}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap{height:auto}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default{border:1px solid #7e8993;border-radius:4px}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-gutters{border-right:1px solid #7e8993}body:not(.acf-admin-5-3) .acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default{border-color:#dfdfdf}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-activeline-background{background:#f9f9f9}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-selected{background:#f0f0f0!important}.acf-field-acfe-code-editor>.acf-input>.acf-input-wrap>.CodeMirror-wrap.cm-s-default .CodeMirror-gutters{background:#f9f9f9}body .CodeMirror-wrap pre{word-break:break-all}.acf-field-acfe-code-editor>td.acf-input{max-width:1px}.acf-accordion{z-index:initial}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input{margin-left:-12px;margin-right:-12px;margin-bottom:-15px}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input,.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-input{margin-top:-15px}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description,.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-group-modal="1"])>.acf-label>p.description{margin-bottom:15px}.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style.acfe-no-label>.acf-input>.acf-fields{border-width:0}.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-left-width:0;border-right-width:0;border-bottom-width:0}.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields{border-width:0}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input{margin:0}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-width:1px}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input,.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style:not([data-acfe-group-modal="1"])>.acf-input{padding:0 0 0 1px;margin:-15px 0}.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input>.acf-table,.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-table{margin:0}.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input>.acf-table{border-width:1px}.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-group.acfe-field-group-layout-table.acfe-seamless-style>.acf-input{padding:0 12px}.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-fields,.acf-fields>.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acf-table{display:none}tr.acf-field.acf-field-group.acfe-seamless-style>td.acf-input>.acf-fields{border:0;margin:-15px -10px}tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table>td.acf-input{padding:0;margin:-15px 0}tr.acf-field.acf-field-group.acfe-seamless-style.acfe-field-group-layout-table>td.acf-input>.acf-table,tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,tr.acf-field.acf-field-group[data-acfe-group-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input{margin-left:-12px;margin-right:-12px;margin-bottom:-15px}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-no-label.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input{margin-top:-15px}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description,.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style.acfe-no-label:not([data-acfe-clone-modal="1"])>.acf-label>p.description{margin-bottom:15px}.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-no-label.acfe-seamless-style>.acf-input>.acf-fields{border-width:0}.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-left-width:0;border-right-width:0;border-bottom-width:0}.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields{border-width:0}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input{margin:0}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields{border-width:1px}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input,.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style:not([data-acfe-clone-modal="1"])>.acf-input{padding:0 0 0 1px;margin:-15px 0}.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input>.acf-table,.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,.acf-fields>.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-table{margin:0}.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input>.acf-fields,.acf-postbox.seamless>.acf-fields>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input>.acf-table{border-width:1px}.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-block.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-row.acfe-seamless-style>.acf-input,.acf-postbox.seamless>.acf-fields.-left>.acf-field-clone.acfe-field-clone-layout-table.acfe-seamless-style>.acf-input{padding:0 12px}tr.acf-field.acf-field-clone.acfe-seamless-style>td.acf-input>.acf-fields{border:0;margin:-15px -10px}tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table>td.acf-input{padding:0;margin:-15px 0}tr.acf-field.acf-field-clone.acfe-seamless-style.acfe-field-clone-layout-table>td.acf-input>.acf-table,tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,tr.acf-field.acf-field-clone[data-acfe-clone-modal="1"]>.acf-input>.acfe-modal>.acfe-modal-wrapper>.acfe-modal-content>.acf-table{border-width:0}.acfe-modal-content .acf-color-picker .wp-picker-holder{position:relative}.acf-field-checkbox .acf-input .acf-checkbox-list.acf-bl li+li>strong{margin-top:15px;display:inline-block}.acf-field-radio .acf-input .acf-radio-list.acf-bl li>strong,.acf-field-radio[data-acfe-labels] .acf-input .acf-radio-list.acf-hl li>strong{display:block}.acf-field-radio .acf-input .acf-radio-list.acf-bl li+li>strong{margin-top:15px}.acf-range-wrap input[type=number]{min-width:3.5em}.acf-link.-value .acfe-modal .button{display:inline-block}.acf-editor-wrap iframe{min-height:60px}.acf-editor-wrap .mce-top-part::before{-webkit-box-shadow:none;box-shadow:none}.acf-editor-wrap div.mce-statusbar{border:0}.acf-editor-wrap .mce-divider,.acf-editor-wrap .mce-path-item{color:#aaa}form.acfe-form.is-invalid[data-hide-error="1"]>.acf-error-message.-dismiss,form.acfe-form.is-valid[data-hide-revalidation="1"]>.acf-notice.-success{display:none}form.acfe-form.is-invalid[data-errors-position=below] .acf-field .acf-notice{margin:15px 0 0}.acf-fields>.acf-field.acf-field-acfe-column{float:left;clear:none;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0;border-top-width:0}.acf-fields.-left>.acf-field.acf-field-acfe-column{border-right:1px solid #eee}.acf-fields.-left>.acf-field.acf-field-acfe-column:before{content:"";display:block;position:initial;background:0 0;border:0;width:auto}.acf-fields.-left>.acf-field.acf-field-acfe-column>.acf-input{float:none;width:auto;margin:0;padding:0}.acf-fields>.acf-field.acf-field-acfe-column>.acf-input>.acf-fields>.acf-field{border-top-width:0}.acf-fields>.acf-field.acf-field-acfe-column[data-endpoint="1"]{clear:both;border-top:1px solid #eee;width:100%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"]{width:8.333333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"]{width:16.66666%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"]{width:25%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"]{width:33.33333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"]{width:41.66667%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"]{width:50%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"]{width:58.33333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"]{width:66.66666%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"]{width:75%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"]{width:83.33333%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"]{width:91.66667%}.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"]{width:100%;border-right:0}@media only screen and (max-width:1024px){.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"]{width:50%}}@media only screen and (max-width:640px){.acf-fields>.acf-field.acf-field-acfe-column[data-columns="1/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="10/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="11/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="12/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="2/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="3/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="4/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="5/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="6/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="7/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="8/12"],.acf-fields>.acf-field.acf-field-acfe-column[data-columns="9/12"]{width:100%}}.acf-media-modal .screen-reader-text,.acf-media-modal .screen-reader-text span,.acf-media-modal .ui-helper-hidden-accessible{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.acf-ui-datepicker .ui-datepicker{padding:0;border-color:#7e8993!important;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fff}.acf-ui-datepicker select{font-size:14px;cursor:pointer;vertical-align:middle;line-height:2;color:#32373c;border-color:#7e8993;-webkit-box-shadow:none;box-shadow:none;border-radius:3px;padding:0 24px 0 8px;min-height:30px;max-width:25rem;-webkit-appearance:none;background:url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') right 5px top 55%/16px 16px no-repeat #fff}.acf-ui-datepicker .ui-datepicker table{font-size:13px;margin:0 0 7px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-header{border:none;background:#f9f9f9;color:#222;font-weight:400;border-radius:4px 4px 0}.acf-ui-datepicker .ui-datepicker .ui-datepicker-header .ui-state-hover{background:#f9f9f9;cursor:pointer;border-radius:0;border:0}.acf-ui-datepicker .ui-datepicker thead{background:#f9f9f9;color:#222}.acf-ui-datepicker .ui-datepicker .ui-datepicker-title{margin-top:.4em;margin-bottom:.3em;color:#222;font-size:14px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next,.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover{height:20px;width:20px;border:none;overflow:hidden;margin-top:15px;top:0}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next-hover,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev-hover{background:0 0!important;color:#007cba!important}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next{right:7px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev{left:7px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span{height:20px;width:20px;background:0 0;position:relative;margin:0;left:unset;top:unset;font-size:1px}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before,.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before{display:block;font-family:dashicons;line-height:1;font-weight:400;text-indent:0;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:20px;height:20px;font-size:16px;vertical-align:top;text-align:center}.acf-ui-datepicker .ui-datepicker .ui-datepicker-next span:before{content:"\f345"}.acf-ui-datepicker .ui-datepicker .ui-datepicker-prev span:before{content:"\f341"}.acf-ui-datepicker .ui-datepicker .ui-datepicker-title select{margin:0 3px}.acf-ui-datepicker .ui-datepicker th{padding:.75em 0;color:#222;font-weight:400;border:none;border-bottom:1px solid #e1e1e1;background:#f9f9f9}.acf-ui-datepicker .ui-datepicker td{background:#fff;border:none;padding:0}.acf-ui-datepicker .ui-datepicker td .ui-state-default{background:0 0;border:none;text-align:center;padding:.5em;margin:0;font-weight:400;color:#333}.acf-ui-datepicker .ui-datepicker td .ui-state-active,.acf-ui-datepicker .ui-datepicker td .ui-state-hover{background:#007cba;color:#fff;-webkit-box-shadow:none;box-shadow:none}.acf-ui-datepicker .ui-datepicker td.ui-state-disabled,.acf-ui-datepicker .ui-datepicker td.ui-state-disabled .ui-state-default{opacity:1;color:#999}.acf-ui-datepicker .ui-datepicker-today .ui-state-highlight{border:none!important;background:#eee!important;font-weight:400!important;color:#222!important}.acf-ui-datepicker .ui-state-highlight.ui-state-active,.acf-ui-datepicker .ui-state-highlight.ui-state-hover{border:none!important;background:#007cba!important;font-weight:400!important;color:#fff!important}.acf-ui-datepicker .ui-state-highlight.ui-state-hover.ui-state-active{background:#007cba!important}.acf-ui-datepicker .ui-timepicker-div{padding:10px 7px!important}.acf-ui-datepicker .ui-timepicker-div .ui-widget-header{background:0 0!important;border:0!important;display:none!important}.acf-ui-datepicker .ui-timepicker-div .ui-widget-header .ui-datepicker-title{font-size:13px!important;font-weight:600!important}.acf-ui-datepicker .ui-timepicker-div dl{margin:0;text-align:center!important}.acf-ui-datepicker .ui-timepicker-div .ui_tpicker_time_label{display:none!important}.acf-ui-datepicker .ui-timepicker-div select{background:url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') right 5px top 55%/16px 16px no-repeat #fff!important;color:#32373c!important;border-color:#7e8993!important}.acf-ui-datepicker .ui-datepicker-buttonpane{border:0!important;padding:7px!important;margin:0!important;background:#f9f9f9!important;border-top:1px solid #e1e1e1!important;border-radius:0 0 4px 4px!important}.acf-ui-datepicker .ui-datepicker-buttonpane:after{content:'';display:block;clear:both}.acf-ui-datepicker .ui-datepicker-buttonpane button{display:inline-block;text-decoration:none;font-size:13px!important;line-height:2.15384615;min-height:30px;margin:0!important;padding:0 10px!important;cursor:pointer!important;-webkit-appearance:none;border-radius:3px;font-weight:400!important;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;color:#0071a1!important;background:#f3f5f6!important;vertical-align:top;-webkit-box-shadow:none!important;box-shadow:none!important;outline:0!important;opacity:unset!important;-webkit-filter:unset!important;filter:unset!important;border:1px solid #0071a1!important}.acf-ui-datepicker .ui-datepicker-buttonpane button:hover{background:#f1f1f1!important;border-color:#016087!important;color:#016087!important}.mce-toolbar .mce-btn-group:not(:first-child){margin-left:6px;padding-left:6px}body .medium-editor-toolbar{z-index:999999!important}.acf-field-repeater[data-acfe-repeater-lock="1"]>.acf-input>.acf-repeater>.acf-table>tbody>.acf-row>.acf-row-handle{cursor:initial}.acf-repeater.-block>table,.acf-repeater.-row>table{border-collapse:separate;border-spacing:0 15px;background:0 0;border:0;margin-top:-15px;margin-bottom:-7px}.acf-repeater.-block>table>*,.acf-repeater.-row>table>*{border-collapse:collapse;border-spacing:0}.acf-repeater.-block>table>tbody>tr>td,.acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #ccd0d4!important;border-bottom:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:first-of-type,.acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #ccd0d4!important}.acf-repeater.-block>table>tbody>tr>td:last-of-type,.acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #ccd0d4!important}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td{border-top:1px solid #e1e1e1;border-bottom:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:first-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:first-of-type{border-left:1px solid #e1e1e1}body:not(.acf-admin-5-3) .acf-repeater.-block>table>tbody>tr>td:last-of-type,body:not(.acf-admin-5-3) .acf-repeater.-row>table>tbody>tr>td:last-of-type{border-right:1px solid #e1e1e1}.acf-repeater.-table.-empty>.acf-table{display:none}.acf-field-repeater>.acf-input>.acf-repeater>.acfe-repeater-stylised-button{padding:40px 20px;border:2px dashed #ccc;text-align:center}.acf-field-repeater>.acf-input>.acf-repeater>.acfe-repeater-stylised-button>.acf-actions{text-align:center}.acf-field-flexible-content>.acf-input>.acf-repeater .acf-actions .acf-button .dashicons{width:auto;height:auto;vertical-align:text-top}
|
@@ -1,301 +1,306 @@
|
|
1 |
-
.wrap {
|
2 |
-
|
3 |
-
min-width: auto !important;
|
4 |
}
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
background: #fff;
|
56 |
border: 1px solid #ccd0d4;
|
57 |
border-bottom: 0;
|
58 |
-
position: absolute;
|
59 |
-
width: 280px;
|
60 |
-
top: -38px;
|
61 |
-
height: 37px;
|
62 |
-
left: -1px;
|
63 |
-
}
|
64 |
-
|
65 |
-
.wrap:not(#poststuff) form#createuser .edit-tag-actions .button,
|
66 |
-
.wrap:not(#poststuff) form#createuser p.submit .button,
|
67 |
-
.wrap:not(#poststuff) form#edittag .edit-tag-actions .button,
|
68 |
-
.wrap:not(#poststuff) form#edittag p.submit .button,
|
69 |
-
.wrap:not(#poststuff) form#your-profile .edit-tag-actions .button,
|
70 |
-
.wrap:not(#poststuff) form#your-profile p.submit .button,
|
71 |
-
.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions .button,
|
72 |
-
.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit .button,
|
73 |
-
.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions .button,
|
74 |
-
.wrap:not(#poststuff) form[action="options.php"] p.submit .button {
|
75 |
-
min-height: 32px;
|
76 |
-
line-height: 2.30769231;
|
77 |
-
padding: 0 12px;
|
78 |
-
}
|
79 |
-
|
80 |
-
.wrap:not(#poststuff) form#createuser .edit-tag-actions #delete-link,
|
81 |
-
.wrap:not(#poststuff) form#createuser p.submit #delete-link,
|
82 |
-
.wrap:not(#poststuff) form#edittag .edit-tag-actions #delete-link,
|
83 |
-
.wrap:not(#poststuff) form#edittag p.submit #delete-link,
|
84 |
-
.wrap:not(#poststuff) form#your-profile .edit-tag-actions #delete-link,
|
85 |
-
.wrap:not(#poststuff) form#your-profile p.submit #delete-link,
|
86 |
-
.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions #delete-link,
|
87 |
-
.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit #delete-link,
|
88 |
-
.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions #delete-link,
|
89 |
-
.wrap:not(#poststuff) form[action="options.php"] p.submit #delete-link {
|
90 |
-
float: left;
|
91 |
margin: 0;
|
92 |
-
|
93 |
-
|
|
|
|
|
94 |
}
|
95 |
|
96 |
-
.wrap
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
.wrap > form > h3 {
|
105 |
-
background: #fff;
|
106 |
-
border: 1px solid #ccd0d4;
|
107 |
-
border-bottom: 0;
|
108 |
-
margin: 0;
|
109 |
-
color: #23282d;
|
110 |
-
font-size: 14px;
|
111 |
-
padding: 8px 12px;
|
112 |
-
line-height: 1.4;
|
113 |
}
|
114 |
|
115 |
-
.wrap
|
116 |
-
.wrap
|
117 |
-
.wrap
|
118 |
-
.wrap
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
123 |
}
|
124 |
|
125 |
-
.wrap
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
.wrap > form > h3 + p + .form-table {
|
133 |
-
margin-top: 0;
|
134 |
}
|
135 |
|
136 |
-
.wrap
|
137 |
-
|
138 |
-
width: 100%;
|
139 |
-
border: 1px solid #ccd0d4;
|
140 |
-
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
141 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
142 |
-
margin-bottom: 20px;
|
143 |
}
|
144 |
|
145 |
-
.wrap
|
146 |
-
|
|
|
147 |
}
|
148 |
|
149 |
-
.wrap
|
150 |
-
|
151 |
-
|
152 |
}
|
153 |
|
154 |
-
.wrap
|
155 |
-
|
156 |
-
padding: 0 0 0 20%;
|
157 |
}
|
158 |
|
159 |
-
.wrap
|
160 |
-
|
|
|
|
|
|
|
161 |
}
|
162 |
|
163 |
-
.wrap
|
164 |
-
|
165 |
-
border-top: 1px solid #eee;
|
166 |
-
position: static;
|
167 |
-
padding: 15px 12px;
|
168 |
}
|
169 |
|
170 |
-
.wrap
|
171 |
-
|
172 |
}
|
173 |
|
174 |
-
.wrap
|
175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
}
|
177 |
|
178 |
-
.wrap
|
179 |
-
.wrap
|
180 |
-
|
181 |
-
border-right: 1px solid #e1e1e1;
|
182 |
-
background: #f9f9f9;
|
183 |
-
padding: 15px 12px;
|
184 |
-
width: 20%;
|
185 |
-
font-size: 13px;
|
186 |
-
position: static;
|
187 |
-
color: #444;
|
188 |
}
|
189 |
|
190 |
-
.wrap
|
191 |
-
.wrap
|
192 |
-
|
193 |
}
|
194 |
|
195 |
-
.wrap
|
196 |
-
|
197 |
-
border-top: 1px solid #ccd0d4;
|
198 |
}
|
199 |
|
200 |
-
.wrap
|
201 |
-
|
|
|
202 |
}
|
203 |
|
204 |
-
|
205 |
-
width: 100%;
|
206 |
-
max-width: 25em;
|
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 |
.wrap #titlediv {
|
244 |
-
|
245 |
}
|
246 |
|
247 |
.wrap #titlediv input {
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
}
|
257 |
|
258 |
.wrap .postbox .hndle {
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
}
|
265 |
|
266 |
.wrap .postbox .handle-actions button,
|
267 |
.wrap .postbox .handle-actions span {
|
268 |
-
|
269 |
}
|
270 |
|
271 |
.wrap .postbox .handle-actions .acf-hndle-cog {
|
272 |
-
|
273 |
}
|
274 |
|
275 |
.wrap #submitdiv #major-publishing-actions {
|
276 |
-
|
277 |
}
|
278 |
|
279 |
.wrap #submitdiv #major-publishing-actions #publishing-action {
|
280 |
-
|
281 |
-
|
282 |
}
|
283 |
|
284 |
.wrap #submitdiv #major-publishing-actions #publishing-action .button {
|
285 |
-
|
286 |
}
|
287 |
|
288 |
.wrap #submitdiv #major-publishing-actions #publishing-action .spinner {
|
289 |
-
|
290 |
}
|
291 |
|
292 |
.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link {
|
293 |
-
|
294 |
-
|
295 |
}
|
296 |
|
297 |
.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link a {
|
298 |
-
|
299 |
}
|
300 |
|
301 |
.wrap form#createuser .acf-field input[type=email],
|
@@ -312,152 +317,158 @@
|
|
312 |
.wrap form#your-profile .acf-field input[type=text],
|
313 |
.wrap form#your-profile .acf-field input[type=url],
|
314 |
.wrap form#your-profile .acf-field select {
|
315 |
-
|
316 |
}
|
317 |
|
318 |
.wrap form#createuser .acf-field textarea,
|
319 |
.wrap form#your-profile .acf-field textarea {
|
320 |
-
|
|
|
321 |
}
|
322 |
|
323 |
.wrap form#createuser .acf-tab-wrap,
|
324 |
.wrap form#your-profile .acf-tab-wrap {
|
325 |
-
|
326 |
}
|
327 |
|
328 |
.wrap form#createuser select#ure_select_other_roles,
|
329 |
-
.wrap form#
|
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 |
-
.wrap form#
|
361 |
-
|
362 |
-
|
|
|
|
|
|
|
|
|
363 |
}
|
364 |
|
365 |
.wrap form#createuser .yoast-settings,
|
366 |
.wrap form#your-profile .yoast-settings {
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
}
|
371 |
|
372 |
.wrap form#createuser .yoast-settings h2,
|
373 |
.wrap form#your-profile .yoast-settings h2 {
|
374 |
-
|
375 |
}
|
376 |
|
377 |
.wrap form#createuser .yoast-settings label,
|
378 |
.wrap form#your-profile .yoast-settings label {
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
}
|
386 |
|
387 |
.wrap form#createuser .yoast-settings .description,
|
388 |
.wrap form#your-profile .yoast-settings .description {
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
}
|
393 |
|
394 |
.wrap form#createuser .yoast-settings input,
|
395 |
.wrap form#createuser .yoast-settings textarea,
|
396 |
.wrap form#your-profile .yoast-settings input,
|
397 |
.wrap form#your-profile .yoast-settings textarea {
|
398 |
-
|
399 |
}
|
400 |
|
401 |
.wrap form#createuser .yoast-settings textarea,
|
402 |
.wrap form#your-profile .yoast-settings textarea {
|
403 |
-
|
404 |
}
|
405 |
|
406 |
.wrap form#createuser .yoast-settings input[type=checkbox],
|
407 |
.wrap form#your-profile .yoast-settings input[type=checkbox] {
|
408 |
-
|
409 |
-
|
410 |
}
|
411 |
|
412 |
.wrap form#createuser .form-table[role=presentation] tr.user-language-wrap th[colspan="2"],
|
413 |
.wrap form#your-profile .form-table[role=presentation] tr.user-language-wrap th[colspan="2"] {
|
414 |
-
|
415 |
}
|
416 |
|
417 |
-
.wrap form#addtag .acf-fields.-left
|
418 |
-
.wrap form#edittag .acf-fields.-left
|
419 |
-
|
420 |
}
|
421 |
|
422 |
-
.wrap form#addtag .acf-fields.-left
|
423 |
-
.wrap form#edittag .acf-fields.-left
|
424 |
-
|
425 |
}
|
426 |
|
427 |
-
@media only screen and (max-width:
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
|
|
432 |
}
|
433 |
|
434 |
-
.wrap form#addtag .acf-fields.-left
|
435 |
-
.wrap form#edittag .acf-fields.-left
|
436 |
-
|
437 |
}
|
438 |
|
439 |
-
.wrap form#addtag .acf-fields.-left
|
440 |
-
.wrap form#edittag .acf-fields.-left
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
}
|
445 |
|
446 |
-
.wrap form#addtag .acf-fields.-left
|
447 |
-
.wrap form#edittag .acf-fields.-left
|
448 |
-
|
449 |
}
|
450 |
|
451 |
-
.wrap form#addtag .acf-fields.-left
|
452 |
-
.wrap form#edittag .acf-fields.-left
|
453 |
-
|
454 |
}
|
455 |
|
456 |
.wrap form#addtag .form-field p,
|
457 |
.wrap form#addtag .form-field select,
|
458 |
.wrap form#edittag .form-field p,
|
459 |
.wrap form#edittag .form-field select {
|
460 |
-
|
461 |
}
|
462 |
|
463 |
.wrap form#addtag .form-field input[type=email],
|
@@ -478,209 +489,217 @@
|
|
478 |
.wrap form#edittag .form-field input[type=url],
|
479 |
.wrap form#edittag .form-field select,
|
480 |
.wrap form#edittag .form-field textarea {
|
481 |
-
|
482 |
}
|
483 |
|
484 |
-
.wrap form#edittag .acf-column-1
|
485 |
-
|
486 |
}
|
487 |
|
488 |
-
.wrap form#edittag .postbox.wpseo-taxonomy-metabox-postbox
|
489 |
-
|
490 |
}
|
491 |
|
492 |
.wrap form#edittag tr.wpml-term-languages-wrap {
|
493 |
-
|
494 |
}
|
495 |
|
496 |
.wrap form#edittag #icl-tax-postbox .inside {
|
497 |
-
|
498 |
-
|
499 |
}
|
500 |
|
501 |
.wrap form#edittag #icl-tax-postbox .inside table.icl_translations_table {
|
502 |
-
|
503 |
}
|
504 |
|
505 |
.wrap .rank-math-metabox-frame {
|
506 |
-
|
507 |
}
|
508 |
|
509 |
-
.wrap .rankmath
|
510 |
-
|
511 |
}
|
512 |
|
513 |
-
.wrap .rankmath
|
514 |
-
|
515 |
-
|
516 |
}
|
517 |
|
518 |
.wrap #add-term-translations,
|
519 |
.wrap #edit-term-translations {
|
520 |
-
|
521 |
-
|
522 |
}
|
523 |
|
524 |
.wrap #select-add-term-language select,
|
525 |
.wrap #select-edit-term-language select {
|
526 |
-
|
527 |
-
|
|
|
|
|
|
|
|
|
|
|
528 |
}
|
529 |
|
530 |
-
.wrap #select-add-term-language + p,
|
531 |
.wrap #select-add-term-language p.description,
|
532 |
-
.wrap #select-edit-term-language + p,
|
533 |
.wrap #select-edit-term-language p.description {
|
534 |
-
|
535 |
}
|
536 |
|
537 |
-
.wrap #term-translations
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
}
|
543 |
|
544 |
-
.wrap #term-translations
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
box-sizing: border-box;
|
552 |
}
|
553 |
|
554 |
.wrap #term-translations #add-term-translations {
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
}
|
562 |
|
563 |
.wrap #term-translations #add-term-translations td.pll-translation-column {
|
564 |
-
|
565 |
-
|
566 |
}
|
567 |
|
568 |
.wrap #term-translations #add-term-translations td,
|
569 |
.wrap #term-translations #add-term-translations th {
|
570 |
-
|
571 |
-
|
572 |
}
|
573 |
|
574 |
.wrap #term-translations #add-term-translations tr:first-of-type td,
|
575 |
.wrap #term-translations #add-term-translations tr:first-of-type th {
|
576 |
-
|
577 |
}
|
578 |
|
579 |
.wrap #term-translations #add-term-translations tr:last-of-type td,
|
580 |
.wrap #term-translations #add-term-translations tr:last-of-type th {
|
581 |
-
|
582 |
}
|
583 |
|
584 |
.wrap #term-translations #edit-term-translations td,
|
585 |
.wrap #term-translations #edit-term-translations th {
|
586 |
-
|
587 |
-
|
588 |
}
|
589 |
|
590 |
.wrap #term-translations #edit-term-translations tr:first-of-type td,
|
591 |
.wrap #term-translations #edit-term-translations tr:first-of-type th {
|
592 |
-
|
593 |
}
|
594 |
|
595 |
.wrap #term-translations #edit-term-translations tr:last-of-type td,
|
596 |
.wrap #term-translations #edit-term-translations tr:last-of-type th {
|
597 |
-
|
598 |
-
}
|
599 |
-
|
600 |
-
.wrap #acf-group_term
|
601 |
-
.wrap #acf-group_term
|
602 |
-
.wrap #acf-group_term
|
603 |
-
.wrap #acf-group_user
|
604 |
-
.wrap #acf-group_user
|
605 |
-
.wrap #acf-group_user
|
606 |
-
.wrap #acf-group_user_customer
|
607 |
-
.wrap #acf-group_user_customer
|
608 |
-
.wrap #acf-group_user_customer
|
609 |
-
|
610 |
-
|
611 |
-
}
|
612 |
-
|
613 |
-
.wrap #acf-group_term
|
614 |
-
.wrap #acf-group_term
|
615 |
-
.wrap #acf-group_term
|
616 |
-
.wrap #acf-group_user
|
617 |
-
.wrap #acf-group_user
|
618 |
-
.wrap #acf-group_user
|
619 |
-
.wrap #acf-group_user_customer
|
620 |
-
.wrap #acf-group_user_customer
|
621 |
-
.wrap #acf-group_user_customer
|
622 |
-
|
623 |
-
}
|
624 |
-
|
625 |
-
.wrap #acf-group_term
|
626 |
-
.wrap #acf-group_term
|
627 |
-
.wrap #acf-group_term
|
628 |
-
.wrap #acf-group_term
|
629 |
-
.wrap #acf-group_term
|
630 |
-
.wrap #acf-group_term
|
631 |
-
.wrap #acf-group_user
|
632 |
-
.wrap #acf-group_user
|
633 |
-
.wrap #acf-group_user
|
634 |
-
.wrap #acf-group_user
|
635 |
-
.wrap #acf-group_user
|
636 |
-
.wrap #acf-group_user
|
637 |
-
.wrap #acf-group_user_customer
|
638 |
-
.wrap #acf-group_user_customer
|
639 |
-
.wrap #acf-group_user_customer
|
640 |
-
.wrap #acf-group_user_customer
|
641 |
-
.wrap #acf-group_user_customer
|
642 |
-
.wrap #acf-group_user_customer
|
643 |
-
|
644 |
-
}
|
645 |
-
|
646 |
-
.wrap #acf-group_term
|
647 |
-
.wrap #acf-group_user
|
648 |
-
.wrap #acf-group_user_customer
|
649 |
-
|
650 |
}
|
651 |
|
652 |
.edit-tags-php #col-left {
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
}
|
657 |
|
658 |
.edit-tags-php #col-left .col-wrap {
|
659 |
-
|
660 |
}
|
661 |
|
662 |
.edit-tags-php #col-left .col-wrap #poststuff {
|
663 |
-
|
664 |
}
|
665 |
|
666 |
.edit-tags-php #col-left .col-wrap #poststuff #addtag h2.hndle {
|
667 |
-
|
668 |
}
|
669 |
|
670 |
.edit-tags-php #col-left .col-wrap #poststuff #addtag .inside .term-name-wrap {
|
671 |
-
|
672 |
}
|
673 |
|
674 |
.edit-tags-php #col-left .col-wrap #poststuff #addtag .submit {
|
675 |
-
|
676 |
-
|
677 |
}
|
678 |
|
679 |
.edit-tags-php #col-container #col-right {
|
680 |
-
|
681 |
-
|
682 |
}
|
683 |
|
684 |
.edit-tags-php #col-container #col-right .col-wrap {
|
685 |
-
|
686 |
}
|
1 |
+
body:not(.taxonomy-product_cat):not(.woocommerce-page) .wrap {
|
2 |
+
padding-top: 0 !important
|
|
|
3 |
}
|
4 |
|
5 |
+
.wrap {
|
6 |
+
min-width: auto !important
|
7 |
+
}
|
8 |
+
|
9 |
+
@media only screen and (min-width:782px) {
|
10 |
+
|
11 |
+
.wrap:not(#poststuff) form#createuser,
|
12 |
+
.wrap:not(#poststuff) form#edittag,
|
13 |
+
.wrap:not(#poststuff) form#your-profile,
|
14 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"],
|
15 |
+
.wrap:not(#poststuff) form[action="options.php"] {
|
16 |
+
max-width: calc(100% - 300px) !important;
|
17 |
+
position: relative
|
18 |
+
}
|
19 |
+
|
20 |
+
.wrap:not(#poststuff) form#createuser .edit-tag-actions,
|
21 |
+
.wrap:not(#poststuff) form#createuser p.submit,
|
22 |
+
.wrap:not(#poststuff) form#edittag .edit-tag-actions,
|
23 |
+
.wrap:not(#poststuff) form#edittag p.submit,
|
24 |
+
.wrap:not(#poststuff) form#your-profile .edit-tag-actions,
|
25 |
+
.wrap:not(#poststuff) form#your-profile p.submit,
|
26 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions,
|
27 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit,
|
28 |
+
.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions,
|
29 |
+
.wrap:not(#poststuff) form[action="options.php"] p.submit {
|
30 |
+
-webkit-box-sizing: border-box;
|
31 |
+
box-sizing: border-box;
|
32 |
+
position: absolute;
|
33 |
+
top: 37px;
|
34 |
+
width: 280px;
|
35 |
+
right: -300px;
|
36 |
+
padding: 10px;
|
37 |
+
margin: 0;
|
38 |
+
background: #f5f5f5;
|
39 |
+
text-align: right;
|
40 |
+
border: 1px solid #ccd0d4;
|
41 |
+
border-radius: 0;
|
42 |
+
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
43 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, .04)
|
44 |
+
}
|
45 |
+
|
46 |
+
.wrap:not(#poststuff) form#createuser .edit-tag-actions::before,
|
47 |
+
.wrap:not(#poststuff) form#createuser p.submit::before,
|
48 |
+
.wrap:not(#poststuff) form#edittag .edit-tag-actions::before,
|
49 |
+
.wrap:not(#poststuff) form#edittag p.submit::before,
|
50 |
+
.wrap:not(#poststuff) form#your-profile .edit-tag-actions::before,
|
51 |
+
.wrap:not(#poststuff) form#your-profile p.submit::before,
|
52 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions::before,
|
53 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit::before,
|
54 |
+
.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions::before,
|
55 |
+
.wrap:not(#poststuff) form[action="options.php"] p.submit::before {
|
56 |
+
-webkit-box-sizing: border-box;
|
57 |
+
box-sizing: border-box;
|
58 |
+
content: "";
|
59 |
+
background: #fff;
|
60 |
+
border: 1px solid #ccd0d4;
|
61 |
+
border-bottom: 0;
|
62 |
+
position: absolute;
|
63 |
+
width: 280px;
|
64 |
+
top: -38px;
|
65 |
+
height: 37px;
|
66 |
+
left: -1px
|
67 |
+
}
|
68 |
+
|
69 |
+
.wrap:not(#poststuff) form#createuser .edit-tag-actions .button,
|
70 |
+
.wrap:not(#poststuff) form#createuser p.submit .button,
|
71 |
+
.wrap:not(#poststuff) form#edittag .edit-tag-actions .button,
|
72 |
+
.wrap:not(#poststuff) form#edittag p.submit .button,
|
73 |
+
.wrap:not(#poststuff) form#your-profile .edit-tag-actions .button,
|
74 |
+
.wrap:not(#poststuff) form#your-profile p.submit .button,
|
75 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions .button,
|
76 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit .button,
|
77 |
+
.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions .button,
|
78 |
+
.wrap:not(#poststuff) form[action="options.php"] p.submit .button {
|
79 |
+
min-height: 32px;
|
80 |
+
line-height: 2.30769231;
|
81 |
+
padding: 0 12px
|
82 |
+
}
|
83 |
+
|
84 |
+
.wrap:not(#poststuff) form#createuser .edit-tag-actions #delete-link,
|
85 |
+
.wrap:not(#poststuff) form#createuser p.submit #delete-link,
|
86 |
+
.wrap:not(#poststuff) form#edittag .edit-tag-actions #delete-link,
|
87 |
+
.wrap:not(#poststuff) form#edittag p.submit #delete-link,
|
88 |
+
.wrap:not(#poststuff) form#your-profile .edit-tag-actions #delete-link,
|
89 |
+
.wrap:not(#poststuff) form#your-profile p.submit #delete-link,
|
90 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions #delete-link,
|
91 |
+
.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit #delete-link,
|
92 |
+
.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions #delete-link,
|
93 |
+
.wrap:not(#poststuff) form[action="options.php"] p.submit #delete-link {
|
94 |
+
float: left;
|
95 |
+
margin: 0;
|
96 |
+
text-decoration: underline
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
.wrap>form:not(.search-form) {
|
101 |
+
margin-top: 13px;
|
102 |
+
max-width: 100% !important
|
103 |
+
}
|
104 |
+
|
105 |
+
.wrap>form>div>div>h2,
|
106 |
+
.wrap>form>div>div>h3,
|
107 |
+
.wrap>form>h2,
|
108 |
+
.wrap>form>h3 {
|
109 |
background: #fff;
|
110 |
border: 1px solid #ccd0d4;
|
111 |
border-bottom: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
margin: 0;
|
113 |
+
color: #23282d;
|
114 |
+
font-size: 14px;
|
115 |
+
padding: 8px 12px;
|
116 |
+
line-height: 1.4
|
117 |
}
|
118 |
|
119 |
+
.wrap>form>div>div>h2+p,
|
120 |
+
.wrap>form>div>div>h3+p,
|
121 |
+
.wrap>form>h2+p,
|
122 |
+
.wrap>form>h3+p {
|
123 |
+
margin: 0;
|
124 |
+
border: 1px solid #ccd0d4;
|
125 |
+
border-bottom: 0;
|
126 |
+
padding: 15px 12px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
|
129 |
+
.wrap>form>div>div>h2+.form-table,
|
130 |
+
.wrap>form>div>div>h2+p+.form-table,
|
131 |
+
.wrap>form>div>div>h3+.form-table,
|
132 |
+
.wrap>form>div>div>h3+p+.form-table,
|
133 |
+
.wrap>form>h2+.form-table,
|
134 |
+
.wrap>form>h2+p+.form-table,
|
135 |
+
.wrap>form>h3+.form-table,
|
136 |
+
.wrap>form>h3+p+.form-table {
|
137 |
+
margin-top: 0
|
138 |
}
|
139 |
|
140 |
+
.wrap>form .form-table {
|
141 |
+
background: #fff;
|
142 |
+
width: 100%;
|
143 |
+
border: 1px solid #ccd0d4;
|
144 |
+
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
145 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
|
146 |
+
margin-bottom: 20px
|
|
|
|
|
147 |
}
|
148 |
|
149 |
+
.wrap>form .form-table>tbody>tr.acf-field {
|
150 |
+
position: initial
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
|
153 |
+
.wrap>form .form-table>tbody>tr.acf-tab-wrap>td {
|
154 |
+
background: #f9f9f9;
|
155 |
+
padding: 15px 0 0 0
|
156 |
}
|
157 |
|
158 |
+
.wrap>form .form-table>tbody>tr.acf-tab-wrap>td ul.acf-tab-group {
|
159 |
+
border-bottom: 0;
|
160 |
+
padding: 0 0 0 20%
|
161 |
}
|
162 |
|
163 |
+
.wrap>form .form-table>tbody>tr.acf-tab-wrap>td ul.acf-tab-group>li.active a {
|
164 |
+
background: #fff
|
|
|
165 |
}
|
166 |
|
167 |
+
.wrap>form .form-table>tbody>tr>td {
|
168 |
+
background: #fff;
|
169 |
+
border-top: 1px solid #eee;
|
170 |
+
position: initial;
|
171 |
+
padding: 15px 12px
|
172 |
}
|
173 |
|
174 |
+
.wrap>form .form-table>tbody>tr>td.td-full {
|
175 |
+
padding: 15px 12px
|
|
|
|
|
|
|
176 |
}
|
177 |
|
178 |
+
.wrap>form .form-table>tbody>tr>td p {
|
179 |
+
font-size: 13px
|
180 |
}
|
181 |
|
182 |
+
.wrap>form .form-table>tbody>tr>td.acf-label,
|
183 |
+
.wrap>form .form-table>tbody>tr>th {
|
184 |
+
border-top: 1px solid #eee;
|
185 |
+
border-right: 1px solid #e1e1e1;
|
186 |
+
background: #f9f9f9;
|
187 |
+
padding: 15px 12px;
|
188 |
+
width: 20%;
|
189 |
+
font-size: 13px;
|
190 |
+
position: initial;
|
191 |
+
color: #444
|
192 |
}
|
193 |
|
194 |
+
.wrap>form .form-table>tbody>tr>td.acf-label label,
|
195 |
+
.wrap>form .form-table>tbody>tr>th label {
|
196 |
+
vertical-align: top
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
|
199 |
+
.wrap>form .form-table>tbody>tr:first-of-type td,
|
200 |
+
.wrap>form .form-table>tbody>tr:first-of-type th {
|
201 |
+
border-top: 1px solid #ccd0d4
|
202 |
}
|
203 |
|
204 |
+
.wrap>form .form-table textarea {
|
205 |
+
width: 100%
|
|
|
206 |
}
|
207 |
|
208 |
+
.wrap>form .form-table .regular-text {
|
209 |
+
width: 100%;
|
210 |
+
max-width: 25em
|
211 |
}
|
212 |
|
213 |
+
@media only screen and (max-width:782px) {
|
|
|
|
|
|
|
214 |
|
215 |
+
.wrap>form>div>div>h2,
|
216 |
+
.wrap>form>div>div>h3,
|
217 |
+
.wrap>form>h2,
|
218 |
+
.wrap>form>h3 {
|
219 |
+
padding: 12px
|
220 |
+
}
|
|
|
221 |
|
222 |
+
.wrap>form table.form-table>tbody>tr {
|
223 |
+
display: block;
|
224 |
+
padding: 15px 12px;
|
225 |
+
border-top: 1px solid #eee
|
226 |
+
}
|
227 |
|
228 |
+
.wrap>form table.form-table>tbody>tr>td.acf-label,
|
229 |
+
.wrap>form table.form-table>tbody>tr>th {
|
230 |
+
margin-bottom: 10px
|
231 |
+
}
|
232 |
|
233 |
+
.wrap>form table.form-table>tbody>tr>td,
|
234 |
+
.wrap>form table.form-table>tbody>tr>td.acf-label,
|
235 |
+
.wrap>form table.form-table>tbody>tr>th {
|
236 |
+
padding: 0;
|
237 |
+
display: block;
|
238 |
+
width: auto;
|
239 |
+
background: 0 0;
|
240 |
+
border: 0 !important
|
241 |
+
}
|
242 |
|
243 |
+
.wrap>form table.form-table>tbody>tr:first-child {
|
244 |
+
border-top: 0
|
245 |
+
}
|
246 |
}
|
247 |
|
248 |
.wrap #titlediv {
|
249 |
+
margin-bottom: 10px
|
250 |
}
|
251 |
|
252 |
.wrap #titlediv input {
|
253 |
+
padding: 3px 8px;
|
254 |
+
font-size: 1.7em;
|
255 |
+
line-height: 100%;
|
256 |
+
height: 1.7em;
|
257 |
+
width: 100%;
|
258 |
+
outline: 0;
|
259 |
+
margin: 0 0 3px;
|
260 |
+
background-color: #fff
|
261 |
}
|
262 |
|
263 |
.wrap .postbox .hndle {
|
264 |
+
cursor: auto;
|
265 |
+
-webkit-user-select: auto;
|
266 |
+
-moz-user-select: auto;
|
267 |
+
-ms-user-select: auto;
|
268 |
+
user-select: auto
|
269 |
}
|
270 |
|
271 |
.wrap .postbox .handle-actions button,
|
272 |
.wrap .postbox .handle-actions span {
|
273 |
+
display: none
|
274 |
}
|
275 |
|
276 |
.wrap .postbox .handle-actions .acf-hndle-cog {
|
277 |
+
width: 2.2rem
|
278 |
}
|
279 |
|
280 |
.wrap #submitdiv #major-publishing-actions {
|
281 |
+
border-top: 0
|
282 |
}
|
283 |
|
284 |
.wrap #submitdiv #major-publishing-actions #publishing-action {
|
285 |
+
float: none;
|
286 |
+
margin: 0
|
287 |
}
|
288 |
|
289 |
.wrap #submitdiv #major-publishing-actions #publishing-action .button {
|
290 |
+
float: right
|
291 |
}
|
292 |
|
293 |
.wrap #submitdiv #major-publishing-actions #publishing-action .spinner {
|
294 |
+
margin: 5px 10px 0
|
295 |
}
|
296 |
|
297 |
.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link {
|
298 |
+
float: left;
|
299 |
+
margin-left: 0
|
300 |
}
|
301 |
|
302 |
.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link a {
|
303 |
+
text-decoration: underline
|
304 |
}
|
305 |
|
306 |
.wrap form#createuser .acf-field input[type=email],
|
317 |
.wrap form#your-profile .acf-field input[type=text],
|
318 |
.wrap form#your-profile .acf-field input[type=url],
|
319 |
.wrap form#your-profile .acf-field select {
|
320 |
+
max-width: 100%
|
321 |
}
|
322 |
|
323 |
.wrap form#createuser .acf-field textarea,
|
324 |
.wrap form#your-profile .acf-field textarea {
|
325 |
+
width: 100%;
|
326 |
+
max-width: none
|
327 |
}
|
328 |
|
329 |
.wrap form#createuser .acf-tab-wrap,
|
330 |
.wrap form#your-profile .acf-tab-wrap {
|
331 |
+
position: relative
|
332 |
}
|
333 |
|
334 |
.wrap form#createuser select#ure_select_other_roles,
|
335 |
+
.wrap form#your-profile select#ure_select_other_roles {
|
336 |
+
width: 100% !important;
|
337 |
+
max-width: 500px !important
|
338 |
+
}
|
339 |
+
|
340 |
+
.wrap form#createuser select#ure_select_other_roles+.ms-parent,
|
341 |
+
.wrap form#your-profile select#ure_select_other_roles+.ms-parent {
|
342 |
+
width: 100% !important;
|
343 |
+
max-width: 500px !important
|
344 |
+
}
|
345 |
+
|
346 |
+
.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice,
|
347 |
+
.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice {
|
348 |
+
-webkit-box-shadow: 0 0 0 transparent;
|
349 |
+
box-shadow: 0 0 0 transparent;
|
350 |
+
border-radius: 3px;
|
351 |
+
border: 1px solid #7e8993;
|
352 |
+
color: #32373c;
|
353 |
+
padding: 4px 8px;
|
354 |
+
margin: 0;
|
355 |
+
-webkit-box-sizing: border-box;
|
356 |
+
box-sizing: border-box;
|
357 |
+
font-size: 14px;
|
358 |
+
line-height: 2.1;
|
359 |
+
min-height: 30px;
|
360 |
+
background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55%;
|
361 |
+
background-size: 16px 16px;
|
362 |
+
cursor: pointer
|
363 |
+
}
|
364 |
+
|
365 |
+
.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice>span.placeholder,
|
366 |
+
.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice>span.placeholder {
|
367 |
+
color: #32373c
|
368 |
+
}
|
369 |
+
|
370 |
+
.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice>div,
|
371 |
+
.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice>div {
|
372 |
+
display: none
|
373 |
}
|
374 |
|
375 |
.wrap form#createuser .yoast-settings,
|
376 |
.wrap form#your-profile .yoast-settings {
|
377 |
+
padding: 0;
|
378 |
+
margin-bottom: 20px;
|
379 |
+
font-size: 13px
|
380 |
}
|
381 |
|
382 |
.wrap form#createuser .yoast-settings h2,
|
383 |
.wrap form#your-profile .yoast-settings h2 {
|
384 |
+
margin: 0
|
385 |
}
|
386 |
|
387 |
.wrap form#createuser .yoast-settings label,
|
388 |
.wrap form#your-profile .yoast-settings label {
|
389 |
+
margin: 0;
|
390 |
+
padding: 0;
|
391 |
+
width: auto;
|
392 |
+
font-size: 13px;
|
393 |
+
color: #444;
|
394 |
+
line-height: 1.7
|
395 |
}
|
396 |
|
397 |
.wrap form#createuser .yoast-settings .description,
|
398 |
.wrap form#your-profile .yoast-settings .description {
|
399 |
+
font-size: 13px;
|
400 |
+
margin: 0 0 5px;
|
401 |
+
color: #666
|
402 |
}
|
403 |
|
404 |
.wrap form#createuser .yoast-settings input,
|
405 |
.wrap form#createuser .yoast-settings textarea,
|
406 |
.wrap form#your-profile .yoast-settings input,
|
407 |
.wrap form#your-profile .yoast-settings textarea {
|
408 |
+
margin: 0
|
409 |
}
|
410 |
|
411 |
.wrap form#createuser .yoast-settings textarea,
|
412 |
.wrap form#your-profile .yoast-settings textarea {
|
413 |
+
margin-bottom: 10px
|
414 |
}
|
415 |
|
416 |
.wrap form#createuser .yoast-settings input[type=checkbox],
|
417 |
.wrap form#your-profile .yoast-settings input[type=checkbox] {
|
418 |
+
margin-right: 5px;
|
419 |
+
vertical-align: -6px
|
420 |
}
|
421 |
|
422 |
.wrap form#createuser .form-table[role=presentation] tr.user-language-wrap th[colspan="2"],
|
423 |
.wrap form#your-profile .form-table[role=presentation] tr.user-language-wrap th[colspan="2"] {
|
424 |
+
display: none
|
425 |
}
|
426 |
|
427 |
+
.wrap form#addtag .acf-fields.-left>.acf-field,
|
428 |
+
.wrap form#edittag .acf-fields.-left>.acf-field {
|
429 |
+
padding-left: 0
|
430 |
}
|
431 |
|
432 |
+
.wrap form#addtag .acf-fields.-left>.acf-field.acfe-bt-no-label,
|
433 |
+
.wrap form#edittag .acf-fields.-left>.acf-field.acfe-bt-no-label {
|
434 |
+
padding-left: 20%
|
435 |
}
|
436 |
|
437 |
+
@media only screen and (max-width:640px) {
|
438 |
+
|
439 |
+
.wrap form#addtag .acf-fields.-left>.acf-field.acfe-bt-no-label,
|
440 |
+
.wrap form#edittag .acf-fields.-left>.acf-field.acfe-bt-no-label {
|
441 |
+
padding-left: 0
|
442 |
+
}
|
443 |
}
|
444 |
|
445 |
+
.wrap form#addtag .acf-fields.-left>.acf-field::before,
|
446 |
+
.wrap form#edittag .acf-fields.-left>.acf-field::before {
|
447 |
+
width: 20%
|
448 |
}
|
449 |
|
450 |
+
.wrap form#addtag .acf-fields.-left>.acf-field>.acf-label,
|
451 |
+
.wrap form#edittag .acf-fields.-left>.acf-field>.acf-label {
|
452 |
+
width: 20%;
|
453 |
+
margin-left: 0;
|
454 |
+
padding: 0 12px
|
455 |
}
|
456 |
|
457 |
+
.wrap form#addtag .acf-fields.-left>.acf-field>.acf-label label,
|
458 |
+
.wrap form#edittag .acf-fields.-left>.acf-field>.acf-label label {
|
459 |
+
color: #444
|
460 |
}
|
461 |
|
462 |
+
.wrap form#addtag .acf-fields.-left>.acf-field>.acf-input,
|
463 |
+
.wrap form#edittag .acf-fields.-left>.acf-field>.acf-input {
|
464 |
+
padding: 0 12px
|
465 |
}
|
466 |
|
467 |
.wrap form#addtag .form-field p,
|
468 |
.wrap form#addtag .form-field select,
|
469 |
.wrap form#edittag .form-field p,
|
470 |
.wrap form#edittag .form-field select {
|
471 |
+
max-width: 100%
|
472 |
}
|
473 |
|
474 |
.wrap form#addtag .form-field input[type=email],
|
489 |
.wrap form#edittag .form-field input[type=url],
|
490 |
.wrap form#edittag .form-field select,
|
491 |
.wrap form#edittag .form-field textarea {
|
492 |
+
width: 100%
|
493 |
}
|
494 |
|
495 |
+
.wrap form#edittag .acf-column-1>#wp-description-wrap {
|
496 |
+
display: none
|
497 |
}
|
498 |
|
499 |
+
.wrap form#edittag .postbox.wpseo-taxonomy-metabox-postbox>h2 {
|
500 |
+
border-bottom: 1px solid #ccd0d4
|
501 |
}
|
502 |
|
503 |
.wrap form#edittag tr.wpml-term-languages-wrap {
|
504 |
+
display: none
|
505 |
}
|
506 |
|
507 |
.wrap form#edittag #icl-tax-postbox .inside {
|
508 |
+
margin: 0;
|
509 |
+
padding: 15px 12px
|
510 |
}
|
511 |
|
512 |
.wrap form#edittag #icl-tax-postbox .inside table.icl_translations_table {
|
513 |
+
width: 100%
|
514 |
}
|
515 |
|
516 |
.wrap .rank-math-metabox-frame {
|
517 |
+
max-width: 100%
|
518 |
}
|
519 |
|
520 |
+
.wrap .rankmath>.acf-fields>.acf-field>.acf-input {
|
521 |
+
padding: 0 0 0 1px !important
|
522 |
}
|
523 |
|
524 |
+
.wrap .rankmath>.acf-fields>.acf-field>.acf-input>.rank-math-metabox-frame {
|
525 |
+
margin: -15px 0;
|
526 |
+
border: 0
|
527 |
}
|
528 |
|
529 |
.wrap #add-term-translations,
|
530 |
.wrap #edit-term-translations {
|
531 |
+
border: none;
|
532 |
+
width: 100%
|
533 |
}
|
534 |
|
535 |
.wrap #select-add-term-language select,
|
536 |
.wrap #select-edit-term-language select {
|
537 |
+
width: auto !important;
|
538 |
+
padding-right: 25px
|
539 |
+
}
|
540 |
+
|
541 |
+
.wrap #select-add-term-language+p,
|
542 |
+
.wrap #select-edit-term-language+p {
|
543 |
+
display: none
|
544 |
}
|
545 |
|
|
|
546 |
.wrap #select-add-term-language p.description,
|
|
|
547 |
.wrap #select-edit-term-language p.description {
|
548 |
+
display: none
|
549 |
}
|
550 |
|
551 |
+
.wrap #term-translations>p {
|
552 |
+
position: relative;
|
553 |
+
width: 20%;
|
554 |
+
padding: 0 12px;
|
555 |
+
float: left;
|
556 |
+
-webkit-box-sizing: border-box;
|
557 |
+
box-sizing: border-box;
|
558 |
+
margin: 0;
|
559 |
+
font-size: 13px;
|
560 |
+
font-weight: 600;
|
561 |
+
color: #444
|
562 |
}
|
563 |
|
564 |
+
.wrap #term-translations>.icl_subsubsub {
|
565 |
+
position: relative;
|
566 |
+
width: 20%;
|
567 |
+
-webkit-box-sizing: border-box;
|
568 |
+
box-sizing: border-box;
|
569 |
+
padding: 0 12px;
|
570 |
+
float: left
|
|
|
571 |
}
|
572 |
|
573 |
.wrap #term-translations #add-term-translations {
|
574 |
+
width: 80%;
|
575 |
+
position: relative;
|
576 |
+
float: left;
|
577 |
+
clear: none;
|
578 |
+
background: 0 0;
|
579 |
+
padding: 0 12px
|
580 |
}
|
581 |
|
582 |
.wrap #term-translations #add-term-translations td.pll-translation-column {
|
583 |
+
padding-left: 0;
|
584 |
+
padding-right: 0
|
585 |
}
|
586 |
|
587 |
.wrap #term-translations #add-term-translations td,
|
588 |
.wrap #term-translations #add-term-translations th {
|
589 |
+
padding-top: 4px;
|
590 |
+
padding-bottom: 4px
|
591 |
}
|
592 |
|
593 |
.wrap #term-translations #add-term-translations tr:first-of-type td,
|
594 |
.wrap #term-translations #add-term-translations tr:first-of-type th {
|
595 |
+
padding-top: 0
|
596 |
}
|
597 |
|
598 |
.wrap #term-translations #add-term-translations tr:last-of-type td,
|
599 |
.wrap #term-translations #add-term-translations tr:last-of-type th {
|
600 |
+
padding-bottom: 0
|
601 |
}
|
602 |
|
603 |
.wrap #term-translations #edit-term-translations td,
|
604 |
.wrap #term-translations #edit-term-translations th {
|
605 |
+
padding-top: 2px;
|
606 |
+
padding-bottom: 2px
|
607 |
}
|
608 |
|
609 |
.wrap #term-translations #edit-term-translations tr:first-of-type td,
|
610 |
.wrap #term-translations #edit-term-translations tr:first-of-type th {
|
611 |
+
padding-top: 0
|
612 |
}
|
613 |
|
614 |
.wrap #term-translations #edit-term-translations tr:last-of-type td,
|
615 |
.wrap #term-translations #edit-term-translations tr:last-of-type th {
|
616 |
+
padding-bottom: 0
|
617 |
+
}
|
618 |
+
|
619 |
+
.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field,
|
620 |
+
.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field,
|
621 |
+
.wrap #acf-group_term>.acf-fields>table.acf-field,
|
622 |
+
.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field,
|
623 |
+
.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field,
|
624 |
+
.wrap #acf-group_user>.acf-fields>table.acf-field,
|
625 |
+
.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field,
|
626 |
+
.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field,
|
627 |
+
.wrap #acf-group_user_customer>.acf-fields>table.acf-field {
|
628 |
+
border: none;
|
629 |
+
margin-bottom: 0
|
630 |
+
}
|
631 |
+
|
632 |
+
.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field::before,
|
633 |
+
.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field::before,
|
634 |
+
.wrap #acf-group_term>.acf-fields>table.acf-field::before,
|
635 |
+
.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field::before,
|
636 |
+
.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field::before,
|
637 |
+
.wrap #acf-group_user>.acf-fields>table.acf-field::before,
|
638 |
+
.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field::before,
|
639 |
+
.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field::before,
|
640 |
+
.wrap #acf-group_user_customer>.acf-fields>table.acf-field::before {
|
641 |
+
content: unset
|
642 |
+
}
|
643 |
+
|
644 |
+
.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,
|
645 |
+
.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,
|
646 |
+
.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,
|
647 |
+
.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,
|
648 |
+
.wrap #acf-group_term>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,
|
649 |
+
.wrap #acf-group_term>.acf-fields>table.acf-field>tbody>tr:first-of-type>th,
|
650 |
+
.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,
|
651 |
+
.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,
|
652 |
+
.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,
|
653 |
+
.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,
|
654 |
+
.wrap #acf-group_user>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,
|
655 |
+
.wrap #acf-group_user>.acf-fields>table.acf-field>tbody>tr:first-of-type>th,
|
656 |
+
.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,
|
657 |
+
.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,
|
658 |
+
.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,
|
659 |
+
.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,
|
660 |
+
.wrap #acf-group_user_customer>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,
|
661 |
+
.wrap #acf-group_user_customer>.acf-fields>table.acf-field>tbody>tr:first-of-type>th {
|
662 |
+
border-top: 0
|
663 |
+
}
|
664 |
+
|
665 |
+
.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field,
|
666 |
+
.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field,
|
667 |
+
.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field {
|
668 |
+
padding: 0
|
669 |
}
|
670 |
|
671 |
.edit-tags-php #col-left {
|
672 |
+
display: none;
|
673 |
+
float: none;
|
674 |
+
width: 100%
|
675 |
}
|
676 |
|
677 |
.edit-tags-php #col-left .col-wrap {
|
678 |
+
padding: 0
|
679 |
}
|
680 |
|
681 |
.edit-tags-php #col-left .col-wrap #poststuff {
|
682 |
+
min-width: 100%
|
683 |
}
|
684 |
|
685 |
.edit-tags-php #col-left .col-wrap #poststuff #addtag h2.hndle {
|
686 |
+
border-bottom: 1px solid #ccd0d4
|
687 |
}
|
688 |
|
689 |
.edit-tags-php #col-left .col-wrap #poststuff #addtag .inside .term-name-wrap {
|
690 |
+
border-top: none
|
691 |
}
|
692 |
|
693 |
.edit-tags-php #col-left .col-wrap #poststuff #addtag .submit {
|
694 |
+
display: block;
|
695 |
+
margin: 0
|
696 |
}
|
697 |
|
698 |
.edit-tags-php #col-container #col-right {
|
699 |
+
float: none;
|
700 |
+
width: auto
|
701 |
}
|
702 |
|
703 |
.edit-tags-php #col-container #col-right .col-wrap {
|
704 |
+
padding: 0
|
705 |
}
|
@@ -1 +1 @@
|
|
1 |
-
.wrap{padding-top:0!important;min-width:auto!important}@media only screen and (min-width:782px){.wrap:not(#poststuff) form#createuser,.wrap:not(#poststuff) form#edittag,.wrap:not(#poststuff) form#your-profile,.wrap:not(#poststuff) form[action="options-permalink.php"],.wrap:not(#poststuff) form[action="options.php"]{max-width:calc(100% - 300px)!important;position:relative}.wrap:not(#poststuff) form#createuser .edit-tag-actions,.wrap:not(#poststuff) form#createuser p.submit,.wrap:not(#poststuff) form#edittag .edit-tag-actions,.wrap:not(#poststuff) form#edittag p.submit,.wrap:not(#poststuff) form#your-profile .edit-tag-actions,.wrap:not(#poststuff) form#your-profile p.submit,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions,.wrap:not(#poststuff) form[action="options.php"] p.submit{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:37px;width:280px;right:-300px;padding:10px;margin:0;background:#f5f5f5;text-align:right;border:1px solid #ccd0d4;border-radius:0;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.wrap:not(#poststuff) form#createuser .edit-tag-actions:before,.wrap:not(#poststuff) form#createuser p.submit:before,.wrap:not(#poststuff) form#edittag .edit-tag-actions:before,.wrap:not(#poststuff) form#edittag p.submit:before,.wrap:not(#poststuff) form#your-profile .edit-tag-actions:before,.wrap:not(#poststuff) form#your-profile p.submit:before,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions:before,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit:before,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions:before,.wrap:not(#poststuff) form[action="options.php"] p.submit:before{-webkit-box-sizing:border-box;box-sizing:border-box;content:"";background:#fff;border:1px solid #ccd0d4;border-bottom:0;position:absolute;width:280px;top:-38px;height:37px;left:-1px}.wrap:not(#poststuff) form#createuser .edit-tag-actions .button,.wrap:not(#poststuff) form#createuser p.submit .button,.wrap:not(#poststuff) form#edittag .edit-tag-actions .button,.wrap:not(#poststuff) form#edittag p.submit .button,.wrap:not(#poststuff) form#your-profile .edit-tag-actions .button,.wrap:not(#poststuff) form#your-profile p.submit .button,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions .button,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit .button,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions .button,.wrap:not(#poststuff) form[action="options.php"] p.submit .button{min-height:32px;line-height:2.30769231;padding:0 12px}.wrap:not(#poststuff) form#createuser .edit-tag-actions #delete-link,.wrap:not(#poststuff) form#createuser p.submit #delete-link,.wrap:not(#poststuff) form#edittag .edit-tag-actions #delete-link,.wrap:not(#poststuff) form#edittag p.submit #delete-link,.wrap:not(#poststuff) form#your-profile .edit-tag-actions #delete-link,.wrap:not(#poststuff) form#your-profile p.submit #delete-link,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions #delete-link,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit #delete-link,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions #delete-link,.wrap:not(#poststuff) form[action="options.php"] p.submit #delete-link{float:left;margin:0;text-decoration:underline}}.wrap>form:not(.search-form){margin-top:13px;max-width:100%!important}.wrap>form>div>div>h2,.wrap>form>div>div>h3,.wrap>form>h2,.wrap>form>h3{background:#fff;border:1px solid #ccd0d4;border-bottom:0;margin:0;color:#23282d;font-size:14px;padding:8px 12px;line-height:1.4}.wrap>form>div>div>h2+p,.wrap>form>div>div>h3+p,.wrap>form>h2+p,.wrap>form>h3+p{margin:0;border:1px solid #ccd0d4;border-bottom:0;padding:15px 12px}.wrap>form>div>div>h2+.form-table,.wrap>form>div>div>h2+p+.form-table,.wrap>form>div>div>h3+.form-table,.wrap>form>div>div>h3+p+.form-table,.wrap>form>h2+.form-table,.wrap>form>h2+p+.form-table,.wrap>form>h3+.form-table,.wrap>form>h3+p+.form-table{margin-top:0}.wrap>form .form-table{background:#fff;width:100%;border:1px solid #ccd0d4;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);margin-bottom:20px}.wrap>form .form-table>tbody>tr.acf-field{position:static}.wrap>form .form-table>tbody>tr.acf-tab-wrap>td{background:#f9f9f9;padding:15px 0 0}.wrap>form .form-table>tbody>tr.acf-tab-wrap>td ul.acf-tab-group{border-bottom:0;padding:0 0 0 20%}.wrap>form .form-table>tbody>tr.acf-tab-wrap>td ul.acf-tab-group>li.active a{background:#fff}.wrap>form .form-table>tbody>tr>td{background:#fff;border-top:1px solid #eee;position:static;padding:15px 12px}.wrap>form .form-table>tbody>tr>td.td-full{padding:15px 12px}.wrap>form .form-table>tbody>tr>td p{font-size:13px}.wrap>form .form-table>tbody>tr>td.acf-label,.wrap>form .form-table>tbody>tr>th{border-top:1px solid #eee;border-right:1px solid #e1e1e1;background:#f9f9f9;padding:15px 12px;width:20%;font-size:13px;position:static;color:#444}.wrap>form .form-table>tbody>tr>td.acf-label label,.wrap>form .form-table>tbody>tr>th label{vertical-align:top}.wrap>form .form-table>tbody>tr:first-of-type td,.wrap>form .form-table>tbody>tr:first-of-type th{border-top:1px solid #ccd0d4}.wrap>form .form-table textarea{width:100%}.wrap>form .form-table .regular-text{width:100%;max-width:25em}@media only screen and (max-width:782px){.wrap>form>div>div>h2,.wrap>form>div>div>h3,.wrap>form>h2,.wrap>form>h3{padding:12px}.wrap>form table.form-table>tbody>tr{display:block;padding:15px 12px;border-top:1px solid #eee}.wrap>form table.form-table>tbody>tr>td.acf-label,.wrap>form table.form-table>tbody>tr>th{margin-bottom:10px}.wrap>form table.form-table>tbody>tr>td,.wrap>form table.form-table>tbody>tr>td.acf-label,.wrap>form table.form-table>tbody>tr>th{padding:0;display:block;width:auto;background:none;border:0!important}.wrap>form table.form-table>tbody>tr:first-child{border-top:0}}.wrap #titlediv{margin-bottom:10px}.wrap #titlediv input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}.wrap .postbox .hndle{cursor:auto;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wrap .postbox .handle-actions button,.wrap .postbox .handle-actions span{display:none}.wrap .postbox .handle-actions .acf-hndle-cog{width:2.2rem}.wrap #submitdiv #major-publishing-actions{border-top:0}.wrap #submitdiv #major-publishing-actions #publishing-action{float:none;margin:0}.wrap #submitdiv #major-publishing-actions #publishing-action .button{float:right}.wrap #submitdiv #major-publishing-actions #publishing-action .spinner{margin:5px 10px 0}.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link{float:left;margin-left:0}.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link a{text-decoration:underline}.wrap form#createuser .acf-field input[type=email],.wrap form#createuser .acf-field input[type=number],.wrap form#createuser .acf-field input[type=password],.wrap form#createuser .acf-field input[type=search],.wrap form#createuser .acf-field input[type=text],.wrap form#createuser .acf-field input[type=url],.wrap form#createuser .acf-field select,.wrap form#your-profile .acf-field input[type=email],.wrap form#your-profile .acf-field input[type=number],.wrap form#your-profile .acf-field input[type=password],.wrap form#your-profile .acf-field input[type=search],.wrap form#your-profile .acf-field input[type=text],.wrap form#your-profile .acf-field input[type=url],.wrap form#your-profile .acf-field select{max-width:100%}.wrap form#createuser .acf-field textarea,.wrap form#your-profile .acf-field textarea{width:100%}.wrap form#createuser .acf-tab-wrap,.wrap form#your-profile .acf-tab-wrap{position:relative}.wrap form#createuser select#ure_select_other_roles,.wrap form#createuser select#ure_select_other_roles+.ms-parent,.wrap form#your-profile select#ure_select_other_roles,.wrap form#your-profile select#ure_select_other_roles+.ms-parent{width:100%!important;max-width:500px!important}.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice,.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice{-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:3px;border:1px solid #7e8993;color:#32373c;padding:4px 8px;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px;line-height:2.1;min-height:30px;background:#fff url("data:image/svg+xml;charset=US-ASCII, %3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:16px 16px;cursor:pointer}.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice>span.placeholder,.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice>span.placeholder{color:#32373c}.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice>div,.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice>div{display:none}.wrap form#createuser .yoast-settings,.wrap form#your-profile .yoast-settings{padding:0;margin-bottom:20px;font-size:13px}.wrap form#createuser .yoast-settings h2,.wrap form#your-profile .yoast-settings h2{margin:0}.wrap form#createuser .yoast-settings label,.wrap form#your-profile .yoast-settings label{margin:0;padding:0;width:auto;font-size:13px;color:#444;line-height:1.7}.wrap form#createuser .yoast-settings .description,.wrap form#your-profile .yoast-settings .description{font-size:13px;margin:0 0 5px;color:#666}.wrap form#createuser .yoast-settings input,.wrap form#createuser .yoast-settings textarea,.wrap form#your-profile .yoast-settings input,.wrap form#your-profile .yoast-settings textarea{margin:0}.wrap form#createuser .yoast-settings textarea,.wrap form#your-profile .yoast-settings textarea{margin-bottom:10px}.wrap form#createuser .yoast-settings input[type=checkbox],.wrap form#your-profile .yoast-settings input[type=checkbox]{margin-right:5px;vertical-align:-6px}.wrap form#createuser .form-table[role=presentation] tr.user-language-wrap th[colspan="2"],.wrap form#your-profile .form-table[role=presentation] tr.user-language-wrap th[colspan="2"]{display:none}.wrap form#addtag .acf-fields.-left>.acf-field,.wrap form#edittag .acf-fields.-left>.acf-field{padding-left:0}.wrap form#addtag .acf-fields.-left>.acf-field.acfe-bt-no-label,.wrap form#edittag .acf-fields.-left>.acf-field.acfe-bt-no-label{padding-left:20%}@media only screen and (max-width:640px){.wrap form#addtag .acf-fields.-left>.acf-field.acfe-bt-no-label,.wrap form#edittag .acf-fields.-left>.acf-field.acfe-bt-no-label{padding-left:0}}.wrap form#addtag .acf-fields.-left>.acf-field:before,.wrap form#edittag .acf-fields.-left>.acf-field:before{width:20%}.wrap form#addtag .acf-fields.-left>.acf-field>.acf-label,.wrap form#edittag .acf-fields.-left>.acf-field>.acf-label{width:20%;margin-left:0;padding:0 12px}.wrap form#addtag .acf-fields.-left>.acf-field>.acf-label label,.wrap form#edittag .acf-fields.-left>.acf-field>.acf-label label{color:#444}.wrap form#addtag .acf-fields.-left>.acf-field>.acf-input,.wrap form#edittag .acf-fields.-left>.acf-field>.acf-input{padding:0 12px}.wrap form#addtag .form-field p,.wrap form#addtag .form-field select,.wrap form#edittag .form-field p,.wrap form#edittag .form-field select{max-width:100%}.wrap form#addtag .form-field input[type=email],.wrap form#addtag .form-field input[type=number],.wrap form#addtag .form-field input[type=password],.wrap form#addtag .form-field input[type=search],.wrap form#addtag .form-field input[type=tel],.wrap form#addtag .form-field input[type=text],.wrap form#addtag .form-field input[type=url],.wrap form#addtag .form-field select,.wrap form#addtag .form-field textarea,.wrap form#edittag .form-field input[type=email],.wrap form#edittag .form-field input[type=number],.wrap form#edittag .form-field input[type=password],.wrap form#edittag .form-field input[type=search],.wrap form#edittag .form-field input[type=tel],.wrap form#edittag .form-field input[type=text],.wrap form#edittag .form-field input[type=url],.wrap form#edittag .form-field select,.wrap form#edittag .form-field textarea{width:100%}.wrap form#edittag .acf-column-1>#wp-description-wrap{display:none}.wrap form#edittag .postbox.wpseo-taxonomy-metabox-postbox>h2{border-bottom:1px solid #ccd0d4}.wrap form#edittag tr.wpml-term-languages-wrap{display:none}.wrap form#edittag #icl-tax-postbox .inside{margin:0;padding:15px 12px}.wrap form#edittag #icl-tax-postbox .inside table.icl_translations_table{width:100%}.wrap .rank-math-metabox-frame{max-width:100%}.wrap .rankmath>.acf-fields>.acf-field>.acf-input{padding:0 0 0 1px!important}.wrap .rankmath>.acf-fields>.acf-field>.acf-input>.rank-math-metabox-frame{margin:-15px 0;border:0}.wrap #add-term-translations,.wrap #edit-term-translations{border:none;width:100%}.wrap #select-add-term-language select,.wrap #select-edit-term-language select{width:auto!important;padding-right:25px}.wrap #select-add-term-language+p,.wrap #select-add-term-language p.description,.wrap #select-edit-term-language+p,.wrap #select-edit-term-language p.description{display:none}.wrap #term-translations>p{margin:0;font-size:13px;font-weight:600;color:#444}.wrap #term-translations>.icl_subsubsub,.wrap #term-translations>p{position:relative;width:20%;padding:0 12px;float:left;-webkit-box-sizing:border-box;box-sizing:border-box}.wrap #term-translations #add-term-translations{width:80%;position:relative;float:left;clear:none;background:none;padding:0 12px}.wrap #term-translations #add-term-translations td.pll-translation-column{padding-left:0;padding-right:0}.wrap #term-translations #add-term-translations td,.wrap #term-translations #add-term-translations th{padding-top:4px;padding-bottom:4px}.wrap #term-translations #add-term-translations tr:first-of-type td,.wrap #term-translations #add-term-translations tr:first-of-type th{padding-top:0}.wrap #term-translations #add-term-translations tr:last-of-type td,.wrap #term-translations #add-term-translations tr:last-of-type th{padding-bottom:0}.wrap #term-translations #edit-term-translations td,.wrap #term-translations #edit-term-translations th{padding-top:2px;padding-bottom:2px}.wrap #term-translations #edit-term-translations tr:first-of-type td,.wrap #term-translations #edit-term-translations tr:first-of-type th{padding-top:0}.wrap #term-translations #edit-term-translations tr:last-of-type td,.wrap #term-translations #edit-term-translations tr:last-of-type th{padding-bottom:0}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field,.wrap #acf-group_term>.acf-fields>table.acf-field,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field,.wrap #acf-group_user>.acf-fields>table.acf-field,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field,.wrap #acf-group_user_customer>.acf-fields>table.acf-field{border:none;margin-bottom:0}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field:before,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field:before,.wrap #acf-group_term>.acf-fields>table.acf-field:before,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field:before,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field:before,.wrap #acf-group_user>.acf-fields>table.acf-field:before,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field:before,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field:before,.wrap #acf-group_user_customer>.acf-fields>table.acf-field:before{content:unset}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_term>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_term>.acf-fields>table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user>.acf-fields>table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user_customer>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user_customer>.acf-fields>table.acf-field>tbody>tr:first-of-type>th{border-top:0}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field{padding:0}.edit-tags-php #col-left{display:none;float:none;width:100%}.edit-tags-php #col-left .col-wrap{padding:0}.edit-tags-php #col-left .col-wrap #poststuff{min-width:100%}.edit-tags-php #col-left .col-wrap #poststuff #addtag h2.hndle{border-bottom:1px solid #ccd0d4}.edit-tags-php #col-left .col-wrap #poststuff #addtag .inside .term-name-wrap{border-top:none}.edit-tags-php #col-left .col-wrap #poststuff #addtag .submit{display:block;margin:0}.edit-tags-php #col-container #col-right{float:none;width:auto}.edit-tags-php #col-container #col-right .col-wrap{padding:0}
|
1 |
+
body:not(.taxonomy-product_cat):not(.woocommerce-page) .wrap{padding-top:0!important}.wrap{min-width:auto!important}@media only screen and (min-width:782px){.wrap:not(#poststuff) form#createuser,.wrap:not(#poststuff) form#edittag,.wrap:not(#poststuff) form#your-profile,.wrap:not(#poststuff) form[action="options-permalink.php"],.wrap:not(#poststuff) form[action="options.php"]{max-width:calc(100% - 300px)!important;position:relative}.wrap:not(#poststuff) form#createuser .edit-tag-actions,.wrap:not(#poststuff) form#createuser p.submit,.wrap:not(#poststuff) form#edittag .edit-tag-actions,.wrap:not(#poststuff) form#edittag p.submit,.wrap:not(#poststuff) form#your-profile .edit-tag-actions,.wrap:not(#poststuff) form#your-profile p.submit,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions,.wrap:not(#poststuff) form[action="options.php"] p.submit{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:37px;width:280px;right:-300px;padding:10px;margin:0;background:#f5f5f5;text-align:right;border:1px solid #ccd0d4;border-radius:0;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04)}.wrap:not(#poststuff) form#createuser .edit-tag-actions::before,.wrap:not(#poststuff) form#createuser p.submit::before,.wrap:not(#poststuff) form#edittag .edit-tag-actions::before,.wrap:not(#poststuff) form#edittag p.submit::before,.wrap:not(#poststuff) form#your-profile .edit-tag-actions::before,.wrap:not(#poststuff) form#your-profile p.submit::before,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions::before,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit::before,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions::before,.wrap:not(#poststuff) form[action="options.php"] p.submit::before{-webkit-box-sizing:border-box;box-sizing:border-box;content:"";background:#fff;border:1px solid #ccd0d4;border-bottom:0;position:absolute;width:280px;top:-38px;height:37px;left:-1px}.wrap:not(#poststuff) form#createuser .edit-tag-actions .button,.wrap:not(#poststuff) form#createuser p.submit .button,.wrap:not(#poststuff) form#edittag .edit-tag-actions .button,.wrap:not(#poststuff) form#edittag p.submit .button,.wrap:not(#poststuff) form#your-profile .edit-tag-actions .button,.wrap:not(#poststuff) form#your-profile p.submit .button,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions .button,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit .button,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions .button,.wrap:not(#poststuff) form[action="options.php"] p.submit .button{min-height:32px;line-height:2.30769231;padding:0 12px}.wrap:not(#poststuff) form#createuser .edit-tag-actions #delete-link,.wrap:not(#poststuff) form#createuser p.submit #delete-link,.wrap:not(#poststuff) form#edittag .edit-tag-actions #delete-link,.wrap:not(#poststuff) form#edittag p.submit #delete-link,.wrap:not(#poststuff) form#your-profile .edit-tag-actions #delete-link,.wrap:not(#poststuff) form#your-profile p.submit #delete-link,.wrap:not(#poststuff) form[action="options-permalink.php"] .edit-tag-actions #delete-link,.wrap:not(#poststuff) form[action="options-permalink.php"] p.submit #delete-link,.wrap:not(#poststuff) form[action="options.php"] .edit-tag-actions #delete-link,.wrap:not(#poststuff) form[action="options.php"] p.submit #delete-link{float:left;margin:0;text-decoration:underline}}.wrap>form:not(.search-form){margin-top:13px;max-width:100%!important}.wrap>form>div>div>h2,.wrap>form>div>div>h3,.wrap>form>h2,.wrap>form>h3{background:#fff;border:1px solid #ccd0d4;border-bottom:0;margin:0;color:#23282d;font-size:14px;padding:8px 12px;line-height:1.4}.wrap>form>div>div>h2+p,.wrap>form>div>div>h3+p,.wrap>form>h2+p,.wrap>form>h3+p{margin:0;border:1px solid #ccd0d4;border-bottom:0;padding:15px 12px}.wrap>form>div>div>h2+.form-table,.wrap>form>div>div>h2+p+.form-table,.wrap>form>div>div>h3+.form-table,.wrap>form>div>div>h3+p+.form-table,.wrap>form>h2+.form-table,.wrap>form>h2+p+.form-table,.wrap>form>h3+.form-table,.wrap>form>h3+p+.form-table{margin-top:0}.wrap>form .form-table{background:#fff;width:100%;border:1px solid #ccd0d4;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);margin-bottom:20px}.wrap>form .form-table>tbody>tr.acf-field{position:initial}.wrap>form .form-table>tbody>tr.acf-tab-wrap>td{background:#f9f9f9;padding:15px 0 0}.wrap>form .form-table>tbody>tr.acf-tab-wrap>td ul.acf-tab-group{border-bottom:0;padding:0 0 0 20%}.wrap>form .form-table>tbody>tr.acf-tab-wrap>td ul.acf-tab-group>li.active a{background:#fff}.wrap>form .form-table>tbody>tr>td{background:#fff;border-top:1px solid #eee;position:initial;padding:15px 12px}.wrap>form .form-table>tbody>tr>td.td-full{padding:15px 12px}.wrap>form .form-table>tbody>tr>td p{font-size:13px}.wrap>form .form-table>tbody>tr>td.acf-label,.wrap>form .form-table>tbody>tr>th{border-top:1px solid #eee;border-right:1px solid #e1e1e1;background:#f9f9f9;padding:15px 12px;width:20%;font-size:13px;position:initial;color:#444}.wrap>form .form-table>tbody>tr>td.acf-label label,.wrap>form .form-table>tbody>tr>th label{vertical-align:top}.wrap>form .form-table>tbody>tr:first-of-type td,.wrap>form .form-table>tbody>tr:first-of-type th{border-top:1px solid #ccd0d4}.wrap>form .form-table textarea{width:100%}.wrap>form .form-table .regular-text{width:100%;max-width:25em}@media only screen and (max-width:782px){.wrap>form>div>div>h2,.wrap>form>div>div>h3,.wrap>form>h2,.wrap>form>h3{padding:12px}.wrap>form table.form-table>tbody>tr{display:block;padding:15px 12px;border-top:1px solid #eee}.wrap>form table.form-table>tbody>tr>td.acf-label,.wrap>form table.form-table>tbody>tr>th{margin-bottom:10px}.wrap>form table.form-table>tbody>tr>td,.wrap>form table.form-table>tbody>tr>td.acf-label,.wrap>form table.form-table>tbody>tr>th{padding:0;display:block;width:auto;background:0 0;border:0!important}.wrap>form table.form-table>tbody>tr:first-child{border-top:0}}.wrap #titlediv{margin-bottom:10px}.wrap #titlediv input{padding:3px 8px;font-size:1.7em;line-height:100%;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}.wrap .postbox .hndle{cursor:auto;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.wrap .postbox .handle-actions button,.wrap .postbox .handle-actions span{display:none}.wrap .postbox .handle-actions .acf-hndle-cog{width:2.2rem}.wrap #submitdiv #major-publishing-actions{border-top:0}.wrap #submitdiv #major-publishing-actions #publishing-action{float:none;margin:0}.wrap #submitdiv #major-publishing-actions #publishing-action .button{float:right}.wrap #submitdiv #major-publishing-actions #publishing-action .spinner{margin:5px 10px 0}.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link{float:left;margin-left:0}.wrap #submitdiv #major-publishing-actions #publishing-action #delete-link a{text-decoration:underline}.wrap form#createuser .acf-field input[type=email],.wrap form#createuser .acf-field input[type=number],.wrap form#createuser .acf-field input[type=password],.wrap form#createuser .acf-field input[type=search],.wrap form#createuser .acf-field input[type=text],.wrap form#createuser .acf-field input[type=url],.wrap form#createuser .acf-field select,.wrap form#your-profile .acf-field input[type=email],.wrap form#your-profile .acf-field input[type=number],.wrap form#your-profile .acf-field input[type=password],.wrap form#your-profile .acf-field input[type=search],.wrap form#your-profile .acf-field input[type=text],.wrap form#your-profile .acf-field input[type=url],.wrap form#your-profile .acf-field select{max-width:100%}.wrap form#createuser .acf-field textarea,.wrap form#your-profile .acf-field textarea{width:100%;max-width:none}.wrap form#createuser .acf-tab-wrap,.wrap form#your-profile .acf-tab-wrap{position:relative}.wrap form#createuser select#ure_select_other_roles,.wrap form#createuser select#ure_select_other_roles+.ms-parent,.wrap form#your-profile select#ure_select_other_roles,.wrap form#your-profile select#ure_select_other_roles+.ms-parent{width:100%!important;max-width:500px!important}.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice,.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice{-webkit-box-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:3px;border:1px solid #7e8993;color:#32373c;padding:4px 8px;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px;line-height:2.1;min-height:30px;background:url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') right 5px top 55%/16px 16px no-repeat #fff;cursor:pointer}.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice>span.placeholder,.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice>span.placeholder{color:#32373c}.wrap form#createuser select#ure_select_other_roles+.ms-parent .ms-choice>div,.wrap form#your-profile select#ure_select_other_roles+.ms-parent .ms-choice>div{display:none}.wrap form#createuser .yoast-settings,.wrap form#your-profile .yoast-settings{padding:0;margin-bottom:20px;font-size:13px}.wrap form#createuser .yoast-settings h2,.wrap form#your-profile .yoast-settings h2{margin:0}.wrap form#createuser .yoast-settings label,.wrap form#your-profile .yoast-settings label{margin:0;padding:0;width:auto;font-size:13px;color:#444;line-height:1.7}.wrap form#createuser .yoast-settings .description,.wrap form#your-profile .yoast-settings .description{font-size:13px;margin:0 0 5px;color:#666}.wrap form#createuser .yoast-settings input,.wrap form#createuser .yoast-settings textarea,.wrap form#your-profile .yoast-settings input,.wrap form#your-profile .yoast-settings textarea{margin:0}.wrap form#createuser .yoast-settings textarea,.wrap form#your-profile .yoast-settings textarea{margin-bottom:10px}.wrap form#createuser .yoast-settings input[type=checkbox],.wrap form#your-profile .yoast-settings input[type=checkbox]{margin-right:5px;vertical-align:-6px}.wrap form#createuser .form-table[role=presentation] tr.user-language-wrap th[colspan="2"],.wrap form#your-profile .form-table[role=presentation] tr.user-language-wrap th[colspan="2"]{display:none}.wrap form#addtag .acf-fields.-left>.acf-field,.wrap form#edittag .acf-fields.-left>.acf-field{padding-left:0}.wrap form#addtag .acf-fields.-left>.acf-field.acfe-bt-no-label,.wrap form#edittag .acf-fields.-left>.acf-field.acfe-bt-no-label{padding-left:20%}@media only screen and (max-width:640px){.wrap form#addtag .acf-fields.-left>.acf-field.acfe-bt-no-label,.wrap form#edittag .acf-fields.-left>.acf-field.acfe-bt-no-label{padding-left:0}}.wrap form#addtag .acf-fields.-left>.acf-field::before,.wrap form#edittag .acf-fields.-left>.acf-field::before{width:20%}.wrap form#addtag .acf-fields.-left>.acf-field>.acf-label,.wrap form#edittag .acf-fields.-left>.acf-field>.acf-label{width:20%;margin-left:0;padding:0 12px}.wrap form#addtag .acf-fields.-left>.acf-field>.acf-label label,.wrap form#edittag .acf-fields.-left>.acf-field>.acf-label label{color:#444}.wrap form#addtag .acf-fields.-left>.acf-field>.acf-input,.wrap form#edittag .acf-fields.-left>.acf-field>.acf-input{padding:0 12px}.wrap form#addtag .form-field p,.wrap form#addtag .form-field select,.wrap form#edittag .form-field p,.wrap form#edittag .form-field select{max-width:100%}.wrap form#addtag .form-field input[type=email],.wrap form#addtag .form-field input[type=number],.wrap form#addtag .form-field input[type=password],.wrap form#addtag .form-field input[type=search],.wrap form#addtag .form-field input[type=tel],.wrap form#addtag .form-field input[type=text],.wrap form#addtag .form-field input[type=url],.wrap form#addtag .form-field select,.wrap form#addtag .form-field textarea,.wrap form#edittag .form-field input[type=email],.wrap form#edittag .form-field input[type=number],.wrap form#edittag .form-field input[type=password],.wrap form#edittag .form-field input[type=search],.wrap form#edittag .form-field input[type=tel],.wrap form#edittag .form-field input[type=text],.wrap form#edittag .form-field input[type=url],.wrap form#edittag .form-field select,.wrap form#edittag .form-field textarea{width:100%}.wrap form#edittag .acf-column-1>#wp-description-wrap{display:none}.wrap form#edittag .postbox.wpseo-taxonomy-metabox-postbox>h2{border-bottom:1px solid #ccd0d4}.wrap form#edittag tr.wpml-term-languages-wrap{display:none}.wrap form#edittag #icl-tax-postbox .inside{margin:0;padding:15px 12px}.wrap form#edittag #icl-tax-postbox .inside table.icl_translations_table{width:100%}.wrap .rank-math-metabox-frame{max-width:100%}.wrap .rankmath>.acf-fields>.acf-field>.acf-input{padding:0 0 0 1px!important}.wrap .rankmath>.acf-fields>.acf-field>.acf-input>.rank-math-metabox-frame{margin:-15px 0;border:0}.wrap #add-term-translations,.wrap #edit-term-translations{border:none;width:100%}.wrap #select-add-term-language select,.wrap #select-edit-term-language select{width:auto!important;padding-right:25px}.wrap #select-add-term-language p.description,.wrap #select-add-term-language+p,.wrap #select-edit-term-language p.description,.wrap #select-edit-term-language+p{display:none}.wrap #term-translations>p{position:relative;width:20%;padding:0 12px;float:left;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;font-size:13px;font-weight:600;color:#444}.wrap #term-translations>.icl_subsubsub{position:relative;width:20%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 12px;float:left}.wrap #term-translations #add-term-translations{width:80%;position:relative;float:left;clear:none;background:0 0;padding:0 12px}.wrap #term-translations #add-term-translations td.pll-translation-column{padding-left:0;padding-right:0}.wrap #term-translations #add-term-translations td,.wrap #term-translations #add-term-translations th{padding-top:4px;padding-bottom:4px}.wrap #term-translations #add-term-translations tr:first-of-type td,.wrap #term-translations #add-term-translations tr:first-of-type th{padding-top:0}.wrap #term-translations #add-term-translations tr:last-of-type td,.wrap #term-translations #add-term-translations tr:last-of-type th{padding-bottom:0}.wrap #term-translations #edit-term-translations td,.wrap #term-translations #edit-term-translations th{padding-top:2px;padding-bottom:2px}.wrap #term-translations #edit-term-translations tr:first-of-type td,.wrap #term-translations #edit-term-translations tr:first-of-type th{padding-top:0}.wrap #term-translations #edit-term-translations tr:last-of-type td,.wrap #term-translations #edit-term-translations tr:last-of-type th{padding-bottom:0}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field,.wrap #acf-group_term>.acf-fields>table.acf-field,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field,.wrap #acf-group_user>.acf-fields>table.acf-field,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field,.wrap #acf-group_user_customer>.acf-fields>table.acf-field{border:none;margin-bottom:0}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field::before,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field::before,.wrap #acf-group_term>.acf-fields>table.acf-field::before,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field::before,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field::before,.wrap #acf-group_user>.acf-fields>table.acf-field::before,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field::before,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field::before,.wrap #acf-group_user_customer>.acf-fields>table.acf-field::before{content:unset}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_term>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_term>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_term>.acf-fields>table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user>.acf-fields>table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user_customer>.acf-fields>.yoast-settings-table.acf-field>tbody>tr:first-of-type>th,.wrap #acf-group_user_customer>.acf-fields>table.acf-field>tbody>tr:first-of-type>td,.wrap #acf-group_user_customer>.acf-fields>table.acf-field>tbody>tr:first-of-type>th{border-top:0}.wrap #acf-group_term>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user>.acf-fields>.rank-math-metabox-frame.acf-field,.wrap #acf-group_user_customer>.acf-fields>.rank-math-metabox-frame.acf-field{padding:0}.edit-tags-php #col-left{display:none;float:none;width:100%}.edit-tags-php #col-left .col-wrap{padding:0}.edit-tags-php #col-left .col-wrap #poststuff{min-width:100%}.edit-tags-php #col-left .col-wrap #poststuff #addtag h2.hndle{border-bottom:1px solid #ccd0d4}.edit-tags-php #col-left .col-wrap #poststuff #addtag .inside .term-name-wrap{border-top:none}.edit-tags-php #col-left .col-wrap #poststuff #addtag .submit{display:block;margin:0}.edit-tags-php #col-container #col-right{float:none;width:auto}.edit-tags-php #col-container #col-right .col-wrap{padding:0}
|
@@ -1,583 +1,614 @@
|
|
1 |
body.acfe-modal-opened {
|
2 |
-
|
3 |
}
|
4 |
|
5 |
.acfe-modal-overlay {
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
}
|
16 |
|
17 |
.acfe-modal {
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
}
|
23 |
|
24 |
.acfe-modal.-open {
|
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 |
-
.acfe-modal.-settings.-open.-full
|
121 |
-
|
122 |
-
}
|
123 |
-
|
124 |
-
.acfe-modal.-settings.-open.-full
|
125 |
-
|
126 |
-
}
|
127 |
-
|
128 |
-
.acfe-modal.-settings.-open.-full
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
140 |
}
|
141 |
|
142 |
.acfe-modal.-open .acfe-modal-title *,
|
143 |
-
.acfe-modal.-open
|
144 |
-
|
145 |
-
|
146 |
}
|
147 |
|
148 |
.acfe-modal.-open .acfe-modal-title {
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
}
|
163 |
-
|
164 |
-
.acfe-modal.-open.acfe-modal-sub
|
165 |
-
|
166 |
-
}
|
167 |
-
|
168 |
-
.acfe-modal.-open .acfe-modal-title
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
}
|
173 |
-
|
174 |
-
.acfe-modal.-open .acfe-modal-title
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
}
|
187 |
-
|
188 |
-
.acfe-modal.-open .acfe-modal-title
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
}
|
206 |
-
|
207 |
-
.acfe-modal.-open .acfe-modal-title
|
208 |
-
|
209 |
-
}
|
210 |
-
|
211 |
-
.acfe-modal.-open .acfe-modal-title
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
}
|
220 |
|
221 |
.acfe-modal.-open .acfe-modal-content {
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
}
|
229 |
|
230 |
.acfe-modal.-open.-iframe .acfe-modal-content {
|
231 |
-
|
232 |
-
line-height: 0;
|
233 |
}
|
234 |
|
235 |
-
.acfe-modal.-open.acfe-modal-sub
|
236 |
-
|
237 |
}
|
238 |
|
239 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper {
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
}
|
244 |
|
245 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a {
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
}
|
257 |
|
258 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a span.dashicons-menu {
|
259 |
-
|
260 |
}
|
261 |
|
262 |
-
.acfe-modal.-open
|
263 |
-
|
264 |
-
|
265 |
}
|
266 |
|
267 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active,
|
268 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active:hover {
|
269 |
-
|
270 |
-
|
271 |
}
|
272 |
|
273 |
.acfe-modal.-open .acfe-modal-content .nav-tab:focus,
|
274 |
.acfe-modal.-open .acfe-modal-content .nav-tab:focus:active {
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
}
|
280 |
|
281 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container,
|
282 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container * {
|
283 |
-
|
284 |
-
|
285 |
}
|
286 |
|
287 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container {
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
}
|
293 |
|
294 |
-
.acfe-modal.-open .acfe-modal-content .acfe-flexible-categories
|
295 |
-
|
296 |
-
|
297 |
}
|
298 |
|
299 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul {
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
|
|
|
|
306 |
}
|
307 |
|
308 |
-
.acfe-modal.-open
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
}
|
313 |
|
314 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li {
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
}
|
326 |
|
327 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a {
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
}
|
336 |
|
337 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-flex-thumbnails ul li a {
|
338 |
-
|
339 |
}
|
340 |
|
341 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover {
|
342 |
-
|
343 |
-
|
344 |
}
|
345 |
|
346 |
body:not(.acf-admin-5-3) .acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover {
|
347 |
-
|
348 |
}
|
349 |
|
350 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span {
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
}
|
355 |
|
356 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip {
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
}
|
363 |
|
364 |
-
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip
|
365 |
-
|
366 |
}
|
367 |
|
368 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover span.badge.acf-js-tooltip {
|
369 |
-
|
370 |
}
|
371 |
|
372 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled {
|
373 |
-
|
374 |
-
|
375 |
}
|
376 |
|
377 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:hover {
|
378 |
-
|
379 |
}
|
380 |
|
381 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:focus {
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
}
|
386 |
|
387 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li {
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
}
|
393 |
|
394 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-2 ul li {
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
}
|
400 |
|
401 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-3 ul li {
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
}
|
407 |
|
408 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-4 ul li {
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
}
|
414 |
|
415 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-5 ul li {
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
}
|
421 |
|
422 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-6 ul li {
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
}
|
428 |
-
|
429 |
-
@media only screen and (max-width:
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
}
|
448 |
-
|
449 |
-
@media only screen and (max-width:
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
}
|
458 |
|
459 |
.acfe-modal.-open .acfe-modal-footer,
|
460 |
.acfe-modal.-open .acfe-modal-footer * {
|
461 |
-
|
462 |
-
|
463 |
}
|
464 |
|
465 |
.acfe-modal.-open .acfe-modal-footer {
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
}
|
477 |
|
478 |
-
.acfe-modal.-open.acfe-modal-sub
|
479 |
-
|
480 |
}
|
481 |
|
482 |
-
.acfe-modal.-open .acfe-modal-footer
|
483 |
-
|
484 |
}
|
485 |
|
486 |
body.block-editor-page .edit-post-layout .acfe-modal.-open {
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
}
|
501 |
|
502 |
-
body.block-editor-page .
|
503 |
-
|
504 |
}
|
505 |
|
506 |
-
body.block-editor-page .
|
507 |
-
|
508 |
-
display: block;
|
509 |
-
position: absolute;
|
510 |
-
z-index: 0;
|
511 |
-
background: #f9f9f9;
|
512 |
-
border: solid #e1e1e1;
|
513 |
-
border-width: 0 1px 0 0;
|
514 |
-
top: 0;
|
515 |
-
bottom: 0;
|
516 |
-
left: 0;
|
517 |
-
width: 20%;
|
518 |
}
|
519 |
|
520 |
-
|
521 |
-
|
522 |
-
margin-top: 88px;
|
523 |
-
}
|
524 |
}
|
525 |
|
526 |
-
body.block-editor-page .edit-post-layout .acfe-modal.-open
|
527 |
-
|
528 |
-
|
|
|
|
|
|
|
|
|
529 |
}
|
530 |
|
531 |
-
body.block-editor-page .edit-post-layout
|
532 |
-
|
533 |
}
|
534 |
|
535 |
-
body.block-editor-page.folded .edit-post-layout .acfe-modal.-open
|
536 |
-
|
537 |
-
|
538 |
}
|
539 |
|
540 |
-
@media only screen and (max-width:
|
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 |
body.wp-admin.upload-php.acfe-modal-opened>div:not([style*="display: none;"])>.media-modal.wp-core-ui:not(.acf-media-modal):before {
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
}
|
580 |
|
581 |
.pac-container {
|
582 |
-
|
583 |
}
|
1 |
body.acfe-modal-opened {
|
2 |
+
overflow: hidden
|
3 |
}
|
4 |
|
5 |
.acfe-modal-overlay {
|
6 |
+
background: rgba(0, 0, 0, .7);
|
7 |
+
position: fixed;
|
8 |
+
top: 0;
|
9 |
+
left: 0;
|
10 |
+
right: 0;
|
11 |
+
bottom: 0;
|
12 |
+
height: 100%;
|
13 |
+
width: 100%;
|
14 |
+
z-index: 100000
|
15 |
}
|
16 |
|
17 |
.acfe-modal {
|
18 |
+
display: none;
|
19 |
+
-webkit-transition: all .3s ease-in-out;
|
20 |
+
-o-transition: all .3s ease-in-out;
|
21 |
+
transition: all .3s ease-in-out
|
22 |
}
|
23 |
|
24 |
.acfe-modal.-open {
|
25 |
+
position: fixed;
|
26 |
+
z-index: 100001;
|
27 |
+
height: 100%;
|
28 |
+
width: 100%;
|
29 |
+
top: 0;
|
30 |
+
left: 0;
|
31 |
+
bottom: 0;
|
32 |
+
right: 0;
|
33 |
+
-webkit-font-smoothing: subpixel-antialiased;
|
34 |
+
display: -webkit-box;
|
35 |
+
display: -ms-flexbox;
|
36 |
+
display: flex;
|
37 |
+
-webkit-box-orient: vertical;
|
38 |
+
-webkit-box-direction: normal;
|
39 |
+
-ms-flex-direction: column;
|
40 |
+
flex-direction: column;
|
41 |
+
-webkit-box-pack: center;
|
42 |
+
-ms-flex-pack: center;
|
43 |
+
justify-content: center;
|
44 |
+
-webkit-box-align: center;
|
45 |
+
-ms-flex-align: center;
|
46 |
+
align-items: center;
|
47 |
+
pointer-events: none
|
48 |
+
}
|
49 |
+
|
50 |
+
.acfe-modal.-open>.acfe-modal-wrapper {
|
51 |
+
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .7);
|
52 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, .7);
|
53 |
+
display: -webkit-box;
|
54 |
+
display: -ms-flexbox;
|
55 |
+
display: flex;
|
56 |
+
-webkit-box-orient: vertical;
|
57 |
+
-webkit-box-direction: normal;
|
58 |
+
-ms-flex-direction: column;
|
59 |
+
flex-direction: column;
|
60 |
+
width: calc(100vw - 60px);
|
61 |
+
max-width: 1100px;
|
62 |
+
max-height: calc(100vh - 60px);
|
63 |
+
position: relative
|
64 |
+
}
|
65 |
+
|
66 |
+
.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-wrapper-overlay {
|
67 |
+
position: absolute;
|
68 |
+
z-index: 10;
|
69 |
+
background: rgba(0, 0, 0, .7);
|
70 |
+
height: 100%;
|
71 |
+
width: 100%;
|
72 |
+
pointer-events: none
|
73 |
+
}
|
74 |
+
|
75 |
+
.acfe-modal.-open.-small>.acfe-modal-wrapper {
|
76 |
+
max-width: 450px
|
77 |
+
}
|
78 |
+
|
79 |
+
.acfe-modal.-open.-medium>.acfe-modal-wrapper {
|
80 |
+
max-width: 700px
|
81 |
+
}
|
82 |
+
|
83 |
+
.acfe-modal.-open.-large>.acfe-modal-wrapper {
|
84 |
+
max-width: 1100px
|
85 |
+
}
|
86 |
+
|
87 |
+
.acfe-modal.-open.-xlarge>.acfe-modal-wrapper {
|
88 |
+
max-width: 1400px
|
89 |
+
}
|
90 |
+
|
91 |
+
.acfe-modal.-open.-full>.acfe-modal-wrapper {
|
92 |
+
max-width: 100%;
|
93 |
+
-webkit-box-flex: 1;
|
94 |
+
-ms-flex: 1;
|
95 |
+
flex: 1
|
96 |
+
}
|
97 |
+
|
98 |
+
.acfe-modal.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left {
|
99 |
+
height: 100%
|
100 |
+
}
|
101 |
+
|
102 |
+
.acfe-modal.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left:before {
|
103 |
+
content: "";
|
104 |
+
display: block;
|
105 |
+
position: absolute;
|
106 |
+
z-index: 0;
|
107 |
+
background: #f9f9f9;
|
108 |
+
border-color: #e1e1e1;
|
109 |
+
border-style: solid;
|
110 |
+
border-width: 0 1px 0 0;
|
111 |
+
top: 0;
|
112 |
+
bottom: 0;
|
113 |
+
left: 0;
|
114 |
+
width: 20%
|
115 |
+
}
|
116 |
+
|
117 |
+
.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,
|
118 |
+
.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone,
|
119 |
+
.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input,
|
120 |
+
.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input>.acf-clone-fields.acf-fields.-left {
|
121 |
+
height: 100%
|
122 |
+
}
|
123 |
+
|
124 |
+
.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone {
|
125 |
+
padding: 0
|
126 |
+
}
|
127 |
+
|
128 |
+
.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input {
|
129 |
+
margin: 0
|
130 |
+
}
|
131 |
+
|
132 |
+
.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input>.acf-clone-fields.acf-fields.-left:before {
|
133 |
+
content: "";
|
134 |
+
display: block;
|
135 |
+
position: absolute;
|
136 |
+
z-index: 0;
|
137 |
+
background: #f9f9f9;
|
138 |
+
border-color: #e1e1e1;
|
139 |
+
border-style: solid;
|
140 |
+
border-width: 0 1px 0 0;
|
141 |
+
top: 0;
|
142 |
+
bottom: 0;
|
143 |
+
left: 0;
|
144 |
+
width: 20%
|
145 |
}
|
146 |
|
147 |
.acfe-modal.-open .acfe-modal-title *,
|
148 |
+
.acfe-modal.-open>.acfe-modal-title {
|
149 |
+
-webkit-box-sizing: border-box;
|
150 |
+
box-sizing: border-box
|
151 |
}
|
152 |
|
153 |
.acfe-modal.-open .acfe-modal-title {
|
154 |
+
display: block;
|
155 |
+
height: 50px;
|
156 |
+
line-height: 50px;
|
157 |
+
font-size: 22px;
|
158 |
+
color: #23282d;
|
159 |
+
border-bottom: 1px solid #ddd;
|
160 |
+
-o-text-overflow: ellipsis;
|
161 |
+
text-overflow: ellipsis;
|
162 |
+
background: #fcfcfc;
|
163 |
+
padding: 0 0 0 16px;
|
164 |
+
position: relative;
|
165 |
+
text-align: left;
|
166 |
+
pointer-events: auto
|
167 |
+
}
|
168 |
+
|
169 |
+
.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-title {
|
170 |
+
pointer-events: none
|
171 |
+
}
|
172 |
+
|
173 |
+
.acfe-modal.-open .acfe-modal-title>span.title {
|
174 |
+
line-height: 50px;
|
175 |
+
color: #23282d;
|
176 |
+
font-weight: 600
|
177 |
+
}
|
178 |
+
|
179 |
+
.acfe-modal.-open .acfe-modal-title>span.title .acf-fc-layout-order {
|
180 |
+
width: 30px;
|
181 |
+
height: 30px;
|
182 |
+
border-radius: 30px;
|
183 |
+
display: inline-block;
|
184 |
+
text-align: center;
|
185 |
+
line-height: 30px;
|
186 |
+
margin: 0 2px 0 0;
|
187 |
+
background: #f1f1f1;
|
188 |
+
font-size: 14px;
|
189 |
+
color: #666;
|
190 |
+
vertical-align: 2px
|
191 |
+
}
|
192 |
+
|
193 |
+
.acfe-modal.-open .acfe-modal-title>button.close {
|
194 |
+
height: 50px;
|
195 |
+
width: 50px;
|
196 |
+
color: #666;
|
197 |
+
border: 0;
|
198 |
+
border-left: 0;
|
199 |
+
margin: 0;
|
200 |
+
padding: 0;
|
201 |
+
border-radius: 0;
|
202 |
+
position: absolute;
|
203 |
+
top: 0;
|
204 |
+
right: 0;
|
205 |
+
-webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
|
206 |
+
-o-transition: color .1s ease-in-out, background .1s ease-in-out;
|
207 |
+
transition: color .1s ease-in-out, background .1s ease-in-out;
|
208 |
+
background: 0 0;
|
209 |
+
cursor: pointer
|
210 |
+
}
|
211 |
+
|
212 |
+
.acfe-modal.-open .acfe-modal-title>button.close:hover {
|
213 |
+
color: #00a0d2
|
214 |
+
}
|
215 |
+
|
216 |
+
.acfe-modal.-open .acfe-modal-title>button.close:before {
|
217 |
+
height: 50px;
|
218 |
+
width: 50px;
|
219 |
+
line-height: 50px !important;
|
220 |
+
font: normal 20px/1 dashicons;
|
221 |
+
content: "\f158";
|
222 |
+
margin: 0;
|
223 |
+
padding: 0
|
224 |
}
|
225 |
|
226 |
.acfe-modal.-open .acfe-modal-content {
|
227 |
+
height: 100%;
|
228 |
+
background: #fff;
|
229 |
+
display: block;
|
230 |
+
position: relative;
|
231 |
+
pointer-events: auto;
|
232 |
+
overflow: auto
|
233 |
}
|
234 |
|
235 |
.acfe-modal.-open.-iframe .acfe-modal-content {
|
236 |
+
overflow: hidden
|
|
|
237 |
}
|
238 |
|
239 |
+
.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-content {
|
240 |
+
pointer-events: none
|
241 |
}
|
242 |
|
243 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper {
|
244 |
+
padding: 0;
|
245 |
+
margin: 0;
|
246 |
+
border-bottom: 1px solid #ddd
|
247 |
}
|
248 |
|
249 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a {
|
250 |
+
margin: 0;
|
251 |
+
border-left: 0;
|
252 |
+
border-top: 0;
|
253 |
+
border-bottom: 0;
|
254 |
+
background: #fff;
|
255 |
+
-webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
|
256 |
+
-o-transition: color .1s ease-in-out, background .1s ease-in-out;
|
257 |
+
transition: color .1s ease-in-out, background .1s ease-in-out;
|
258 |
+
padding: 7px 15px;
|
259 |
+
border-color: #ddd
|
260 |
}
|
261 |
|
262 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a span.dashicons-menu {
|
263 |
+
line-height: 27px
|
264 |
}
|
265 |
|
266 |
+
.acfe-modal.-open>.acfe-modal-content .nav-tab-wrapper a:hover {
|
267 |
+
background: #f9f9f9;
|
268 |
+
color: #23282d
|
269 |
}
|
270 |
|
271 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active,
|
272 |
.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active:hover {
|
273 |
+
background: #fcfcfc;
|
274 |
+
color: #23282d
|
275 |
}
|
276 |
|
277 |
.acfe-modal.-open .acfe-modal-content .nav-tab:focus,
|
278 |
.acfe-modal.-open .acfe-modal-content .nav-tab:focus:active {
|
279 |
+
border-bottom: 0;
|
280 |
+
-webkit-box-shadow: none;
|
281 |
+
box-shadow: none;
|
282 |
+
outline: 0
|
283 |
}
|
284 |
|
285 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container,
|
286 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container * {
|
287 |
+
-webkit-box-sizing: border-box;
|
288 |
+
box-sizing: border-box
|
289 |
}
|
290 |
|
291 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container {
|
292 |
+
width: 100%;
|
293 |
+
padding: 14px;
|
294 |
+
margin-right: auto;
|
295 |
+
margin-left: auto
|
296 |
}
|
297 |
|
298 |
+
.acfe-modal.-open .acfe-modal-content .acfe-flexible-categories~.acfe-flex-container {
|
299 |
+
overflow: auto;
|
300 |
+
height: calc(100% - 39px)
|
301 |
}
|
302 |
|
303 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul {
|
304 |
+
margin: 0;
|
305 |
+
margin-right: -7px;
|
306 |
+
margin-left: -7px;
|
307 |
+
display: -webkit-box;
|
308 |
+
display: -ms-flexbox;
|
309 |
+
display: flex;
|
310 |
+
-ms-flex-wrap: wrap;
|
311 |
+
flex-wrap: wrap
|
312 |
}
|
313 |
|
314 |
+
.acfe-modal.-open>.acfe-modal-content .acfe-flex-container ul:after {
|
315 |
+
content: "";
|
316 |
+
clear: both;
|
317 |
+
display: table
|
318 |
}
|
319 |
|
320 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li {
|
321 |
+
position: relative;
|
322 |
+
width: 100%;
|
323 |
+
padding-right: 7px;
|
324 |
+
padding-left: 7px;
|
325 |
+
padding-bottom: 14px;
|
326 |
+
margin: 0;
|
327 |
+
-webkit-box-flex: 0;
|
328 |
+
-ms-flex: 0 0 25%;
|
329 |
+
flex: 0 0 25%;
|
330 |
+
max-width: 25%
|
331 |
}
|
332 |
|
333 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a {
|
334 |
+
border: 1px solid #ddd;
|
335 |
+
background: #f9f9f9;
|
336 |
+
padding: 15px;
|
337 |
+
color: #333;
|
338 |
+
display: block;
|
339 |
+
text-decoration: none;
|
340 |
+
height: 100%
|
341 |
}
|
342 |
|
343 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-flex-thumbnails ul li a {
|
344 |
+
text-align: center
|
345 |
}
|
346 |
|
347 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover {
|
348 |
+
background: #007cba;
|
349 |
+
color: #fff
|
350 |
}
|
351 |
|
352 |
body:not(.acf-admin-5-3) .acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover {
|
353 |
+
background: #0073aa
|
354 |
}
|
355 |
|
356 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span {
|
357 |
+
display: inline-block;
|
358 |
+
font-size: 16px;
|
359 |
+
font-weight: 600
|
360 |
}
|
361 |
|
362 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip {
|
363 |
+
color: #999;
|
364 |
+
font-weight: 400;
|
365 |
+
margin-left: 2px;
|
366 |
+
line-height: 1.2;
|
367 |
+
font-size: 0
|
368 |
}
|
369 |
|
370 |
+
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip::before {
|
371 |
+
font-size: 16px
|
372 |
}
|
373 |
|
374 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover span.badge.acf-js-tooltip {
|
375 |
+
color: #fff
|
376 |
}
|
377 |
|
378 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled {
|
379 |
+
pointer-events: none;
|
380 |
+
opacity: .67
|
381 |
}
|
382 |
|
383 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:hover {
|
384 |
+
cursor: default
|
385 |
}
|
386 |
|
387 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:focus {
|
388 |
+
-webkit-box-shadow: none;
|
389 |
+
box-shadow: none;
|
390 |
+
outline: 0
|
391 |
}
|
392 |
|
393 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li {
|
394 |
+
-webkit-box-flex: 0;
|
395 |
+
-ms-flex: 0 0 100%;
|
396 |
+
flex: 0 0 100%;
|
397 |
+
max-width: 100%
|
398 |
}
|
399 |
|
400 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-2 ul li {
|
401 |
+
-webkit-box-flex: 0;
|
402 |
+
-ms-flex: 0 0 50%;
|
403 |
+
flex: 0 0 50%;
|
404 |
+
max-width: 50%
|
405 |
}
|
406 |
|
407 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-3 ul li {
|
408 |
+
-webkit-box-flex: 0;
|
409 |
+
-ms-flex: 0 0 33.333333%;
|
410 |
+
flex: 0 0 33.333333%;
|
411 |
+
max-width: 33.333333%
|
412 |
}
|
413 |
|
414 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-4 ul li {
|
415 |
+
-webkit-box-flex: 0;
|
416 |
+
-ms-flex: 0 0 25%;
|
417 |
+
flex: 0 0 25%;
|
418 |
+
max-width: 25%
|
419 |
}
|
420 |
|
421 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-5 ul li {
|
422 |
+
-webkit-box-flex: 0;
|
423 |
+
-ms-flex: 0 0 20%;
|
424 |
+
flex: 0 0 20%;
|
425 |
+
max-width: 20%
|
426 |
}
|
427 |
|
428 |
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-6 ul li {
|
429 |
+
-webkit-box-flex: 0;
|
430 |
+
-ms-flex: 0 0 16.66%;
|
431 |
+
flex: 0 0 16.66%;
|
432 |
+
max-width: 16.66%
|
433 |
+
}
|
434 |
+
|
435 |
+
@media only screen and (max-width:960px) {
|
436 |
+
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li {
|
437 |
+
-webkit-box-flex: 0 !important;
|
438 |
+
-ms-flex: 0 0 50% !important;
|
439 |
+
flex: 0 0 50% !important;
|
440 |
+
max-width: 50% !important
|
441 |
+
}
|
442 |
+
|
443 |
+
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li {
|
444 |
+
-webkit-box-flex: 0 !important;
|
445 |
+
-ms-flex: 0 0 100% !important;
|
446 |
+
flex: 0 0 100% !important;
|
447 |
+
max-width: 100% !important
|
448 |
+
}
|
449 |
+
|
450 |
+
.acfe-modal.-open .acfe-modal-content ul li a {
|
451 |
+
padding: 7px
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
@media only screen and (max-width:720px) {
|
456 |
+
.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li {
|
457 |
+
-webkit-box-flex: 0 !important;
|
458 |
+
-ms-flex: 0 0 100% !important;
|
459 |
+
flex: 0 0 100% !important;
|
460 |
+
max-width: 100% !important
|
461 |
+
}
|
462 |
+
|
463 |
+
.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li {
|
464 |
+
-webkit-box-flex: 0 !important;
|
465 |
+
-ms-flex: 0 0 100% !important;
|
466 |
+
flex: 0 0 100% !important;
|
467 |
+
max-width: 100% !important
|
468 |
+
}
|
469 |
}
|
470 |
|
471 |
.acfe-modal.-open .acfe-modal-footer,
|
472 |
.acfe-modal.-open .acfe-modal-footer * {
|
473 |
+
-webkit-box-sizing: border-box;
|
474 |
+
box-sizing: border-box
|
475 |
}
|
476 |
|
477 |
.acfe-modal.-open .acfe-modal-footer {
|
478 |
+
display: block;
|
479 |
+
height: 50px;
|
480 |
+
line-height: 50px;
|
481 |
+
color: #23282d;
|
482 |
+
background: #fcfcfc;
|
483 |
+
padding: 0 16px;
|
484 |
+
position: relative;
|
485 |
+
text-align: right;
|
486 |
+
border-top: 1px solid #ddd;
|
487 |
+
pointer-events: auto
|
488 |
}
|
489 |
|
490 |
+
.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-footer {
|
491 |
+
pointer-events: none
|
492 |
}
|
493 |
|
494 |
+
.acfe-modal.-open .acfe-modal-footer>button {
|
495 |
+
vertical-align: baseline
|
496 |
}
|
497 |
|
498 |
body.block-editor-page .edit-post-layout .acfe-modal.-open {
|
499 |
+
-webkit-box-pack: start;
|
500 |
+
-ms-flex-pack: start;
|
501 |
+
justify-content: start;
|
502 |
+
-webkit-box-align: start;
|
503 |
+
-ms-flex-align: start;
|
504 |
+
align-items: start;
|
505 |
+
background: rgba(0, 0, 0, .7)
|
506 |
+
}
|
507 |
+
|
508 |
+
body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left {
|
509 |
+
height: 100%
|
510 |
+
}
|
511 |
+
|
512 |
+
body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left:before {
|
513 |
+
content: "";
|
514 |
+
display: block;
|
515 |
+
position: absolute;
|
516 |
+
z-index: 0;
|
517 |
+
background: #f9f9f9;
|
518 |
+
border-color: #e1e1e1;
|
519 |
+
border-style: solid;
|
520 |
+
border-width: 0 1px 0 0;
|
521 |
+
top: 0;
|
522 |
+
bottom: 0;
|
523 |
+
left: 0;
|
524 |
+
width: 20%
|
525 |
}
|
526 |
|
527 |
+
body.block-editor-page .acfe-modal-overlay {
|
528 |
+
display: none
|
529 |
}
|
530 |
|
531 |
+
body.block-editor-page .acfe-modal.-open.acfe-modal-sub {
|
532 |
+
background: 0 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
}
|
534 |
|
535 |
+
body.block-editor-page .acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-wrapper-overlay {
|
536 |
+
background: 0 0
|
|
|
|
|
537 |
}
|
538 |
|
539 |
+
body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
540 |
+
height: 100%;
|
541 |
+
width: 100%;
|
542 |
+
max-height: calc(100vh - 70px);
|
543 |
+
max-width: calc(100vw - 340px);
|
544 |
+
margin-left: 170px;
|
545 |
+
margin-top: 50px
|
546 |
}
|
547 |
|
548 |
+
body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
549 |
+
margin-left: 240px
|
550 |
}
|
551 |
|
552 |
+
body.block-editor-page.auto-fold.folded .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper,
|
553 |
+
body.block-editor-page.is-fullscreen-mode .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
554 |
+
margin-left: 170px
|
555 |
}
|
556 |
|
557 |
+
@media only screen and (max-width:1080px) {
|
558 |
+
body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
559 |
+
max-height: calc(100vh - 50px);
|
560 |
+
margin-top: 40px;
|
561 |
+
max-width: calc(100vw - 180px);
|
562 |
+
margin-left: 170px
|
563 |
+
}
|
564 |
|
565 |
+
body.block-editor-page.auto-fold.folded .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper,
|
566 |
+
body.block-editor-page.is-fullscreen-mode .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
567 |
+
max-height: calc(100vh - 50px);
|
568 |
+
margin-top: 40px;
|
569 |
+
max-width: calc(100vw - 56px);
|
570 |
+
margin-left: 46px
|
571 |
+
}
|
572 |
}
|
573 |
|
574 |
+
@media only screen and (max-width:960px) {
|
575 |
+
body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
576 |
+
max-height: calc(100vh - 50px);
|
577 |
+
margin-top: 40px;
|
578 |
+
max-width: calc(100vw - 180px);
|
579 |
+
margin-left: 170px
|
580 |
+
}
|
581 |
|
582 |
+
body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper,
|
583 |
+
body.block-editor-page.is-fullscreen-mode .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
584 |
+
max-height: calc(100vh - 50px);
|
585 |
+
margin-top: 40px;
|
586 |
+
max-width: calc(100vw - 56px);
|
587 |
+
margin-left: 46px
|
588 |
+
}
|
589 |
}
|
590 |
|
591 |
+
@media only screen and (max-width:782px) {
|
592 |
+
body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper {
|
593 |
+
max-width: calc(100vw - 20px) !important;
|
594 |
+
margin-left: 10px !important;
|
595 |
+
max-height: calc(100vh - 66px) !important;
|
596 |
+
margin-top: 56px !important
|
597 |
+
}
|
598 |
}
|
599 |
|
600 |
body.wp-admin.upload-php.acfe-modal-opened>div:not([style*="display: none;"])>.media-modal.wp-core-ui:not(.acf-media-modal):before {
|
601 |
+
content: "";
|
602 |
+
display: block;
|
603 |
+
position: absolute;
|
604 |
+
background: rgba(0, 0, 0, .7);
|
605 |
+
top: 0;
|
606 |
+
left: 0;
|
607 |
+
width: 100%;
|
608 |
+
height: 100%;
|
609 |
+
z-index: 10000
|
610 |
}
|
611 |
|
612 |
.pac-container {
|
613 |
+
z-index: 100001
|
614 |
}
|
@@ -1 +1 @@
|
|
1 |
-
body.acfe-modal-opened{overflow:hidden}.acfe-modal-overlay{background:rgba(0,0,0,.7);position:fixed;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:100000}.acfe-modal{display:none;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.acfe-modal.-open{position:fixed;z-index:100001;height:100%;width:100%;top:0;left:0;bottom:0;right:0;-webkit-font-smoothing:subpixel-antialiased;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;pointer-events:none}.acfe-modal.-open,.acfe-modal.-open>.acfe-modal-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.acfe-modal.-open>.acfe-modal-wrapper{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);width:calc(100vw - 60px);max-width:1100px;max-height:calc(100vh - 60px);position:relative}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-wrapper-overlay{position:absolute;z-index:10;background:rgba(0,0,0,.7);height:100%;width:100%;pointer-events:none}.acfe-modal.-open.-small>.acfe-modal-wrapper{max-width:450px}.acfe-modal.-open.-medium>.acfe-modal-wrapper{max-width:700px}.acfe-modal.-open.-large>.acfe-modal-wrapper{max-width:1100px}.acfe-modal.-open.-xlarge>.acfe-modal-wrapper{max-width:1400px}.acfe-modal.-open.-full>.acfe-modal-wrapper{max-width:100%;-webkit-box-flex:1;-ms-flex:1;flex:1}.acfe-modal.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left{height:100%}.acfe-modal.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border:solid #e1e1e1;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone,.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input,.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input>.acf-clone-fields.acf-fields.-left{height:100%}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone{padding:0}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input{margin:0}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input>.acf-clone-fields.acf-fields.-left:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border:solid #e1e1e1;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acfe-modal.-open .acfe-modal-title *,.acfe-modal.-open>.acfe-modal-title{-webkit-box-sizing:border-box;box-sizing:border-box}.acfe-modal.-open .acfe-modal-title{display:block;height:50px;line-height:50px;font-size:22px;color:#23282d;border-bottom:1px solid #ddd;-o-text-overflow:ellipsis;text-overflow:ellipsis;background:#fcfcfc;padding:0 0 0 16px;position:relative;text-align:left;pointer-events:auto}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-title{pointer-events:none}.acfe-modal.-open .acfe-modal-title>span.title{line-height:50px;color:#23282d;font-weight:600}.acfe-modal.-open .acfe-modal-title>span.title .acf-fc-layout-order{width:30px;height:30px;border-radius:30px;display:inline-block;text-align:center;line-height:30px;margin:0 2px 0 0;background:#f1f1f1;font-size:14px;color:#666;vertical-align:2px}.acfe-modal.-open .acfe-modal-title>button.close{height:50px;width:50px;color:#666;border:0;border-left:0;margin:0;padding:0;border-radius:0;position:absolute;top:0;right:0;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;-o-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;background:none;cursor:pointer}.acfe-modal.-open .acfe-modal-title>button.close:hover{color:#00a0d2}.acfe-modal.-open .acfe-modal-title>button.close:before{height:50px;width:50px;line-height:50px!important;font:normal 20px/1 dashicons;content:"\f158";margin:0;padding:0}.acfe-modal.-open .acfe-modal-content{height:100%;background:#fff;display:block;position:relative;pointer-events:auto;overflow:auto}.acfe-modal.-open.-iframe .acfe-modal-content{overflow:hidden}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-content{pointer-events:none}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper{padding:0;margin:0;border-bottom:1px solid #ddd}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a{margin:0;border-left:0;border-top:0;border-bottom:0;background:#fff;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;-o-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;padding:7px 15px;border-color:#ddd}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a span.dashicons-menu{line-height:27px}.acfe-modal.-open>.acfe-modal-content .nav-tab-wrapper a:hover{background:#f9f9f9;color:#23282d}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active,.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active:hover{background:#fcfcfc;color:#23282d}.acfe-modal.-open .acfe-modal-content .nav-tab:focus,.acfe-modal.-open .acfe-modal-content .nav-tab:focus:active{border-bottom:0;-webkit-box-shadow:none;box-shadow:none;outline:0}.acfe-modal.-open .acfe-modal-content .acfe-flex-container,.acfe-modal.-open .acfe-modal-content .acfe-flex-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.acfe-modal.-open .acfe-modal-content .acfe-flex-container{width:100%;padding:14px;margin-right:auto;margin-left:auto}.acfe-modal.-open .acfe-modal-content .acfe-flexible-categories~.acfe-flex-container{overflow:auto;height:calc(100% - 39px)}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul{margin:0 -7px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.acfe-modal.-open>.acfe-modal-content .acfe-flex-container ul:after{content:"";clear:both;display:table}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li{position:relative;width:100%;padding-right:7px;padding-left:7px;padding-bottom:14px;margin:0;-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a{border:1px solid #ddd;background:#f9f9f9;padding:15px;color:#333;display:block;text-decoration:none;height:100%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-flex-thumbnails ul li a{text-align:center}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover{background:#007cba;color:#fff}body:not(.acf-admin-5-3) .acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover{background:#0073aa}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span{display:inline-block;font-size:16px;font-weight:600}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip{color:#999;font-weight:400;margin-left:2px;line-height:1.2;font-size:0}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip:before{font-size:16px}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover span.badge.acf-js-tooltip{color:#fff}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled{pointer-events:none;opacity:.67}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:hover{cursor:default}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:focus{-webkit-box-shadow:none;box-shadow:none;outline:none}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-2 ul li{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-3 ul li{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-4 ul li{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-5 ul li{-webkit-box-flex:0;-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-6 ul li{-webkit-box-flex:0;-ms-flex:0 0 16.66%;flex:0 0 16.66%;max-width:16.66%}@media only screen and (max-width:960px){.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li{-webkit-box-flex:0!important;-ms-flex:0 0 50%!important;flex:0 0 50%!important;max-width:50%!important}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li{-webkit-box-flex:0!important;-ms-flex:0 0 100%!important;flex:0 0 100%!important;max-width:100%!important}.acfe-modal.-open .acfe-modal-content ul li a{padding:7px}}@media only screen and (max-width:720px){.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li,.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li{-webkit-box-flex:0!important;-ms-flex:0 0 100%!important;flex:0 0 100%!important;max-width:100%!important}}.acfe-modal.-open .acfe-modal-footer,.acfe-modal.-open .acfe-modal-footer *{-webkit-box-sizing:border-box;box-sizing:border-box}.acfe-modal.-open .acfe-modal-footer{display:block;height:50px;line-height:50px;color:#23282d;background:#fcfcfc;padding:0 16px;position:relative;text-align:right;border-top:1px solid #ddd;pointer-events:auto}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-footer{pointer-events:none}.acfe-modal.-open .acfe-modal-footer>button{vertical-align:baseline}body.block-editor-page .edit-post-layout .acfe-modal.-open{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start}body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{margin-top:88px;height:100%;width:100%;max-height:calc(100vh - 88px)}body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left{height:100%}body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border:solid #e1e1e1;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}@media only screen and (max-width:1080px){body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{margin-top:88px}}body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-width:calc(100vw - 160px);margin-left:160px}body.block-editor-page .edit-post-layout.is-sidebar-opened .acfe-modal.-open>.acfe-modal-wrapper{max-width:calc(100vw - 440px)}body.block-editor-page.folded .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-width:calc(100vw - 36px);margin-left:36px}@media only screen and (max-width:960px){body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-width:calc(100vw - 36px);margin-left:36px}}@media only screen and (max-width:782px){body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-width:100vw;margin-left:0;margin-top:100px}}body.block-editor-page.folded .edit-post-layout.is-sidebar-opened .acfe-modal.-open>.acfe-modal-wrapper{max-width:calc(100vw - 316px)}@media (min-width:600px){body.block-editor-page.acfe-modal-opened .edit-post-layout__content{overflow-y:hidden}}body.block-editor-page .acfe-modal-overlay{display:none}body.wp-admin.upload-php.acfe-modal-opened>div:not([style*="display: none;"])>.media-modal.wp-core-ui:not(.acf-media-modal):before{content:"";display:block;position:absolute;background:rgba(0,0,0,.7);top:0;left:0;width:100%;height:100%;z-index:10000}.pac-container{z-index:100001}
|
1 |
+
body.acfe-modal-opened{overflow:hidden}.acfe-modal-overlay{background:rgba(0,0,0,.7);position:fixed;top:0;left:0;right:0;bottom:0;height:100%;width:100%;z-index:100000}.acfe-modal{display:none;-webkit-transition:.3s ease-in-out;-o-transition:.3s ease-in-out;transition:.3s ease-in-out}.acfe-modal.-open{position:fixed;z-index:100001;height:100%;width:100%;top:0;left:0;bottom:0;right:0;-webkit-font-smoothing:subpixel-antialiased;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;pointer-events:none}.acfe-modal.-open>.acfe-modal-wrapper{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:calc(100vw - 60px);max-width:1100px;max-height:calc(100vh - 60px);position:relative}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-wrapper-overlay{position:absolute;z-index:10;background:rgba(0,0,0,.7);height:100%;width:100%;pointer-events:none}.acfe-modal.-open.-small>.acfe-modal-wrapper{max-width:450px}.acfe-modal.-open.-medium>.acfe-modal-wrapper{max-width:700px}.acfe-modal.-open.-large>.acfe-modal-wrapper{max-width:1100px}.acfe-modal.-open.-xlarge>.acfe-modal-wrapper{max-width:1400px}.acfe-modal.-open.-full>.acfe-modal-wrapper{max-width:100%;-webkit-box-flex:1;-ms-flex:1;flex:1}.acfe-modal.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left{height:100%}.acfe-modal.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border-color:#e1e1e1;border-style:solid;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields,.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone,.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input,.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input>.acf-clone-fields.acf-fields.-left{height:100%}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone{padding:0}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input{margin:0}.acfe-modal.-settings.-open.-full>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields>.acf-field-clone>.acf-input>.acf-clone-fields.acf-fields.-left:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border-color:#e1e1e1;border-style:solid;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acfe-modal.-open .acfe-modal-title *,.acfe-modal.-open>.acfe-modal-title{-webkit-box-sizing:border-box;box-sizing:border-box}.acfe-modal.-open .acfe-modal-title{display:block;height:50px;line-height:50px;font-size:22px;color:#23282d;border-bottom:1px solid #ddd;-o-text-overflow:ellipsis;text-overflow:ellipsis;background:#fcfcfc;padding:0 0 0 16px;position:relative;text-align:left;pointer-events:auto}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-title{pointer-events:none}.acfe-modal.-open .acfe-modal-title>span.title{line-height:50px;color:#23282d;font-weight:600}.acfe-modal.-open .acfe-modal-title>span.title .acf-fc-layout-order{width:30px;height:30px;border-radius:30px;display:inline-block;text-align:center;line-height:30px;margin:0 2px 0 0;background:#f1f1f1;font-size:14px;color:#666;vertical-align:2px}.acfe-modal.-open .acfe-modal-title>button.close{height:50px;width:50px;color:#666;border:0;border-left:0;margin:0;padding:0;border-radius:0;position:absolute;top:0;right:0;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;-o-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;background:0 0;cursor:pointer}.acfe-modal.-open .acfe-modal-title>button.close:hover{color:#00a0d2}.acfe-modal.-open .acfe-modal-title>button.close:before{height:50px;width:50px;line-height:50px!important;font:20px/1 dashicons;content:"\f158";margin:0;padding:0}.acfe-modal.-open .acfe-modal-content{height:100%;background:#fff;display:block;position:relative;pointer-events:auto;overflow:auto}.acfe-modal.-open.-iframe .acfe-modal-content{overflow:hidden}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-content{pointer-events:none}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper{padding:0;margin:0;border-bottom:1px solid #ddd}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a{margin:0;border-left:0;border-top:0;border-bottom:0;background:#fff;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;-o-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out;padding:7px 15px;border-color:#ddd}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a span.dashicons-menu{line-height:27px}.acfe-modal.-open>.acfe-modal-content .nav-tab-wrapper a:hover{background:#f9f9f9;color:#23282d}.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active,.acfe-modal.-open .acfe-modal-content .nav-tab-wrapper a.nav-tab-active:hover{background:#fcfcfc;color:#23282d}.acfe-modal.-open .acfe-modal-content .nav-tab:focus,.acfe-modal.-open .acfe-modal-content .nav-tab:focus:active{border-bottom:0;-webkit-box-shadow:none;box-shadow:none;outline:0}.acfe-modal.-open .acfe-modal-content .acfe-flex-container,.acfe-modal.-open .acfe-modal-content .acfe-flex-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.acfe-modal.-open .acfe-modal-content .acfe-flex-container{width:100%;padding:14px;margin-right:auto;margin-left:auto}.acfe-modal.-open .acfe-modal-content .acfe-flexible-categories~.acfe-flex-container{overflow:auto;height:calc(100% - 39px)}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul{margin:0 -7px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.acfe-modal.-open>.acfe-modal-content .acfe-flex-container ul:after{content:"";clear:both;display:table}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li{position:relative;width:100%;padding-right:7px;padding-left:7px;padding-bottom:14px;margin:0;-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a{border:1px solid #ddd;background:#f9f9f9;padding:15px;color:#333;display:block;text-decoration:none;height:100%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-flex-thumbnails ul li a{text-align:center}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover{background:#007cba;color:#fff}body:not(.acf-admin-5-3) .acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover{background:#0073aa}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span{display:inline-block;font-size:16px;font-weight:600}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip{color:#999;font-weight:400;margin-left:2px;line-height:1.2;font-size:0}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a span.badge.acf-js-tooltip::before{font-size:16px}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a:hover span.badge.acf-js-tooltip{color:#fff}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled{pointer-events:none;opacity:.67}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:hover{cursor:default}.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li a.disabled:focus{-webkit-box-shadow:none;box-shadow:none;outline:0}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-2 ul li{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-3 ul li{-webkit-box-flex:0;-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-4 ul li{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-5 ul li{-webkit-box-flex:0;-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-6 ul li{-webkit-box-flex:0;-ms-flex:0 0 16.66%;flex:0 0 16.66%;max-width:16.66%}@media only screen and (max-width:960px){.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li{-webkit-box-flex:0!important;-ms-flex:0 0 50%!important;flex:0 0 50%!important;max-width:50%!important}.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li{-webkit-box-flex:0!important;-ms-flex:0 0 100%!important;flex:0 0 100%!important;max-width:100%!important}.acfe-modal.-open .acfe-modal-content ul li a{padding:7px}}@media only screen and (max-width:720px){.acfe-modal.-open .acfe-modal-content .acfe-flex-container ul li,.acfe-modal.-open .acfe-modal-content .acfe-flex-container.acfe-col-1 ul li{-webkit-box-flex:0!important;-ms-flex:0 0 100%!important;flex:0 0 100%!important;max-width:100%!important}}.acfe-modal.-open .acfe-modal-footer,.acfe-modal.-open .acfe-modal-footer *{-webkit-box-sizing:border-box;box-sizing:border-box}.acfe-modal.-open .acfe-modal-footer{display:block;height:50px;line-height:50px;color:#23282d;background:#fcfcfc;padding:0 16px;position:relative;text-align:right;border-top:1px solid #ddd;pointer-events:auto}.acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-footer{pointer-events:none}.acfe-modal.-open .acfe-modal-footer>button{vertical-align:baseline}body.block-editor-page .edit-post-layout .acfe-modal.-open{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;background:rgba(0,0,0,.7)}body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left{height:100%}body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper>.acfe-modal-content>.acf-fields.-left:before{content:"";display:block;position:absolute;z-index:0;background:#f9f9f9;border-color:#e1e1e1;border-style:solid;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}body.block-editor-page .acfe-modal-overlay{display:none}body.block-editor-page .acfe-modal.-open.acfe-modal-sub,body.block-editor-page .acfe-modal.-open.acfe-modal-sub>.acfe-modal-wrapper>.acfe-modal-wrapper-overlay{background:0 0}body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{height:100%;width:100%;max-height:calc(100vh - 70px);max-width:calc(100vw - 340px);margin-left:170px;margin-top:50px}body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{margin-left:240px}body.block-editor-page.auto-fold.folded .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper,body.block-editor-page.is-fullscreen-mode .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{margin-left:170px}@media only screen and (max-width:1080px){body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-height:calc(100vh - 50px);margin-top:40px;max-width:calc(100vw - 180px);margin-left:170px}body.block-editor-page.auto-fold.folded .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper,body.block-editor-page.is-fullscreen-mode .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-height:calc(100vh - 50px);margin-top:40px;max-width:calc(100vw - 56px);margin-left:46px}}@media only screen and (max-width:960px){body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-height:calc(100vh - 50px);margin-top:40px;max-width:calc(100vw - 180px);margin-left:170px}body.block-editor-page.auto-fold .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper,body.block-editor-page.is-fullscreen-mode .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-height:calc(100vh - 50px);margin-top:40px;max-width:calc(100vw - 56px);margin-left:46px}}@media only screen and (max-width:782px){body.block-editor-page .edit-post-layout .acfe-modal.-open>.acfe-modal-wrapper{max-width:calc(100vw - 20px)!important;margin-left:10px!important;max-height:calc(100vh - 66px)!important;margin-top:56px!important}}body.wp-admin.upload-php.acfe-modal-opened>div:not([style*="display: none;"])>.media-modal.wp-core-ui:not(.acf-media-modal):before{content:"";display:block;position:absolute;background:rgba(0,0,0,.7);top:0;left:0;width:100%;height:100%;z-index:10000}.pac-container{z-index:100001}
|
@@ -1,6 +1,6 @@
|
|
1 |
-
(function($){
|
2 |
|
3 |
-
if(typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
/*
|
@@ -11,48 +11,48 @@
|
|
11 |
actions: {
|
12 |
|
13 |
// Buttons
|
14 |
-
'new_field/name=acfe_form_actions':
|
15 |
-
'new_field/name=acfe_form_email_files':
|
16 |
-
'new_field/name=acfe_form_email_files_static':
|
17 |
|
18 |
// Post
|
19 |
-
'new_field/name=acfe_form_post_map_target':
|
20 |
-
'new_field/name=acfe_form_post_map_post_type':
|
21 |
-
'new_field/name=acfe_form_post_map_post_status':
|
22 |
-
'new_field/name=acfe_form_post_map_post_title':
|
23 |
-
'new_field/name=acfe_form_post_map_post_name':
|
24 |
-
'new_field/name=acfe_form_post_map_post_content':
|
25 |
-
'new_field/name=acfe_form_post_map_post_author':
|
26 |
-
'new_field/name=acfe_form_post_map_post_parent':
|
27 |
-
'new_field/name=acfe_form_post_map_post_terms':
|
28 |
|
29 |
// User
|
30 |
-
'new_field/name=acfe_form_user_map_email':
|
31 |
-
'new_field/name=acfe_form_user_map_username':
|
32 |
-
'new_field/name=acfe_form_user_map_password':
|
33 |
-
'new_field/name=acfe_form_user_map_first_name':
|
34 |
-
'new_field/name=acfe_form_user_map_last_name':
|
35 |
-
'new_field/name=acfe_form_user_map_nickname':
|
36 |
-
'new_field/name=acfe_form_user_map_display_name':
|
37 |
-
'new_field/name=acfe_form_user_map_website':
|
38 |
-
'new_field/name=acfe_form_user_map_description':
|
39 |
-
'new_field/name=acfe_form_user_map_role':
|
40 |
|
41 |
// Term
|
42 |
-
'new_field/name=acfe_form_term_map_name':
|
43 |
-
'new_field/name=acfe_form_term_map_slug':
|
44 |
-
'new_field/name=acfe_form_term_map_taxonomy':
|
45 |
-
'new_field/name=acfe_form_term_map_parent':
|
46 |
-
'new_field/name=acfe_form_term_map_description':
|
47 |
},
|
48 |
|
49 |
filters: {
|
50 |
-
'select2_args':
|
51 |
},
|
52 |
|
53 |
-
actionsButton: function(field){
|
54 |
|
55 |
-
field.on('click', '[data-name="add-layout"]', function(e){
|
56 |
|
57 |
$('body').find('.acf-fc-popup').addClass('acfe-fc-popup-grey');
|
58 |
|
@@ -60,24 +60,24 @@
|
|
60 |
|
61 |
},
|
62 |
|
63 |
-
filesButton: function(field){
|
64 |
|
65 |
field.$('> .acf-input > .acf-repeater > .acf-actions > .acf-button').removeClass('button-primary');
|
66 |
|
67 |
},
|
68 |
|
69 |
-
mapFields: function(field){
|
70 |
|
71 |
var $layout = field.$el.closest('.layout');
|
72 |
var $message = $layout.find('> .acf-fields > .acf-field[data-name="' + field.get('name') + '_message"] > .acf-input');
|
73 |
|
74 |
var selected = field.$input().find('option:selected').text();
|
75 |
|
76 |
-
if(selected.length){
|
77 |
$message.html(selected);
|
78 |
}
|
79 |
|
80 |
-
field.$input().on('change', function(){
|
81 |
|
82 |
// Message
|
83 |
var text = $(this).find('option:selected').text();
|
@@ -88,13 +88,13 @@
|
|
88 |
|
89 |
},
|
90 |
|
91 |
-
select2Args: function(options, $select, fieldData, field, instance){
|
92 |
|
93 |
-
if(field.get('acfeAllowCustom')){
|
94 |
|
95 |
-
options.templateSelection = function(state){
|
96 |
|
97 |
-
if(!state.id){
|
98 |
return state.text;
|
99 |
}
|
100 |
|
@@ -123,9 +123,9 @@
|
|
123 |
|
124 |
};
|
125 |
|
126 |
-
options.templateResult = function(state){
|
127 |
|
128 |
-
if(!state.id){
|
129 |
return state.text;
|
130 |
}
|
131 |
|
@@ -169,32 +169,43 @@
|
|
169 |
wait: 'prepare',
|
170 |
|
171 |
events: {
|
172 |
-
'click .acfe_delete_meta':
|
173 |
-
'click #acfe_bulk_delete_meta_submit':
|
174 |
-
'click.postboxes .hide-postbox-tog':
|
|
|
175 |
},
|
176 |
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
return $('#acfe-acf-custom-fields');
|
179 |
},
|
180 |
|
181 |
-
$wpWrap: function(){
|
182 |
return $('#acfe-wp-custom-fields');
|
183 |
},
|
184 |
|
185 |
-
acfCount: function(){
|
186 |
return $('#acfe-acf-custom-fields tbody tr').length;
|
187 |
},
|
188 |
|
189 |
-
wpCount: function(){
|
190 |
return $('#acfe-wp-custom-fields tbody tr').length;
|
191 |
},
|
192 |
|
193 |
-
$bulkActions: function(){
|
194 |
return $('.acfe_dev_bulk_actions');
|
195 |
},
|
196 |
|
197 |
-
initialize: function(){
|
198 |
|
199 |
var $acfWrap = this.$acfWrap();
|
200 |
var $wpWrap = this.$wpWrap();
|
@@ -204,7 +215,7 @@
|
|
204 |
$acfWrap.find('.tablenav.bottom').insertAfter($acfWrap);
|
205 |
$wpWrap.find('.tablenav.bottom').insertAfter($wpWrap);
|
206 |
|
207 |
-
if(!$acfWrap.is(':visible') && !$wpWrap.is(':visible')){
|
208 |
|
209 |
$bulkActions.hide();
|
210 |
|
@@ -212,40 +223,36 @@
|
|
212 |
|
213 |
},
|
214 |
|
215 |
-
sync: function(){
|
216 |
|
217 |
var self = this;
|
218 |
|
219 |
-
|
|
|
220 |
|
221 |
-
|
222 |
-
|
223 |
|
224 |
-
|
225 |
-
var $wpWrap = self.$wpWrap();
|
226 |
|
227 |
-
|
|
|
228 |
|
229 |
-
|
230 |
-
$
|
231 |
-
|
232 |
-
if(!acfCount){
|
233 |
-
$acfWrap.remove();
|
234 |
-
}
|
235 |
-
|
236 |
-
if(!wpCount){
|
237 |
-
$wpWrap.remove();
|
238 |
-
}
|
239 |
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
|
244 |
-
|
|
|
|
|
245 |
|
246 |
},
|
247 |
|
248 |
-
onClickSingle: function(e, $el){
|
249 |
|
250 |
e.preventDefault();
|
251 |
|
@@ -256,25 +263,28 @@
|
|
256 |
url: acf.get('ajaxurl'),
|
257 |
type: 'post',
|
258 |
data: {
|
259 |
-
action:
|
260 |
-
id:
|
261 |
-
key:
|
262 |
-
type:
|
263 |
-
_wpnonce:
|
264 |
},
|
265 |
-
beforeSend: function(){
|
266 |
|
267 |
-
$tr.css({
|
|
|
|
|
268 |
$tr.remove();
|
|
|
269 |
});
|
270 |
|
271 |
-
self.sync();
|
272 |
-
|
273 |
},
|
274 |
-
success: function(response){
|
275 |
|
276 |
-
if(response !== '1'){
|
277 |
-
$tr.css({
|
|
|
|
|
278 |
$tr.show();
|
279 |
}
|
280 |
|
@@ -283,7 +293,7 @@
|
|
283 |
|
284 |
},
|
285 |
|
286 |
-
onSubmitBulk: function(e, $el){
|
287 |
|
288 |
e.preventDefault();
|
289 |
|
@@ -292,37 +302,38 @@
|
|
292 |
var type = $el.prevAll('.acfe_bulk_delete_meta_type').val();
|
293 |
var nonce = $el.prevAll('.acfe_bulk_delete_meta_nonce').val();
|
294 |
|
295 |
-
if(action === 'delete'){
|
296 |
|
297 |
var ids = [];
|
298 |
var trs = [];
|
299 |
|
300 |
-
$('input.acfe_bulk_delete_meta:checked').each(function(){
|
301 |
ids.push($(this).val());
|
302 |
trs.push($(this).closest('tr'));
|
303 |
});
|
304 |
|
305 |
-
if(ids.length){
|
306 |
|
307 |
$.ajax({
|
308 |
url: acf.get('ajaxurl'),
|
309 |
type: 'post',
|
310 |
data: {
|
311 |
-
action:
|
312 |
-
ids:
|
313 |
-
type:
|
314 |
-
_wpnonce:
|
315 |
},
|
316 |
-
beforeSend: function(){
|
317 |
|
318 |
-
trs.map(function(tr){
|
319 |
-
$(tr).css({
|
|
|
|
|
320 |
$(tr).remove();
|
|
|
321 |
});
|
322 |
});
|
323 |
|
324 |
-
self.sync();
|
325 |
-
|
326 |
}
|
327 |
});
|
328 |
|
@@ -332,7 +343,7 @@
|
|
332 |
|
333 |
},
|
334 |
|
335 |
-
onClickPostbox: function(e, $el){
|
336 |
|
337 |
var val = $el.val();
|
338 |
|
@@ -340,15 +351,15 @@
|
|
340 |
var $wpWrap = this.$wpWrap();
|
341 |
var $bulkActions = this.$bulkActions();
|
342 |
|
343 |
-
if(!acfe.inArray(val, ['acfe-wp-custom-fields', 'acfe-acf-custom-fields']))
|
344 |
return;
|
345 |
|
346 |
-
if($el.prop('checked')){
|
347 |
|
348 |
-
if(!$bulkActions.is(':visible'))
|
349 |
$bulkActions.show();
|
350 |
|
351 |
-
}else if((val === 'acfe-wp-custom-fields' && !$acfWrap.is(':visible')) || (val === 'acfe-acf-custom-fields' && !$wpWrap.is(':visible'))){
|
352 |
|
353 |
$bulkActions.hide();
|
354 |
|
@@ -367,9 +378,9 @@
|
|
367 |
'new_field/name=acfe_author': 'newField',
|
368 |
},
|
369 |
|
370 |
-
newField: function(field){
|
371 |
|
372 |
-
field.on('change', function(e){
|
373 |
e.stopPropagation();
|
374 |
});
|
375 |
|
@@ -380,7 +391,7 @@
|
|
380 |
/*
|
381 |
* Postbox: ACFE Class
|
382 |
*/
|
383 |
-
acf.addAction('show_postbox', function(postbox){
|
384 |
postbox.$el.removeClass('acfe-postbox-left acfe-postbox-top');
|
385 |
});
|
386 |
|
@@ -393,56 +404,56 @@
|
|
393 |
'new_field': 'newField',
|
394 |
},
|
395 |
|
396 |
-
isRepeater: function(field){
|
397 |
return field.get('type') === 'repeater' || field.get('type') === 'flexible_content';
|
398 |
},
|
399 |
|
400 |
-
getCondition: function(target){
|
401 |
return this.isRepeater(target) ? target.val() === 0 : !target.val().length;
|
402 |
},
|
403 |
|
404 |
-
enableSwitcher: function(field){
|
405 |
|
406 |
var self = this;
|
407 |
var switcher, target;
|
408 |
|
409 |
-
if(field.get('switched')){
|
410 |
|
411 |
switcher = acf.getField(field.$el.prev());
|
412 |
target = field;
|
413 |
|
414 |
-
}else if(field.get('switcher')){
|
415 |
|
416 |
switcher = field;
|
417 |
target = acf.getField(field.$el.next());
|
418 |
|
419 |
}
|
420 |
|
421 |
-
if(self.getCondition(target)){
|
422 |
|
423 |
switcher.switchOff();
|
424 |
switcher.show('switcher');
|
425 |
target.hide('switcher');
|
426 |
|
427 |
-
}else{
|
428 |
|
429 |
switcher.hide('switcher');
|
430 |
target.show('switcher');
|
431 |
|
432 |
}
|
433 |
|
434 |
-
if(field.get('switcher')){
|
435 |
|
436 |
// Switch Action
|
437 |
-
switcher.on('change', function(){
|
438 |
|
439 |
-
if(switcher.$input().prop('checked')){
|
440 |
|
441 |
switcher.hide('switcher');
|
442 |
|
443 |
target.show('switcher');
|
444 |
|
445 |
-
if(self.isRepeater(target)){
|
446 |
target.add();
|
447 |
}
|
448 |
|
@@ -451,9 +462,9 @@
|
|
451 |
});
|
452 |
|
453 |
// Field Action
|
454 |
-
target.on('change', function(e, $el){
|
455 |
|
456 |
-
if(self.getCondition(target)){
|
457 |
|
458 |
switcher.switchOff();
|
459 |
switcher.show('switcher');
|
@@ -467,7 +478,7 @@
|
|
467 |
|
468 |
},
|
469 |
|
470 |
-
enableSwitch: function(field){
|
471 |
|
472 |
// Clone
|
473 |
var $row = field.$el.clone();
|
@@ -504,15 +515,13 @@
|
|
504 |
|
505 |
},
|
506 |
|
507 |
-
newField: function(field){
|
508 |
|
509 |
-
if(field.get('enableSwitch')){
|
510 |
|
511 |
this.enableSwitch(field);
|
512 |
|
513 |
-
}
|
514 |
-
|
515 |
-
else if(field.get('switched') || field.get('switcher')){
|
516 |
|
517 |
this.enableSwitcher(field);
|
518 |
|
@@ -521,5 +530,5 @@
|
|
521 |
}
|
522 |
|
523 |
});
|
524 |
-
|
525 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
|
3 |
+
if (typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
/*
|
11 |
actions: {
|
12 |
|
13 |
// Buttons
|
14 |
+
'new_field/name=acfe_form_actions': 'actionsButton',
|
15 |
+
'new_field/name=acfe_form_email_files': 'filesButton',
|
16 |
+
'new_field/name=acfe_form_email_files_static': 'filesButton',
|
17 |
|
18 |
// Post
|
19 |
+
'new_field/name=acfe_form_post_map_target': 'mapFields',
|
20 |
+
'new_field/name=acfe_form_post_map_post_type': 'mapFields',
|
21 |
+
'new_field/name=acfe_form_post_map_post_status': 'mapFields',
|
22 |
+
'new_field/name=acfe_form_post_map_post_title': 'mapFields',
|
23 |
+
'new_field/name=acfe_form_post_map_post_name': 'mapFields',
|
24 |
+
'new_field/name=acfe_form_post_map_post_content': 'mapFields',
|
25 |
+
'new_field/name=acfe_form_post_map_post_author': 'mapFields',
|
26 |
+
'new_field/name=acfe_form_post_map_post_parent': 'mapFields',
|
27 |
+
'new_field/name=acfe_form_post_map_post_terms': 'mapFields',
|
28 |
|
29 |
// User
|
30 |
+
'new_field/name=acfe_form_user_map_email': 'mapFields',
|
31 |
+
'new_field/name=acfe_form_user_map_username': 'mapFields',
|
32 |
+
'new_field/name=acfe_form_user_map_password': 'mapFields',
|
33 |
+
'new_field/name=acfe_form_user_map_first_name': 'mapFields',
|
34 |
+
'new_field/name=acfe_form_user_map_last_name': 'mapFields',
|
35 |
+
'new_field/name=acfe_form_user_map_nickname': 'mapFields',
|
36 |
+
'new_field/name=acfe_form_user_map_display_name': 'mapFields',
|
37 |
+
'new_field/name=acfe_form_user_map_website': 'mapFields',
|
38 |
+
'new_field/name=acfe_form_user_map_description': 'mapFields',
|
39 |
+
'new_field/name=acfe_form_user_map_role': 'mapFields',
|
40 |
|
41 |
// Term
|
42 |
+
'new_field/name=acfe_form_term_map_name': 'mapFields',
|
43 |
+
'new_field/name=acfe_form_term_map_slug': 'mapFields',
|
44 |
+
'new_field/name=acfe_form_term_map_taxonomy': 'mapFields',
|
45 |
+
'new_field/name=acfe_form_term_map_parent': 'mapFields',
|
46 |
+
'new_field/name=acfe_form_term_map_description': 'mapFields',
|
47 |
},
|
48 |
|
49 |
filters: {
|
50 |
+
'select2_args': 'select2Args'
|
51 |
},
|
52 |
|
53 |
+
actionsButton: function(field) {
|
54 |
|
55 |
+
field.on('click', '[data-name="add-layout"]', function(e) {
|
56 |
|
57 |
$('body').find('.acf-fc-popup').addClass('acfe-fc-popup-grey');
|
58 |
|
60 |
|
61 |
},
|
62 |
|
63 |
+
filesButton: function(field) {
|
64 |
|
65 |
field.$('> .acf-input > .acf-repeater > .acf-actions > .acf-button').removeClass('button-primary');
|
66 |
|
67 |
},
|
68 |
|
69 |
+
mapFields: function(field) {
|
70 |
|
71 |
var $layout = field.$el.closest('.layout');
|
72 |
var $message = $layout.find('> .acf-fields > .acf-field[data-name="' + field.get('name') + '_message"] > .acf-input');
|
73 |
|
74 |
var selected = field.$input().find('option:selected').text();
|
75 |
|
76 |
+
if (selected.length) {
|
77 |
$message.html(selected);
|
78 |
}
|
79 |
|
80 |
+
field.$input().on('change', function() {
|
81 |
|
82 |
// Message
|
83 |
var text = $(this).find('option:selected').text();
|
88 |
|
89 |
},
|
90 |
|
91 |
+
select2Args: function(options, $select, fieldData, field, instance) {
|
92 |
|
93 |
+
if (field.get('acfeAllowCustom')) {
|
94 |
|
95 |
+
options.templateSelection = function(state) {
|
96 |
|
97 |
+
if (!state.id) {
|
98 |
return state.text;
|
99 |
}
|
100 |
|
123 |
|
124 |
};
|
125 |
|
126 |
+
options.templateResult = function(state) {
|
127 |
|
128 |
+
if (!state.id) {
|
129 |
return state.text;
|
130 |
}
|
131 |
|
169 |
wait: 'prepare',
|
170 |
|
171 |
events: {
|
172 |
+
'click .acfe_delete_meta': 'onClickSingle',
|
173 |
+
'click #acfe_bulk_delete_meta_submit': 'onSubmitBulk',
|
174 |
+
'click.postboxes .hide-postbox-tog': 'onClickPostbox',
|
175 |
+
'click .acfe-wp-object-modal': 'onClickOpen'
|
176 |
},
|
177 |
|
178 |
+
onClickOpen: function(e, $el) {
|
179 |
+
|
180 |
+
new acfe.Popup($('.acfe-modal[data-modal-key=' + $el.attr('data-modal-key') + ']'), {
|
181 |
+
title: $el.attr('data-modal-title'),
|
182 |
+
size: 'medium',
|
183 |
+
footer: acf.__('Close')
|
184 |
+
});
|
185 |
+
|
186 |
+
},
|
187 |
+
|
188 |
+
$acfWrap: function() {
|
189 |
return $('#acfe-acf-custom-fields');
|
190 |
},
|
191 |
|
192 |
+
$wpWrap: function() {
|
193 |
return $('#acfe-wp-custom-fields');
|
194 |
},
|
195 |
|
196 |
+
acfCount: function() {
|
197 |
return $('#acfe-acf-custom-fields tbody tr').length;
|
198 |
},
|
199 |
|
200 |
+
wpCount: function() {
|
201 |
return $('#acfe-wp-custom-fields tbody tr').length;
|
202 |
},
|
203 |
|
204 |
+
$bulkActions: function() {
|
205 |
return $('.acfe_dev_bulk_actions');
|
206 |
},
|
207 |
|
208 |
+
initialize: function() {
|
209 |
|
210 |
var $acfWrap = this.$acfWrap();
|
211 |
var $wpWrap = this.$wpWrap();
|
215 |
$acfWrap.find('.tablenav.bottom').insertAfter($acfWrap);
|
216 |
$wpWrap.find('.tablenav.bottom').insertAfter($wpWrap);
|
217 |
|
218 |
+
if (!$acfWrap.is(':visible') && !$wpWrap.is(':visible')) {
|
219 |
|
220 |
$bulkActions.hide();
|
221 |
|
223 |
|
224 |
},
|
225 |
|
226 |
+
sync: function() {
|
227 |
|
228 |
var self = this;
|
229 |
|
230 |
+
var acfCount = self.acfCount();
|
231 |
+
var wpCount = self.wpCount();
|
232 |
|
233 |
+
var $acfWrap = self.$acfWrap();
|
234 |
+
var $wpWrap = self.$wpWrap();
|
235 |
|
236 |
+
var $bulkActions = self.$bulkActions();
|
|
|
237 |
|
238 |
+
$acfWrap.find('.acfe_dev_meta_count').text(acfCount);
|
239 |
+
$wpWrap.find('.acfe_dev_meta_count').text(wpCount);
|
240 |
|
241 |
+
if (!acfCount) {
|
242 |
+
$acfWrap.remove();
|
243 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
+
if (!wpCount) {
|
246 |
+
$wpWrap.remove();
|
247 |
+
}
|
248 |
|
249 |
+
if (!acfCount && !wpCount) {
|
250 |
+
$bulkActions.remove();
|
251 |
+
}
|
252 |
|
253 |
},
|
254 |
|
255 |
+
onClickSingle: function(e, $el) {
|
256 |
|
257 |
e.preventDefault();
|
258 |
|
263 |
url: acf.get('ajaxurl'),
|
264 |
type: 'post',
|
265 |
data: {
|
266 |
+
action: 'acfe/delete_meta',
|
267 |
+
id: $el.attr('data-meta-id'),
|
268 |
+
key: $el.attr('data-meta-key'),
|
269 |
+
type: $el.attr('data-type'),
|
270 |
+
_wpnonce: $el.attr('data-nonce'),
|
271 |
},
|
272 |
+
beforeSend: function() {
|
273 |
|
274 |
+
$tr.css({
|
275 |
+
backgroundColor: '#faafaa'
|
276 |
+
}).fadeOut(350, function() {
|
277 |
$tr.remove();
|
278 |
+
self.sync();
|
279 |
});
|
280 |
|
|
|
|
|
281 |
},
|
282 |
+
success: function(response) {
|
283 |
|
284 |
+
if (response !== '1') {
|
285 |
+
$tr.css({
|
286 |
+
backgroundColor: ''
|
287 |
+
});
|
288 |
$tr.show();
|
289 |
}
|
290 |
|
293 |
|
294 |
},
|
295 |
|
296 |
+
onSubmitBulk: function(e, $el) {
|
297 |
|
298 |
e.preventDefault();
|
299 |
|
302 |
var type = $el.prevAll('.acfe_bulk_delete_meta_type').val();
|
303 |
var nonce = $el.prevAll('.acfe_bulk_delete_meta_nonce').val();
|
304 |
|
305 |
+
if (action === 'delete') {
|
306 |
|
307 |
var ids = [];
|
308 |
var trs = [];
|
309 |
|
310 |
+
$('input.acfe_bulk_delete_meta:checked').each(function() {
|
311 |
ids.push($(this).val());
|
312 |
trs.push($(this).closest('tr'));
|
313 |
});
|
314 |
|
315 |
+
if (ids.length) {
|
316 |
|
317 |
$.ajax({
|
318 |
url: acf.get('ajaxurl'),
|
319 |
type: 'post',
|
320 |
data: {
|
321 |
+
action: 'acfe/bulk_delete_meta',
|
322 |
+
ids: ids,
|
323 |
+
type: type,
|
324 |
+
_wpnonce: nonce,
|
325 |
},
|
326 |
+
beforeSend: function() {
|
327 |
|
328 |
+
trs.map(function(tr) {
|
329 |
+
$(tr).css({
|
330 |
+
backgroundColor: '#faafaa'
|
331 |
+
}).fadeOut(350, function() {
|
332 |
$(tr).remove();
|
333 |
+
self.sync();
|
334 |
});
|
335 |
});
|
336 |
|
|
|
|
|
337 |
}
|
338 |
});
|
339 |
|
343 |
|
344 |
},
|
345 |
|
346 |
+
onClickPostbox: function(e, $el) {
|
347 |
|
348 |
var val = $el.val();
|
349 |
|
351 |
var $wpWrap = this.$wpWrap();
|
352 |
var $bulkActions = this.$bulkActions();
|
353 |
|
354 |
+
if (!acfe.inArray(val, ['acfe-wp-custom-fields', 'acfe-acf-custom-fields']))
|
355 |
return;
|
356 |
|
357 |
+
if ($el.prop('checked')) {
|
358 |
|
359 |
+
if (!$bulkActions.is(':visible'))
|
360 |
$bulkActions.show();
|
361 |
|
362 |
+
} else if ((val === 'acfe-wp-custom-fields' && !$acfWrap.is(':visible')) || (val === 'acfe-acf-custom-fields' && !$wpWrap.is(':visible'))) {
|
363 |
|
364 |
$bulkActions.hide();
|
365 |
|
378 |
'new_field/name=acfe_author': 'newField',
|
379 |
},
|
380 |
|
381 |
+
newField: function(field) {
|
382 |
|
383 |
+
field.on('change', function(e) {
|
384 |
e.stopPropagation();
|
385 |
});
|
386 |
|
391 |
/*
|
392 |
* Postbox: ACFE Class
|
393 |
*/
|
394 |
+
acf.addAction('show_postbox', function(postbox) {
|
395 |
postbox.$el.removeClass('acfe-postbox-left acfe-postbox-top');
|
396 |
});
|
397 |
|
404 |
'new_field': 'newField',
|
405 |
},
|
406 |
|
407 |
+
isRepeater: function(field) {
|
408 |
return field.get('type') === 'repeater' || field.get('type') === 'flexible_content';
|
409 |
},
|
410 |
|
411 |
+
getCondition: function(target) {
|
412 |
return this.isRepeater(target) ? target.val() === 0 : !target.val().length;
|
413 |
},
|
414 |
|
415 |
+
enableSwitcher: function(field) {
|
416 |
|
417 |
var self = this;
|
418 |
var switcher, target;
|
419 |
|
420 |
+
if (field.get('switched')) {
|
421 |
|
422 |
switcher = acf.getField(field.$el.prev());
|
423 |
target = field;
|
424 |
|
425 |
+
} else if (field.get('switcher')) {
|
426 |
|
427 |
switcher = field;
|
428 |
target = acf.getField(field.$el.next());
|
429 |
|
430 |
}
|
431 |
|
432 |
+
if (self.getCondition(target)) {
|
433 |
|
434 |
switcher.switchOff();
|
435 |
switcher.show('switcher');
|
436 |
target.hide('switcher');
|
437 |
|
438 |
+
} else {
|
439 |
|
440 |
switcher.hide('switcher');
|
441 |
target.show('switcher');
|
442 |
|
443 |
}
|
444 |
|
445 |
+
if (field.get('switcher')) {
|
446 |
|
447 |
// Switch Action
|
448 |
+
switcher.on('change', function() {
|
449 |
|
450 |
+
if (switcher.$input().prop('checked')) {
|
451 |
|
452 |
switcher.hide('switcher');
|
453 |
|
454 |
target.show('switcher');
|
455 |
|
456 |
+
if (self.isRepeater(target)) {
|
457 |
target.add();
|
458 |
}
|
459 |
|
462 |
});
|
463 |
|
464 |
// Field Action
|
465 |
+
target.on('change', function(e, $el) {
|
466 |
|
467 |
+
if (self.getCondition(target)) {
|
468 |
|
469 |
switcher.switchOff();
|
470 |
switcher.show('switcher');
|
478 |
|
479 |
},
|
480 |
|
481 |
+
enableSwitch: function(field) {
|
482 |
|
483 |
// Clone
|
484 |
var $row = field.$el.clone();
|
515 |
|
516 |
},
|
517 |
|
518 |
+
newField: function(field) {
|
519 |
|
520 |
+
if (field.get('enableSwitch')) {
|
521 |
|
522 |
this.enableSwitch(field);
|
523 |
|
524 |
+
} else if (field.get('switched') || field.get('switcher')) {
|
|
|
|
|
525 |
|
526 |
this.enableSwitcher(field);
|
527 |
|
530 |
}
|
531 |
|
532 |
});
|
533 |
+
|
534 |
})(jQuery);
|
@@ -1 +1 @@
|
|
1 |
-
!function(o){"undefined"!=typeof acf&&(new acf.Model({actions:{"new_field/name=acfe_form_actions":"actionsButton","new_field/name=acfe_form_email_files":"filesButton","new_field/name=acfe_form_email_files_static":"filesButton","new_field/name=acfe_form_post_map_target":"mapFields","new_field/name=acfe_form_post_map_post_type":"mapFields","new_field/name=acfe_form_post_map_post_status":"mapFields","new_field/name=acfe_form_post_map_post_title":"mapFields","new_field/name=acfe_form_post_map_post_name":"mapFields","new_field/name=acfe_form_post_map_post_content":"mapFields","new_field/name=acfe_form_post_map_post_author":"mapFields","new_field/name=acfe_form_post_map_post_parent":"mapFields","new_field/name=acfe_form_post_map_post_terms":"mapFields","new_field/name=acfe_form_user_map_email":"mapFields","new_field/name=acfe_form_user_map_username":"mapFields","new_field/name=acfe_form_user_map_password":"mapFields","new_field/name=acfe_form_user_map_first_name":"mapFields","new_field/name=acfe_form_user_map_last_name":"mapFields","new_field/name=acfe_form_user_map_nickname":"mapFields","new_field/name=acfe_form_user_map_display_name":"mapFields","new_field/name=acfe_form_user_map_website":"mapFields","new_field/name=acfe_form_user_map_description":"mapFields","new_field/name=acfe_form_user_map_role":"mapFields","new_field/name=acfe_form_term_map_name":"mapFields","new_field/name=acfe_form_term_map_slug":"mapFields","new_field/name=acfe_form_term_map_taxonomy":"mapFields","new_field/name=acfe_form_term_map_parent":"mapFields","new_field/name=acfe_form_term_map_description":"mapFields"},filters:{select2_args:"select2Args"},actionsButton:function(e){e.on("click",'[data-name="add-layout"]',function(e){o("body").find(".acf-fc-popup").addClass("acfe-fc-popup-grey")})},filesButton:function(e){e.$("> .acf-input > .acf-repeater > .acf-actions > .acf-button").removeClass("button-primary")},mapFields:function(e){var t=e.$el.closest(".layout").find('> .acf-fields > .acf-field[data-name="'+e.get("name")+'_message"] > .acf-input'),a=e.$input().find("option:selected").text();a.length&&t.html(a),e.$input().on("change",function(){var e=o(this).find("option:selected").text();t.html(e)})},select2Args:function(e,t,a,i,n){return i.get("acfeAllowCustom")&&(e.templateSelection=function(e){if(!e.id)return e.text;e=e.text;return e=(e=(e=(e=(e=(e=(e=(e=e.replace(/{field:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{field:$1}</code>")).replace(/{fields}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{fields}</code>")).replace(/{current:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{current:$1}</code>")).replace(/{(form|form:.*?)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{$1}</code>")).replace(/{action:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{action:$1}</code>")).replace(/{get_field:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{get_field:$1}</code>")).replace(/{query_var:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{query_var:$1}</code>")).replace(/{request:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{request:$1}</code>")},e.templateResult=function(e){if(!e.id)return e.text;e=e.text;return e=(e=(e=(e=(e=(e=(e=(e=e.replace(/{field:(.*?)}/g,"<code style='font-size:12px;'>{field:$1}</code>")).replace(/{fields}/g,"<code style='font-size:12px;'>{fields}</code>")).replace(/{get_field:(.*?)}/g,"<code style='font-size:12px;'>{get_field:$1}</code>")).replace(/{query_var:(.*?)}/g,"<code style='font-size:12px;'>{query_var:$1}</code>")).replace(/{request:(.*?)}/g,"<code style='font-size:12px;'>{request:$1}</code>")).replace(/{current:(.*?)}/g,"<code style='font-size:12px;'>{current:$1}</code>")).replace(/{(form|form:.*?)}/g,"<code style='font-size:12px;'>{$1}</code>")).replace(/{action:(.*?)}/g,"<code style='font-size:12px;'>{action:$1}</code>")}),e}}),new acf.Model({wait:"prepare",events:{"click .acfe_delete_meta":"onClickSingle","click #acfe_bulk_delete_meta_submit":"onSubmitBulk","click.postboxes .hide-postbox-tog":"onClickPostbox"},$acfWrap:function(){return o("#acfe-acf-custom-fields")},$wpWrap:function(){return o("#acfe-wp-custom-fields")},acfCount:function(){return o("#acfe-acf-custom-fields tbody tr").length},wpCount:function(){return o("#acfe-wp-custom-fields tbody tr").length},$bulkActions:function(){return o(".acfe_dev_bulk_actions")},initialize:function(){var e=this.$acfWrap(),t=this.$wpWrap(),a=this.$bulkActions();e.find(".tablenav.bottom").insertAfter(e),t.find(".tablenav.bottom").insertAfter(t),e.is(":visible")||t.is(":visible")||a.hide()},sync:function(){var
|
1 |
+
!function(o){"undefined"!=typeof acf&&(new acf.Model({actions:{"new_field/name=acfe_form_actions":"actionsButton","new_field/name=acfe_form_email_files":"filesButton","new_field/name=acfe_form_email_files_static":"filesButton","new_field/name=acfe_form_post_map_target":"mapFields","new_field/name=acfe_form_post_map_post_type":"mapFields","new_field/name=acfe_form_post_map_post_status":"mapFields","new_field/name=acfe_form_post_map_post_title":"mapFields","new_field/name=acfe_form_post_map_post_name":"mapFields","new_field/name=acfe_form_post_map_post_content":"mapFields","new_field/name=acfe_form_post_map_post_author":"mapFields","new_field/name=acfe_form_post_map_post_parent":"mapFields","new_field/name=acfe_form_post_map_post_terms":"mapFields","new_field/name=acfe_form_user_map_email":"mapFields","new_field/name=acfe_form_user_map_username":"mapFields","new_field/name=acfe_form_user_map_password":"mapFields","new_field/name=acfe_form_user_map_first_name":"mapFields","new_field/name=acfe_form_user_map_last_name":"mapFields","new_field/name=acfe_form_user_map_nickname":"mapFields","new_field/name=acfe_form_user_map_display_name":"mapFields","new_field/name=acfe_form_user_map_website":"mapFields","new_field/name=acfe_form_user_map_description":"mapFields","new_field/name=acfe_form_user_map_role":"mapFields","new_field/name=acfe_form_term_map_name":"mapFields","new_field/name=acfe_form_term_map_slug":"mapFields","new_field/name=acfe_form_term_map_taxonomy":"mapFields","new_field/name=acfe_form_term_map_parent":"mapFields","new_field/name=acfe_form_term_map_description":"mapFields"},filters:{select2_args:"select2Args"},actionsButton:function(e){e.on("click",'[data-name="add-layout"]',function(e){o("body").find(".acf-fc-popup").addClass("acfe-fc-popup-grey")})},filesButton:function(e){e.$("> .acf-input > .acf-repeater > .acf-actions > .acf-button").removeClass("button-primary")},mapFields:function(e){var t=e.$el.closest(".layout").find('> .acf-fields > .acf-field[data-name="'+e.get("name")+'_message"] > .acf-input'),a=e.$input().find("option:selected").text();a.length&&t.html(a),e.$input().on("change",function(){var e=o(this).find("option:selected").text();t.html(e)})},select2Args:function(e,t,a,i,n){return i.get("acfeAllowCustom")&&(e.templateSelection=function(e){if(!e.id)return e.text;e=e.text;return e=(e=(e=(e=(e=(e=(e=(e=e.replace(/{field:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{field:$1}</code>")).replace(/{fields}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{fields}</code>")).replace(/{current:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{current:$1}</code>")).replace(/{(form|form:.*?)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{$1}</code>")).replace(/{action:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{action:$1}</code>")).replace(/{get_field:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{get_field:$1}</code>")).replace(/{query_var:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{query_var:$1}</code>")).replace(/{request:(.*)}/g,"<code style='font-size:12px;padding:3px;vertical-align: 1px;line-height: 12px;'>{request:$1}</code>")},e.templateResult=function(e){if(!e.id)return e.text;e=e.text;return e=(e=(e=(e=(e=(e=(e=(e=e.replace(/{field:(.*?)}/g,"<code style='font-size:12px;'>{field:$1}</code>")).replace(/{fields}/g,"<code style='font-size:12px;'>{fields}</code>")).replace(/{get_field:(.*?)}/g,"<code style='font-size:12px;'>{get_field:$1}</code>")).replace(/{query_var:(.*?)}/g,"<code style='font-size:12px;'>{query_var:$1}</code>")).replace(/{request:(.*?)}/g,"<code style='font-size:12px;'>{request:$1}</code>")).replace(/{current:(.*?)}/g,"<code style='font-size:12px;'>{current:$1}</code>")).replace(/{(form|form:.*?)}/g,"<code style='font-size:12px;'>{$1}</code>")).replace(/{action:(.*?)}/g,"<code style='font-size:12px;'>{action:$1}</code>")}),e}}),new acf.Model({wait:"prepare",events:{"click .acfe_delete_meta":"onClickSingle","click #acfe_bulk_delete_meta_submit":"onSubmitBulk","click.postboxes .hide-postbox-tog":"onClickPostbox","click .acfe-wp-object-modal":"onClickOpen"},onClickOpen:function(e,t){new acfe.Popup(o(".acfe-modal[data-modal-key="+t.attr("data-modal-key")+"]"),{title:t.attr("data-modal-title"),size:"medium",footer:acf.__("Close")})},$acfWrap:function(){return o("#acfe-acf-custom-fields")},$wpWrap:function(){return o("#acfe-wp-custom-fields")},acfCount:function(){return o("#acfe-acf-custom-fields tbody tr").length},wpCount:function(){return o("#acfe-wp-custom-fields tbody tr").length},$bulkActions:function(){return o(".acfe_dev_bulk_actions")},initialize:function(){var e=this.$acfWrap(),t=this.$wpWrap(),a=this.$bulkActions();e.find(".tablenav.bottom").insertAfter(e),t.find(".tablenav.bottom").insertAfter(t),e.is(":visible")||t.is(":visible")||a.hide()},sync:function(){var e=this,t=e.acfCount(),a=e.wpCount(),i=e.$acfWrap(),n=e.$wpWrap(),e=e.$bulkActions();i.find(".acfe_dev_meta_count").text(t),n.find(".acfe_dev_meta_count").text(a),t||i.remove(),a||n.remove(),t||a||e.remove()},onClickSingle:function(e,t){e.preventDefault();var a=this,i=t.closest("tr");o.ajax({url:acf.get("ajaxurl"),type:"post",data:{action:"acfe/delete_meta",id:t.attr("data-meta-id"),key:t.attr("data-meta-key"),type:t.attr("data-type"),_wpnonce:t.attr("data-nonce")},beforeSend:function(){i.css({backgroundColor:"#faafaa"}).fadeOut(350,function(){i.remove(),a.sync()})},success:function(e){"1"!==e&&(i.css({backgroundColor:""}),i.show())}})},onSubmitBulk:function(e,t){e.preventDefault();var a,i,n=this,c=t.prevAll(".acfe_bulk_delete_meta_action").val(),e=t.prevAll(".acfe_bulk_delete_meta_type").val(),t=t.prevAll(".acfe_bulk_delete_meta_nonce").val();"delete"===c&&(a=[],i=[],o("input.acfe_bulk_delete_meta:checked").each(function(){a.push(o(this).val()),i.push(o(this).closest("tr"))}),a.length&&o.ajax({url:acf.get("ajaxurl"),type:"post",data:{action:"acfe/bulk_delete_meta",ids:a,type:e,_wpnonce:t},beforeSend:function(){i.map(function(e){o(e).css({backgroundColor:"#faafaa"}).fadeOut(350,function(){o(e).remove(),n.sync()})})}}))},onClickPostbox:function(e,t){var a=t.val(),i=this.$acfWrap(),n=this.$wpWrap(),c=this.$bulkActions();acfe.inArray(a,["acfe-wp-custom-fields","acfe-acf-custom-fields"])&&(t.prop("checked")?c.is(":visible")||c.show():("acfe-wp-custom-fields"===a&&!i.is(":visible")||"acfe-acf-custom-fields"===a&&!n.is(":visible"))&&c.hide())}}),new acf.Model({actions:{"new_field/name=acfe_author":"newField"},newField:function(e){e.on("change",function(e){e.stopPropagation()})}}),acf.addAction("show_postbox",function(e){e.$el.removeClass("acfe-postbox-left acfe-postbox-top")}),new acf.Model({actions:{new_field:"newField"},isRepeater:function(e){return"repeater"===e.get("type")||"flexible_content"===e.get("type")},getCondition:function(e){return this.isRepeater(e)?0===e.val():!e.val().length},enableSwitcher:function(e){var a,i,n=this;e.get("switched")?(a=acf.getField(e.$el.prev()),i=e):e.get("switcher")&&(a=e,i=acf.getField(e.$el.next())),n.getCondition(i)?(a.switchOff(),a.show("switcher"),i.hide("switcher")):(a.hide("switcher"),i.show("switcher")),e.get("switcher")&&(a.on("change",function(){a.$input().prop("checked")&&(a.hide("switcher"),i.show("switcher"),n.isRepeater(i)&&i.add())}),i.on("change",function(e,t){n.getCondition(i)&&(a.switchOff(),a.show("switcher"),i.hide("switcher"))}))},enableSwitch:function(e){var t=e.$el.clone();t.removeAttr("data-enable-switch"),t.attr("data-switcher",!0),t.attr("data-name",e.get("name")+"_acfe_switch"),t.attr("data-key",e.get("name")+"_acfe_switch"),t.attr("data-type","true_false"),t.find(">.acf-input").html('<div class="acf-true-false">\n<input type="hidden" value="0"><label>\n<input type="checkbox" value="1" class="acf-switch-input" autocomplete="off">\n<div class="acf-switch"><span class="acf-switch-on" style="min-width: 18px;">'+acf.__("Yes")+'</span><span class="acf-switch-off" style="min-width: 18px;">'+acf.__("No")+'</span><div class="acf-switch-slider"></div></div></label>\n</div>'),t=t.insertBefore(e.$el),acf.getField(t),e.$el.removeAttr("data-enable-switch"),e.set("enableSwitch",!1),e.$el.attr("data-switched",!0),e.set("switched",!0)},newField:function(e){e.get("enableSwitch")?this.enableSwitch(e):(e.get("switched")||e.get("switcher"))&&this.enableSwitcher(e)}}))}(jQuery);
|
@@ -1,6 +1,6 @@
|
|
1 |
-
(function($){
|
2 |
-
|
3 |
-
if(typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
/*
|
@@ -13,9 +13,9 @@
|
|
13 |
},
|
14 |
|
15 |
// Fix duplicate Code Editor
|
16 |
-
appendCodeEditor: function(field){
|
17 |
|
18 |
-
if(field.get('type') !== 'acfe_code_editor')
|
19 |
return;
|
20 |
|
21 |
field.$setting('default_value').find('> .acf-input > .acf-input-wrap > .CodeMirror:last').remove();
|
@@ -31,12 +31,12 @@
|
|
31 |
new acf.Model({
|
32 |
|
33 |
actions: {
|
34 |
-
'change_field_label/type=acfe_column':
|
35 |
-
'change_field_type/type=acfe_column':
|
36 |
-
'render_field_settings/type=acfe_column':
|
37 |
},
|
38 |
|
39 |
-
renderTitle: function($el){
|
40 |
|
41 |
var field = acf.getInstance($el);
|
42 |
|
@@ -46,11 +46,11 @@
|
|
46 |
var $endpoint = field.$setting('endpoint');
|
47 |
var endpoint = acf.getInstance($endpoint).getValue();
|
48 |
|
49 |
-
if(endpoint){
|
50 |
|
51 |
field.set('label', '(Column endpoint)');
|
52 |
|
53 |
-
}else{
|
54 |
|
55 |
field.set('label', '(Column ' + columns + ')');
|
56 |
|
@@ -58,11 +58,11 @@
|
|
58 |
|
59 |
},
|
60 |
|
61 |
-
renderField: function($el){
|
62 |
|
63 |
var field = acf.getFieldObject($el);
|
64 |
|
65 |
-
var setLabel = function(){
|
66 |
field.set('label', true);
|
67 |
}
|
68 |
|
@@ -82,14 +82,14 @@
|
|
82 |
'select2_ajax_data/action=acfe/fields/taxonomy_terms/allow_query': 'taxonomyTermsAjax',
|
83 |
},
|
84 |
|
85 |
-
taxonomyTermsAjax: function(ajaxData, data, $el, field, select){
|
86 |
|
87 |
// Taxonomies
|
88 |
var $taxonomies = $el.closest('.acf-field-settings').find('> .acf-field-setting-taxonomy > .acf-input > select > option:selected');
|
89 |
|
90 |
var tax = [];
|
91 |
|
92 |
-
$taxonomies.each(function(){
|
93 |
tax.push($(this).val());
|
94 |
});
|
95 |
|
@@ -117,7 +117,7 @@
|
|
117 |
'click .acfe_modal_open': 'onClickOpen'
|
118 |
},
|
119 |
|
120 |
-
onClickOpen: function(e, $el){
|
121 |
|
122 |
new acfe.Popup($('.acfe-modal[data-modal-key=' + $el.attr('data-modal-key') + ']'), {
|
123 |
title: 'Data',
|
@@ -127,9 +127,9 @@
|
|
127 |
|
128 |
},
|
129 |
|
130 |
-
initialize: function(){
|
131 |
|
132 |
-
$('.button.edit-field').each(function(){
|
133 |
|
134 |
var tbody = $(this).closest('tbody');
|
135 |
$(tbody).find('.acfe_modal_open:first').insertAfter($(this));
|
@@ -148,30 +148,30 @@
|
|
148 |
new acf.Model({
|
149 |
|
150 |
actions: {
|
151 |
-
'new_field'
|
152 |
},
|
153 |
|
154 |
-
onNewField: function(field){
|
155 |
|
156 |
-
if(field.get('type') === 'tab')
|
157 |
return;
|
158 |
|
159 |
var $sibling;
|
160 |
|
161 |
-
if(field.has('before')){
|
162 |
|
163 |
// vars
|
164 |
$sibling = field.$el.siblings('[data-name="' + field.get('before') + '"]').first();
|
165 |
|
166 |
-
if($sibling.length)
|
167 |
$sibling.before(field.$el);
|
168 |
|
169 |
-
}else if(field.has('after')){
|
170 |
|
171 |
// vars
|
172 |
$sibling = field.$el.siblings('[data-name="' + field.get('after') + '"]').first();
|
173 |
|
174 |
-
if($sibling.length)
|
175 |
$sibling.after(field.$el);
|
176 |
|
177 |
}
|
@@ -186,22 +186,22 @@
|
|
186 |
|
187 |
acf.models.TabField = Tab.extend({
|
188 |
|
189 |
-
initialize: function(){
|
190 |
|
191 |
-
if(this.has('before')){
|
192 |
|
193 |
// vars
|
194 |
$sibling = this.$el.siblings('[data-name="' + this.get('before') + '"]').first();
|
195 |
|
196 |
-
if($sibling.length)
|
197 |
$sibling.before(this.$el);
|
198 |
|
199 |
-
}else if(this.has('after')){
|
200 |
|
201 |
// vars
|
202 |
$sibling = this.$el.siblings('[data-name="' + this.get('after') + '"]').first();
|
203 |
|
204 |
-
if($sibling.length)
|
205 |
$sibling.after(this.$el);
|
206 |
|
207 |
}
|
@@ -220,33 +220,33 @@
|
|
220 |
|
221 |
wait: 'ready',
|
222 |
|
223 |
-
actions:{
|
224 |
-
'append':
|
225 |
-
'acfe/field_group/rule_refresh':
|
226 |
},
|
227 |
|
228 |
-
initialize: function(){
|
229 |
this.$el = $('#acf-field-group-locations');
|
230 |
},
|
231 |
|
232 |
-
onAppend: function($el){
|
233 |
|
234 |
-
if(!$el.is('.rule-group') && !$el.parent().parent().parent().is('.rule-group'))
|
235 |
return;
|
236 |
|
237 |
this.refreshFields();
|
238 |
|
239 |
},
|
240 |
|
241 |
-
refreshFields: function(){
|
242 |
|
243 |
var fields = acf.getFields({
|
244 |
parent: this.$('td.value')
|
245 |
});
|
246 |
|
247 |
-
fields.map(function(field){
|
248 |
|
249 |
-
if(!acfe.inArray(field.get('type'), ['date_picker', 'date_time_picker', 'time_picker']))
|
250 |
return;
|
251 |
|
252 |
field.$inputText().removeClass('hasDatepicker').removeAttr('id');
|
@@ -265,12 +265,12 @@
|
|
265 |
new acf.Model({
|
266 |
|
267 |
actions: {
|
268 |
-
'new_field/name=acfe_meta':
|
269 |
'new_field/name=acfe_settings': 'renderClass',
|
270 |
'new_field/name=acfe_validate': 'renderClass',
|
271 |
},
|
272 |
|
273 |
-
renderClass: function(field){
|
274 |
|
275 |
field.$('.acf-button').removeClass('button-primary');
|
276 |
|
@@ -287,11 +287,11 @@
|
|
287 |
'keyup #post_name': 'onInput'
|
288 |
},
|
289 |
|
290 |
-
onInput: function(e, $el){
|
291 |
|
292 |
var val = $el.val();
|
293 |
|
294 |
-
if(!val.startsWith('group_')){
|
295 |
|
296 |
val = 'group_' + val;
|
297 |
$el.val(val);
|
@@ -315,10 +315,10 @@
|
|
315 |
},
|
316 |
|
317 |
// 0.8.4.5 Flexible Content: Fix duplicated "layout_settings" & "layout_title"
|
318 |
-
flexibleContent: function(field){
|
319 |
|
320 |
// field_acfe_layout_abc123456_settings + field_acfe_layout_abc123456_title
|
321 |
-
if(!field.get('key').startsWith('field_acfe_layout_'))
|
322 |
return;
|
323 |
|
324 |
field.delete();
|
@@ -326,5 +326,5 @@
|
|
326 |
},
|
327 |
|
328 |
});
|
329 |
-
|
330 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
+
|
3 |
+
if (typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
/*
|
13 |
},
|
14 |
|
15 |
// Fix duplicate Code Editor
|
16 |
+
appendCodeEditor: function(field) {
|
17 |
|
18 |
+
if (field.get('type') !== 'acfe_code_editor')
|
19 |
return;
|
20 |
|
21 |
field.$setting('default_value').find('> .acf-input > .acf-input-wrap > .CodeMirror:last').remove();
|
31 |
new acf.Model({
|
32 |
|
33 |
actions: {
|
34 |
+
'change_field_label/type=acfe_column': 'renderTitle',
|
35 |
+
'change_field_type/type=acfe_column': 'renderTitle',
|
36 |
+
'render_field_settings/type=acfe_column': 'renderField',
|
37 |
},
|
38 |
|
39 |
+
renderTitle: function($el) {
|
40 |
|
41 |
var field = acf.getInstance($el);
|
42 |
|
46 |
var $endpoint = field.$setting('endpoint');
|
47 |
var endpoint = acf.getInstance($endpoint).getValue();
|
48 |
|
49 |
+
if (endpoint) {
|
50 |
|
51 |
field.set('label', '(Column endpoint)');
|
52 |
|
53 |
+
} else {
|
54 |
|
55 |
field.set('label', '(Column ' + columns + ')');
|
56 |
|
58 |
|
59 |
},
|
60 |
|
61 |
+
renderField: function($el) {
|
62 |
|
63 |
var field = acf.getFieldObject($el);
|
64 |
|
65 |
+
var setLabel = function() {
|
66 |
field.set('label', true);
|
67 |
}
|
68 |
|
82 |
'select2_ajax_data/action=acfe/fields/taxonomy_terms/allow_query': 'taxonomyTermsAjax',
|
83 |
},
|
84 |
|
85 |
+
taxonomyTermsAjax: function(ajaxData, data, $el, field, select) {
|
86 |
|
87 |
// Taxonomies
|
88 |
var $taxonomies = $el.closest('.acf-field-settings').find('> .acf-field-setting-taxonomy > .acf-input > select > option:selected');
|
89 |
|
90 |
var tax = [];
|
91 |
|
92 |
+
$taxonomies.each(function() {
|
93 |
tax.push($(this).val());
|
94 |
});
|
95 |
|
117 |
'click .acfe_modal_open': 'onClickOpen'
|
118 |
},
|
119 |
|
120 |
+
onClickOpen: function(e, $el) {
|
121 |
|
122 |
new acfe.Popup($('.acfe-modal[data-modal-key=' + $el.attr('data-modal-key') + ']'), {
|
123 |
title: 'Data',
|
127 |
|
128 |
},
|
129 |
|
130 |
+
initialize: function() {
|
131 |
|
132 |
+
$('.button.edit-field').each(function() {
|
133 |
|
134 |
var tbody = $(this).closest('tbody');
|
135 |
$(tbody).find('.acfe_modal_open:first').insertAfter($(this));
|
148 |
new acf.Model({
|
149 |
|
150 |
actions: {
|
151 |
+
'new_field': 'onNewField'
|
152 |
},
|
153 |
|
154 |
+
onNewField: function(field) {
|
155 |
|
156 |
+
if (field.get('type') === 'tab')
|
157 |
return;
|
158 |
|
159 |
var $sibling;
|
160 |
|
161 |
+
if (field.has('before')) {
|
162 |
|
163 |
// vars
|
164 |
$sibling = field.$el.siblings('[data-name="' + field.get('before') + '"]').first();
|
165 |
|
166 |
+
if ($sibling.length)
|
167 |
$sibling.before(field.$el);
|
168 |
|
169 |
+
} else if (field.has('after')) {
|
170 |
|
171 |
// vars
|
172 |
$sibling = field.$el.siblings('[data-name="' + field.get('after') + '"]').first();
|
173 |
|
174 |
+
if ($sibling.length)
|
175 |
$sibling.after(field.$el);
|
176 |
|
177 |
}
|
186 |
|
187 |
acf.models.TabField = Tab.extend({
|
188 |
|
189 |
+
initialize: function() {
|
190 |
|
191 |
+
if (this.has('before')) {
|
192 |
|
193 |
// vars
|
194 |
$sibling = this.$el.siblings('[data-name="' + this.get('before') + '"]').first();
|
195 |
|
196 |
+
if ($sibling.length)
|
197 |
$sibling.before(this.$el);
|
198 |
|
199 |
+
} else if (this.has('after')) {
|
200 |
|
201 |
// vars
|
202 |
$sibling = this.$el.siblings('[data-name="' + this.get('after') + '"]').first();
|
203 |
|
204 |
+
if ($sibling.length)
|
205 |
$sibling.after(this.$el);
|
206 |
|
207 |
}
|
220 |
|
221 |
wait: 'ready',
|
222 |
|
223 |
+
actions: {
|
224 |
+
'append': 'onAppend',
|
225 |
+
'acfe/field_group/rule_refresh': 'refreshFields'
|
226 |
},
|
227 |
|
228 |
+
initialize: function() {
|
229 |
this.$el = $('#acf-field-group-locations');
|
230 |
},
|
231 |
|
232 |
+
onAppend: function($el) {
|
233 |
|
234 |
+
if (!$el.is('.rule-group') && !$el.parent().parent().parent().is('.rule-group'))
|
235 |
return;
|
236 |
|
237 |
this.refreshFields();
|
238 |
|
239 |
},
|
240 |
|
241 |
+
refreshFields: function() {
|
242 |
|
243 |
var fields = acf.getFields({
|
244 |
parent: this.$('td.value')
|
245 |
});
|
246 |
|
247 |
+
fields.map(function(field) {
|
248 |
|
249 |
+
if (!acfe.inArray(field.get('type'), ['date_picker', 'date_time_picker', 'time_picker']))
|
250 |
return;
|
251 |
|
252 |
field.$inputText().removeClass('hasDatepicker').removeAttr('id');
|
265 |
new acf.Model({
|
266 |
|
267 |
actions: {
|
268 |
+
'new_field/name=acfe_meta': 'renderClass',
|
269 |
'new_field/name=acfe_settings': 'renderClass',
|
270 |
'new_field/name=acfe_validate': 'renderClass',
|
271 |
},
|
272 |
|
273 |
+
renderClass: function(field) {
|
274 |
|
275 |
field.$('.acf-button').removeClass('button-primary');
|
276 |
|
287 |
'keyup #post_name': 'onInput'
|
288 |
},
|
289 |
|
290 |
+
onInput: function(e, $el) {
|
291 |
|
292 |
var val = $el.val();
|
293 |
|
294 |
+
if (!val.startsWith('group_')) {
|
295 |
|
296 |
val = 'group_' + val;
|
297 |
$el.val(val);
|
315 |
},
|
316 |
|
317 |
// 0.8.4.5 Flexible Content: Fix duplicated "layout_settings" & "layout_title"
|
318 |
+
flexibleContent: function(field) {
|
319 |
|
320 |
// field_acfe_layout_abc123456_settings + field_acfe_layout_abc123456_title
|
321 |
+
if (!field.get('key').startsWith('field_acfe_layout_'))
|
322 |
return;
|
323 |
|
324 |
field.delete();
|
326 |
},
|
327 |
|
328 |
});
|
329 |
+
|
330 |
})(jQuery);
|
@@ -1,32 +1,32 @@
|
|
1 |
-
(function($){
|
2 |
|
3 |
-
if(typeof acf === 'undefined')
|
4 |
return;
|
5 |
-
|
6 |
/*
|
7 |
* Init
|
8 |
*/
|
9 |
var flexible = acf.getFieldType('flexible_content');
|
10 |
var model = flexible.prototype;
|
11 |
-
|
12 |
/*
|
13 |
* Drag & Drop
|
14 |
*/
|
15 |
-
model.addSortable = function(self){
|
16 |
-
|
17 |
// bail early if max 1 row
|
18 |
-
if(this.get('max') == 1){
|
19 |
return;
|
20 |
}
|
21 |
-
|
22 |
// add sortable
|
23 |
this.$layoutsWrap().sortable({
|
24 |
items: ' > .layout',
|
25 |
handle: '> .acf-fc-layout-handle',
|
26 |
-
forceHelperSize: false,
|
27 |
forcePlaceholderSize: true,
|
28 |
revert: 50,
|
29 |
-
tolerance: "pointer",
|
30 |
scroll: true,
|
31 |
stop: function(event, ui) {
|
32 |
self.render();
|
@@ -35,147 +35,147 @@
|
|
35 |
self.$input().trigger('change');
|
36 |
}
|
37 |
});
|
38 |
-
|
39 |
};
|
40 |
-
|
41 |
/*
|
42 |
* Actions
|
43 |
*/
|
44 |
-
model.acfeOneClick = function(e, $el){
|
45 |
-
|
46 |
// Get Flexible
|
47 |
var flexible = this;
|
48 |
-
|
49 |
// Vars
|
50 |
var $clones = flexible.$clones();
|
51 |
var $layout_name = $($clones[0]).data('layout');
|
52 |
-
|
53 |
// Source
|
54 |
var $layout_source = null;
|
55 |
-
if($el.hasClass('acf-icon'))
|
56 |
$layout_source = $el.closest('.layout');
|
57 |
-
|
58 |
// Add
|
59 |
var $layout_added = flexible.add({
|
60 |
layout: $layout_name,
|
61 |
before: $layout_source
|
62 |
});
|
63 |
-
|
64 |
// Hide native tooltip
|
65 |
var acfPopup = $('.acf-fc-popup');
|
66 |
|
67 |
-
if(acfPopup.length){
|
68 |
acfPopup.hide();
|
69 |
}
|
70 |
|
71 |
-
|
72 |
};
|
73 |
-
|
74 |
-
model.acfeLayoutInit = function($layout){
|
75 |
-
|
76 |
// Get Flexible
|
77 |
var flexible = this;
|
78 |
-
|
79 |
// Vars
|
80 |
var $controls = $layout.find('> .acf-fc-layout-controls');
|
81 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
82 |
-
|
83 |
// Placeholder
|
84 |
var $placeholder = $layout.find('> .acfe-fc-placeholder');
|
85 |
-
|
86 |
// Placeholder: Show
|
87 |
$placeholder.removeClass('acf-hidden');
|
88 |
-
|
89 |
// If no modal edition & opened: Hide Placeholder
|
90 |
-
if(!flexible.has('acfeFlexibleModalEdition') && !flexible.isLayoutClosed($layout)){
|
91 |
-
|
92 |
$placeholder.addClass('acf-hidden');
|
93 |
-
|
94 |
}
|
95 |
-
|
96 |
// Flexible has Preview
|
97 |
-
if(flexible.isLayoutClosed($layout) && flexible.has('acfeFlexiblePreview') && !$placeholder.hasClass('-loading')){
|
98 |
-
|
99 |
$placeholder.addClass('acfe-fc-preview -loading').find('> .acfe-flexible-placeholder').prepend('<span class="spinner"></span>');
|
100 |
$placeholder.find('> .acfe-fc-overlay').addClass('-hover');
|
101 |
-
|
102 |
// vars
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
acf.doAction('acfe/fields/flexible_content/before_preview',
|
116 |
-
acf.doAction('acfe/fields/flexible_content/before_preview/name=' + flexible.get('name'),
|
117 |
-
acf.doAction('acfe/fields/flexible_content/before_preview/key=' + flexible.get('key'),
|
118 |
-
acf.doAction('acfe/fields/flexible_content/before_preview/name=' + flexible.get('name') + '&layout=' + $layout.data('layout'),
|
119 |
-
acf.doAction('acfe/fields/flexible_content/before_preview/key=' + flexible.get('key') + '&layout=' + $layout.data('layout'),
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
$placeholder.removeClass('acfe-fc-preview');
|
136 |
-
|
137 |
}
|
138 |
-
|
139 |
-
acf.doAction('acfe/fields/flexible_content/preview',
|
140 |
-
acf.doAction('acfe/fields/flexible_content/preview/name=' + flexible.get('name'),
|
141 |
-
acf.doAction('acfe/fields/flexible_content/preview/key=' + flexible.get('key'),
|
142 |
-
acf.doAction('acfe/fields/flexible_content/preview/name=' + flexible.get('name') + '&layout=' + $layout.data('layout'),
|
143 |
-
acf.doAction('acfe/fields/flexible_content/preview/key=' + flexible.get('key') + '&layout=' + $layout.data('layout'),
|
144 |
-
|
145 |
-
|
146 |
-
complete: function(){
|
147 |
-
|
148 |
$placeholder.find('> .acfe-fc-overlay').removeClass('-hover');
|
149 |
$placeholder.removeClass('-loading').find('> .acfe-flexible-placeholder > .spinner').remove();
|
150 |
-
|
151 |
}
|
152 |
-
|
153 |
-
|
154 |
}
|
155 |
-
|
156 |
};
|
157 |
|
158 |
/*
|
159 |
* WYSIWYG
|
160 |
*/
|
161 |
var wysiwyg = acf.getFieldType('wysiwyg').prototype;
|
162 |
-
wysiwyg.initialize = function(){
|
163 |
|
164 |
// initializeEditor if no delay
|
165 |
-
if(
|
166 |
this.initializeEditor();
|
167 |
}
|
168 |
|
169 |
};
|
170 |
|
171 |
-
var acfeFlexibleDelayInit = function(editor){
|
172 |
|
173 |
-
if(editor.has('id') || !editor.$el.is(':visible') || acfe.isFilterEnabled('acfeForceOpen'))
|
174 |
return;
|
175 |
|
176 |
var $wrap = editor.$control();
|
177 |
|
178 |
-
if($wrap.hasClass('delay')){
|
179 |
|
180 |
$wrap.removeClass('delay');
|
181 |
$wrap.find('.acf-editor-toolbar').remove();
|
@@ -193,57 +193,65 @@
|
|
193 |
/*
|
194 |
* Spawn
|
195 |
*/
|
196 |
-
acf.addAction('new_field/type=flexible_content', function(flexible){
|
197 |
-
|
198 |
// Vars
|
199 |
var $clones = flexible.$clones();
|
200 |
var $layouts = flexible.$layouts();
|
201 |
-
|
202 |
// Merge
|
203 |
var $all_layouts = $.merge($layouts, $clones);
|
204 |
-
|
205 |
// Do Actions
|
206 |
-
$layouts.each(function(){
|
207 |
-
|
208 |
var $layout = $(this);
|
209 |
var $name = $layout.data('layout');
|
210 |
-
|
211 |
acf.doAction('acfe/flexible/layouts', $layout, flexible);
|
212 |
acf.doAction('acfe/flexible/layout/name=' + $name, $layout, flexible);
|
213 |
-
|
214 |
});
|
215 |
-
|
216 |
// ACFE: 1 layout available - OneClick
|
217 |
-
if($clones.length === 1){
|
218 |
-
|
219 |
// Remove native ACF Tooltip action
|
220 |
-
flexible.removeEvents({
|
221 |
-
|
|
|
|
|
222 |
// Add ACF Extended Modal action
|
223 |
-
flexible.addEvents({
|
224 |
-
|
|
|
|
|
225 |
}
|
226 |
-
|
227 |
-
flexible.addEvents({
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
231 |
// Flexible: Ajax
|
232 |
-
if(flexible.has('acfeFlexibleAjax')){
|
233 |
-
|
234 |
-
flexible.add = function(args){
|
235 |
-
|
236 |
// Get Flexible
|
237 |
var flexible = this;
|
238 |
-
|
239 |
// defaults
|
240 |
args = acf.parseArgs(args, {
|
241 |
layout: '',
|
242 |
before: false
|
243 |
});
|
244 |
-
|
245 |
// validate
|
246 |
-
if(
|
247 |
return false;
|
248 |
}
|
249 |
|
@@ -251,77 +259,77 @@
|
|
251 |
$.ajax({
|
252 |
url: acf.get('ajaxurl'),
|
253 |
data: acf.prepareForAjax({
|
254 |
-
action:
|
255 |
-
field_key:
|
256 |
-
layout:
|
257 |
}),
|
258 |
dataType: 'html',
|
259 |
type: 'post',
|
260 |
-
beforeSend: function(){
|
261 |
$('body').addClass('-loading');
|
262 |
},
|
263 |
-
success: function(html){
|
264 |
-
if(html){
|
265 |
-
|
266 |
var $layout = $(html);
|
267 |
var uniqid = acf.uniqid();
|
268 |
-
|
269 |
var search = 'acf[' + flexible.get('key') + '][acfcloneindex]';
|
270 |
var replace = flexible.$control().find('> input[type=hidden]').attr('name') + '[' + uniqid + ']';
|
271 |
-
|
272 |
// add row
|
273 |
var $el = acf.duplicate({
|
274 |
target: $layout,
|
275 |
search: search,
|
276 |
replace: replace,
|
277 |
-
append: flexible.proxy(function(
|
278 |
-
|
279 |
// append
|
280 |
-
if(
|
281 |
-
args.before.before(
|
282 |
} else {
|
283 |
-
flexible.$layoutsWrap().append(
|
284 |
}
|
285 |
-
|
286 |
// enable
|
287 |
-
acf.enable(
|
288 |
-
|
289 |
// render
|
290 |
flexible.render();
|
291 |
})
|
292 |
});
|
293 |
-
|
294 |
// Fix data-id
|
295 |
$el.attr('data-id', uniqid);
|
296 |
-
|
297 |
// trigger change for validation errors
|
298 |
flexible.$input().trigger('change');
|
299 |
-
|
300 |
// return
|
301 |
return $el;
|
302 |
-
|
303 |
}
|
304 |
},
|
305 |
-
'complete': function(){
|
306 |
$('body').removeClass('-loading');
|
307 |
}
|
308 |
});
|
309 |
-
|
310 |
};
|
311 |
-
|
312 |
}
|
313 |
|
314 |
});
|
315 |
-
|
316 |
-
acf.addAction('acfe/flexible/layouts', function($layout, flexible){
|
317 |
-
|
318 |
// Layout Closed
|
319 |
-
if(flexible.isLayoutClosed($layout)){
|
320 |
-
|
321 |
// Placeholder
|
322 |
$layout.find('> .acfe-fc-placeholder').removeClass('acf-hidden');
|
323 |
|
324 |
-
if(flexible.has('acfeFlexibleOpen')){
|
325 |
|
326 |
acfe.enableFilter('acfeForceOpen');
|
327 |
|
@@ -330,102 +338,102 @@
|
|
330 |
acfe.disableFilter('acfeForceOpen');
|
331 |
|
332 |
}
|
333 |
-
|
334 |
}
|
335 |
-
|
336 |
});
|
337 |
-
|
338 |
-
acf.addAction('show', function($layout, type){
|
339 |
-
|
340 |
-
if(type !== 'collapse' || !$layout.is('.layout'))
|
341 |
return;
|
342 |
-
|
343 |
var flexible = acf.getInstance($layout.closest('.acf-field-flexible-content'));
|
344 |
-
|
345 |
// Hide Placeholder
|
346 |
-
if(!flexible.has('acfeFlexibleModalEdition')){
|
347 |
-
|
348 |
// Placeholder
|
349 |
$layout.find('> .acfe-fc-placeholder').addClass('acf-hidden');
|
350 |
-
|
351 |
}
|
352 |
-
|
353 |
});
|
354 |
-
|
355 |
-
acf.addAction('hide', function($layout, type){
|
356 |
-
|
357 |
-
if(type !== 'collapse' || !$layout.is('.layout') || $layout.is('.acf-clone'))
|
358 |
return;
|
359 |
-
|
360 |
// Get Flexible
|
361 |
var flexible = acf.getInstance($layout.closest('.acf-field-flexible-content'));
|
362 |
-
|
363 |
// Remove Ajax Title
|
364 |
-
if(flexible.has('acfeFlexibleRemoveAjaxTitle')){
|
365 |
|
366 |
-
flexible.renderLayout = function($layout){};
|
367 |
|
368 |
}
|
369 |
-
|
370 |
// Preview Ajax
|
371 |
flexible.acfeLayoutInit($layout);
|
372 |
-
|
373 |
});
|
374 |
-
|
375 |
-
acf.addAction('append', function($el){
|
376 |
-
|
377 |
// Bail early if layout is not layout
|
378 |
-
if(!$el.is('.layout'))
|
379 |
return;
|
380 |
-
|
381 |
// Get Flexible
|
382 |
var flexible = acf.getInstance($el.closest('.acf-field-flexible-content'));
|
383 |
-
|
384 |
// Open Layout
|
385 |
-
if(!$el.is('.acfe-layout-duplicated')){
|
386 |
-
|
387 |
// Modal Edition: Open
|
388 |
-
if(flexible.has('acfeFlexibleModalEdition')){
|
389 |
-
|
390 |
$el.find('> [data-action="acfe-flexible-modal-edit"]:first').trigger('click');
|
391 |
-
|
392 |
}
|
393 |
-
|
394 |
// Normal Edition: Open
|
395 |
-
else{
|
396 |
-
|
397 |
flexible.openLayout($el);
|
398 |
-
|
399 |
}
|
400 |
-
|
401 |
}
|
402 |
-
|
403 |
flexible.acfeLayoutInit($el);
|
404 |
-
|
405 |
var $modal = flexible.$el.closest('.acfe-modal.-open');
|
406 |
-
|
407 |
-
if($modal.length){
|
408 |
-
|
409 |
// Scroll to new layout
|
410 |
$modal.find('> .acfe-modal-wrapper > .acfe-modal-content').animate({
|
411 |
scrollTop: parseInt($el.offset().top) - 200
|
412 |
}, 200);
|
413 |
-
|
414 |
-
}else{
|
415 |
|
416 |
var acfVersion = parseFloat(acf.get('acf_version'));
|
417 |
|
418 |
-
if(acfVersion < 5.9){
|
419 |
|
420 |
// Scroll to new layout
|
421 |
$('html, body').animate({
|
422 |
scrollTop: parseInt($el.offset().top) - 200
|
423 |
}, 200);
|
424 |
|
425 |
-
}else{
|
426 |
|
427 |
// Avoid native ACF duplicate
|
428 |
-
if(!$el.hasClass('-focused')){
|
429 |
|
430 |
// Scroll to new layout
|
431 |
$('html, body').animate({
|
@@ -437,40 +445,40 @@
|
|
437 |
}
|
438 |
|
439 |
}
|
440 |
-
|
441 |
});
|
442 |
-
|
443 |
/*
|
444 |
* Field Error
|
445 |
*/
|
446 |
-
acf.addAction('invalid_field', function(field){
|
447 |
-
|
448 |
field.$el.parents('.layout').addClass('acfe-flexible-modal-edit-error');
|
449 |
-
|
450 |
});
|
451 |
-
|
452 |
/*
|
453 |
* Field Valid
|
454 |
*/
|
455 |
-
acf.addAction('valid_field', function(field){
|
456 |
-
|
457 |
-
field.$el.parents('.layout').each(function(){
|
458 |
-
|
459 |
var $layout = $(this);
|
460 |
-
|
461 |
-
if(!$layout.find('.acf-error').length)
|
462 |
$layout.removeClass('acfe-flexible-modal-edit-error');
|
463 |
-
|
464 |
});
|
465 |
-
|
466 |
});
|
467 |
-
|
468 |
})(jQuery);
|
469 |
-
(function($){
|
470 |
-
|
471 |
-
if(typeof acf === 'undefined')
|
472 |
return;
|
473 |
-
|
474 |
/*
|
475 |
* Init
|
476 |
*/
|
@@ -481,154 +489,152 @@
|
|
481 |
* Actions
|
482 |
*/
|
483 |
model.events['click .acf-fc-layout-handle'] = 'acfeEditLayoutTitleToggleHandle';
|
484 |
-
model.acfeEditLayoutTitleToggleHandle = function(e, $el){
|
485 |
-
|
486 |
var flexible = this;
|
487 |
-
|
488 |
// Title Edition
|
489 |
-
if(!flexible.has('acfeFlexibleTitleEdition'))
|
490 |
return;
|
491 |
-
|
492 |
// Vars
|
493 |
var $layout = $el.closest('.layout');
|
494 |
-
|
495 |
-
if($layout.hasClass('acfe-flexible-title-edition')){
|
496 |
-
|
497 |
$layout.find('> .acf-fc-layout-handle > .acfe-layout-title > input.acfe-flexible-control-title').trigger('blur');
|
498 |
-
|
499 |
}
|
500 |
-
|
501 |
}
|
502 |
-
|
503 |
model.events['click .acfe-layout-title-text'] = 'acfeEditLayoutTitle';
|
504 |
-
model.acfeEditLayoutTitle = function(e, $el){
|
505 |
-
|
506 |
// Get Flexible
|
507 |
var flexible = this;
|
508 |
-
|
509 |
// Title Edition
|
510 |
-
if(!flexible.has('acfeFlexibleTitleEdition'))
|
511 |
return;
|
512 |
-
|
513 |
// Stop propagation
|
514 |
e.stopPropagation();
|
515 |
-
|
516 |
// Toggle
|
517 |
flexible.acfeEditLayoutTitleToggle(e, $el);
|
518 |
-
|
519 |
}
|
520 |
-
|
521 |
model.events['blur input.acfe-flexible-control-title'] = 'acfeEditLayoutTitleToggle';
|
522 |
-
model.acfeEditLayoutTitleToggle = function(e, $el){
|
523 |
-
|
524 |
var flexible = this;
|
525 |
-
|
526 |
// Vars
|
527 |
var $layout = $el.closest('.layout');
|
528 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
529 |
var $title = $handle.find('.acfe-layout-title');
|
530 |
-
|
531 |
-
if($layout.hasClass('acfe-flexible-title-edition')){
|
532 |
-
|
533 |
var $input = $title.find('> input[data-acfe-flexible-control-title-input]');
|
534 |
-
|
535 |
-
if($input.val() === '')
|
536 |
$input.val($input.attr('placeholder')).trigger('input');
|
537 |
-
|
538 |
$layout.removeClass('acfe-flexible-title-edition');
|
539 |
-
|
540 |
$input.insertAfter($handle);
|
541 |
-
|
542 |
-
}
|
543 |
-
|
544 |
-
else{
|
545 |
-
|
546 |
var $input = $layout.find('> input[data-acfe-flexible-control-title-input]');
|
547 |
-
|
548 |
var $input = $input.appendTo($title);
|
549 |
-
|
550 |
$layout.addClass('acfe-flexible-title-edition');
|
551 |
$input.focus().attr('size', $input.val().length);
|
552 |
-
|
553 |
}
|
554 |
-
|
555 |
}
|
556 |
-
|
557 |
// Layout: Edit Title
|
558 |
model.events['click input.acfe-flexible-control-title'] = 'acfeEditLayoutTitlePropagation';
|
559 |
-
model.acfeEditLayoutTitlePropagation = function(e, $el){
|
560 |
-
|
561 |
e.stopPropagation();
|
562 |
-
|
563 |
}
|
564 |
-
|
565 |
// Layout: Edit Title Input
|
566 |
model.events['input [data-acfe-flexible-control-title-input]'] = 'acfeEditLayoutTitleInput';
|
567 |
-
model.acfeEditLayoutTitleInput = function(e, $el){
|
568 |
-
|
569 |
// Vars
|
570 |
var $layout = $el.closest('.layout');
|
571 |
var $title = $layout.find('> .acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text');
|
572 |
-
|
573 |
var val = $el.val();
|
574 |
-
|
575 |
$el.attr('size', val.length);
|
576 |
-
|
577 |
$title.html(val);
|
578 |
-
|
579 |
}
|
580 |
-
|
581 |
// Layout: Edit Title Input Enter
|
582 |
model.events['keypress [data-acfe-flexible-control-title-input]'] = 'acfeEditLayoutTitleInputEnter';
|
583 |
-
model.acfeEditLayoutTitleInputEnter = function(e, $el){
|
584 |
-
|
585 |
// Enter Key
|
586 |
-
if(e.keyCode !== 13)
|
587 |
return;
|
588 |
-
|
589 |
e.preventDefault();
|
590 |
$el.blur();
|
591 |
-
|
592 |
}
|
593 |
-
|
594 |
// Layout: Settings
|
595 |
model.events['click [data-acfe-flexible-settings]'] = 'acfeLayoutSettings';
|
596 |
-
model.acfeLayoutSettings = function(e, $el){
|
597 |
-
|
598 |
// Get Flexible
|
599 |
var flexible = this;
|
600 |
-
|
601 |
// Vars
|
602 |
var $layout = $el.closest('.layout');
|
603 |
-
|
604 |
// Modal data
|
605 |
var $modal = $layout.find('> .acfe-modal.-settings');
|
606 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
607 |
-
|
608 |
var $layout_order = $handle.find('> .acf-fc-layout-order').outerHTML();
|
609 |
var $layout_title = $handle.find('.acfe-layout-title-text').text();
|
610 |
-
|
611 |
// Open modal
|
612 |
new acfe.Popup($modal, {
|
613 |
title: $layout_order + ' ' + $layout_title,
|
614 |
footer: acf.__('Close'),
|
615 |
-
onClose: function(){
|
616 |
|
617 |
-
if(!flexible.has('acfeFlexiblePreview'))
|
618 |
return;
|
619 |
|
620 |
flexible.closeLayout($layout);
|
621 |
|
622 |
}
|
623 |
});
|
624 |
-
|
625 |
}
|
626 |
|
627 |
/*
|
628 |
* Layout: Toggle Action
|
629 |
*/
|
630 |
model.events['click [data-acfe-flexible-control-toggle]'] = 'acfeLayoutToggle';
|
631 |
-
model.acfeLayoutToggle = function(e, $el){
|
632 |
|
633 |
// Get Flexible
|
634 |
var flexible = this;
|
@@ -638,15 +644,15 @@
|
|
638 |
|
639 |
var $field = $layout.find('> .acfe-flexible-layout-toggle');
|
640 |
|
641 |
-
if(!$field.length)
|
642 |
return;
|
643 |
|
644 |
-
if($field.val() === '1'){
|
645 |
|
646 |
$layout.removeClass('acfe-flexible-layout-hidden');
|
647 |
$field.val('');
|
648 |
|
649 |
-
}else{
|
650 |
|
651 |
$layout.addClass('acfe-flexible-layout-hidden');
|
652 |
$field.val('1');
|
@@ -658,302 +664,302 @@
|
|
658 |
/*
|
659 |
* Layout: Toggle Spawn
|
660 |
*/
|
661 |
-
acf.addAction('acfe/flexible/layouts', function($layout, flexible){
|
662 |
|
663 |
-
if(!flexible.has('acfeFlexibleToggle'))
|
664 |
return;
|
665 |
|
666 |
// Layout Closed
|
667 |
var $field = $layout.find('> .acfe-flexible-layout-toggle');
|
668 |
|
669 |
-
if(!$field.length)
|
670 |
return;
|
671 |
|
672 |
-
if($field.val() === '1'){
|
673 |
|
674 |
$layout.addClass('acfe-flexible-layout-hidden');
|
675 |
|
676 |
-
}else{
|
677 |
|
678 |
$layout.removeClass('acfe-flexible-layout-hidden');
|
679 |
|
680 |
}
|
681 |
|
682 |
});
|
683 |
-
|
684 |
// Layout: Clone
|
685 |
model.events['click [data-acfe-flexible-control-clone]'] = 'acfeCloneLayout';
|
686 |
-
model.acfeCloneLayout = function(e, $el){
|
687 |
-
|
688 |
// Get Flexible
|
689 |
var flexible = this;
|
690 |
-
|
691 |
// Vars
|
692 |
var $layout = $el.closest('.layout');
|
693 |
var layout_name = $layout.data('layout');
|
694 |
-
|
695 |
// Popup min/max
|
696 |
var $popup = $(flexible.$popup().html());
|
697 |
var $layouts = flexible.$layouts();
|
698 |
|
699 |
-
var countLayouts = function(name){
|
700 |
-
return $layouts.filter(function(){
|
701 |
return $(this).data('layout') === name;
|
702 |
}).length;
|
703 |
};
|
704 |
-
|
705 |
-
|
706 |
var $a = $popup.find('[data-layout="' + layout_name + '"]');
|
707 |
var min = $a.data('min') || 0;
|
708 |
var max = $a.data('max') || 0;
|
709 |
var count = countLayouts(layout_name);
|
710 |
-
|
711 |
// max
|
712 |
-
if(max && count >= max){
|
713 |
-
|
714 |
$el.addClass('disabled');
|
715 |
return false;
|
716 |
-
|
717 |
-
}else{
|
718 |
-
|
719 |
$el.removeClass('disabled');
|
720 |
-
|
721 |
}
|
722 |
-
|
723 |
// Fix inputs
|
724 |
flexible.acfeFixInputs($layout);
|
725 |
-
|
726 |
var $_layout = $layout.clone();
|
727 |
-
|
728 |
// Clean Layout
|
729 |
flexible.acfeCleanLayouts($_layout);
|
730 |
-
|
731 |
var parent = $el.closest('.acf-flexible-content').find('> input[type=hidden]').attr('name');
|
732 |
-
|
733 |
// Clone
|
734 |
var $layout_added = flexible.acfeDuplicate({
|
735 |
layout: $_layout,
|
736 |
before: $layout,
|
737 |
parent: parent
|
738 |
});
|
739 |
-
|
740 |
}
|
741 |
-
|
742 |
// Layout: Copy
|
743 |
model.events['click [data-acfe-flexible-control-copy]'] = 'acfeCopyLayout';
|
744 |
-
model.acfeCopyLayout = function(e, $el){
|
745 |
-
|
746 |
// Get Flexible
|
747 |
var flexible = this;
|
748 |
-
|
749 |
// Vars
|
750 |
var $layout = $el.closest('.layout').clone();
|
751 |
var source = flexible.$control().find('> input[type=hidden]').attr('name');
|
752 |
-
|
753 |
// Fix inputs
|
754 |
flexible.acfeFixInputs($layout);
|
755 |
-
|
756 |
// Clean layout
|
757 |
flexible.acfeCleanLayouts($layout);
|
758 |
-
|
759 |
// Get layout data
|
760 |
var data = JSON.stringify({
|
761 |
source: source,
|
762 |
layouts: $layout[0].outerHTML
|
763 |
});
|
764 |
-
|
765 |
// Append Temp Input
|
766 |
var $input = $('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo($('body'));
|
767 |
$input.attr('value', data).select();
|
768 |
|
769 |
// Command: Copy
|
770 |
-
if(document.execCommand('copy'))
|
771 |
alert('Layout has been transferred to your clipboard');
|
772 |
-
|
773 |
// Prompt
|
774 |
else
|
775 |
prompt('Copy the following layout data to your clipboard', data);
|
776 |
-
|
777 |
// Remove the temp input
|
778 |
$input.remove();
|
779 |
-
|
780 |
}
|
781 |
-
|
782 |
// Flexible: Copy Layouts
|
783 |
-
model.acfeCopyLayouts = function(){
|
784 |
-
|
785 |
// Get Flexible
|
786 |
var flexible = this;
|
787 |
-
|
788 |
// Get layouts
|
789 |
var $layouts = flexible.$layoutsWrap().clone();
|
790 |
var source = flexible.$control().find('> input[type=hidden]').attr('name');
|
791 |
-
|
792 |
// Fix inputs
|
793 |
flexible.acfeFixInputs($layouts);
|
794 |
-
|
795 |
// Clean layout
|
796 |
flexible.acfeCleanLayouts($layouts);
|
797 |
-
|
798 |
// Get layouts data
|
799 |
var data = JSON.stringify({
|
800 |
source: source,
|
801 |
layouts: $layouts.html()
|
802 |
});
|
803 |
-
|
804 |
// Append Temp Input
|
805 |
var $input = $('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo(flexible.$el);
|
806 |
$input.attr('value', data).select();
|
807 |
-
|
808 |
// Command: Copy
|
809 |
-
if(document.execCommand('copy'))
|
810 |
alert('Layouts have been transferred to your clipboard');
|
811 |
-
|
812 |
// Prompt
|
813 |
else
|
814 |
prompt('Copy the following layouts data to your clipboard', data);
|
815 |
-
|
816 |
$input.remove();
|
817 |
-
|
818 |
}
|
819 |
-
|
820 |
// Flexible: Paste Layouts
|
821 |
-
model.acfePasteLayouts = function(){
|
822 |
-
|
823 |
// Get Flexible
|
824 |
var flexible = this;
|
825 |
-
|
826 |
var paste = prompt('Paste layouts data in the following field');
|
827 |
-
|
828 |
// No input
|
829 |
-
if(paste == null || paste === '')
|
830 |
return;
|
831 |
-
|
832 |
-
try{
|
833 |
-
|
834 |
// Paste HTML
|
835 |
var data = JSON.parse(paste);
|
836 |
var source = data.source;
|
837 |
var $html = $(data.layouts);
|
838 |
-
|
839 |
// Parsed layouts
|
840 |
var $html_layouts = $html.closest('[data-layout]');
|
841 |
-
|
842 |
-
if(!$html_layouts.length)
|
843 |
return alert('No layouts data available');
|
844 |
-
|
845 |
// Popup min/max
|
846 |
var $popup = $(flexible.$popup().html());
|
847 |
var $layouts = flexible.$layouts();
|
848 |
-
|
849 |
-
var countLayouts = function(name){
|
850 |
-
return $layouts.filter(function(){
|
851 |
return $(this).data('layout') === name;
|
852 |
}).length;
|
853 |
};
|
854 |
-
|
855 |
// init
|
856 |
var validated_layouts = [];
|
857 |
-
|
858 |
// Each first level layouts
|
859 |
-
$html_layouts.each(function(){
|
860 |
-
|
861 |
var $this = $(this);
|
862 |
var layout_name = $this.data('layout');
|
863 |
-
|
864 |
// vars
|
865 |
var $a = $popup.find('[data-layout="' + layout_name + '"]');
|
866 |
var min = $a.data('min') || 0;
|
867 |
var max = $a.data('max') || 0;
|
868 |
var count = countLayouts(layout_name);
|
869 |
-
|
870 |
// max
|
871 |
-
if(max && count >= max)
|
872 |
return;
|
873 |
-
|
874 |
// Validate layout against available layouts
|
875 |
var get_clone_layout = flexible.$clone($this.attr('data-layout'));
|
876 |
-
|
877 |
// Layout is invalid
|
878 |
-
if(!get_clone_layout.length)
|
879 |
return;
|
880 |
-
|
881 |
// Add validated layout
|
882 |
validated_layouts.push($this);
|
883 |
-
|
884 |
});
|
885 |
-
|
886 |
// Nothing to add
|
887 |
-
if(!validated_layouts.length)
|
888 |
return alert('No layouts could be pasted');
|
889 |
-
|
890 |
// Add layouts
|
891 |
-
$.each(validated_layouts, function(){
|
892 |
-
|
893 |
var $layout = $(this);
|
894 |
var search = source + '[' + $layout.attr('data-id') + ']';
|
895 |
var target = flexible.$control().find('> input[type=hidden]').attr('name');
|
896 |
-
|
897 |
flexible.acfeDuplicate({
|
898 |
layout: $layout,
|
899 |
before: false,
|
900 |
search: search,
|
901 |
parent: target
|
902 |
});
|
903 |
-
|
904 |
});
|
905 |
-
|
906 |
-
}catch(e){
|
907 |
-
|
908 |
console.log(e);
|
909 |
alert('Invalid data');
|
910 |
-
|
911 |
}
|
912 |
-
|
913 |
}
|
914 |
-
|
915 |
// Flexible: Dropdown
|
916 |
model.events['click [data-name="acfe-flexible-control-button"]'] = 'acfeControl';
|
917 |
-
model.acfeControl = function(e, $el){
|
918 |
-
|
919 |
// Get Flexible
|
920 |
var flexible = this;
|
921 |
-
|
922 |
// Vars
|
923 |
var $dropdown = $el.next('.tmpl-acfe-flexible-control-popup').html();
|
924 |
-
|
925 |
// Init Popup
|
926 |
var Popup = acf.models.TooltipConfirm.extend({
|
927 |
-
render: function(){
|
928 |
this.html(this.get('text'));
|
929 |
this.$el.addClass('acf-fc-popup');
|
930 |
}
|
931 |
});
|
932 |
-
|
933 |
// New Popup
|
934 |
var popup = new Popup({
|
935 |
target: $el,
|
936 |
targetConfirm: false,
|
937 |
text: $dropdown,
|
938 |
context: flexible,
|
939 |
-
confirm: function(e, $el){
|
940 |
-
|
941 |
-
if($el.attr('data-acfe-flexible-control-action') === 'paste')
|
942 |
flexible.acfePasteLayouts();
|
943 |
-
|
944 |
-
else if($el.attr('data-acfe-flexible-control-action') === 'copy')
|
945 |
flexible.acfeCopyLayouts();
|
946 |
-
|
947 |
}
|
948 |
});
|
949 |
-
|
950 |
popup.on('click', 'a', 'onConfirm');
|
951 |
-
|
952 |
}
|
953 |
-
|
954 |
// Flexible: Duplicate
|
955 |
-
model.acfeDuplicate = function(args){
|
956 |
-
|
957 |
// Arguments
|
958 |
args = acf.parseArgs(args, {
|
959 |
layout: '',
|
@@ -962,30 +968,30 @@
|
|
962 |
search: '',
|
963 |
replace: '',
|
964 |
});
|
965 |
-
|
966 |
// Validate
|
967 |
-
if(!this.allowAdd())
|
968 |
return false;
|
969 |
-
|
970 |
var uniqid = acf.uniqid();
|
971 |
-
|
972 |
-
if(args.parent){
|
973 |
-
|
974 |
-
if(!args.search){
|
975 |
-
|
976 |
args.search = args.parent + '[' + args.layout.attr('data-id') + ']';
|
977 |
-
|
978 |
}
|
979 |
-
|
980 |
args.replace = args.parent + '[' + uniqid + ']';
|
981 |
-
|
982 |
}
|
983 |
|
984 |
var duplicate_args = {
|
985 |
target: args.layout,
|
986 |
search: args.search,
|
987 |
replace: args.replace,
|
988 |
-
append: this.proxy(function($el, $el2){
|
989 |
|
990 |
// Add class to duplicated layout
|
991 |
$el2.addClass('acfe-layout-duplicated');
|
@@ -994,7 +1000,7 @@
|
|
994 |
$el2.attr('data-id', uniqid);
|
995 |
|
996 |
// append before
|
997 |
-
if(args.before){
|
998 |
|
999 |
// Fix clone: Use after() instead of native before()
|
1000 |
args.before.after($el2);
|
@@ -1002,7 +1008,7 @@
|
|
1002 |
}
|
1003 |
|
1004 |
// append end
|
1005 |
-
else{
|
1006 |
|
1007 |
this.$layoutsWrap().append($el2);
|
1008 |
|
@@ -1019,19 +1025,19 @@
|
|
1019 |
|
1020 |
var acfVersion = parseFloat(acf.get('acf_version'));
|
1021 |
|
1022 |
-
if(acfVersion < 5.9){
|
1023 |
|
1024 |
// Add row
|
1025 |
var $el = acf.duplicate(duplicate_args);
|
1026 |
|
1027 |
-
|
1028 |
-
}else{
|
1029 |
|
1030 |
// Add row
|
1031 |
var $el = model.acfeNewAcfDuplicate(duplicate_args);
|
1032 |
|
1033 |
}
|
1034 |
-
|
1035 |
// trigger change for validation errors
|
1036 |
this.$input().trigger('change');
|
1037 |
|
@@ -1041,11 +1047,11 @@
|
|
1041 |
parent: $el,
|
1042 |
});
|
1043 |
|
1044 |
-
if(tabs.length){
|
1045 |
|
1046 |
-
$.each(tabs, function(){
|
1047 |
|
1048 |
-
if(this.$el.hasClass('acf-hidden')){
|
1049 |
|
1050 |
this.tab.$el.addClass('acf-hidden');
|
1051 |
|
@@ -1055,10 +1061,10 @@
|
|
1055 |
|
1056 |
}
|
1057 |
|
1058 |
-
|
1059 |
// return
|
1060 |
return $el;
|
1061 |
-
|
1062 |
}
|
1063 |
|
1064 |
/*
|
@@ -1067,10 +1073,10 @@
|
|
1067 |
* doAction('duplicate) has been commented out
|
1068 |
* This fix an issue with the WYSIWYG editor field during copy/paste since ACF 5.9
|
1069 |
*/
|
1070 |
-
model.acfeNewAcfDuplicate = function(
|
1071 |
|
1072 |
// allow jQuery
|
1073 |
-
if(
|
1074 |
args = {
|
1075 |
target: args
|
1076 |
};
|
@@ -1082,10 +1088,10 @@
|
|
1082 |
search: '',
|
1083 |
replace: '',
|
1084 |
rename: true,
|
1085 |
-
before: function(
|
1086 |
-
after: function(
|
1087 |
-
append: function(
|
1088 |
-
$el.after(
|
1089 |
}
|
1090 |
});
|
1091 |
|
@@ -1102,19 +1108,19 @@
|
|
1102 |
// before
|
1103 |
// - allow acf to modify DOM
|
1104 |
// - fixes bug where select field option is not selected
|
1105 |
-
args.before(
|
1106 |
acf.doAction('before_duplicate', $el);
|
1107 |
|
1108 |
// clone
|
1109 |
var $el2 = $el.clone();
|
1110 |
|
1111 |
// rename
|
1112 |
-
if(
|
1113 |
acf.rename({
|
1114 |
-
target:
|
1115 |
-
search:
|
1116 |
-
replace:
|
1117 |
-
replacer:
|
1118 |
});
|
1119 |
}
|
1120 |
|
@@ -1124,11 +1130,11 @@
|
|
1124 |
|
1125 |
// after
|
1126 |
// - allow acf to modify DOM
|
1127 |
-
args.after(
|
1128 |
-
acf.doAction('after_duplicate', $el, $el2
|
1129 |
|
1130 |
// append
|
1131 |
-
args.append(
|
1132 |
|
1133 |
/**
|
1134 |
* Fires after an element has been duplicated and appended to the DOM.
|
@@ -1147,261 +1153,263 @@
|
|
1147 |
// return
|
1148 |
return $el2;
|
1149 |
};
|
1150 |
-
|
1151 |
// Flexible: Fix Inputs
|
1152 |
-
model.acfeFixInputs = function($layout){
|
1153 |
-
|
1154 |
-
$layout.find('input').each(function(){
|
1155 |
-
|
1156 |
$(this).attr('value', this.value);
|
1157 |
-
|
1158 |
});
|
1159 |
-
|
1160 |
-
$layout.find('textarea').each(function(){
|
1161 |
-
|
1162 |
$(this).html(this.value);
|
1163 |
-
|
1164 |
});
|
1165 |
-
|
1166 |
$layout.find('input:radio,input:checkbox').each(function() {
|
1167 |
-
|
1168 |
-
if(this.checked)
|
1169 |
$(this).attr('checked', 'checked');
|
1170 |
-
|
1171 |
else
|
1172 |
$(this).attr('checked', false);
|
1173 |
-
|
1174 |
});
|
1175 |
-
|
1176 |
-
$layout.find('option').each(function(){
|
1177 |
-
|
1178 |
-
if(this.selected)
|
1179 |
$(this).attr('selected', 'selected');
|
1180 |
-
|
1181 |
else
|
1182 |
$(this).attr('selected', false);
|
1183 |
-
|
1184 |
});
|
1185 |
-
|
1186 |
}
|
1187 |
-
|
1188 |
// Flexible: Clean Layout
|
1189 |
-
model.acfeCleanLayouts = function($layout){
|
1190 |
-
|
1191 |
// Clean WP Editor
|
1192 |
-
$layout.find('.acf-editor-wrap').each(function(){
|
1193 |
-
|
1194 |
var $input = $(this);
|
1195 |
-
|
1196 |
$input.find('.wp-editor-container div').remove();
|
1197 |
$input.find('.wp-editor-container textarea').css('display', '');
|
1198 |
-
|
1199 |
});
|
1200 |
-
|
1201 |
// Clean Date
|
1202 |
-
$layout.find('.acf-date-picker').each(function(){
|
1203 |
-
|
1204 |
var $input = $(this);
|
1205 |
-
|
1206 |
$input.find('input.input').removeClass('hasDatepicker').removeAttr('id');
|
1207 |
-
|
1208 |
});
|
1209 |
-
|
1210 |
// Clean Time
|
1211 |
-
$layout.find('.acf-time-picker').each(function(){
|
1212 |
-
|
1213 |
var $input = $(this);
|
1214 |
-
|
1215 |
$input.find('input.input').removeClass('hasDatepicker').removeAttr('id');
|
1216 |
-
|
1217 |
});
|
1218 |
-
|
1219 |
// Clean DateTime
|
1220 |
-
$layout.find('.acf-date-time-picker').each(function(){
|
1221 |
-
|
1222 |
var $input = $(this);
|
1223 |
-
|
1224 |
$input.find('input.input').removeClass('hasDatepicker').removeAttr('id');
|
1225 |
-
|
1226 |
});
|
1227 |
|
1228 |
// Clean Code Editor
|
1229 |
-
$layout.find('.acfe-field-code-editor').each(function(){
|
1230 |
|
1231 |
var $input = $(this);
|
1232 |
|
1233 |
$input.find('.CodeMirror').remove();
|
1234 |
|
1235 |
});
|
1236 |
-
|
1237 |
// Clean Color Picker
|
1238 |
-
$layout.find('.acf-color-picker').each(function(){
|
1239 |
-
|
1240 |
var $input = $(this);
|
1241 |
-
|
1242 |
var $color_picker = $input.find('> input');
|
1243 |
var $color_picker_proxy = $input.find('.wp-picker-container input.wp-color-picker').clone();
|
1244 |
-
|
1245 |
$color_picker.after($color_picker_proxy);
|
1246 |
-
|
1247 |
$input.find('.wp-picker-container').remove();
|
1248 |
-
|
1249 |
});
|
1250 |
-
|
1251 |
// Clean Post Object
|
1252 |
-
$layout.find('.acf-field-post-object').each(function(){
|
1253 |
-
|
1254 |
var $input = $(this);
|
1255 |
-
|
1256 |
$input.find('> .acf-input span').remove();
|
1257 |
-
|
1258 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden').removeClass();
|
1259 |
-
|
1260 |
});
|
1261 |
-
|
1262 |
// Clean Page Link
|
1263 |
-
$layout.find('.acf-field-page-link').each(function(){
|
1264 |
-
|
1265 |
var $input = $(this);
|
1266 |
-
|
1267 |
$input.find('> .acf-input span').remove();
|
1268 |
-
|
1269 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden').removeClass();
|
1270 |
-
|
1271 |
});
|
1272 |
-
|
1273 |
// Clean Select2
|
1274 |
-
$layout.find('.acf-field-select').each(function(){
|
1275 |
-
|
1276 |
var $input = $(this);
|
1277 |
-
|
1278 |
$input.find('> .acf-input span').remove();
|
1279 |
-
|
1280 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden').removeClass();
|
1281 |
-
|
1282 |
});
|
1283 |
-
|
1284 |
// Clean FontAwesome
|
1285 |
-
$layout.find('.acf-field-font-awesome').each(function(){
|
1286 |
-
|
1287 |
var $input = $(this);
|
1288 |
-
|
1289 |
$input.find('> .acf-input span').remove();
|
1290 |
-
|
1291 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden');
|
1292 |
-
|
1293 |
});
|
1294 |
|
1295 |
|
1296 |
// Clean Tab
|
1297 |
-
$layout.find('.acf-tab-wrap').each(function(){
|
1298 |
-
|
1299 |
var $wrap = $(this);
|
1300 |
-
|
1301 |
var $content = $wrap.closest('.acf-fields');
|
1302 |
-
|
1303 |
var tabs = [];
|
1304 |
-
$.each($wrap.find('li a'), function(){
|
1305 |
-
|
1306 |
tabs.push($(this));
|
1307 |
-
|
1308 |
});
|
1309 |
-
|
1310 |
-
$content.find('> .acf-field-tab').each(function(){
|
1311 |
-
|
1312 |
$current_tab = $(this);
|
1313 |
-
|
1314 |
-
$.each(tabs, function(){
|
1315 |
-
|
1316 |
var $this = $(this);
|
1317 |
-
|
1318 |
-
if($this.attr('data-key') !== $current_tab.attr('data-key'))
|
1319 |
return;
|
1320 |
-
|
1321 |
$current_tab.find('> .acf-input').append($this);
|
1322 |
-
|
1323 |
});
|
1324 |
-
|
1325 |
});
|
1326 |
-
|
1327 |
$wrap.remove();
|
1328 |
-
|
1329 |
});
|
1330 |
-
|
1331 |
// Clean Accordion
|
1332 |
-
$layout.find('.acf-field-accordion').each(function(){
|
1333 |
-
|
1334 |
var $input = $(this);
|
1335 |
-
|
1336 |
$input.find('> .acf-accordion-title > .acf-accordion-icon').remove();
|
1337 |
-
|
1338 |
// Append virtual endpoint after each accordion
|
1339 |
$input.after('<div class="acf-field acf-field-accordion" data-type="accordion"><div class="acf-input"><div class="acf-fields" data-endpoint="1"></div></div></div>');
|
1340 |
-
|
1341 |
});
|
1342 |
-
|
1343 |
}
|
1344 |
-
|
1345 |
/*
|
1346 |
* Spawn
|
1347 |
*/
|
1348 |
-
acf.addAction('new_field/type=flexible_content', function(flexible){
|
1349 |
-
|
1350 |
// ACFE: Lock
|
1351 |
-
if(flexible.has('acfeFlexibleLock')){
|
1352 |
-
|
1353 |
-
flexible.removeEvents({
|
1354 |
-
|
|
|
|
|
1355 |
}
|
1356 |
-
|
1357 |
});
|
1358 |
-
|
1359 |
})(jQuery);
|
1360 |
-
(function($){
|
1361 |
-
|
1362 |
-
if(typeof acf === 'undefined')
|
1363 |
return;
|
1364 |
-
|
1365 |
/*
|
1366 |
* Init
|
1367 |
*/
|
1368 |
var flexible = acf.getFieldType('flexible_content');
|
1369 |
var model = flexible.prototype;
|
1370 |
-
|
1371 |
/*
|
1372 |
* Actions
|
1373 |
*/
|
1374 |
-
model.acfeModalSelect = function(e, $el){
|
1375 |
-
|
1376 |
// Get Flexible
|
1377 |
var flexible = this;
|
1378 |
-
|
1379 |
// Validate
|
1380 |
-
if(!flexible.validateAdd())
|
1381 |
return false;
|
1382 |
-
|
1383 |
// Layout
|
1384 |
var $layout_source = null;
|
1385 |
-
|
1386 |
-
if($el.hasClass('acf-icon'))
|
1387 |
$layout_source = $el.closest('.layout');
|
1388 |
-
|
1389 |
// Get Available Layouts
|
1390 |
var layouts = flexible.getPopupHTML();
|
1391 |
-
|
1392 |
// Init Categories
|
1393 |
var categories = {
|
1394 |
array: [],
|
1395 |
html: ''
|
1396 |
};
|
1397 |
|
1398 |
-
function SearchArray(element, array){
|
1399 |
|
1400 |
var len = array.length,
|
1401 |
str = element.toString().toLowerCase();
|
1402 |
|
1403 |
-
for(var i = 0; i < len; i++){
|
1404 |
-
if(array[i].toLowerCase() === str){
|
1405 |
return i;
|
1406 |
}
|
1407 |
}
|
@@ -1409,78 +1417,78 @@
|
|
1409 |
return -1;
|
1410 |
|
1411 |
}
|
1412 |
-
|
1413 |
// Get Categories
|
1414 |
-
$(layouts).find('li a span[data-acfe-flexible-category]').each(function(){
|
1415 |
|
1416 |
var spanCats = $(this).data('acfe-flexible-category');
|
1417 |
|
1418 |
-
$.each(spanCats, function(){
|
1419 |
|
1420 |
-
if(SearchArray(this, categories.array) !== -1)
|
1421 |
return;
|
1422 |
|
1423 |
categories.array.push(this);
|
1424 |
|
1425 |
});
|
1426 |
-
|
1427 |
});
|
1428 |
-
|
1429 |
// Categories HTML
|
1430 |
-
if(categories.array.length){
|
1431 |
-
|
1432 |
categories.array.sort();
|
1433 |
-
|
1434 |
categories.html += '<h2 class="acfe-flexible-categories nav-tab-wrapper">';
|
1435 |
-
|
1436 |
categories.html += '<a href="#" data-acfe-flexible-category="acfe-all" class="nav-tab nav-tab-active"><span class="dashicons dashicons-menu"></span></a>';
|
1437 |
-
|
1438 |
-
$(categories.array).each(function(k, category){
|
1439 |
-
|
1440 |
categories.html += '<a href="#" data-acfe-flexible-category="' + category + '" class="nav-tab">' + category + '</a>';
|
1441 |
-
|
1442 |
});
|
1443 |
-
|
1444 |
categories.html += '</h2>';
|
1445 |
-
|
1446 |
}
|
1447 |
-
|
1448 |
// Modal Title
|
1449 |
var modalTitle = acf.__('Add Row');
|
1450 |
-
|
1451 |
-
if(flexible.has('acfeFlexibleModalTitle')){
|
1452 |
modalTitle = flexible.get('acfeFlexibleModalTitle');
|
1453 |
}
|
1454 |
-
|
1455 |
// Create Modal
|
1456 |
-
var $modal = $('' +
|
1457 |
-
'<div class="acfe-modal">' +
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
'</div>'
|
1465 |
-
|
1466 |
).appendTo('body');
|
1467 |
-
|
1468 |
// Open Modal
|
1469 |
new acfe.Popup($modal, {
|
1470 |
title: modalTitle,
|
1471 |
size: 'full',
|
1472 |
destroy: true
|
1473 |
});
|
1474 |
-
|
1475 |
// Modal: Columns
|
1476 |
-
if(flexible.has('acfeFlexibleModalCol')){
|
1477 |
|
1478 |
$modal.find('.acfe-modal-content .acfe-flex-container').addClass('acfe-col-' + flexible.get('acfeFlexibleModalCol'));
|
1479 |
|
1480 |
}
|
1481 |
|
1482 |
// Modal: Columns
|
1483 |
-
if(flexible.has('acfeFlexibleThumbnails')){
|
1484 |
|
1485 |
$modal.find('.acfe-modal-content .acfe-flex-container').addClass('acfe-flex-thumbnails');
|
1486 |
|
@@ -1490,43 +1498,43 @@
|
|
1490 |
$modal.find('li:first-of-type a').blur();
|
1491 |
|
1492 |
// Modal: Layouts Badges
|
1493 |
-
$modal.find('li a span.badge').each(function(){
|
1494 |
|
1495 |
$(this).addClass('acf-js-tooltip dashicons dashicons-info');
|
1496 |
|
1497 |
});
|
1498 |
|
1499 |
// Modal: Categories Click
|
1500 |
-
$modal.find('.acfe-flexible-categories a').click(function(e){
|
1501 |
-
|
1502 |
e.preventDefault();
|
1503 |
-
|
1504 |
var $link = $(this);
|
1505 |
-
|
1506 |
$link.closest('.acfe-flexible-categories').find('a').removeClass('nav-tab-active');
|
1507 |
$link.addClass('nav-tab-active');
|
1508 |
-
|
1509 |
var selected_category = $link.data('acfe-flexible-category');
|
1510 |
-
|
1511 |
-
$modal.find('a[data-layout] span[data-acfe-flexible-category]').each(function(){
|
1512 |
-
|
1513 |
// Get span
|
1514 |
var $span = $(this);
|
1515 |
-
|
1516 |
// Show All
|
1517 |
$span.closest('li').show();
|
1518 |
-
|
1519 |
var category = $span.data('acfe-flexible-category');
|
1520 |
-
|
1521 |
// Specific category
|
1522 |
-
if(selected_category !== 'acfe-all'){
|
1523 |
-
|
1524 |
// Hide All
|
1525 |
$span.closest('li').hide();
|
1526 |
|
1527 |
-
$.each(category, function(i, c){
|
1528 |
|
1529 |
-
if(selected_category.toLowerCase() === c.toLowerCase()){
|
1530 |
|
1531 |
$span.closest('li').show();
|
1532 |
|
@@ -1535,147 +1543,155 @@
|
|
1535 |
}
|
1536 |
|
1537 |
});
|
1538 |
-
|
1539 |
}
|
1540 |
-
|
1541 |
});
|
1542 |
-
|
1543 |
});
|
1544 |
-
|
1545 |
// Modal: Click Add Layout
|
1546 |
-
$modal.on('click', 'a[data-layout]', function(e){
|
1547 |
-
|
1548 |
e.preventDefault();
|
1549 |
-
|
1550 |
// Close modal
|
1551 |
acfe.closePopup();
|
1552 |
-
|
1553 |
// Add layout
|
1554 |
flexible.add({
|
1555 |
layout: $(this).data('layout'),
|
1556 |
before: $layout_source
|
1557 |
});
|
1558 |
-
|
1559 |
});
|
1560 |
-
|
1561 |
}
|
1562 |
-
|
1563 |
/*
|
1564 |
* Spawn
|
1565 |
*/
|
1566 |
-
acf.addAction('new_field/type=flexible_content', function(flexible){
|
1567 |
-
|
1568 |
-
if(!flexible.has('acfeFlexibleModal'))
|
1569 |
return;
|
1570 |
-
|
1571 |
// Vars
|
1572 |
var $clones = flexible.$clones();
|
1573 |
-
|
1574 |
-
if($clones.length <= 1)
|
1575 |
return;
|
1576 |
-
|
1577 |
// Remove native ACF Tooltip action
|
1578 |
-
flexible.removeEvents({
|
1579 |
-
|
|
|
|
|
1580 |
// Add ACF Extended Modal action
|
1581 |
-
flexible.addEvents({
|
|
|
|
|
1582 |
|
1583 |
});
|
1584 |
-
|
1585 |
})(jQuery);
|
1586 |
-
(function($){
|
1587 |
-
|
1588 |
-
if(typeof acf === 'undefined')
|
1589 |
return;
|
1590 |
-
|
1591 |
/*
|
1592 |
* Init
|
1593 |
*/
|
1594 |
var flexible = acf.getFieldType('flexible_content');
|
1595 |
var model = flexible.prototype;
|
1596 |
-
|
1597 |
/*
|
1598 |
* Actions
|
1599 |
*/
|
1600 |
model.events['click [data-action="acfe-flexible-modal-edit"]'] = 'acfeModalEdit';
|
1601 |
-
model.acfeModalEdit = function(e, $el){
|
1602 |
-
|
1603 |
var flexible = this;
|
1604 |
-
|
1605 |
// Layout
|
1606 |
var $layout = $el.closest('.layout');
|
1607 |
-
|
1608 |
// Modal data
|
1609 |
-
var $modal = $layout.find('> .acfe-modal.-fields');
|
1610 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
1611 |
-
|
1612 |
var $layout_order = $handle.find('> .acf-fc-layout-order').outerHTML();
|
1613 |
var $layout_title = $handle.find('.acfe-layout-title-text').text();
|
1614 |
-
|
1615 |
var close = false;
|
1616 |
-
if(flexible.has('acfeFlexibleCloseButton')){
|
1617 |
-
|
1618 |
close = acf.__('Close');
|
1619 |
-
|
1620 |
}
|
1621 |
-
|
1622 |
// Open modal
|
1623 |
new acfe.Popup($modal, {
|
1624 |
title: $layout_order + ' ' + $layout_title,
|
1625 |
footer: close,
|
1626 |
-
onOpen: function(){
|
1627 |
|
1628 |
flexible.openLayout($layout);
|
1629 |
|
1630 |
},
|
1631 |
-
onClose: function(){
|
1632 |
|
1633 |
flexible.closeLayout($layout);
|
1634 |
|
1635 |
}
|
1636 |
});
|
1637 |
-
|
1638 |
};
|
1639 |
-
|
1640 |
/*
|
1641 |
* Spawn
|
1642 |
*/
|
1643 |
-
acf.addAction('new_field/type=flexible_content', function(flexible){
|
1644 |
-
|
1645 |
-
if(flexible.has('acfeFlexibleModalEdition') && (flexible.has('acfeFlexiblePlaceholder') || flexible.has('acfeFlexiblePreview'))){
|
1646 |
-
|
1647 |
// Remove Collapse Action
|
1648 |
-
flexible.removeEvents({
|
1649 |
-
|
|
|
|
|
1650 |
// Remove placeholder Collapse Action
|
1651 |
-
flexible.removeEvents({
|
1652 |
-
|
|
|
|
|
1653 |
}
|
1654 |
-
|
1655 |
});
|
1656 |
-
|
1657 |
})(jQuery);
|
1658 |
/*
|
1659 |
* Field: reCaptcha Callback
|
1660 |
*/
|
1661 |
-
function acfe_recaptcha(){
|
1662 |
-
|
1663 |
-
(function($){
|
1664 |
-
|
1665 |
-
if(typeof acf === 'undefined')
|
1666 |
return;
|
1667 |
|
1668 |
-
$.each(acf.getFields({
|
|
|
|
|
1669 |
this.render();
|
1670 |
});
|
1671 |
-
|
1672 |
})(jQuery);
|
1673 |
-
|
1674 |
}
|
1675 |
|
1676 |
-
(function($){
|
1677 |
-
|
1678 |
-
if(typeof acf === 'undefined')
|
1679 |
return;
|
1680 |
|
1681 |
/*
|
@@ -1686,67 +1702,67 @@ function acfe_recaptcha(){
|
|
1686 |
type: 'acfe_recaptcha',
|
1687 |
|
1688 |
actions: {
|
1689 |
-
'validation_failure'
|
1690 |
},
|
1691 |
|
1692 |
-
$control: function(){
|
1693 |
return this.$('.acfe-field-recaptcha');
|
1694 |
},
|
1695 |
|
1696 |
-
$input: function(){
|
1697 |
return this.$('input[type="hidden"]');
|
1698 |
},
|
1699 |
|
1700 |
-
$selector: function(){
|
1701 |
return this.$control().find('> div');
|
1702 |
},
|
1703 |
|
1704 |
-
selector: function(){
|
1705 |
return this.$selector()[0];
|
1706 |
},
|
1707 |
|
1708 |
-
version: function(){
|
1709 |
return this.get('version');
|
1710 |
},
|
1711 |
|
1712 |
-
render: function(){
|
1713 |
|
1714 |
var field = this;
|
1715 |
|
1716 |
-
if(this.version() === 'v2'){
|
1717 |
|
1718 |
this.recaptcha = grecaptcha.render(field.selector(), {
|
1719 |
-
'sitekey':
|
1720 |
-
'theme':
|
1721 |
-
'size':
|
1722 |
|
1723 |
|
1724 |
-
'callback': function(response){
|
1725 |
|
1726 |
field.$input().val(response).change();
|
1727 |
field.$input().closest('.acf-input').find('> .acf-notice.-error').hide();
|
1728 |
|
1729 |
},
|
1730 |
|
1731 |
-
'error-callback': function(){
|
1732 |
|
1733 |
field.$input().val('error').change();
|
1734 |
|
1735 |
},
|
1736 |
|
1737 |
-
'expired-callback': function(){
|
1738 |
|
1739 |
field.$input().val('expired').change();
|
1740 |
|
1741 |
}
|
1742 |
});
|
1743 |
|
1744 |
-
}
|
1745 |
-
|
1746 |
-
else if(this.version() === 'v3'){
|
1747 |
|
1748 |
-
grecaptcha.ready(function(){
|
1749 |
-
grecaptcha.execute(field.$control().data('site-key'), {
|
|
|
|
|
1750 |
|
1751 |
field.$input().val(response).change();
|
1752 |
field.$input().closest('.acf-input').find('> .acf-notice.-error').hide();
|
@@ -1758,9 +1774,9 @@ function acfe_recaptcha(){
|
|
1758 |
|
1759 |
},
|
1760 |
|
1761 |
-
validationFailure: function($form){
|
1762 |
|
1763 |
-
if(this.version() === 'v2'){
|
1764 |
|
1765 |
grecaptcha.reset(this.recaptcha);
|
1766 |
|
@@ -1771,49 +1787,49 @@ function acfe_recaptcha(){
|
|
1771 |
});
|
1772 |
|
1773 |
acf.registerFieldType(reCaptcha);
|
1774 |
-
|
1775 |
/*
|
1776 |
* Field: Code Editor
|
1777 |
*/
|
1778 |
var CodeEditor = acf.Field.extend({
|
1779 |
-
|
1780 |
wait: 'ready',
|
1781 |
-
|
1782 |
type: 'acfe_code_editor',
|
1783 |
-
|
1784 |
events: {
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
$control: function(){
|
1789 |
-
|
1790 |
return this.$el.find('> .acf-input > .acf-input-wrap');
|
1791 |
-
|
1792 |
},
|
1793 |
-
|
1794 |
-
$input: function(){
|
1795 |
-
|
1796 |
return this.$el.find('> .acf-input > .acf-input-wrap > textarea');
|
1797 |
-
|
1798 |
},
|
1799 |
-
|
1800 |
-
input: function(){
|
1801 |
-
|
1802 |
return this.$input()[0];
|
1803 |
-
|
1804 |
},
|
1805 |
-
|
1806 |
-
rows: function(){
|
1807 |
-
|
1808 |
return this.$input().attr('rows');
|
1809 |
-
|
1810 |
},
|
1811 |
-
|
1812 |
-
initialize: function(){
|
1813 |
-
|
1814 |
this.rows = this.$control().data('rows');
|
1815 |
this.max_rows = this.$control().data('max-rows');
|
1816 |
-
|
1817 |
this.mode = this.$control().data('mode');
|
1818 |
this.lines = this.$control().data('lines');
|
1819 |
this.indentUnit = this.$control().data('indent-unit');
|
@@ -1834,10 +1850,10 @@ function acfe_recaptcha(){
|
|
1834 |
indentWithTabs: true,
|
1835 |
mode: this.mode,
|
1836 |
extraKeys: {
|
1837 |
-
Tab: function(cm){
|
1838 |
cm.execCommand("indentMore")
|
1839 |
},
|
1840 |
-
"Shift-Tab": function(cm){
|
1841 |
cm.execCommand("indentLess")
|
1842 |
},
|
1843 |
},
|
@@ -1851,164 +1867,164 @@ function acfe_recaptcha(){
|
|
1851 |
|
1852 |
// Init WP Code Editor
|
1853 |
this.editor = wp.codeEditor.initialize(this.input(), codeEditor);
|
1854 |
-
|
1855 |
-
if(this.rows || this.max_rows){
|
1856 |
-
|
1857 |
-
if(this.rows){
|
1858 |
-
|
1859 |
this.editor.codemirror.getScrollerElement().style.minHeight = this.rows * 18.5 + 'px';
|
1860 |
-
|
1861 |
}
|
1862 |
-
|
1863 |
-
if(this.max_rows){
|
1864 |
-
|
1865 |
this.editor.codemirror.getScrollerElement().style.maxHeight = this.max_rows * 18.5 + 'px';
|
1866 |
-
|
1867 |
}
|
1868 |
-
|
1869 |
this.editor.codemirror.refresh();
|
1870 |
-
|
1871 |
}
|
1872 |
-
|
1873 |
field = this;
|
1874 |
-
|
1875 |
-
this.editor.codemirror.on('change', function(){
|
1876 |
-
|
1877 |
field.editor.codemirror.save();
|
1878 |
field.$input().change();
|
1879 |
-
|
1880 |
});
|
1881 |
-
|
1882 |
},
|
1883 |
-
|
1884 |
-
onShow: function(){
|
1885 |
-
|
1886 |
-
if(this.editor.codemirror){
|
1887 |
-
|
1888 |
this.editor.codemirror.refresh();
|
1889 |
-
|
1890 |
}
|
1891 |
-
|
1892 |
},
|
1893 |
-
|
1894 |
});
|
1895 |
|
1896 |
acf.registerFieldType(CodeEditor);
|
1897 |
-
|
1898 |
/*
|
1899 |
* Field: Textarea
|
1900 |
*/
|
1901 |
var Textarea = acf.Field.extend({
|
1902 |
-
|
1903 |
type: 'textarea',
|
1904 |
-
|
1905 |
events: {
|
1906 |
'keydown textarea': 'onInput',
|
1907 |
},
|
1908 |
-
|
1909 |
-
onInput: function(e, $el){
|
1910 |
-
|
1911 |
-
if(!this.has('acfeTextareaCode'))
|
1912 |
return;
|
1913 |
-
|
1914 |
-
if(e.keyCode !== 9)
|
1915 |
return;
|
1916 |
-
|
1917 |
e.preventDefault();
|
1918 |
-
|
1919 |
var input = this.$el.find('textarea')[0];
|
1920 |
|
1921 |
var s = input.selectionStart;
|
1922 |
|
1923 |
-
this.$el.find('textarea').val(function(i, v){
|
1924 |
|
1925 |
return v.substring(0, s) + " " + v.substring(input.selectionEnd)
|
1926 |
|
1927 |
});
|
1928 |
|
1929 |
input.selectionEnd = s + 4;
|
1930 |
-
|
1931 |
},
|
1932 |
-
|
1933 |
});
|
1934 |
|
1935 |
acf.registerFieldType(Textarea);
|
1936 |
-
|
1937 |
/*
|
1938 |
* Field: Slug
|
1939 |
*/
|
1940 |
var ACFE_Slug = acf.Field.extend({
|
1941 |
-
|
1942 |
type: 'acfe_slug',
|
1943 |
-
|
1944 |
events: {
|
1945 |
'input input': 'onInput',
|
1946 |
'focusout input': 'onFocusOut',
|
1947 |
},
|
1948 |
-
|
1949 |
-
onInput: function(e, $el){
|
1950 |
-
|
1951 |
$el.val($el.val().toLowerCase()
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
},
|
1959 |
-
|
1960 |
-
onFocusOut: function(e, $el){
|
1961 |
-
|
1962 |
$el.val($el.val().toLowerCase()
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
},
|
1967 |
-
|
1968 |
});
|
1969 |
|
1970 |
acf.registerFieldType(ACFE_Slug);
|
1971 |
-
|
1972 |
/*
|
1973 |
* Field: Button
|
1974 |
*/
|
1975 |
var ACFE_Button = acf.Field.extend({
|
1976 |
-
|
1977 |
type: 'acfe_button',
|
1978 |
-
|
1979 |
events: {
|
1980 |
'click input': 'onClick',
|
1981 |
'click button': 'onClick',
|
1982 |
},
|
1983 |
-
|
1984 |
-
$input: function(){
|
1985 |
-
|
1986 |
-
if(this.$('input').length){
|
1987 |
-
|
1988 |
return this.$('input');
|
1989 |
-
|
1990 |
-
}else if(this.$('button').length){
|
1991 |
-
|
1992 |
return this.$('button');
|
1993 |
-
|
1994 |
}
|
1995 |
-
|
1996 |
},
|
1997 |
-
|
1998 |
-
initialize: function(){
|
1999 |
-
|
2000 |
// vars
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
},
|
2007 |
-
|
2008 |
-
onClick: function(e, $el){
|
2009 |
-
|
2010 |
-
if(this.get('ajax')){
|
2011 |
-
|
2012 |
e.preventDefault();
|
2013 |
|
2014 |
// serialize form data
|
@@ -2017,15 +2033,15 @@ function acfe_recaptcha(){
|
|
2017 |
field_name: this.get('name'),
|
2018 |
field_key: this.get('key')
|
2019 |
};
|
2020 |
-
|
2021 |
// Deprecated
|
2022 |
-
acf.doAction('acfe/fields/button/before_ajax',
|
2023 |
|
2024 |
// Actions
|
2025 |
-
acf.doAction('acfe/fields/button/before',
|
2026 |
-
acf.doAction('acfe/fields/button/before/key=' + this.get('key'),
|
2027 |
-
acf.doAction('acfe/fields/button/before/name=' + this.get('name'),
|
2028 |
-
|
2029 |
// ajax
|
2030 |
$.ajax({
|
2031 |
url: acf.get('ajaxurl'),
|
@@ -2033,120 +2049,120 @@ function acfe_recaptcha(){
|
|
2033 |
type: 'post',
|
2034 |
dataType: 'json',
|
2035 |
context: this,
|
2036 |
-
|
2037 |
// Success
|
2038 |
-
success: function(response){
|
2039 |
-
|
2040 |
// Deprecated
|
2041 |
-
acf.doAction('acfe/fields/button/ajax_success',
|
2042 |
|
2043 |
// Actions
|
2044 |
-
acf.doAction('acfe/fields/button/success',
|
2045 |
-
acf.doAction('acfe/fields/button/success/key=' + this.get('key'),
|
2046 |
acf.doAction('acfe/fields/button/success/name=' + this.get('name'), response, this.$el, data);
|
2047 |
-
|
2048 |
},
|
2049 |
-
|
2050 |
// Complete
|
2051 |
-
complete: function(xhr){
|
2052 |
|
2053 |
var response = xhr.responseText;
|
2054 |
|
2055 |
// Actions
|
2056 |
-
acf.doAction('acfe/fields/button/complete',
|
2057 |
-
acf.doAction('acfe/fields/button/complete/key=' + this.get('key'),
|
2058 |
-
acf.doAction('acfe/fields/button/complete/name=' + this.get('name'),
|
2059 |
|
2060 |
}
|
2061 |
-
|
2062 |
-
|
2063 |
});
|
2064 |
-
|
2065 |
}
|
2066 |
-
|
2067 |
}
|
2068 |
-
|
2069 |
});
|
2070 |
|
2071 |
acf.registerFieldType(ACFE_Button);
|
2072 |
-
|
2073 |
/*
|
2074 |
* Field: Advanced Link
|
2075 |
*/
|
2076 |
var ACFE_Advanced_Link = acf.Field.extend({
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
initialize: function(){
|
2091 |
// ...
|
2092 |
},
|
2093 |
-
|
2094 |
-
getValue: function(){
|
2095 |
|
2096 |
-
|
|
|
|
|
2097 |
var data = {
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
if(data.type === 'post'){
|
2107 |
-
|
2108 |
data.url = data.post;
|
2109 |
-
|
2110 |
-
}else if(data.type === 'term'){
|
2111 |
-
|
2112 |
data.url = data.term;
|
2113 |
-
|
2114 |
}
|
2115 |
-
|
2116 |
return data;
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
$div.addClass('-value');
|
2139 |
-
|
2140 |
-
|
2141 |
$div.addClass('-external');
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
if(val.remove){
|
2149 |
-
|
2150 |
this.$('.input-type :checked').prop('checked', false);
|
2151 |
this.$('.input-type [value="url"]').prop('checked', true).trigger('change');
|
2152 |
this.$('.input-title').val('');
|
@@ -2154,70 +2170,70 @@ function acfe_recaptcha(){
|
|
2154 |
this.$('.input-url').val('').trigger('change');
|
2155 |
this.$('.input-post').val('').trigger('change');
|
2156 |
this.$('.input-term').val('').trigger('change');
|
2157 |
-
|
2158 |
}
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
var $modal = $el.closest('.acf-input').find('.acfe-modal');
|
2165 |
-
|
2166 |
var title = $modal.attr('data-modal-title');
|
2167 |
-
|
2168 |
var model = this;
|
2169 |
|
2170 |
new acfe.Popup($modal, {
|
2171 |
title: title,
|
2172 |
size: 'medium',
|
2173 |
footer: acf.__('Close'),
|
2174 |
-
onClose: function(){
|
2175 |
model.onChange();
|
2176 |
}
|
2177 |
});
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
/*
|
2204 |
* Field: Advanced Link Manager
|
2205 |
*/
|
2206 |
new acf.Model({
|
2207 |
|
2208 |
actions: {
|
2209 |
-
'invalid_field':
|
2210 |
},
|
2211 |
|
2212 |
filters: {
|
2213 |
-
'select2_ajax_data/type=post_object':
|
2214 |
},
|
2215 |
|
2216 |
-
invalidField: function(field){
|
2217 |
|
2218 |
var $advanced_link = field.$el.closest('.acf-field-acfe-advanced-link').not('.acf-error');
|
2219 |
|
2220 |
-
if($advanced_link.length){
|
2221 |
|
2222 |
var advanced_link_field = acf.getInstance($advanced_link);
|
2223 |
|
@@ -2227,14 +2243,14 @@ function acfe_recaptcha(){
|
|
2227 |
|
2228 |
},
|
2229 |
|
2230 |
-
ajaxField: function(ajaxData, data, $el, field, select){
|
2231 |
|
2232 |
-
if(field.get('key') !== 'post')
|
2233 |
return ajaxData;
|
2234 |
|
2235 |
var advanced_link = acf.getInstance($el.closest('.acf-field-acfe-advanced-link'));
|
2236 |
|
2237 |
-
if(advanced_link){
|
2238 |
|
2239 |
ajaxData.field_key = advanced_link.get('key');
|
2240 |
|
@@ -2245,202 +2261,190 @@ function acfe_recaptcha(){
|
|
2245 |
},
|
2246 |
|
2247 |
});
|
2248 |
-
|
2249 |
/*
|
2250 |
* Field: Group
|
2251 |
*/
|
2252 |
var Group = acf.Field.extend({
|
2253 |
|
2254 |
wait: false,
|
2255 |
-
|
2256 |
type: 'group',
|
2257 |
-
|
2258 |
events: {
|
2259 |
'click [data-name="edit"]': 'onClick',
|
2260 |
-
'duplicateField':
|
2261 |
},
|
2262 |
-
|
2263 |
-
initialize: function(){
|
2264 |
-
|
2265 |
-
if(this.has('acfeGroupModal')){
|
2266 |
-
|
2267 |
var edit = this.get('acfeGroupModalButton');
|
2268 |
-
|
2269 |
this.$el.find('> .acf-input > .acf-fields, > .acf-input > .acf-table').wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>');
|
2270 |
this.$el.find('> .acf-input').append('<a data-name="edit" class="acf-button button" href="#">' + edit + '</a>');
|
2271 |
-
|
2272 |
}
|
2273 |
-
|
2274 |
},
|
2275 |
-
|
2276 |
-
onClick: function(e, $el){
|
2277 |
-
|
2278 |
-
var title = this.$
|
2279 |
-
var $modal = this.$el.find('> .acf-input > .acfe-modal');
|
2280 |
-
|
2281 |
// Title
|
2282 |
-
if(!title.length){
|
2283 |
-
|
2284 |
title = this.get('acfeGroupModalButton');
|
2285 |
-
|
2286 |
}
|
2287 |
-
|
2288 |
// Close
|
2289 |
var close = false;
|
2290 |
-
|
2291 |
-
if(this.has('acfeGroupModalClose')){
|
2292 |
-
|
2293 |
close = acf.__('Close');
|
2294 |
-
|
2295 |
}
|
2296 |
-
|
2297 |
// Size
|
2298 |
var size = 'large';
|
2299 |
-
|
2300 |
-
if(this.has('acfeGroupModalSize')){
|
2301 |
-
|
2302 |
size = this.get('acfeGroupModalSize');
|
2303 |
-
|
2304 |
}
|
2305 |
-
|
2306 |
// Open modal
|
2307 |
new acfe.Popup($modal, {
|
2308 |
-
title:
|
2309 |
-
size:
|
2310 |
footer: close
|
2311 |
});
|
2312 |
-
|
2313 |
},
|
2314 |
|
2315 |
-
onDuplicate: function(e, $el, $duplicate){
|
2316 |
$duplicate.find('a[data-name="edit"]').remove();
|
2317 |
}
|
2318 |
-
|
2319 |
});
|
2320 |
|
2321 |
acf.registerFieldType(Group);
|
2322 |
-
|
2323 |
/*
|
2324 |
* Field: Clone
|
2325 |
*/
|
2326 |
var Clone = acf.Field.extend({
|
2327 |
|
2328 |
wait: false,
|
2329 |
-
|
2330 |
type: 'clone',
|
2331 |
-
|
2332 |
events: {
|
2333 |
'click [data-name="edit"]': 'onClick',
|
2334 |
-
'duplicateField':
|
2335 |
},
|
2336 |
-
|
2337 |
-
initialize: function(){
|
2338 |
-
|
2339 |
-
if(this.has('acfeCloneModal')){
|
2340 |
-
|
2341 |
var edit = this.get('acfeCloneModalButton');
|
2342 |
-
|
2343 |
this.$el.find('> .acf-input > .acf-fields, > .acf-input > .acf-table').wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>');
|
2344 |
this.$el.find('> .acf-input').append('<a data-name="edit" class="acf-button button" href="#">' + edit + '</a>');
|
2345 |
-
|
2346 |
}
|
2347 |
-
|
2348 |
},
|
2349 |
-
|
2350 |
-
onClick: function(e, $el){
|
2351 |
-
|
2352 |
-
var title = this.$
|
2353 |
-
var $modal = this.$el.find('> .acf-input > .acfe-modal');
|
2354 |
-
|
2355 |
-
|
2356 |
// Title
|
2357 |
-
if(!title.length){
|
2358 |
-
|
2359 |
title = this.get('acfeCloneModalButton');
|
2360 |
-
|
2361 |
}
|
2362 |
-
|
2363 |
// Close
|
2364 |
var close = false;
|
2365 |
-
|
2366 |
-
if(this.has('acfeCloneModalClose')){
|
2367 |
-
|
2368 |
close = acf.__('Close');
|
2369 |
-
|
2370 |
}
|
2371 |
-
|
2372 |
// Size
|
2373 |
var size = 'large';
|
2374 |
-
|
2375 |
-
if(this.has('acfeCloneModalSize')){
|
2376 |
-
|
2377 |
size = this.get('acfeCloneModalSize');
|
2378 |
-
|
2379 |
}
|
2380 |
-
|
2381 |
// Open modal
|
2382 |
new acfe.Popup($modal, {
|
2383 |
-
title:
|
2384 |
-
size:
|
2385 |
footer: close
|
2386 |
});
|
2387 |
-
|
2388 |
},
|
2389 |
|
2390 |
-
onDuplicate: function(e, $el, $duplicate){
|
2391 |
$duplicate.find('a[data-name="edit"]').remove();
|
2392 |
}
|
2393 |
-
|
2394 |
});
|
2395 |
|
2396 |
acf.registerFieldType(Clone);
|
2397 |
-
|
2398 |
/*
|
2399 |
* Field: Column
|
2400 |
*/
|
2401 |
var Column = acf.Field.extend({
|
2402 |
-
|
2403 |
wait: 'new_field',
|
2404 |
-
|
2405 |
type: 'acfe_column',
|
2406 |
|
2407 |
-
$control: function(){
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
initialize: function(){
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
var $table = this.$el.closest('.acf-table').find('th[data-type="acfe_column"]').remove();
|
2416 |
this.remove();
|
2417 |
-
|
2418 |
}
|
2419 |
-
|
2420 |
-
if(this.get('endpoint')){
|
2421 |
-
|
2422 |
this.$el.find('> .acf-label').remove();
|
2423 |
this.$el.find('> .acf-input').remove();
|
2424 |
-
|
2425 |
return;
|
2426 |
-
|
2427 |
}
|
2428 |
-
|
2429 |
var $field = this.$el;
|
2430 |
var $label = this.$el.find('> .acf-label');
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
$label.remove();
|
2435 |
-
|
2436 |
var $parent = $field.parent();
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
$wrap.append($field.nextUntil('.acf-field-acfe-column', '.acf-field'));
|
2441 |
-
|
2442 |
}
|
2443 |
-
|
2444 |
});
|
2445 |
|
2446 |
acf.registerFieldType(Column);
|
@@ -2454,19 +2458,19 @@ function acfe_recaptcha(){
|
|
2454 |
'new_field/type=select': 'newField',
|
2455 |
},
|
2456 |
|
2457 |
-
newField: function(field){
|
2458 |
|
2459 |
field.inherit(field.$input());
|
2460 |
|
2461 |
// Remove "- -" characters from placeholder
|
2462 |
-
if(!field.get('ui') && field.get('allow_null')){
|
2463 |
|
2464 |
-
field.$input().find('option').each(function(i, option){
|
2465 |
|
2466 |
-
if(option.value)
|
2467 |
return;
|
2468 |
|
2469 |
-
if(!option.text.startsWith('- ') || !option.text.endsWith(' -'))
|
2470 |
return;
|
2471 |
|
2472 |
option.text = option.text.substring(2);
|
@@ -2476,26 +2480,26 @@ function acfe_recaptcha(){
|
|
2476 |
|
2477 |
}
|
2478 |
|
2479 |
-
if(field.has('acfePrepend') || field.has('acfeAppend')){
|
2480 |
|
2481 |
-
if(!field.$input().parent('.acf-input-wrap').length){
|
2482 |
|
2483 |
field.$input().wrapAll('<div class="acf-input-wrap"></div>');
|
2484 |
|
2485 |
-
if(field.get('ui')){
|
2486 |
|
2487 |
field.$('.acf-input-wrap:first').append(field.$('.select2'));
|
2488 |
|
2489 |
}
|
2490 |
|
2491 |
-
if(field.has('acfePrepend')){
|
2492 |
|
2493 |
field.$('.acf-input-wrap:first').before('<div class="acf-input-prepend">' + field.get('acfePrepend') + '</div>');
|
2494 |
field.$input().addClass('acf-is-prepended');
|
2495 |
|
2496 |
}
|
2497 |
|
2498 |
-
if(field.has('acfeAppend')){
|
2499 |
|
2500 |
field.$('.acf-input-wrap:first').before('<div class="acf-input-append">' + field.get('acfeAppend') + '</div>');
|
2501 |
field.$input().addClass('acf-is-appended');
|
@@ -2515,33 +2519,33 @@ function acfe_recaptcha(){
|
|
2515 |
*/
|
2516 |
new acf.Model({
|
2517 |
|
2518 |
-
actions:{
|
2519 |
-
'select2_init':
|
2520 |
},
|
2521 |
|
2522 |
filters: {
|
2523 |
-
'select2_args':
|
2524 |
-
'select2_ajax_data':
|
2525 |
},
|
2526 |
|
2527 |
-
select2Init: function($select, options, data, field, instance){
|
2528 |
|
2529 |
// Search Placeholder
|
2530 |
-
if(field.get('acfeSearchPlaceholder')){
|
2531 |
|
2532 |
var search_placeholder = field.get('acfeSearchPlaceholder');
|
2533 |
|
2534 |
-
$select.on('select2:open', function(e){
|
2535 |
|
2536 |
-
if(field.get('multiple')){
|
2537 |
|
2538 |
-
if(!$select.val()){
|
2539 |
|
2540 |
field.$('.select2-search__field').attr('placeholder', search_placeholder);
|
2541 |
|
2542 |
}
|
2543 |
|
2544 |
-
}else{
|
2545 |
|
2546 |
$('.select2-search.select2-search--dropdown > .select2-search__field').attr('placeholder', search_placeholder);
|
2547 |
|
@@ -2549,11 +2553,11 @@ function acfe_recaptcha(){
|
|
2549 |
|
2550 |
});
|
2551 |
|
2552 |
-
if(field.get('multiple')){
|
2553 |
|
2554 |
-
$select.on('select2:close', function(e){
|
2555 |
|
2556 |
-
if(!$select.val()){
|
2557 |
|
2558 |
field.$('.select2-search__field').attr('placeholder', field.get('placeholder'));
|
2559 |
|
@@ -2565,31 +2569,36 @@ function acfe_recaptcha(){
|
|
2565 |
|
2566 |
}
|
2567 |
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
|
|
|
|
|
|
|
|
|
|
2571 |
|
2572 |
},
|
2573 |
|
2574 |
-
select2Args: function(options, $select, data, field, instance){
|
2575 |
|
2576 |
// Allow Custom tags
|
2577 |
-
if(field.get('acfeAllowCustom')){
|
2578 |
|
2579 |
options.tags = true;
|
2580 |
|
2581 |
-
options.createTag = function(params){
|
2582 |
|
2583 |
var term = $.trim(params.term);
|
2584 |
|
2585 |
-
if(term === '')
|
2586 |
return null;
|
2587 |
|
2588 |
var optionsMatch = false;
|
2589 |
|
2590 |
-
this.$element.find('option').each(function(){
|
2591 |
|
2592 |
-
if(this.value.toLowerCase() !== term.toLowerCase())
|
2593 |
return;
|
2594 |
|
2595 |
optionsMatch = true;
|
@@ -2597,7 +2606,7 @@ function acfe_recaptcha(){
|
|
2597 |
|
2598 |
});
|
2599 |
|
2600 |
-
if(optionsMatch)
|
2601 |
return null;
|
2602 |
|
2603 |
return {
|
@@ -2608,13 +2617,13 @@ function acfe_recaptcha(){
|
|
2608 |
};
|
2609 |
|
2610 |
|
2611 |
-
options.insertTag = function(data, tag){
|
2612 |
|
2613 |
var found = false;
|
2614 |
|
2615 |
-
$.each(data, function(){
|
2616 |
|
2617 |
-
if($.trim(tag.text).toUpperCase() !== $.trim(this.text).toUpperCase())
|
2618 |
return;
|
2619 |
|
2620 |
found = true;
|
@@ -2622,28 +2631,28 @@ function acfe_recaptcha(){
|
|
2622 |
|
2623 |
});
|
2624 |
|
2625 |
-
if(!found)
|
2626 |
data.unshift(tag);
|
2627 |
|
2628 |
};
|
2629 |
|
2630 |
}
|
2631 |
|
2632 |
-
options = acf.applyFilters('select2_args/type=' +
|
2633 |
-
options = acf.applyFilters('select2_args/name=' +
|
2634 |
-
options = acf.applyFilters('select2_args/key=' +
|
2635 |
|
2636 |
return options;
|
2637 |
|
2638 |
},
|
2639 |
|
2640 |
-
select2Ajax: function(ajaxData, data, $el, field, instance){
|
2641 |
|
2642 |
-
ajaxData = acf.applyFilters('select2_ajax_data/type=' +
|
2643 |
-
ajaxData = acf.applyFilters('select2_ajax_data/name=' +
|
2644 |
-
ajaxData = acf.applyFilters('select2_ajax_data/key=' +
|
2645 |
|
2646 |
-
if(ajaxData.action){
|
2647 |
|
2648 |
ajaxData = acf.applyFilters('select2_ajax_data/action=' + ajaxData.action, ajaxData, data, $el, field, instance);
|
2649 |
|
@@ -2664,27 +2673,27 @@ function acfe_recaptcha(){
|
|
2664 |
'prepare_field/type=tab': 'prepareField',
|
2665 |
},
|
2666 |
|
2667 |
-
prepareField: function(field){
|
2668 |
|
2669 |
-
if(!field.has('noPreference'))
|
2670 |
return;
|
2671 |
|
2672 |
var $tabs = field.findTabs();
|
2673 |
var tabs = acf.getInstances($tabs);
|
2674 |
var key = field.get('key');
|
2675 |
|
2676 |
-
if(tabs.length){
|
2677 |
|
2678 |
var preference = acf.getPreference('this.tabs');
|
2679 |
|
2680 |
-
if(!preference)
|
2681 |
return;
|
2682 |
|
2683 |
-
$.each(tabs, function(i, group){
|
2684 |
|
2685 |
var groupIndex = group.get('index');
|
2686 |
|
2687 |
-
if(group.data.key !== key)
|
2688 |
return;
|
2689 |
|
2690 |
preference[groupIndex] = 0;
|
@@ -2709,12 +2718,12 @@ function acfe_recaptcha(){
|
|
2709 |
'new_field/type=checkbox': 'newField',
|
2710 |
},
|
2711 |
|
2712 |
-
newField: function(field){
|
2713 |
|
2714 |
-
if(!field.has('acfeLabels'))
|
2715 |
return;
|
2716 |
|
2717 |
-
$.each(field.get('acfeLabels'), function(group, key){
|
2718 |
|
2719 |
field.$control().find('input[type=checkbox][value="' + key + '"]').closest('ul').before('<strong>' + group + '</strong>');
|
2720 |
|
@@ -2733,20 +2742,20 @@ function acfe_recaptcha(){
|
|
2733 |
'new_field/type=radio': 'newField',
|
2734 |
},
|
2735 |
|
2736 |
-
newField: function(field){
|
2737 |
|
2738 |
-
if(!field.has('acfeLabels'))
|
2739 |
return;
|
2740 |
|
2741 |
-
$.each(field.get('acfeLabels'), function(group, key){
|
2742 |
|
2743 |
field.$control().find('input[type=radio][value="' + key + '"]').closest('li').addClass('parent').prepend('<strong>' + group + '</strong>');
|
2744 |
|
2745 |
});
|
2746 |
|
2747 |
-
if(field.$control().hasClass('acf-hl')){
|
2748 |
|
2749 |
-
field.$control().find('li.parent').each(function(){
|
2750 |
|
2751 |
$(this).nextUntil('li.parent').addBack().wrapAll('<li><ul></ul></li>');
|
2752 |
|
@@ -2770,68 +2779,68 @@ function acfe_recaptcha(){
|
|
2770 |
'new_field': 'newField',
|
2771 |
},
|
2772 |
|
2773 |
-
newField: function(field){
|
2774 |
|
2775 |
this.field = field;
|
2776 |
|
2777 |
-
if(field.has('instructionTooltip')){
|
2778 |
this.setTooltip();
|
2779 |
}
|
2780 |
|
2781 |
-
if(field.has('instructionAboveField')){
|
2782 |
this.setAboveField();
|
2783 |
}
|
2784 |
|
2785 |
-
if(field.has('instructionPlacement')){
|
2786 |
this.overridePlacement(field.get('instructionPlacement'));
|
2787 |
}
|
2788 |
|
2789 |
},
|
2790 |
|
2791 |
-
setTooltip: function(){
|
2792 |
|
2793 |
this.field.$labelWrap().prepend('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="' + _.escape(this.field.get('instructionTooltip')) + '"></span>');
|
2794 |
this.field.$labelWrap().find('.description').remove();
|
2795 |
|
2796 |
},
|
2797 |
|
2798 |
-
setAboveField: function(){
|
2799 |
|
2800 |
this.field.$inputWrap().prepend('<p class="description">' + this.field.get('instructionAboveField') + '</p>');
|
2801 |
this.field.$labelWrap().find('.description').remove();
|
2802 |
|
2803 |
},
|
2804 |
|
2805 |
-
overridePlacement: function(target){
|
2806 |
|
2807 |
var current = this.getPlacement();
|
2808 |
|
2809 |
// No instruction
|
2810 |
-
if(!current)
|
2811 |
return;
|
2812 |
|
2813 |
// Placement is correct
|
2814 |
-
if(current === target)
|
2815 |
return;
|
2816 |
|
2817 |
this.setPlacement(target);
|
2818 |
|
2819 |
},
|
2820 |
|
2821 |
-
getPlacement: function(){
|
2822 |
|
2823 |
var placement = false;
|
2824 |
|
2825 |
-
if(this.field.$labelWrap().find('>.description').length)
|
2826 |
placement = 'label';
|
2827 |
|
2828 |
-
else if(this.field.$inputWrap().find('>.description:first-child').length)
|
2829 |
placement = 'above_field';
|
2830 |
|
2831 |
-
else if(this.field.$inputWrap().find('>.description:last-child').length)
|
2832 |
placement = 'field';
|
2833 |
|
2834 |
-
else if(this.field.$labelWrap().find('>.acfe-field-tooltip').length)
|
2835 |
placement = 'tooltip';
|
2836 |
|
2837 |
this.placement = placement;
|
@@ -2840,23 +2849,23 @@ function acfe_recaptcha(){
|
|
2840 |
|
2841 |
},
|
2842 |
|
2843 |
-
$getInstruction: function(){
|
2844 |
|
2845 |
var placement = this.getPlacement();
|
2846 |
|
2847 |
-
if(placement === 'label'){
|
2848 |
|
2849 |
return this.field.$labelWrap().find('>.description');
|
2850 |
|
2851 |
-
}else if(placement === 'above_field'){
|
2852 |
|
2853 |
return this.field.$inputWrap().find('>.description:first-child');
|
2854 |
|
2855 |
-
}else if(placement === 'field'){
|
2856 |
|
2857 |
return this.field.$inputWrap().find('>.description:last-child');
|
2858 |
|
2859 |
-
}else if(placement === 'tooltip'){
|
2860 |
|
2861 |
return this.field.$labelWrap().find('>.acfe-field-tooltip');
|
2862 |
|
@@ -2866,11 +2875,11 @@ function acfe_recaptcha(){
|
|
2866 |
|
2867 |
},
|
2868 |
|
2869 |
-
setPlacement: function(target){
|
2870 |
|
2871 |
var $instruction = this.$getInstruction();
|
2872 |
|
2873 |
-
if(this.placement === 'tooltip'){
|
2874 |
|
2875 |
var text = $instruction.attr('title');
|
2876 |
|
@@ -2879,19 +2888,19 @@ function acfe_recaptcha(){
|
|
2879 |
|
2880 |
}
|
2881 |
|
2882 |
-
if(target === 'label'){
|
2883 |
|
2884 |
this.field.$labelWrap().append($instruction);
|
2885 |
|
2886 |
-
}else if(target === 'above_field'){
|
2887 |
|
2888 |
this.field.$inputWrap().prepend($instruction);
|
2889 |
|
2890 |
-
}else if(target === 'field'){
|
2891 |
|
2892 |
this.field.$inputWrap().append($instruction);
|
2893 |
|
2894 |
-
}else if(target === 'tooltip'){
|
2895 |
|
2896 |
this.field.$labelWrap().prepend($('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="' + _.escape($instruction.html()) + '"></span>'));
|
2897 |
$instruction.remove();
|
@@ -2903,141 +2912,147 @@ function acfe_recaptcha(){
|
|
2903 |
});
|
2904 |
|
2905 |
})(jQuery);
|
2906 |
-
(function($){
|
2907 |
-
|
2908 |
-
if(typeof acf === 'undefined')
|
2909 |
return;
|
2910 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2911 |
/*
|
2912 |
* Field Conditions: Code Editor
|
2913 |
*/
|
2914 |
-
acf.registerConditionForFieldType('equalTo',
|
2915 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2916 |
-
acf.registerConditionForFieldType('patternMatch',
|
2917 |
-
acf.registerConditionForFieldType('contains',
|
2918 |
-
acf.registerConditionForFieldType('hasValue',
|
2919 |
-
acf.registerConditionForFieldType('hasNoValue',
|
2920 |
|
2921 |
/*
|
2922 |
* Field Conditions: Datepicker
|
2923 |
*/
|
2924 |
-
acf.registerConditionForFieldType('equalTo',
|
2925 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2926 |
-
acf.registerConditionForFieldType('patternMatch',
|
2927 |
-
acf.registerConditionForFieldType('contains',
|
2928 |
-
acf.registerConditionForFieldType('greaterThan',
|
2929 |
-
acf.registerConditionForFieldType('lessThan',
|
2930 |
|
2931 |
/*
|
2932 |
* Field Conditions: Datetime picker
|
2933 |
*/
|
2934 |
-
acf.registerConditionForFieldType('equalTo',
|
2935 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2936 |
-
acf.registerConditionForFieldType('patternMatch',
|
2937 |
-
acf.registerConditionForFieldType('contains',
|
2938 |
|
2939 |
/*
|
2940 |
* Field Conditions: Timepicker
|
2941 |
*/
|
2942 |
-
acf.registerConditionForFieldType('equalTo',
|
2943 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2944 |
-
acf.registerConditionForFieldType('patternMatch',
|
2945 |
-
acf.registerConditionForFieldType('contains',
|
2946 |
|
2947 |
/*
|
2948 |
* Field Conditions: Taxonomy
|
2949 |
*/
|
2950 |
-
acf.registerConditionForFieldType('equalTo',
|
2951 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2952 |
-
acf.registerConditionForFieldType('patternMatch',
|
2953 |
-
acf.registerConditionForFieldType('contains',
|
2954 |
-
acf.registerConditionForFieldType('hasValue',
|
2955 |
-
acf.registerConditionForFieldType('hasNoValue',
|
2956 |
|
2957 |
/*
|
2958 |
* Field Conditions: Forms
|
2959 |
*/
|
2960 |
-
acf.registerConditionForFieldType('equalTo',
|
2961 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2962 |
-
acf.registerConditionForFieldType('patternMatch',
|
2963 |
-
acf.registerConditionForFieldType('contains',
|
2964 |
-
acf.registerConditionForFieldType('hasValue',
|
2965 |
-
acf.registerConditionForFieldType('hasNoValue',
|
2966 |
|
2967 |
/*
|
2968 |
* Field Conditions: Hidden
|
2969 |
*/
|
2970 |
-
acf.registerConditionForFieldType('equalTo',
|
2971 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2972 |
-
acf.registerConditionForFieldType('patternMatch',
|
2973 |
-
acf.registerConditionForFieldType('contains',
|
2974 |
-
acf.registerConditionForFieldType('hasValue',
|
2975 |
-
acf.registerConditionForFieldType('hasNoValue',
|
2976 |
|
2977 |
/*
|
2978 |
* Field Conditions: Post Status
|
2979 |
*/
|
2980 |
-
acf.registerConditionForFieldType('equalTo',
|
2981 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2982 |
-
acf.registerConditionForFieldType('patternMatch',
|
2983 |
-
acf.registerConditionForFieldType('contains',
|
2984 |
-
acf.registerConditionForFieldType('hasValue',
|
2985 |
-
acf.registerConditionForFieldType('hasNoValue',
|
2986 |
|
2987 |
/*
|
2988 |
* Field Conditions: Post Types
|
2989 |
*/
|
2990 |
-
acf.registerConditionForFieldType('equalTo',
|
2991 |
-
acf.registerConditionForFieldType('notEqualTo',
|
2992 |
-
acf.registerConditionForFieldType('patternMatch',
|
2993 |
-
acf.registerConditionForFieldType('contains',
|
2994 |
-
acf.registerConditionForFieldType('hasValue',
|
2995 |
-
acf.registerConditionForFieldType('hasNoValue',
|
2996 |
|
2997 |
/*
|
2998 |
* Field Conditions: Slug
|
2999 |
*/
|
3000 |
-
acf.registerConditionForFieldType('equalTo',
|
3001 |
-
acf.registerConditionForFieldType('notEqualTo',
|
3002 |
-
acf.registerConditionForFieldType('patternMatch',
|
3003 |
-
acf.registerConditionForFieldType('contains',
|
3004 |
-
acf.registerConditionForFieldType('hasValue',
|
3005 |
-
acf.registerConditionForFieldType('hasNoValue',
|
3006 |
|
3007 |
/*
|
3008 |
* Field Conditions: Taxonomies
|
3009 |
*/
|
3010 |
-
acf.registerConditionForFieldType('equalTo',
|
3011 |
-
acf.registerConditionForFieldType('notEqualTo',
|
3012 |
-
acf.registerConditionForFieldType('patternMatch',
|
3013 |
-
acf.registerConditionForFieldType('contains',
|
3014 |
-
acf.registerConditionForFieldType('hasValue',
|
3015 |
-
acf.registerConditionForFieldType('hasNoValue',
|
3016 |
|
3017 |
/*
|
3018 |
* Field Conditions: Taxonomy Terms
|
3019 |
*/
|
3020 |
-
acf.registerConditionForFieldType('equalTo',
|
3021 |
-
acf.registerConditionForFieldType('notEqualTo',
|
3022 |
-
acf.registerConditionForFieldType('patternMatch',
|
3023 |
-
acf.registerConditionForFieldType('contains',
|
3024 |
-
acf.registerConditionForFieldType('hasValue',
|
3025 |
-
acf.registerConditionForFieldType('hasNoValue',
|
3026 |
|
3027 |
/*
|
3028 |
* Field Conditions: User Roles
|
3029 |
*/
|
3030 |
-
acf.registerConditionForFieldType('equalTo',
|
3031 |
-
acf.registerConditionForFieldType('notEqualTo',
|
3032 |
-
acf.registerConditionForFieldType('patternMatch',
|
3033 |
-
acf.registerConditionForFieldType('contains',
|
3034 |
-
acf.registerConditionForFieldType('hasValue',
|
3035 |
-
acf.registerConditionForFieldType('hasNoValue',
|
3036 |
|
3037 |
})(jQuery);
|
3038 |
-
(function($){
|
3039 |
-
|
3040 |
-
if(typeof acf === 'undefined')
|
3041 |
return;
|
3042 |
|
3043 |
/*
|
@@ -3046,29 +3061,29 @@ function acfe_recaptcha(){
|
|
3046 |
new acf.Model({
|
3047 |
|
3048 |
actions: {
|
3049 |
-
'prepare':
|
3050 |
-
'new_field/type=date_picker':
|
3051 |
-
'new_field/type=date_time_picker':
|
3052 |
-
'new_field/type=time_picker':
|
3053 |
-
'new_field/type=google_map':
|
3054 |
-
'invalid_field':
|
3055 |
-
'validation_begin':
|
3056 |
},
|
3057 |
|
3058 |
-
prepare: function(){
|
3059 |
|
3060 |
-
if(acfe.get('is_admin'))
|
3061 |
return;
|
3062 |
|
3063 |
// Fix Image/File WP Media upload
|
3064 |
-
if(acf.isset(window, 'wp', 'media', 'view', 'settings', 'post')){
|
3065 |
|
3066 |
// Unset Post ID
|
3067 |
wp.media.view.settings.post = false;
|
3068 |
|
3069 |
}
|
3070 |
|
3071 |
-
if($('.acfe-form[data-hide-unload="1"]').length){
|
3072 |
|
3073 |
acf.unload.disable();
|
3074 |
|
@@ -3076,14 +3091,14 @@ function acfe_recaptcha(){
|
|
3076 |
|
3077 |
var $form_success = $('.acfe-form-success');
|
3078 |
|
3079 |
-
if($form_success.length){
|
3080 |
|
3081 |
// Prevent refresh sending post fields again
|
3082 |
-
if(window.history.replaceState){
|
3083 |
window.history.replaceState(null, null, window.location.href);
|
3084 |
}
|
3085 |
|
3086 |
-
$form_success.each(function(){
|
3087 |
|
3088 |
var form_name = $(this).data('form-name');
|
3089 |
var form_id = $(this).data('form-id');
|
@@ -3097,9 +3112,9 @@ function acfe_recaptcha(){
|
|
3097 |
}
|
3098 |
|
3099 |
// Prevent form submission click spam
|
3100 |
-
$('.acf-form .button, .acf-form [type="submit"], .acfe-form .button, .acfe-form [type="submit"]').click(function(e){
|
3101 |
|
3102 |
-
if(!$(this).hasClass('disabled'))
|
3103 |
return;
|
3104 |
|
3105 |
e.preventDefault();
|
@@ -3109,70 +3124,70 @@ function acfe_recaptcha(){
|
|
3109 |
},
|
3110 |
|
3111 |
// Datepicker: Add field class
|
3112 |
-
datePicker: function(field){
|
3113 |
|
3114 |
-
if(acfe.get('is_admin'))
|
3115 |
return;
|
3116 |
|
3117 |
var $form = field.$el.closest('.acfe-form');
|
3118 |
|
3119 |
-
if(!$form.length)
|
3120 |
return;
|
3121 |
|
3122 |
var field_class = $form.data('fields-class');
|
3123 |
|
3124 |
-
if(field_class)
|
3125 |
field.$inputText().addClass(field_class);
|
3126 |
|
3127 |
},
|
3128 |
|
3129 |
// Google Maps: Add field class
|
3130 |
-
googleMap: function(field){
|
3131 |
|
3132 |
-
if(acfe.get('is_admin'))
|
3133 |
return;
|
3134 |
|
3135 |
var $form = field.$el.closest('.acfe-form');
|
3136 |
|
3137 |
-
if(!$form.length)
|
3138 |
return;
|
3139 |
|
3140 |
var field_class = $form.data('fields-class');
|
3141 |
|
3142 |
-
if(field_class)
|
3143 |
field.$search().addClass(field_class);
|
3144 |
|
3145 |
},
|
3146 |
|
3147 |
// Error: Move error
|
3148 |
-
invalidField: function(field){
|
3149 |
|
3150 |
-
if(acfe.get('is_admin'))
|
3151 |
return;
|
3152 |
|
3153 |
var $form = field.$el.closest('.acfe-form');
|
3154 |
|
3155 |
-
if(!$form.length)
|
3156 |
return;
|
3157 |
|
3158 |
var errors_position = $form.data('errors-position');
|
3159 |
var errors_class = $form.data('errors-class');
|
3160 |
|
3161 |
// Class
|
3162 |
-
if(errors_class && errors_class.length){
|
3163 |
|
3164 |
field.$el.find('.acf-notice.-error').addClass(errors_class);
|
3165 |
|
3166 |
}
|
3167 |
|
3168 |
// Move below
|
3169 |
-
if(errors_position && errors_position === 'below'){
|
3170 |
|
3171 |
-
if(field.$control().length){
|
3172 |
|
3173 |
field.$el.find('.acf-notice.-error').insertAfter(field.$control());
|
3174 |
|
3175 |
-
}else if(field.$input().length){
|
3176 |
|
3177 |
field.$el.find('.acf-notice.-error').insertAfter(field.$input());
|
3178 |
|
@@ -3180,23 +3195,23 @@ function acfe_recaptcha(){
|
|
3180 |
|
3181 |
var $selector = false;
|
3182 |
|
3183 |
-
if(field.$control().length){
|
3184 |
|
3185 |
$selector = field.$control();
|
3186 |
|
3187 |
-
}else if(field.$input().length){
|
3188 |
|
3189 |
$selector = field.$input();
|
3190 |
|
3191 |
}
|
3192 |
|
3193 |
-
if($selector)
|
3194 |
field.$el.find('.acf-notice.-error').insertAfter($selector);
|
3195 |
|
3196 |
}
|
3197 |
|
3198 |
// Group errors
|
3199 |
-
else if(errors_position && errors_position === 'group'){
|
3200 |
|
3201 |
var label = field.$el.find('.acf-label label').text().trim();
|
3202 |
var placeholder = field.$el.find('.acf-input-wrap [placeholder!=""]').attr('placeholder');
|
@@ -3205,21 +3220,21 @@ function acfe_recaptcha(){
|
|
3205 |
field.$el.find('.acf-notice.-error').remove();
|
3206 |
|
3207 |
// Try label
|
3208 |
-
if(label && label.length && label !== '*'){
|
3209 |
|
3210 |
message = label + ': ' + message;
|
3211 |
|
3212 |
}
|
3213 |
|
3214 |
// Try placeholder
|
3215 |
-
else if(placeholder && placeholder.length && placeholder !== ''){
|
3216 |
|
3217 |
message = placeholder + ': ' + message;
|
3218 |
|
3219 |
}
|
3220 |
|
3221 |
// If everything fails, use field name
|
3222 |
-
else{
|
3223 |
|
3224 |
message = field.get('name') + ': ' + message;
|
3225 |
|
@@ -3227,7 +3242,7 @@ function acfe_recaptcha(){
|
|
3227 |
|
3228 |
var $form_error = $form.find('> .acfe-form-error')
|
3229 |
|
3230 |
-
if(!$form_error.length)
|
3231 |
$form_error = $('<div class="acf-notice -error acf-error-message acfe-form-error" />').prependTo($form);
|
3232 |
|
3233 |
$form_error.append('<p>' + message + '</p>');
|
@@ -3235,7 +3250,7 @@ function acfe_recaptcha(){
|
|
3235 |
}
|
3236 |
|
3237 |
// Hide errors
|
3238 |
-
else if(errors_position && errors_position === 'hide'){
|
3239 |
|
3240 |
field.$el.find('.acf-notice.-error').remove();
|
3241 |
|
@@ -3244,12 +3259,12 @@ function acfe_recaptcha(){
|
|
3244 |
},
|
3245 |
|
3246 |
// Ajax Validation
|
3247 |
-
validationBegin: function($form){
|
3248 |
|
3249 |
-
if(acfe.get('is_admin'))
|
3250 |
return;
|
3251 |
|
3252 |
-
if(typeof $form === 'undefined')
|
3253 |
return;
|
3254 |
|
3255 |
$form.find('.acf-error-message').remove();
|
@@ -3260,24 +3275,24 @@ function acfe_recaptcha(){
|
|
3260 |
|
3261 |
// Rewrite ACF New Condition
|
3262 |
// Allow conditions to work within wrapped div
|
3263 |
-
acf.newCondition = function(rule, conditions){
|
3264 |
|
3265 |
// currently setting up conditions for fieldX, this field is the 'target'
|
3266 |
var target = conditions.get('field');
|
3267 |
|
3268 |
// use the 'target' to find the 'trigger' field.
|
3269 |
// - this field is used to setup the conditional logic events
|
3270 |
-
var field = target.getField(
|
3271 |
|
3272 |
// ACF Extended: Check in all form if targeted field not found
|
3273 |
-
if(
|
3274 |
|
3275 |
-
field = acf.getField(
|
3276 |
|
3277 |
}
|
3278 |
|
3279 |
// bail ealry if no target or no field (possible if field doesn't exist due to HTML error)
|
3280 |
-
if(
|
3281 |
return false;
|
3282 |
}
|
3283 |
|
@@ -3303,70 +3318,74 @@ function acfe_recaptcha(){
|
|
3303 |
var model = conditionTypes[0] || acf.Condition;
|
3304 |
|
3305 |
// instantiate
|
3306 |
-
var condition = new model(
|
3307 |
|
3308 |
// return
|
3309 |
return condition;
|
3310 |
|
3311 |
};
|
3312 |
-
|
3313 |
})(jQuery);
|
3314 |
-
(function($){
|
3315 |
-
|
3316 |
-
if(typeof acf === 'undefined')
|
3317 |
return;
|
3318 |
-
|
3319 |
/*
|
3320 |
* Init
|
3321 |
*/
|
3322 |
var repeater = acf.getFieldType('repeater');
|
3323 |
var model = repeater.prototype;
|
3324 |
-
|
3325 |
// Repeater: Lock Layouts
|
3326 |
-
model.acfeOnHover = function(){
|
3327 |
-
|
3328 |
var repeater = this;
|
3329 |
-
|
3330 |
// remove event
|
3331 |
repeater.off('mouseover');
|
3332 |
-
|
3333 |
}
|
3334 |
-
|
3335 |
/*
|
3336 |
* Spawn
|
3337 |
*/
|
3338 |
-
acf.addAction('new_field/type=repeater', function(repeater){
|
3339 |
-
|
3340 |
// ACFE: Lock
|
3341 |
-
if(repeater.has('acfeRepeaterLock')){
|
3342 |
-
|
3343 |
-
repeater.removeEvents({
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
|
|
|
|
|
|
|
|
3347 |
}
|
3348 |
-
|
3349 |
// ACFE: Remove Actions
|
3350 |
-
if(repeater.has('acfeRepeaterRemoveActions')){
|
3351 |
-
|
3352 |
repeater.$actions().remove();
|
3353 |
-
|
3354 |
repeater.$el.find('thead:first > tr > th.acf-row-handle:last').remove();
|
3355 |
repeater.$rows().find('> .acf-row-handle:last').remove();
|
3356 |
-
|
3357 |
repeater.$control().find('> .acfe-repeater-stylised-button').remove();
|
3358 |
-
|
3359 |
-
|
3360 |
}
|
3361 |
-
|
3362 |
// ACFE: Stylised button
|
3363 |
-
if(repeater.has('acfeRepeaterStylisedButton')){
|
3364 |
-
|
3365 |
repeater.$button().removeClass('button-primary');
|
3366 |
repeater.$actions().wrap('<div class="acfe-repeater-stylised-button" />');
|
3367 |
-
|
3368 |
}
|
3369 |
|
3370 |
});
|
3371 |
-
|
3372 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
|
3 |
+
if (typeof acf === 'undefined')
|
4 |
return;
|
5 |
+
|
6 |
/*
|
7 |
* Init
|
8 |
*/
|
9 |
var flexible = acf.getFieldType('flexible_content');
|
10 |
var model = flexible.prototype;
|
11 |
+
|
12 |
/*
|
13 |
* Drag & Drop
|
14 |
*/
|
15 |
+
model.addSortable = function(self) {
|
16 |
+
|
17 |
// bail early if max 1 row
|
18 |
+
if (this.get('max') == 1) {
|
19 |
return;
|
20 |
}
|
21 |
+
|
22 |
// add sortable
|
23 |
this.$layoutsWrap().sortable({
|
24 |
items: ' > .layout',
|
25 |
handle: '> .acf-fc-layout-handle',
|
26 |
+
forceHelperSize: false, // Changed to false
|
27 |
forcePlaceholderSize: true,
|
28 |
revert: 50,
|
29 |
+
tolerance: "pointer", // Changed to pointer
|
30 |
scroll: true,
|
31 |
stop: function(event, ui) {
|
32 |
self.render();
|
35 |
self.$input().trigger('change');
|
36 |
}
|
37 |
});
|
38 |
+
|
39 |
};
|
40 |
+
|
41 |
/*
|
42 |
* Actions
|
43 |
*/
|
44 |
+
model.acfeOneClick = function(e, $el) {
|
45 |
+
|
46 |
// Get Flexible
|
47 |
var flexible = this;
|
48 |
+
|
49 |
// Vars
|
50 |
var $clones = flexible.$clones();
|
51 |
var $layout_name = $($clones[0]).data('layout');
|
52 |
+
|
53 |
// Source
|
54 |
var $layout_source = null;
|
55 |
+
if ($el.hasClass('acf-icon'))
|
56 |
$layout_source = $el.closest('.layout');
|
57 |
+
|
58 |
// Add
|
59 |
var $layout_added = flexible.add({
|
60 |
layout: $layout_name,
|
61 |
before: $layout_source
|
62 |
});
|
63 |
+
|
64 |
// Hide native tooltip
|
65 |
var acfPopup = $('.acf-fc-popup');
|
66 |
|
67 |
+
if (acfPopup.length) {
|
68 |
acfPopup.hide();
|
69 |
}
|
70 |
|
71 |
+
|
72 |
};
|
73 |
+
|
74 |
+
model.acfeLayoutInit = function($layout) {
|
75 |
+
|
76 |
// Get Flexible
|
77 |
var flexible = this;
|
78 |
+
|
79 |
// Vars
|
80 |
var $controls = $layout.find('> .acf-fc-layout-controls');
|
81 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
82 |
+
|
83 |
// Placeholder
|
84 |
var $placeholder = $layout.find('> .acfe-fc-placeholder');
|
85 |
+
|
86 |
// Placeholder: Show
|
87 |
$placeholder.removeClass('acf-hidden');
|
88 |
+
|
89 |
// If no modal edition & opened: Hide Placeholder
|
90 |
+
if (!flexible.has('acfeFlexibleModalEdition') && !flexible.isLayoutClosed($layout)) {
|
91 |
+
|
92 |
$placeholder.addClass('acf-hidden');
|
93 |
+
|
94 |
}
|
95 |
+
|
96 |
// Flexible has Preview
|
97 |
+
if (flexible.isLayoutClosed($layout) && flexible.has('acfeFlexiblePreview') && !$placeholder.hasClass('-loading')) {
|
98 |
+
|
99 |
$placeholder.addClass('acfe-fc-preview -loading').find('> .acfe-flexible-placeholder').prepend('<span class="spinner"></span>');
|
100 |
$placeholder.find('> .acfe-fc-overlay').addClass('-hover');
|
101 |
+
|
102 |
// vars
|
103 |
+
var $input = $layout.children('input');
|
104 |
+
var prefix = $input.attr('name').replace('[acf_fc_layout]', '');
|
105 |
+
|
106 |
+
// ajax data
|
107 |
+
var ajaxData = {
|
108 |
+
action: 'acfe/flexible/layout_preview',
|
109 |
+
field_key: flexible.get('key'),
|
110 |
+
i: $layout.index(),
|
111 |
+
layout: $layout.data('layout'),
|
112 |
+
value: acf.serialize($layout, prefix)
|
113 |
+
};
|
114 |
+
|
115 |
+
acf.doAction('acfe/fields/flexible_content/before_preview', flexible.$el, $layout, ajaxData);
|
116 |
+
acf.doAction('acfe/fields/flexible_content/before_preview/name=' + flexible.get('name'), flexible.$el, $layout, ajaxData);
|
117 |
+
acf.doAction('acfe/fields/flexible_content/before_preview/key=' + flexible.get('key'), flexible.$el, $layout, ajaxData);
|
118 |
+
acf.doAction('acfe/fields/flexible_content/before_preview/name=' + flexible.get('name') + '&layout=' + $layout.data('layout'), flexible.$el, $layout, ajaxData);
|
119 |
+
acf.doAction('acfe/fields/flexible_content/before_preview/key=' + flexible.get('key') + '&layout=' + $layout.data('layout'), flexible.$el, $layout, ajaxData);
|
120 |
+
|
121 |
+
// ajax
|
122 |
+
$.ajax({
|
123 |
+
url: acf.get('ajaxurl'),
|
124 |
+
data: acf.prepareForAjax(ajaxData),
|
125 |
+
dataType: 'html',
|
126 |
+
type: 'post',
|
127 |
+
success: function(response) {
|
128 |
+
|
129 |
+
if (response) {
|
130 |
+
|
131 |
+
$placeholder.find('> .acfe-flexible-placeholder').html(response);
|
132 |
+
|
133 |
+
} else {
|
134 |
+
|
135 |
$placeholder.removeClass('acfe-fc-preview');
|
136 |
+
|
137 |
}
|
138 |
+
|
139 |
+
acf.doAction('acfe/fields/flexible_content/preview', response, flexible.$el, $layout, ajaxData);
|
140 |
+
acf.doAction('acfe/fields/flexible_content/preview/name=' + flexible.get('name'), response, flexible.$el, $layout, ajaxData);
|
141 |
+
acf.doAction('acfe/fields/flexible_content/preview/key=' + flexible.get('key'), response, flexible.$el, $layout, ajaxData);
|
142 |
+
acf.doAction('acfe/fields/flexible_content/preview/name=' + flexible.get('name') + '&layout=' + $layout.data('layout'), response, flexible.$el, $layout, ajaxData);
|
143 |
+
acf.doAction('acfe/fields/flexible_content/preview/key=' + flexible.get('key') + '&layout=' + $layout.data('layout'), response, flexible.$el, $layout, ajaxData);
|
144 |
+
|
145 |
+
},
|
146 |
+
complete: function() {
|
147 |
+
|
148 |
$placeholder.find('> .acfe-fc-overlay').removeClass('-hover');
|
149 |
$placeholder.removeClass('-loading').find('> .acfe-flexible-placeholder > .spinner').remove();
|
150 |
+
|
151 |
}
|
152 |
+
});
|
153 |
+
|
154 |
}
|
155 |
+
|
156 |
};
|
157 |
|
158 |
/*
|
159 |
* WYSIWYG
|
160 |
*/
|
161 |
var wysiwyg = acf.getFieldType('wysiwyg').prototype;
|
162 |
+
wysiwyg.initialize = function() {
|
163 |
|
164 |
// initializeEditor if no delay
|
165 |
+
if (!this.has('id') && !this.$control().hasClass('delay')) {
|
166 |
this.initializeEditor();
|
167 |
}
|
168 |
|
169 |
};
|
170 |
|
171 |
+
var acfeFlexibleDelayInit = function(editor) {
|
172 |
|
173 |
+
if (editor.has('id') || !editor.$el.is(':visible') || acfe.isFilterEnabled('acfeForceOpen'))
|
174 |
return;
|
175 |
|
176 |
var $wrap = editor.$control();
|
177 |
|
178 |
+
if ($wrap.hasClass('delay')) {
|
179 |
|
180 |
$wrap.removeClass('delay');
|
181 |
$wrap.find('.acf-editor-toolbar').remove();
|
193 |
/*
|
194 |
* Spawn
|
195 |
*/
|
196 |
+
acf.addAction('new_field/type=flexible_content', function(flexible) {
|
197 |
+
|
198 |
// Vars
|
199 |
var $clones = flexible.$clones();
|
200 |
var $layouts = flexible.$layouts();
|
201 |
+
|
202 |
// Merge
|
203 |
var $all_layouts = $.merge($layouts, $clones);
|
204 |
+
|
205 |
// Do Actions
|
206 |
+
$layouts.each(function() {
|
207 |
+
|
208 |
var $layout = $(this);
|
209 |
var $name = $layout.data('layout');
|
210 |
+
|
211 |
acf.doAction('acfe/flexible/layouts', $layout, flexible);
|
212 |
acf.doAction('acfe/flexible/layout/name=' + $name, $layout, flexible);
|
213 |
+
|
214 |
});
|
215 |
+
|
216 |
// ACFE: 1 layout available - OneClick
|
217 |
+
if ($clones.length === 1) {
|
218 |
+
|
219 |
// Remove native ACF Tooltip action
|
220 |
+
flexible.removeEvents({
|
221 |
+
'click [data-name="add-layout"]': 'onClickAdd'
|
222 |
+
});
|
223 |
+
|
224 |
// Add ACF Extended Modal action
|
225 |
+
flexible.addEvents({
|
226 |
+
'click [data-name="add-layout"]': 'acfeOneClick'
|
227 |
+
});
|
228 |
+
|
229 |
}
|
230 |
+
|
231 |
+
flexible.addEvents({
|
232 |
+
'click .acfe-fc-placeholder': 'onClickCollapse'
|
233 |
+
});
|
234 |
+
|
235 |
+
flexible.addEvents({
|
236 |
+
'click .acfe-flexible-opened-actions > a': 'onClickCollapse'
|
237 |
+
});
|
238 |
+
|
239 |
// Flexible: Ajax
|
240 |
+
if (flexible.has('acfeFlexibleAjax')) {
|
241 |
+
|
242 |
+
flexible.add = function(args) {
|
243 |
+
|
244 |
// Get Flexible
|
245 |
var flexible = this;
|
246 |
+
|
247 |
// defaults
|
248 |
args = acf.parseArgs(args, {
|
249 |
layout: '',
|
250 |
before: false
|
251 |
});
|
252 |
+
|
253 |
// validate
|
254 |
+
if (!this.allowAdd()) {
|
255 |
return false;
|
256 |
}
|
257 |
|
259 |
$.ajax({
|
260 |
url: acf.get('ajaxurl'),
|
261 |
data: acf.prepareForAjax({
|
262 |
+
action: 'acfe/flexible/models',
|
263 |
+
field_key: this.get('key'),
|
264 |
+
layout: args.layout,
|
265 |
}),
|
266 |
dataType: 'html',
|
267 |
type: 'post',
|
268 |
+
beforeSend: function() {
|
269 |
$('body').addClass('-loading');
|
270 |
},
|
271 |
+
success: function(html) {
|
272 |
+
if (html) {
|
273 |
+
|
274 |
var $layout = $(html);
|
275 |
var uniqid = acf.uniqid();
|
276 |
+
|
277 |
var search = 'acf[' + flexible.get('key') + '][acfcloneindex]';
|
278 |
var replace = flexible.$control().find('> input[type=hidden]').attr('name') + '[' + uniqid + ']';
|
279 |
+
|
280 |
// add row
|
281 |
var $el = acf.duplicate({
|
282 |
target: $layout,
|
283 |
search: search,
|
284 |
replace: replace,
|
285 |
+
append: flexible.proxy(function($el, $el2) {
|
286 |
+
|
287 |
// append
|
288 |
+
if (args.before) {
|
289 |
+
args.before.before($el2);
|
290 |
} else {
|
291 |
+
flexible.$layoutsWrap().append($el2);
|
292 |
}
|
293 |
+
|
294 |
// enable
|
295 |
+
acf.enable($el2, flexible.cid);
|
296 |
+
|
297 |
// render
|
298 |
flexible.render();
|
299 |
})
|
300 |
});
|
301 |
+
|
302 |
// Fix data-id
|
303 |
$el.attr('data-id', uniqid);
|
304 |
+
|
305 |
// trigger change for validation errors
|
306 |
flexible.$input().trigger('change');
|
307 |
+
|
308 |
// return
|
309 |
return $el;
|
310 |
+
|
311 |
}
|
312 |
},
|
313 |
+
'complete': function() {
|
314 |
$('body').removeClass('-loading');
|
315 |
}
|
316 |
});
|
317 |
+
|
318 |
};
|
319 |
+
|
320 |
}
|
321 |
|
322 |
});
|
323 |
+
|
324 |
+
acf.addAction('acfe/flexible/layouts', function($layout, flexible) {
|
325 |
+
|
326 |
// Layout Closed
|
327 |
+
if (flexible.isLayoutClosed($layout)) {
|
328 |
+
|
329 |
// Placeholder
|
330 |
$layout.find('> .acfe-fc-placeholder').removeClass('acf-hidden');
|
331 |
|
332 |
+
if (flexible.has('acfeFlexibleOpen')) {
|
333 |
|
334 |
acfe.enableFilter('acfeForceOpen');
|
335 |
|
338 |
acfe.disableFilter('acfeForceOpen');
|
339 |
|
340 |
}
|
341 |
+
|
342 |
}
|
343 |
+
|
344 |
});
|
345 |
+
|
346 |
+
acf.addAction('show', function($layout, type) {
|
347 |
+
|
348 |
+
if (type !== 'collapse' || !$layout.is('.layout'))
|
349 |
return;
|
350 |
+
|
351 |
var flexible = acf.getInstance($layout.closest('.acf-field-flexible-content'));
|
352 |
+
|
353 |
// Hide Placeholder
|
354 |
+
if (!flexible.has('acfeFlexibleModalEdition')) {
|
355 |
+
|
356 |
// Placeholder
|
357 |
$layout.find('> .acfe-fc-placeholder').addClass('acf-hidden');
|
358 |
+
|
359 |
}
|
360 |
+
|
361 |
});
|
362 |
+
|
363 |
+
acf.addAction('hide', function($layout, type) {
|
364 |
+
|
365 |
+
if (type !== 'collapse' || !$layout.is('.layout') || $layout.is('.acf-clone'))
|
366 |
return;
|
367 |
+
|
368 |
// Get Flexible
|
369 |
var flexible = acf.getInstance($layout.closest('.acf-field-flexible-content'));
|
370 |
+
|
371 |
// Remove Ajax Title
|
372 |
+
if (flexible.has('acfeFlexibleRemoveAjaxTitle')) {
|
373 |
|
374 |
+
flexible.renderLayout = function($layout) {};
|
375 |
|
376 |
}
|
377 |
+
|
378 |
// Preview Ajax
|
379 |
flexible.acfeLayoutInit($layout);
|
380 |
+
|
381 |
});
|
382 |
+
|
383 |
+
acf.addAction('append', function($el) {
|
384 |
+
|
385 |
// Bail early if layout is not layout
|
386 |
+
if (!$el.is('.layout'))
|
387 |
return;
|
388 |
+
|
389 |
// Get Flexible
|
390 |
var flexible = acf.getInstance($el.closest('.acf-field-flexible-content'));
|
391 |
+
|
392 |
// Open Layout
|
393 |
+
if (!$el.is('.acfe-layout-duplicated')) {
|
394 |
+
|
395 |
// Modal Edition: Open
|
396 |
+
if (flexible.has('acfeFlexibleModalEdition')) {
|
397 |
+
|
398 |
$el.find('> [data-action="acfe-flexible-modal-edit"]:first').trigger('click');
|
399 |
+
|
400 |
}
|
401 |
+
|
402 |
// Normal Edition: Open
|
403 |
+
else {
|
404 |
+
|
405 |
flexible.openLayout($el);
|
406 |
+
|
407 |
}
|
408 |
+
|
409 |
}
|
410 |
+
|
411 |
flexible.acfeLayoutInit($el);
|
412 |
+
|
413 |
var $modal = flexible.$el.closest('.acfe-modal.-open');
|
414 |
+
|
415 |
+
if ($modal.length) {
|
416 |
+
|
417 |
// Scroll to new layout
|
418 |
$modal.find('> .acfe-modal-wrapper > .acfe-modal-content').animate({
|
419 |
scrollTop: parseInt($el.offset().top) - 200
|
420 |
}, 200);
|
421 |
+
|
422 |
+
} else {
|
423 |
|
424 |
var acfVersion = parseFloat(acf.get('acf_version'));
|
425 |
|
426 |
+
if (acfVersion < 5.9) {
|
427 |
|
428 |
// Scroll to new layout
|
429 |
$('html, body').animate({
|
430 |
scrollTop: parseInt($el.offset().top) - 200
|
431 |
}, 200);
|
432 |
|
433 |
+
} else {
|
434 |
|
435 |
// Avoid native ACF duplicate
|
436 |
+
if (!$el.hasClass('-focused')) {
|
437 |
|
438 |
// Scroll to new layout
|
439 |
$('html, body').animate({
|
445 |
}
|
446 |
|
447 |
}
|
448 |
+
|
449 |
});
|
450 |
+
|
451 |
/*
|
452 |
* Field Error
|
453 |
*/
|
454 |
+
acf.addAction('invalid_field', function(field) {
|
455 |
+
|
456 |
field.$el.parents('.layout').addClass('acfe-flexible-modal-edit-error');
|
457 |
+
|
458 |
});
|
459 |
+
|
460 |
/*
|
461 |
* Field Valid
|
462 |
*/
|
463 |
+
acf.addAction('valid_field', function(field) {
|
464 |
+
|
465 |
+
field.$el.parents('.layout').each(function() {
|
466 |
+
|
467 |
var $layout = $(this);
|
468 |
+
|
469 |
+
if (!$layout.find('.acf-error').length)
|
470 |
$layout.removeClass('acfe-flexible-modal-edit-error');
|
471 |
+
|
472 |
});
|
473 |
+
|
474 |
});
|
475 |
+
|
476 |
})(jQuery);
|
477 |
+
(function($) {
|
478 |
+
|
479 |
+
if (typeof acf === 'undefined')
|
480 |
return;
|
481 |
+
|
482 |
/*
|
483 |
* Init
|
484 |
*/
|
489 |
* Actions
|
490 |
*/
|
491 |
model.events['click .acf-fc-layout-handle'] = 'acfeEditLayoutTitleToggleHandle';
|
492 |
+
model.acfeEditLayoutTitleToggleHandle = function(e, $el) {
|
493 |
+
|
494 |
var flexible = this;
|
495 |
+
|
496 |
// Title Edition
|
497 |
+
if (!flexible.has('acfeFlexibleTitleEdition'))
|
498 |
return;
|
499 |
+
|
500 |
// Vars
|
501 |
var $layout = $el.closest('.layout');
|
502 |
+
|
503 |
+
if ($layout.hasClass('acfe-flexible-title-edition')) {
|
504 |
+
|
505 |
$layout.find('> .acf-fc-layout-handle > .acfe-layout-title > input.acfe-flexible-control-title').trigger('blur');
|
506 |
+
|
507 |
}
|
508 |
+
|
509 |
}
|
510 |
+
|
511 |
model.events['click .acfe-layout-title-text'] = 'acfeEditLayoutTitle';
|
512 |
+
model.acfeEditLayoutTitle = function(e, $el) {
|
513 |
+
|
514 |
// Get Flexible
|
515 |
var flexible = this;
|
516 |
+
|
517 |
// Title Edition
|
518 |
+
if (!flexible.has('acfeFlexibleTitleEdition'))
|
519 |
return;
|
520 |
+
|
521 |
// Stop propagation
|
522 |
e.stopPropagation();
|
523 |
+
|
524 |
// Toggle
|
525 |
flexible.acfeEditLayoutTitleToggle(e, $el);
|
526 |
+
|
527 |
}
|
528 |
+
|
529 |
model.events['blur input.acfe-flexible-control-title'] = 'acfeEditLayoutTitleToggle';
|
530 |
+
model.acfeEditLayoutTitleToggle = function(e, $el) {
|
531 |
+
|
532 |
var flexible = this;
|
533 |
+
|
534 |
// Vars
|
535 |
var $layout = $el.closest('.layout');
|
536 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
537 |
var $title = $handle.find('.acfe-layout-title');
|
538 |
+
|
539 |
+
if ($layout.hasClass('acfe-flexible-title-edition')) {
|
540 |
+
|
541 |
var $input = $title.find('> input[data-acfe-flexible-control-title-input]');
|
542 |
+
|
543 |
+
if ($input.val() === '')
|
544 |
$input.val($input.attr('placeholder')).trigger('input');
|
545 |
+
|
546 |
$layout.removeClass('acfe-flexible-title-edition');
|
547 |
+
|
548 |
$input.insertAfter($handle);
|
549 |
+
|
550 |
+
} else {
|
551 |
+
|
|
|
|
|
552 |
var $input = $layout.find('> input[data-acfe-flexible-control-title-input]');
|
553 |
+
|
554 |
var $input = $input.appendTo($title);
|
555 |
+
|
556 |
$layout.addClass('acfe-flexible-title-edition');
|
557 |
$input.focus().attr('size', $input.val().length);
|
558 |
+
|
559 |
}
|
560 |
+
|
561 |
}
|
562 |
+
|
563 |
// Layout: Edit Title
|
564 |
model.events['click input.acfe-flexible-control-title'] = 'acfeEditLayoutTitlePropagation';
|
565 |
+
model.acfeEditLayoutTitlePropagation = function(e, $el) {
|
566 |
+
|
567 |
e.stopPropagation();
|
568 |
+
|
569 |
}
|
570 |
+
|
571 |
// Layout: Edit Title Input
|
572 |
model.events['input [data-acfe-flexible-control-title-input]'] = 'acfeEditLayoutTitleInput';
|
573 |
+
model.acfeEditLayoutTitleInput = function(e, $el) {
|
574 |
+
|
575 |
// Vars
|
576 |
var $layout = $el.closest('.layout');
|
577 |
var $title = $layout.find('> .acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text');
|
578 |
+
|
579 |
var val = $el.val();
|
580 |
+
|
581 |
$el.attr('size', val.length);
|
582 |
+
|
583 |
$title.html(val);
|
584 |
+
|
585 |
}
|
586 |
+
|
587 |
// Layout: Edit Title Input Enter
|
588 |
model.events['keypress [data-acfe-flexible-control-title-input]'] = 'acfeEditLayoutTitleInputEnter';
|
589 |
+
model.acfeEditLayoutTitleInputEnter = function(e, $el) {
|
590 |
+
|
591 |
// Enter Key
|
592 |
+
if (e.keyCode !== 13)
|
593 |
return;
|
594 |
+
|
595 |
e.preventDefault();
|
596 |
$el.blur();
|
597 |
+
|
598 |
}
|
599 |
+
|
600 |
// Layout: Settings
|
601 |
model.events['click [data-acfe-flexible-settings]'] = 'acfeLayoutSettings';
|
602 |
+
model.acfeLayoutSettings = function(e, $el) {
|
603 |
+
|
604 |
// Get Flexible
|
605 |
var flexible = this;
|
606 |
+
|
607 |
// Vars
|
608 |
var $layout = $el.closest('.layout');
|
609 |
+
|
610 |
// Modal data
|
611 |
var $modal = $layout.find('> .acfe-modal.-settings');
|
612 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
613 |
+
|
614 |
var $layout_order = $handle.find('> .acf-fc-layout-order').outerHTML();
|
615 |
var $layout_title = $handle.find('.acfe-layout-title-text').text();
|
616 |
+
|
617 |
// Open modal
|
618 |
new acfe.Popup($modal, {
|
619 |
title: $layout_order + ' ' + $layout_title,
|
620 |
footer: acf.__('Close'),
|
621 |
+
onClose: function() {
|
622 |
|
623 |
+
if (!flexible.has('acfeFlexiblePreview'))
|
624 |
return;
|
625 |
|
626 |
flexible.closeLayout($layout);
|
627 |
|
628 |
}
|
629 |
});
|
630 |
+
|
631 |
}
|
632 |
|
633 |
/*
|
634 |
* Layout: Toggle Action
|
635 |
*/
|
636 |
model.events['click [data-acfe-flexible-control-toggle]'] = 'acfeLayoutToggle';
|
637 |
+
model.acfeLayoutToggle = function(e, $el) {
|
638 |
|
639 |
// Get Flexible
|
640 |
var flexible = this;
|
644 |
|
645 |
var $field = $layout.find('> .acfe-flexible-layout-toggle');
|
646 |
|
647 |
+
if (!$field.length)
|
648 |
return;
|
649 |
|
650 |
+
if ($field.val() === '1') {
|
651 |
|
652 |
$layout.removeClass('acfe-flexible-layout-hidden');
|
653 |
$field.val('');
|
654 |
|
655 |
+
} else {
|
656 |
|
657 |
$layout.addClass('acfe-flexible-layout-hidden');
|
658 |
$field.val('1');
|
664 |
/*
|
665 |
* Layout: Toggle Spawn
|
666 |
*/
|
667 |
+
acf.addAction('acfe/flexible/layouts', function($layout, flexible) {
|
668 |
|
669 |
+
if (!flexible.has('acfeFlexibleToggle'))
|
670 |
return;
|
671 |
|
672 |
// Layout Closed
|
673 |
var $field = $layout.find('> .acfe-flexible-layout-toggle');
|
674 |
|
675 |
+
if (!$field.length)
|
676 |
return;
|
677 |
|
678 |
+
if ($field.val() === '1') {
|
679 |
|
680 |
$layout.addClass('acfe-flexible-layout-hidden');
|
681 |
|
682 |
+
} else {
|
683 |
|
684 |
$layout.removeClass('acfe-flexible-layout-hidden');
|
685 |
|
686 |
}
|
687 |
|
688 |
});
|
689 |
+
|
690 |
// Layout: Clone
|
691 |
model.events['click [data-acfe-flexible-control-clone]'] = 'acfeCloneLayout';
|
692 |
+
model.acfeCloneLayout = function(e, $el) {
|
693 |
+
|
694 |
// Get Flexible
|
695 |
var flexible = this;
|
696 |
+
|
697 |
// Vars
|
698 |
var $layout = $el.closest('.layout');
|
699 |
var layout_name = $layout.data('layout');
|
700 |
+
|
701 |
// Popup min/max
|
702 |
var $popup = $(flexible.$popup().html());
|
703 |
var $layouts = flexible.$layouts();
|
704 |
|
705 |
+
var countLayouts = function(name) {
|
706 |
+
return $layouts.filter(function() {
|
707 |
return $(this).data('layout') === name;
|
708 |
}).length;
|
709 |
};
|
710 |
+
|
711 |
+
// vars
|
712 |
var $a = $popup.find('[data-layout="' + layout_name + '"]');
|
713 |
var min = $a.data('min') || 0;
|
714 |
var max = $a.data('max') || 0;
|
715 |
var count = countLayouts(layout_name);
|
716 |
+
|
717 |
// max
|
718 |
+
if (max && count >= max) {
|
719 |
+
|
720 |
$el.addClass('disabled');
|
721 |
return false;
|
722 |
+
|
723 |
+
} else {
|
724 |
+
|
725 |
$el.removeClass('disabled');
|
726 |
+
|
727 |
}
|
728 |
+
|
729 |
// Fix inputs
|
730 |
flexible.acfeFixInputs($layout);
|
731 |
+
|
732 |
var $_layout = $layout.clone();
|
733 |
+
|
734 |
// Clean Layout
|
735 |
flexible.acfeCleanLayouts($_layout);
|
736 |
+
|
737 |
var parent = $el.closest('.acf-flexible-content').find('> input[type=hidden]').attr('name');
|
738 |
+
|
739 |
// Clone
|
740 |
var $layout_added = flexible.acfeDuplicate({
|
741 |
layout: $_layout,
|
742 |
before: $layout,
|
743 |
parent: parent
|
744 |
});
|
745 |
+
|
746 |
}
|
747 |
+
|
748 |
// Layout: Copy
|
749 |
model.events['click [data-acfe-flexible-control-copy]'] = 'acfeCopyLayout';
|
750 |
+
model.acfeCopyLayout = function(e, $el) {
|
751 |
+
|
752 |
// Get Flexible
|
753 |
var flexible = this;
|
754 |
+
|
755 |
// Vars
|
756 |
var $layout = $el.closest('.layout').clone();
|
757 |
var source = flexible.$control().find('> input[type=hidden]').attr('name');
|
758 |
+
|
759 |
// Fix inputs
|
760 |
flexible.acfeFixInputs($layout);
|
761 |
+
|
762 |
// Clean layout
|
763 |
flexible.acfeCleanLayouts($layout);
|
764 |
+
|
765 |
// Get layout data
|
766 |
var data = JSON.stringify({
|
767 |
source: source,
|
768 |
layouts: $layout[0].outerHTML
|
769 |
});
|
770 |
+
|
771 |
// Append Temp Input
|
772 |
var $input = $('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo($('body'));
|
773 |
$input.attr('value', data).select();
|
774 |
|
775 |
// Command: Copy
|
776 |
+
if (document.execCommand('copy'))
|
777 |
alert('Layout has been transferred to your clipboard');
|
778 |
+
|
779 |
// Prompt
|
780 |
else
|
781 |
prompt('Copy the following layout data to your clipboard', data);
|
782 |
+
|
783 |
// Remove the temp input
|
784 |
$input.remove();
|
785 |
+
|
786 |
}
|
787 |
+
|
788 |
// Flexible: Copy Layouts
|
789 |
+
model.acfeCopyLayouts = function() {
|
790 |
+
|
791 |
// Get Flexible
|
792 |
var flexible = this;
|
793 |
+
|
794 |
// Get layouts
|
795 |
var $layouts = flexible.$layoutsWrap().clone();
|
796 |
var source = flexible.$control().find('> input[type=hidden]').attr('name');
|
797 |
+
|
798 |
// Fix inputs
|
799 |
flexible.acfeFixInputs($layouts);
|
800 |
+
|
801 |
// Clean layout
|
802 |
flexible.acfeCleanLayouts($layouts);
|
803 |
+
|
804 |
// Get layouts data
|
805 |
var data = JSON.stringify({
|
806 |
source: source,
|
807 |
layouts: $layouts.html()
|
808 |
});
|
809 |
+
|
810 |
// Append Temp Input
|
811 |
var $input = $('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo(flexible.$el);
|
812 |
$input.attr('value', data).select();
|
813 |
+
|
814 |
// Command: Copy
|
815 |
+
if (document.execCommand('copy'))
|
816 |
alert('Layouts have been transferred to your clipboard');
|
817 |
+
|
818 |
// Prompt
|
819 |
else
|
820 |
prompt('Copy the following layouts data to your clipboard', data);
|
821 |
+
|
822 |
$input.remove();
|
823 |
+
|
824 |
}
|
825 |
+
|
826 |
// Flexible: Paste Layouts
|
827 |
+
model.acfePasteLayouts = function() {
|
828 |
+
|
829 |
// Get Flexible
|
830 |
var flexible = this;
|
831 |
+
|
832 |
var paste = prompt('Paste layouts data in the following field');
|
833 |
+
|
834 |
// No input
|
835 |
+
if (paste == null || paste === '')
|
836 |
return;
|
837 |
+
|
838 |
+
try {
|
839 |
+
|
840 |
// Paste HTML
|
841 |
var data = JSON.parse(paste);
|
842 |
var source = data.source;
|
843 |
var $html = $(data.layouts);
|
844 |
+
|
845 |
// Parsed layouts
|
846 |
var $html_layouts = $html.closest('[data-layout]');
|
847 |
+
|
848 |
+
if (!$html_layouts.length)
|
849 |
return alert('No layouts data available');
|
850 |
+
|
851 |
// Popup min/max
|
852 |
var $popup = $(flexible.$popup().html());
|
853 |
var $layouts = flexible.$layouts();
|
854 |
+
|
855 |
+
var countLayouts = function(name) {
|
856 |
+
return $layouts.filter(function() {
|
857 |
return $(this).data('layout') === name;
|
858 |
}).length;
|
859 |
};
|
860 |
+
|
861 |
// init
|
862 |
var validated_layouts = [];
|
863 |
+
|
864 |
// Each first level layouts
|
865 |
+
$html_layouts.each(function() {
|
866 |
+
|
867 |
var $this = $(this);
|
868 |
var layout_name = $this.data('layout');
|
869 |
+
|
870 |
// vars
|
871 |
var $a = $popup.find('[data-layout="' + layout_name + '"]');
|
872 |
var min = $a.data('min') || 0;
|
873 |
var max = $a.data('max') || 0;
|
874 |
var count = countLayouts(layout_name);
|
875 |
+
|
876 |
// max
|
877 |
+
if (max && count >= max)
|
878 |
return;
|
879 |
+
|
880 |
// Validate layout against available layouts
|
881 |
var get_clone_layout = flexible.$clone($this.attr('data-layout'));
|
882 |
+
|
883 |
// Layout is invalid
|
884 |
+
if (!get_clone_layout.length)
|
885 |
return;
|
886 |
+
|
887 |
// Add validated layout
|
888 |
validated_layouts.push($this);
|
889 |
+
|
890 |
});
|
891 |
+
|
892 |
// Nothing to add
|
893 |
+
if (!validated_layouts.length)
|
894 |
return alert('No layouts could be pasted');
|
895 |
+
|
896 |
// Add layouts
|
897 |
+
$.each(validated_layouts, function() {
|
898 |
+
|
899 |
var $layout = $(this);
|
900 |
var search = source + '[' + $layout.attr('data-id') + ']';
|
901 |
var target = flexible.$control().find('> input[type=hidden]').attr('name');
|
902 |
+
|
903 |
flexible.acfeDuplicate({
|
904 |
layout: $layout,
|
905 |
before: false,
|
906 |
search: search,
|
907 |
parent: target
|
908 |
});
|
909 |
+
|
910 |
});
|
911 |
+
|
912 |
+
} catch (e) {
|
913 |
+
|
914 |
console.log(e);
|
915 |
alert('Invalid data');
|
916 |
+
|
917 |
}
|
918 |
+
|
919 |
}
|
920 |
+
|
921 |
// Flexible: Dropdown
|
922 |
model.events['click [data-name="acfe-flexible-control-button"]'] = 'acfeControl';
|
923 |
+
model.acfeControl = function(e, $el) {
|
924 |
+
|
925 |
// Get Flexible
|
926 |
var flexible = this;
|
927 |
+
|
928 |
// Vars
|
929 |
var $dropdown = $el.next('.tmpl-acfe-flexible-control-popup').html();
|
930 |
+
|
931 |
// Init Popup
|
932 |
var Popup = acf.models.TooltipConfirm.extend({
|
933 |
+
render: function() {
|
934 |
this.html(this.get('text'));
|
935 |
this.$el.addClass('acf-fc-popup');
|
936 |
}
|
937 |
});
|
938 |
+
|
939 |
// New Popup
|
940 |
var popup = new Popup({
|
941 |
target: $el,
|
942 |
targetConfirm: false,
|
943 |
text: $dropdown,
|
944 |
context: flexible,
|
945 |
+
confirm: function(e, $el) {
|
946 |
+
|
947 |
+
if ($el.attr('data-acfe-flexible-control-action') === 'paste')
|
948 |
flexible.acfePasteLayouts();
|
949 |
+
|
950 |
+
else if ($el.attr('data-acfe-flexible-control-action') === 'copy')
|
951 |
flexible.acfeCopyLayouts();
|
952 |
+
|
953 |
}
|
954 |
});
|
955 |
+
|
956 |
popup.on('click', 'a', 'onConfirm');
|
957 |
+
|
958 |
}
|
959 |
+
|
960 |
// Flexible: Duplicate
|
961 |
+
model.acfeDuplicate = function(args) {
|
962 |
+
|
963 |
// Arguments
|
964 |
args = acf.parseArgs(args, {
|
965 |
layout: '',
|
968 |
search: '',
|
969 |
replace: '',
|
970 |
});
|
971 |
+
|
972 |
// Validate
|
973 |
+
if (!this.allowAdd())
|
974 |
return false;
|
975 |
+
|
976 |
var uniqid = acf.uniqid();
|
977 |
+
|
978 |
+
if (args.parent) {
|
979 |
+
|
980 |
+
if (!args.search) {
|
981 |
+
|
982 |
args.search = args.parent + '[' + args.layout.attr('data-id') + ']';
|
983 |
+
|
984 |
}
|
985 |
+
|
986 |
args.replace = args.parent + '[' + uniqid + ']';
|
987 |
+
|
988 |
}
|
989 |
|
990 |
var duplicate_args = {
|
991 |
target: args.layout,
|
992 |
search: args.search,
|
993 |
replace: args.replace,
|
994 |
+
append: this.proxy(function($el, $el2) {
|
995 |
|
996 |
// Add class to duplicated layout
|
997 |
$el2.addClass('acfe-layout-duplicated');
|
1000 |
$el2.attr('data-id', uniqid);
|
1001 |
|
1002 |
// append before
|
1003 |
+
if (args.before) {
|
1004 |
|
1005 |
// Fix clone: Use after() instead of native before()
|
1006 |
args.before.after($el2);
|
1008 |
}
|
1009 |
|
1010 |
// append end
|
1011 |
+
else {
|
1012 |
|
1013 |
this.$layoutsWrap().append($el2);
|
1014 |
|
1025 |
|
1026 |
var acfVersion = parseFloat(acf.get('acf_version'));
|
1027 |
|
1028 |
+
if (acfVersion < 5.9) {
|
1029 |
|
1030 |
// Add row
|
1031 |
var $el = acf.duplicate(duplicate_args);
|
1032 |
|
1033 |
+
// Hotfix for ACF Pro 5.9
|
1034 |
+
} else {
|
1035 |
|
1036 |
// Add row
|
1037 |
var $el = model.acfeNewAcfDuplicate(duplicate_args);
|
1038 |
|
1039 |
}
|
1040 |
+
|
1041 |
// trigger change for validation errors
|
1042 |
this.$input().trigger('change');
|
1043 |
|
1047 |
parent: $el,
|
1048 |
});
|
1049 |
|
1050 |
+
if (tabs.length) {
|
1051 |
|
1052 |
+
$.each(tabs, function() {
|
1053 |
|
1054 |
+
if (this.$el.hasClass('acf-hidden')) {
|
1055 |
|
1056 |
this.tab.$el.addClass('acf-hidden');
|
1057 |
|
1061 |
|
1062 |
}
|
1063 |
|
1064 |
+
|
1065 |
// return
|
1066 |
return $el;
|
1067 |
+
|
1068 |
}
|
1069 |
|
1070 |
/*
|
1073 |
* doAction('duplicate) has been commented out
|
1074 |
* This fix an issue with the WYSIWYG editor field during copy/paste since ACF 5.9
|
1075 |
*/
|
1076 |
+
model.acfeNewAcfDuplicate = function(args) {
|
1077 |
|
1078 |
// allow jQuery
|
1079 |
+
if (args instanceof jQuery) {
|
1080 |
args = {
|
1081 |
target: args
|
1082 |
};
|
1088 |
search: '',
|
1089 |
replace: '',
|
1090 |
rename: true,
|
1091 |
+
before: function($el) {},
|
1092 |
+
after: function($el, $el2) {},
|
1093 |
+
append: function($el, $el2) {
|
1094 |
+
$el.after($el2);
|
1095 |
}
|
1096 |
});
|
1097 |
|
1108 |
// before
|
1109 |
// - allow acf to modify DOM
|
1110 |
// - fixes bug where select field option is not selected
|
1111 |
+
args.before($el);
|
1112 |
acf.doAction('before_duplicate', $el);
|
1113 |
|
1114 |
// clone
|
1115 |
var $el2 = $el.clone();
|
1116 |
|
1117 |
// rename
|
1118 |
+
if (args.rename) {
|
1119 |
acf.rename({
|
1120 |
+
target: $el2,
|
1121 |
+
search: args.search,
|
1122 |
+
replace: args.replace,
|
1123 |
+
replacer: (typeof args.rename === 'function' ? args.rename : null)
|
1124 |
});
|
1125 |
}
|
1126 |
|
1130 |
|
1131 |
// after
|
1132 |
// - allow acf to modify DOM
|
1133 |
+
args.after($el, $el2);
|
1134 |
+
acf.doAction('after_duplicate', $el, $el2);
|
1135 |
|
1136 |
// append
|
1137 |
+
args.append($el, $el2);
|
1138 |
|
1139 |
/**
|
1140 |
* Fires after an element has been duplicated and appended to the DOM.
|
1153 |
// return
|
1154 |
return $el2;
|
1155 |
};
|
1156 |
+
|
1157 |
// Flexible: Fix Inputs
|
1158 |
+
model.acfeFixInputs = function($layout) {
|
1159 |
+
|
1160 |
+
$layout.find('input').each(function() {
|
1161 |
+
|
1162 |
$(this).attr('value', this.value);
|
1163 |
+
|
1164 |
});
|
1165 |
+
|
1166 |
+
$layout.find('textarea').each(function() {
|
1167 |
+
|
1168 |
$(this).html(this.value);
|
1169 |
+
|
1170 |
});
|
1171 |
+
|
1172 |
$layout.find('input:radio,input:checkbox').each(function() {
|
1173 |
+
|
1174 |
+
if (this.checked)
|
1175 |
$(this).attr('checked', 'checked');
|
1176 |
+
|
1177 |
else
|
1178 |
$(this).attr('checked', false);
|
1179 |
+
|
1180 |
});
|
1181 |
+
|
1182 |
+
$layout.find('option').each(function() {
|
1183 |
+
|
1184 |
+
if (this.selected)
|
1185 |
$(this).attr('selected', 'selected');
|
1186 |
+
|
1187 |
else
|
1188 |
$(this).attr('selected', false);
|
1189 |
+
|
1190 |
});
|
1191 |
+
|
1192 |
}
|
1193 |
+
|
1194 |
// Flexible: Clean Layout
|
1195 |
+
model.acfeCleanLayouts = function($layout) {
|
1196 |
+
|
1197 |
// Clean WP Editor
|
1198 |
+
$layout.find('.acf-editor-wrap').each(function() {
|
1199 |
+
|
1200 |
var $input = $(this);
|
1201 |
+
|
1202 |
$input.find('.wp-editor-container div').remove();
|
1203 |
$input.find('.wp-editor-container textarea').css('display', '');
|
1204 |
+
|
1205 |
});
|
1206 |
+
|
1207 |
// Clean Date
|
1208 |
+
$layout.find('.acf-date-picker').each(function() {
|
1209 |
+
|
1210 |
var $input = $(this);
|
1211 |
+
|
1212 |
$input.find('input.input').removeClass('hasDatepicker').removeAttr('id');
|
1213 |
+
|
1214 |
});
|
1215 |
+
|
1216 |
// Clean Time
|
1217 |
+
$layout.find('.acf-time-picker').each(function() {
|
1218 |
+
|
1219 |
var $input = $(this);
|
1220 |
+
|
1221 |
$input.find('input.input').removeClass('hasDatepicker').removeAttr('id');
|
1222 |
+
|
1223 |
});
|
1224 |
+
|
1225 |
// Clean DateTime
|
1226 |
+
$layout.find('.acf-date-time-picker').each(function() {
|
1227 |
+
|
1228 |
var $input = $(this);
|
1229 |
+
|
1230 |
$input.find('input.input').removeClass('hasDatepicker').removeAttr('id');
|
1231 |
+
|
1232 |
});
|
1233 |
|
1234 |
// Clean Code Editor
|
1235 |
+
$layout.find('.acfe-field-code-editor').each(function() {
|
1236 |
|
1237 |
var $input = $(this);
|
1238 |
|
1239 |
$input.find('.CodeMirror').remove();
|
1240 |
|
1241 |
});
|
1242 |
+
|
1243 |
// Clean Color Picker
|
1244 |
+
$layout.find('.acf-color-picker').each(function() {
|
1245 |
+
|
1246 |
var $input = $(this);
|
1247 |
+
|
1248 |
var $color_picker = $input.find('> input');
|
1249 |
var $color_picker_proxy = $input.find('.wp-picker-container input.wp-color-picker').clone();
|
1250 |
+
|
1251 |
$color_picker.after($color_picker_proxy);
|
1252 |
+
|
1253 |
$input.find('.wp-picker-container').remove();
|
1254 |
+
|
1255 |
});
|
1256 |
+
|
1257 |
// Clean Post Object
|
1258 |
+
$layout.find('.acf-field-post-object').each(function() {
|
1259 |
+
|
1260 |
var $input = $(this);
|
1261 |
+
|
1262 |
$input.find('> .acf-input span').remove();
|
1263 |
+
|
1264 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden').removeClass();
|
1265 |
+
|
1266 |
});
|
1267 |
+
|
1268 |
// Clean Page Link
|
1269 |
+
$layout.find('.acf-field-page-link').each(function() {
|
1270 |
+
|
1271 |
var $input = $(this);
|
1272 |
+
|
1273 |
$input.find('> .acf-input span').remove();
|
1274 |
+
|
1275 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden').removeClass();
|
1276 |
+
|
1277 |
});
|
1278 |
+
|
1279 |
// Clean Select2
|
1280 |
+
$layout.find('.acf-field-select').each(function() {
|
1281 |
+
|
1282 |
var $input = $(this);
|
1283 |
+
|
1284 |
$input.find('> .acf-input span').remove();
|
1285 |
+
|
1286 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden').removeClass();
|
1287 |
+
|
1288 |
});
|
1289 |
+
|
1290 |
// Clean FontAwesome
|
1291 |
+
$layout.find('.acf-field-font-awesome').each(function() {
|
1292 |
+
|
1293 |
var $input = $(this);
|
1294 |
+
|
1295 |
$input.find('> .acf-input span').remove();
|
1296 |
+
|
1297 |
$input.find('> .acf-input select').removeAttr('tabindex aria-hidden');
|
1298 |
+
|
1299 |
});
|
1300 |
|
1301 |
|
1302 |
// Clean Tab
|
1303 |
+
$layout.find('.acf-tab-wrap').each(function() {
|
1304 |
+
|
1305 |
var $wrap = $(this);
|
1306 |
+
|
1307 |
var $content = $wrap.closest('.acf-fields');
|
1308 |
+
|
1309 |
var tabs = [];
|
1310 |
+
$.each($wrap.find('li a'), function() {
|
1311 |
+
|
1312 |
tabs.push($(this));
|
1313 |
+
|
1314 |
});
|
1315 |
+
|
1316 |
+
$content.find('> .acf-field-tab').each(function() {
|
1317 |
+
|
1318 |
$current_tab = $(this);
|
1319 |
+
|
1320 |
+
$.each(tabs, function() {
|
1321 |
+
|
1322 |
var $this = $(this);
|
1323 |
+
|
1324 |
+
if ($this.attr('data-key') !== $current_tab.attr('data-key'))
|
1325 |
return;
|
1326 |
+
|
1327 |
$current_tab.find('> .acf-input').append($this);
|
1328 |
+
|
1329 |
});
|
1330 |
+
|
1331 |
});
|
1332 |
+
|
1333 |
$wrap.remove();
|
1334 |
+
|
1335 |
});
|
1336 |
+
|
1337 |
// Clean Accordion
|
1338 |
+
$layout.find('.acf-field-accordion').each(function() {
|
1339 |
+
|
1340 |
var $input = $(this);
|
1341 |
+
|
1342 |
$input.find('> .acf-accordion-title > .acf-accordion-icon').remove();
|
1343 |
+
|
1344 |
// Append virtual endpoint after each accordion
|
1345 |
$input.after('<div class="acf-field acf-field-accordion" data-type="accordion"><div class="acf-input"><div class="acf-fields" data-endpoint="1"></div></div></div>');
|
1346 |
+
|
1347 |
});
|
1348 |
+
|
1349 |
}
|
1350 |
+
|
1351 |
/*
|
1352 |
* Spawn
|
1353 |
*/
|
1354 |
+
acf.addAction('new_field/type=flexible_content', function(flexible) {
|
1355 |
+
|
1356 |
// ACFE: Lock
|
1357 |
+
if (flexible.has('acfeFlexibleLock')) {
|
1358 |
+
|
1359 |
+
flexible.removeEvents({
|
1360 |
+
'mouseover': 'onHover'
|
1361 |
+
});
|
1362 |
+
|
1363 |
}
|
1364 |
+
|
1365 |
});
|
1366 |
+
|
1367 |
})(jQuery);
|
1368 |
+
(function($) {
|
1369 |
+
|
1370 |
+
if (typeof acf === 'undefined')
|
1371 |
return;
|
1372 |
+
|
1373 |
/*
|
1374 |
* Init
|
1375 |
*/
|
1376 |
var flexible = acf.getFieldType('flexible_content');
|
1377 |
var model = flexible.prototype;
|
1378 |
+
|
1379 |
/*
|
1380 |
* Actions
|
1381 |
*/
|
1382 |
+
model.acfeModalSelect = function(e, $el) {
|
1383 |
+
|
1384 |
// Get Flexible
|
1385 |
var flexible = this;
|
1386 |
+
|
1387 |
// Validate
|
1388 |
+
if (!flexible.validateAdd())
|
1389 |
return false;
|
1390 |
+
|
1391 |
// Layout
|
1392 |
var $layout_source = null;
|
1393 |
+
|
1394 |
+
if ($el.hasClass('acf-icon'))
|
1395 |
$layout_source = $el.closest('.layout');
|
1396 |
+
|
1397 |
// Get Available Layouts
|
1398 |
var layouts = flexible.getPopupHTML();
|
1399 |
+
|
1400 |
// Init Categories
|
1401 |
var categories = {
|
1402 |
array: [],
|
1403 |
html: ''
|
1404 |
};
|
1405 |
|
1406 |
+
function SearchArray(element, array) {
|
1407 |
|
1408 |
var len = array.length,
|
1409 |
str = element.toString().toLowerCase();
|
1410 |
|
1411 |
+
for (var i = 0; i < len; i++) {
|
1412 |
+
if (array[i].toLowerCase() === str) {
|
1413 |
return i;
|
1414 |
}
|
1415 |
}
|
1417 |
return -1;
|
1418 |
|
1419 |
}
|
1420 |
+
|
1421 |
// Get Categories
|
1422 |
+
$(layouts).find('li a span[data-acfe-flexible-category]').each(function() {
|
1423 |
|
1424 |
var spanCats = $(this).data('acfe-flexible-category');
|
1425 |
|
1426 |
+
$.each(spanCats, function() {
|
1427 |
|
1428 |
+
if (SearchArray(this, categories.array) !== -1)
|
1429 |
return;
|
1430 |
|
1431 |
categories.array.push(this);
|
1432 |
|
1433 |
});
|
1434 |
+
|
1435 |
});
|
1436 |
+
|
1437 |
// Categories HTML
|
1438 |
+
if (categories.array.length) {
|
1439 |
+
|
1440 |
categories.array.sort();
|
1441 |
+
|
1442 |
categories.html += '<h2 class="acfe-flexible-categories nav-tab-wrapper">';
|
1443 |
+
|
1444 |
categories.html += '<a href="#" data-acfe-flexible-category="acfe-all" class="nav-tab nav-tab-active"><span class="dashicons dashicons-menu"></span></a>';
|
1445 |
+
|
1446 |
+
$(categories.array).each(function(k, category) {
|
1447 |
+
|
1448 |
categories.html += '<a href="#" data-acfe-flexible-category="' + category + '" class="nav-tab">' + category + '</a>';
|
1449 |
+
|
1450 |
});
|
1451 |
+
|
1452 |
categories.html += '</h2>';
|
1453 |
+
|
1454 |
}
|
1455 |
+
|
1456 |
// Modal Title
|
1457 |
var modalTitle = acf.__('Add Row');
|
1458 |
+
|
1459 |
+
if (flexible.has('acfeFlexibleModalTitle')) {
|
1460 |
modalTitle = flexible.get('acfeFlexibleModalTitle');
|
1461 |
}
|
1462 |
+
|
1463 |
// Create Modal
|
1464 |
+
var $modal = $('' +
|
1465 |
+
'<div class="acfe-modal acfe-modal-select-' + flexible.get('name') + ' acfe-modal-select-' + flexible.get('key') + '">' +
|
1466 |
+
|
1467 |
+
categories.html +
|
1468 |
+
'<div class="acfe-flex-container">' +
|
1469 |
+
layouts +
|
1470 |
+
'</div>' +
|
1471 |
+
|
1472 |
'</div>'
|
1473 |
+
|
1474 |
).appendTo('body');
|
1475 |
+
|
1476 |
// Open Modal
|
1477 |
new acfe.Popup($modal, {
|
1478 |
title: modalTitle,
|
1479 |
size: 'full',
|
1480 |
destroy: true
|
1481 |
});
|
1482 |
+
|
1483 |
// Modal: Columns
|
1484 |
+
if (flexible.has('acfeFlexibleModalCol')) {
|
1485 |
|
1486 |
$modal.find('.acfe-modal-content .acfe-flex-container').addClass('acfe-col-' + flexible.get('acfeFlexibleModalCol'));
|
1487 |
|
1488 |
}
|
1489 |
|
1490 |
// Modal: Columns
|
1491 |
+
if (flexible.has('acfeFlexibleThumbnails')) {
|
1492 |
|
1493 |
$modal.find('.acfe-modal-content .acfe-flex-container').addClass('acfe-flex-thumbnails');
|
1494 |
|
1498 |
$modal.find('li:first-of-type a').blur();
|
1499 |
|
1500 |
// Modal: Layouts Badges
|
1501 |
+
$modal.find('li a span.badge').each(function() {
|
1502 |
|
1503 |
$(this).addClass('acf-js-tooltip dashicons dashicons-info');
|
1504 |
|
1505 |
});
|
1506 |
|
1507 |
// Modal: Categories Click
|
1508 |
+
$modal.find('.acfe-flexible-categories a').click(function(e) {
|
1509 |
+
|
1510 |
e.preventDefault();
|
1511 |
+
|
1512 |
var $link = $(this);
|
1513 |
+
|
1514 |
$link.closest('.acfe-flexible-categories').find('a').removeClass('nav-tab-active');
|
1515 |
$link.addClass('nav-tab-active');
|
1516 |
+
|
1517 |
var selected_category = $link.data('acfe-flexible-category');
|
1518 |
+
|
1519 |
+
$modal.find('a[data-layout] span[data-acfe-flexible-category]').each(function() {
|
1520 |
+
|
1521 |
// Get span
|
1522 |
var $span = $(this);
|
1523 |
+
|
1524 |
// Show All
|
1525 |
$span.closest('li').show();
|
1526 |
+
|
1527 |
var category = $span.data('acfe-flexible-category');
|
1528 |
+
|
1529 |
// Specific category
|
1530 |
+
if (selected_category !== 'acfe-all') {
|
1531 |
+
|
1532 |
// Hide All
|
1533 |
$span.closest('li').hide();
|
1534 |
|
1535 |
+
$.each(category, function(i, c) {
|
1536 |
|
1537 |
+
if (selected_category.toLowerCase() === c.toLowerCase()) {
|
1538 |
|
1539 |
$span.closest('li').show();
|
1540 |
|
1543 |
}
|
1544 |
|
1545 |
});
|
1546 |
+
|
1547 |
}
|
1548 |
+
|
1549 |
});
|
1550 |
+
|
1551 |
});
|
1552 |
+
|
1553 |
// Modal: Click Add Layout
|
1554 |
+
$modal.on('click', 'a[data-layout]', function(e) {
|
1555 |
+
|
1556 |
e.preventDefault();
|
1557 |
+
|
1558 |
// Close modal
|
1559 |
acfe.closePopup();
|
1560 |
+
|
1561 |
// Add layout
|
1562 |
flexible.add({
|
1563 |
layout: $(this).data('layout'),
|
1564 |
before: $layout_source
|
1565 |
});
|
1566 |
+
|
1567 |
});
|
1568 |
+
|
1569 |
}
|
1570 |
+
|
1571 |
/*
|
1572 |
* Spawn
|
1573 |
*/
|
1574 |
+
acf.addAction('new_field/type=flexible_content', function(flexible) {
|
1575 |
+
|
1576 |
+
if (!flexible.has('acfeFlexibleModal'))
|
1577 |
return;
|
1578 |
+
|
1579 |
// Vars
|
1580 |
var $clones = flexible.$clones();
|
1581 |
+
|
1582 |
+
if ($clones.length <= 1)
|
1583 |
return;
|
1584 |
+
|
1585 |
// Remove native ACF Tooltip action
|
1586 |
+
flexible.removeEvents({
|
1587 |
+
'click [data-name="add-layout"]': 'onClickAdd'
|
1588 |
+
});
|
1589 |
+
|
1590 |
// Add ACF Extended Modal action
|
1591 |
+
flexible.addEvents({
|
1592 |
+
'click [data-name="add-layout"]': 'acfeModalSelect'
|
1593 |
+
});
|
1594 |
|
1595 |
});
|
1596 |
+
|
1597 |
})(jQuery);
|
1598 |
+
(function($) {
|
1599 |
+
|
1600 |
+
if (typeof acf === 'undefined')
|
1601 |
return;
|
1602 |
+
|
1603 |
/*
|
1604 |
* Init
|
1605 |
*/
|
1606 |
var flexible = acf.getFieldType('flexible_content');
|
1607 |
var model = flexible.prototype;
|
1608 |
+
|
1609 |
/*
|
1610 |
* Actions
|
1611 |
*/
|
1612 |
model.events['click [data-action="acfe-flexible-modal-edit"]'] = 'acfeModalEdit';
|
1613 |
+
model.acfeModalEdit = function(e, $el) {
|
1614 |
+
|
1615 |
var flexible = this;
|
1616 |
+
|
1617 |
// Layout
|
1618 |
var $layout = $el.closest('.layout');
|
1619 |
+
|
1620 |
// Modal data
|
1621 |
+
var $modal = $layout.find('> .acfe-modal.-fields').addClass('acfe-modal-edit-' + flexible.get('name') + ' acfe-modal-edit-' + flexible.get('key')).addClass('acfe-modal-edit-' + $layout.data('layout'));
|
1622 |
var $handle = $layout.find('> .acf-fc-layout-handle');
|
1623 |
+
|
1624 |
var $layout_order = $handle.find('> .acf-fc-layout-order').outerHTML();
|
1625 |
var $layout_title = $handle.find('.acfe-layout-title-text').text();
|
1626 |
+
|
1627 |
var close = false;
|
1628 |
+
if (flexible.has('acfeFlexibleCloseButton')) {
|
|
|
1629 |
close = acf.__('Close');
|
|
|
1630 |
}
|
1631 |
+
|
1632 |
// Open modal
|
1633 |
new acfe.Popup($modal, {
|
1634 |
title: $layout_order + ' ' + $layout_title,
|
1635 |
footer: close,
|
1636 |
+
onOpen: function() {
|
1637 |
|
1638 |
flexible.openLayout($layout);
|
1639 |
|
1640 |
},
|
1641 |
+
onClose: function() {
|
1642 |
|
1643 |
flexible.closeLayout($layout);
|
1644 |
|
1645 |
}
|
1646 |
});
|
1647 |
+
|
1648 |
};
|
1649 |
+
|
1650 |
/*
|
1651 |
* Spawn
|
1652 |
*/
|
1653 |
+
acf.addAction('new_field/type=flexible_content', function(flexible) {
|
1654 |
+
|
1655 |
+
if (flexible.has('acfeFlexibleModalEdition') && (flexible.has('acfeFlexiblePlaceholder') || flexible.has('acfeFlexiblePreview'))) {
|
1656 |
+
|
1657 |
// Remove Collapse Action
|
1658 |
+
flexible.removeEvents({
|
1659 |
+
'click [data-name="collapse-layout"]': 'onClickCollapse'
|
1660 |
+
});
|
1661 |
+
|
1662 |
// Remove placeholder Collapse Action
|
1663 |
+
flexible.removeEvents({
|
1664 |
+
'click .acfe-fc-placeholder': 'onClickCollapse'
|
1665 |
+
});
|
1666 |
+
|
1667 |
}
|
1668 |
+
|
1669 |
});
|
1670 |
+
|
1671 |
})(jQuery);
|
1672 |
/*
|
1673 |
* Field: reCaptcha Callback
|
1674 |
*/
|
1675 |
+
function acfe_recaptcha() {
|
1676 |
+
|
1677 |
+
(function($) {
|
1678 |
+
|
1679 |
+
if (typeof acf === 'undefined')
|
1680 |
return;
|
1681 |
|
1682 |
+
$.each(acf.getFields({
|
1683 |
+
type: 'acfe_recaptcha'
|
1684 |
+
}), function() {
|
1685 |
this.render();
|
1686 |
});
|
1687 |
+
|
1688 |
})(jQuery);
|
1689 |
+
|
1690 |
}
|
1691 |
|
1692 |
+
(function($) {
|
1693 |
+
|
1694 |
+
if (typeof acf === 'undefined')
|
1695 |
return;
|
1696 |
|
1697 |
/*
|
1702 |
type: 'acfe_recaptcha',
|
1703 |
|
1704 |
actions: {
|
1705 |
+
'validation_failure': 'validationFailure'
|
1706 |
},
|
1707 |
|
1708 |
+
$control: function() {
|
1709 |
return this.$('.acfe-field-recaptcha');
|
1710 |
},
|
1711 |
|
1712 |
+
$input: function() {
|
1713 |
return this.$('input[type="hidden"]');
|
1714 |
},
|
1715 |
|
1716 |
+
$selector: function() {
|
1717 |
return this.$control().find('> div');
|
1718 |
},
|
1719 |
|
1720 |
+
selector: function() {
|
1721 |
return this.$selector()[0];
|
1722 |
},
|
1723 |
|
1724 |
+
version: function() {
|
1725 |
return this.get('version');
|
1726 |
},
|
1727 |
|
1728 |
+
render: function() {
|
1729 |
|
1730 |
var field = this;
|
1731 |
|
1732 |
+
if (this.version() === 'v2') {
|
1733 |
|
1734 |
this.recaptcha = grecaptcha.render(field.selector(), {
|
1735 |
+
'sitekey': field.$control().data('site-key'),
|
1736 |
+
'theme': field.$control().data('theme'),
|
1737 |
+
'size': field.$control().data('size'),
|
1738 |
|
1739 |
|
1740 |
+
'callback': function(response) {
|
1741 |
|
1742 |
field.$input().val(response).change();
|
1743 |
field.$input().closest('.acf-input').find('> .acf-notice.-error').hide();
|
1744 |
|
1745 |
},
|
1746 |
|
1747 |
+
'error-callback': function() {
|
1748 |
|
1749 |
field.$input().val('error').change();
|
1750 |
|
1751 |
},
|
1752 |
|
1753 |
+
'expired-callback': function() {
|
1754 |
|
1755 |
field.$input().val('expired').change();
|
1756 |
|
1757 |
}
|
1758 |
});
|
1759 |
|
1760 |
+
} else if (this.version() === 'v3') {
|
|
|
|
|
1761 |
|
1762 |
+
grecaptcha.ready(function() {
|
1763 |
+
grecaptcha.execute(field.$control().data('site-key'), {
|
1764 |
+
action: 'homepage'
|
1765 |
+
}).then(function(response) {
|
1766 |
|
1767 |
field.$input().val(response).change();
|
1768 |
field.$input().closest('.acf-input').find('> .acf-notice.-error').hide();
|
1774 |
|
1775 |
},
|
1776 |
|
1777 |
+
validationFailure: function($form) {
|
1778 |
|
1779 |
+
if (this.version() === 'v2') {
|
1780 |
|
1781 |
grecaptcha.reset(this.recaptcha);
|
1782 |
|
1787 |
});
|
1788 |
|
1789 |
acf.registerFieldType(reCaptcha);
|
1790 |
+
|
1791 |
/*
|
1792 |
* Field: Code Editor
|
1793 |
*/
|
1794 |
var CodeEditor = acf.Field.extend({
|
1795 |
+
|
1796 |
wait: 'ready',
|
1797 |
+
|
1798 |
type: 'acfe_code_editor',
|
1799 |
+
|
1800 |
events: {
|
1801 |
+
'showField': 'onShow',
|
1802 |
+
},
|
1803 |
+
|
1804 |
+
$control: function() {
|
1805 |
+
|
1806 |
return this.$el.find('> .acf-input > .acf-input-wrap');
|
1807 |
+
|
1808 |
},
|
1809 |
+
|
1810 |
+
$input: function() {
|
1811 |
+
|
1812 |
return this.$el.find('> .acf-input > .acf-input-wrap > textarea');
|
1813 |
+
|
1814 |
},
|
1815 |
+
|
1816 |
+
input: function() {
|
1817 |
+
|
1818 |
return this.$input()[0];
|
1819 |
+
|
1820 |
},
|
1821 |
+
|
1822 |
+
rows: function() {
|
1823 |
+
|
1824 |
return this.$input().attr('rows');
|
1825 |
+
|
1826 |
},
|
1827 |
+
|
1828 |
+
initialize: function() {
|
1829 |
+
|
1830 |
this.rows = this.$control().data('rows');
|
1831 |
this.max_rows = this.$control().data('max-rows');
|
1832 |
+
|
1833 |
this.mode = this.$control().data('mode');
|
1834 |
this.lines = this.$control().data('lines');
|
1835 |
this.indentUnit = this.$control().data('indent-unit');
|
1850 |
indentWithTabs: true,
|
1851 |
mode: this.mode,
|
1852 |
extraKeys: {
|
1853 |
+
Tab: function(cm) {
|
1854 |
cm.execCommand("indentMore")
|
1855 |
},
|
1856 |
+
"Shift-Tab": function(cm) {
|
1857 |
cm.execCommand("indentLess")
|
1858 |
},
|
1859 |
},
|
1867 |
|
1868 |
// Init WP Code Editor
|
1869 |
this.editor = wp.codeEditor.initialize(this.input(), codeEditor);
|
1870 |
+
|
1871 |
+
if (this.rows || this.max_rows) {
|
1872 |
+
|
1873 |
+
if (this.rows) {
|
1874 |
+
|
1875 |
this.editor.codemirror.getScrollerElement().style.minHeight = this.rows * 18.5 + 'px';
|
1876 |
+
|
1877 |
}
|
1878 |
+
|
1879 |
+
if (this.max_rows) {
|
1880 |
+
|
1881 |
this.editor.codemirror.getScrollerElement().style.maxHeight = this.max_rows * 18.5 + 'px';
|
1882 |
+
|
1883 |
}
|
1884 |
+
|
1885 |
this.editor.codemirror.refresh();
|
1886 |
+
|
1887 |
}
|
1888 |
+
|
1889 |
field = this;
|
1890 |
+
|
1891 |
+
this.editor.codemirror.on('change', function() {
|
1892 |
+
|
1893 |
field.editor.codemirror.save();
|
1894 |
field.$input().change();
|
1895 |
+
|
1896 |
});
|
1897 |
+
|
1898 |
},
|
1899 |
+
|
1900 |
+
onShow: function() {
|
1901 |
+
|
1902 |
+
if (this.editor.codemirror) {
|
1903 |
+
|
1904 |
this.editor.codemirror.refresh();
|
1905 |
+
|
1906 |
}
|
1907 |
+
|
1908 |
},
|
1909 |
+
|
1910 |
});
|
1911 |
|
1912 |
acf.registerFieldType(CodeEditor);
|
1913 |
+
|
1914 |
/*
|
1915 |
* Field: Textarea
|
1916 |
*/
|
1917 |
var Textarea = acf.Field.extend({
|
1918 |
+
|
1919 |
type: 'textarea',
|
1920 |
+
|
1921 |
events: {
|
1922 |
'keydown textarea': 'onInput',
|
1923 |
},
|
1924 |
+
|
1925 |
+
onInput: function(e, $el) {
|
1926 |
+
|
1927 |
+
if (!this.has('acfeTextareaCode'))
|
1928 |
return;
|
1929 |
+
|
1930 |
+
if (e.keyCode !== 9)
|
1931 |
return;
|
1932 |
+
|
1933 |
e.preventDefault();
|
1934 |
+
|
1935 |
var input = this.$el.find('textarea')[0];
|
1936 |
|
1937 |
var s = input.selectionStart;
|
1938 |
|
1939 |
+
this.$el.find('textarea').val(function(i, v) {
|
1940 |
|
1941 |
return v.substring(0, s) + " " + v.substring(input.selectionEnd)
|
1942 |
|
1943 |
});
|
1944 |
|
1945 |
input.selectionEnd = s + 4;
|
1946 |
+
|
1947 |
},
|
1948 |
+
|
1949 |
});
|
1950 |
|
1951 |
acf.registerFieldType(Textarea);
|
1952 |
+
|
1953 |
/*
|
1954 |
* Field: Slug
|
1955 |
*/
|
1956 |
var ACFE_Slug = acf.Field.extend({
|
1957 |
+
|
1958 |
type: 'acfe_slug',
|
1959 |
+
|
1960 |
events: {
|
1961 |
'input input': 'onInput',
|
1962 |
'focusout input': 'onFocusOut',
|
1963 |
},
|
1964 |
+
|
1965 |
+
onInput: function(e, $el) {
|
1966 |
+
|
1967 |
$el.val($el.val().toLowerCase()
|
1968 |
+
.replace(/\s+/g, '-') // Replace spaces with -
|
1969 |
+
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
|
1970 |
+
.replace(/\-\-+/g, '-') // Replace multiple - with single -
|
1971 |
+
.replace(/\_\_+/g, '_') // Replace multiple _ with single _
|
1972 |
+
.replace(/^-+/, '')); // Trim - from start of text
|
1973 |
+
|
1974 |
},
|
1975 |
+
|
1976 |
+
onFocusOut: function(e, $el) {
|
1977 |
+
|
1978 |
$el.val($el.val().toLowerCase()
|
1979 |
+
.replace(/-+$/, '') // Trim - from end of text
|
1980 |
+
.replace(/_+$/, '')); // Trim _ from end of text
|
1981 |
+
|
1982 |
},
|
1983 |
+
|
1984 |
});
|
1985 |
|
1986 |
acf.registerFieldType(ACFE_Slug);
|
1987 |
+
|
1988 |
/*
|
1989 |
* Field: Button
|
1990 |
*/
|
1991 |
var ACFE_Button = acf.Field.extend({
|
1992 |
+
|
1993 |
type: 'acfe_button',
|
1994 |
+
|
1995 |
events: {
|
1996 |
'click input': 'onClick',
|
1997 |
'click button': 'onClick',
|
1998 |
},
|
1999 |
+
|
2000 |
+
$input: function() {
|
2001 |
+
|
2002 |
+
if (this.$('input').length) {
|
2003 |
+
|
2004 |
return this.$('input');
|
2005 |
+
|
2006 |
+
} else if (this.$('button').length) {
|
2007 |
+
|
2008 |
return this.$('button');
|
2009 |
+
|
2010 |
}
|
2011 |
+
|
2012 |
},
|
2013 |
+
|
2014 |
+
initialize: function() {
|
2015 |
+
|
2016 |
// vars
|
2017 |
+
var $button = this.$input();
|
2018 |
+
|
2019 |
+
// inherit data
|
2020 |
+
this.inherit($button);
|
2021 |
+
|
2022 |
},
|
2023 |
+
|
2024 |
+
onClick: function(e, $el) {
|
2025 |
+
|
2026 |
+
if (this.get('ajax')) {
|
2027 |
+
|
2028 |
e.preventDefault();
|
2029 |
|
2030 |
// serialize form data
|
2033 |
field_name: this.get('name'),
|
2034 |
field_key: this.get('key')
|
2035 |
};
|
2036 |
+
|
2037 |
// Deprecated
|
2038 |
+
acf.doAction('acfe/fields/button/before_ajax', this.$el, data);
|
2039 |
|
2040 |
// Actions
|
2041 |
+
acf.doAction('acfe/fields/button/before', this.$el, data);
|
2042 |
+
acf.doAction('acfe/fields/button/before/key=' + this.get('key'), this.$el, data);
|
2043 |
+
acf.doAction('acfe/fields/button/before/name=' + this.get('name'), this.$el, data);
|
2044 |
+
|
2045 |
// ajax
|
2046 |
$.ajax({
|
2047 |
url: acf.get('ajaxurl'),
|
2049 |
type: 'post',
|
2050 |
dataType: 'json',
|
2051 |
context: this,
|
2052 |
+
|
2053 |
// Success
|
2054 |
+
success: function(response) {
|
2055 |
+
|
2056 |
// Deprecated
|
2057 |
+
acf.doAction('acfe/fields/button/ajax_success', response, this.$el, data);
|
2058 |
|
2059 |
// Actions
|
2060 |
+
acf.doAction('acfe/fields/button/success', response, this.$el, data);
|
2061 |
+
acf.doAction('acfe/fields/button/success/key=' + this.get('key'), response, this.$el, data);
|
2062 |
acf.doAction('acfe/fields/button/success/name=' + this.get('name'), response, this.$el, data);
|
2063 |
+
|
2064 |
},
|
2065 |
+
|
2066 |
// Complete
|
2067 |
+
complete: function(xhr) {
|
2068 |
|
2069 |
var response = xhr.responseText;
|
2070 |
|
2071 |
// Actions
|
2072 |
+
acf.doAction('acfe/fields/button/complete', response, this.$el, data);
|
2073 |
+
acf.doAction('acfe/fields/button/complete/key=' + this.get('key'), response, this.$el, data);
|
2074 |
+
acf.doAction('acfe/fields/button/complete/name=' + this.get('name'), response, this.$el, data);
|
2075 |
|
2076 |
}
|
2077 |
+
|
2078 |
+
|
2079 |
});
|
2080 |
+
|
2081 |
}
|
2082 |
+
|
2083 |
}
|
2084 |
+
|
2085 |
});
|
2086 |
|
2087 |
acf.registerFieldType(ACFE_Button);
|
2088 |
+
|
2089 |
/*
|
2090 |
* Field: Advanced Link
|
2091 |
*/
|
2092 |
var ACFE_Advanced_Link = acf.Field.extend({
|
2093 |
+
|
2094 |
+
type: 'acfe_advanced_link',
|
2095 |
+
|
2096 |
+
events: {
|
2097 |
+
'click a[data-name="add"]': 'onClickEdit',
|
2098 |
+
'click a[data-name="edit"]': 'onClickEdit',
|
2099 |
+
'click a[data-name="remove"]': 'onClickRemove',
|
2100 |
+
},
|
2101 |
+
|
2102 |
+
$control: function() {
|
2103 |
+
return this.$('.acf-link');
|
2104 |
+
},
|
2105 |
+
|
2106 |
+
initialize: function() {
|
2107 |
// ...
|
2108 |
},
|
|
|
|
|
2109 |
|
2110 |
+
getValue: function() {
|
2111 |
+
|
2112 |
+
// return
|
2113 |
var data = {
|
2114 |
+
type: this.$('.input-type :checked').val(),
|
2115 |
+
title: this.$('.input-title').val(),
|
2116 |
+
url: this.$('.input-url').val(),
|
2117 |
+
post: this.$('.input-post :selected').text(),
|
2118 |
+
term: this.$('.input-term :selected').text(),
|
2119 |
+
target: this.$('.input-target').is(':checked')
|
2120 |
+
};
|
2121 |
+
|
2122 |
+
if (data.type === 'post') {
|
2123 |
+
|
2124 |
data.url = data.post;
|
2125 |
+
|
2126 |
+
} else if (data.type === 'term') {
|
2127 |
+
|
2128 |
data.url = data.term;
|
2129 |
+
|
2130 |
}
|
2131 |
+
|
2132 |
return data;
|
2133 |
+
|
2134 |
+
},
|
2135 |
+
|
2136 |
+
setValue: function(val) {
|
2137 |
+
|
2138 |
+
// default
|
2139 |
+
val = acf.parseArgs(val, {
|
2140 |
+
remove: false,
|
2141 |
+
title: '',
|
2142 |
+
url: '',
|
2143 |
+
target: false
|
2144 |
+
});
|
2145 |
+
|
2146 |
+
// vars
|
2147 |
+
var $div = this.$control();
|
2148 |
+
|
2149 |
+
// remove class
|
2150 |
+
$div.removeClass('-value -external');
|
2151 |
+
|
2152 |
+
// add class
|
2153 |
+
if (val.url)
|
2154 |
$div.addClass('-value');
|
2155 |
+
|
2156 |
+
if (val.target)
|
2157 |
$div.addClass('-external');
|
2158 |
+
|
2159 |
+
// update text
|
2160 |
+
this.$('.link-title').html(val.title);
|
2161 |
+
this.$('.link-url').attr('href', val.url).html(val.url);
|
2162 |
+
|
2163 |
+
// remove inputs data
|
2164 |
+
if (val.remove) {
|
2165 |
+
|
2166 |
this.$('.input-type :checked').prop('checked', false);
|
2167 |
this.$('.input-type [value="url"]').prop('checked', true).trigger('change');
|
2168 |
this.$('.input-title').val('');
|
2170 |
this.$('.input-url').val('').trigger('change');
|
2171 |
this.$('.input-post').val('').trigger('change');
|
2172 |
this.$('.input-term').val('').trigger('change');
|
2173 |
+
|
2174 |
}
|
2175 |
+
|
2176 |
+
},
|
2177 |
+
|
2178 |
+
onClickEdit: function(e, $el) {
|
2179 |
+
|
2180 |
var $modal = $el.closest('.acf-input').find('.acfe-modal');
|
2181 |
+
|
2182 |
var title = $modal.attr('data-modal-title');
|
2183 |
+
|
2184 |
var model = this;
|
2185 |
|
2186 |
new acfe.Popup($modal, {
|
2187 |
title: title,
|
2188 |
size: 'medium',
|
2189 |
footer: acf.__('Close'),
|
2190 |
+
onClose: function() {
|
2191 |
model.onChange();
|
2192 |
}
|
2193 |
});
|
2194 |
+
|
2195 |
+
},
|
2196 |
+
|
2197 |
+
onClickRemove: function(e, $el) {
|
2198 |
+
|
2199 |
+
this.setValue({
|
2200 |
+
remove: true
|
2201 |
+
});
|
2202 |
+
|
2203 |
+
},
|
2204 |
+
|
2205 |
+
onChange: function(e, $el) {
|
2206 |
+
|
2207 |
+
// get the changed value
|
2208 |
+
var val = this.getValue();
|
2209 |
+
|
2210 |
+
// update inputs
|
2211 |
+
this.setValue(val);
|
2212 |
+
|
2213 |
+
},
|
2214 |
+
|
2215 |
+
});
|
2216 |
+
|
2217 |
+
acf.registerFieldType(ACFE_Advanced_Link);
|
2218 |
+
|
2219 |
/*
|
2220 |
* Field: Advanced Link Manager
|
2221 |
*/
|
2222 |
new acf.Model({
|
2223 |
|
2224 |
actions: {
|
2225 |
+
'invalid_field': 'invalidField',
|
2226 |
},
|
2227 |
|
2228 |
filters: {
|
2229 |
+
'select2_ajax_data/type=post_object': 'ajaxField',
|
2230 |
},
|
2231 |
|
2232 |
+
invalidField: function(field) {
|
2233 |
|
2234 |
var $advanced_link = field.$el.closest('.acf-field-acfe-advanced-link').not('.acf-error');
|
2235 |
|
2236 |
+
if ($advanced_link.length) {
|
2237 |
|
2238 |
var advanced_link_field = acf.getInstance($advanced_link);
|
2239 |
|
2243 |
|
2244 |
},
|
2245 |
|
2246 |
+
ajaxField: function(ajaxData, data, $el, field, select) {
|
2247 |
|
2248 |
+
if (field.get('key') !== 'post')
|
2249 |
return ajaxData;
|
2250 |
|
2251 |
var advanced_link = acf.getInstance($el.closest('.acf-field-acfe-advanced-link'));
|
2252 |
|
2253 |
+
if (advanced_link) {
|
2254 |
|
2255 |
ajaxData.field_key = advanced_link.get('key');
|
2256 |
|
2261 |
},
|
2262 |
|
2263 |
});
|
2264 |
+
|
2265 |
/*
|
2266 |
* Field: Group
|
2267 |
*/
|
2268 |
var Group = acf.Field.extend({
|
2269 |
|
2270 |
wait: false,
|
2271 |
+
|
2272 |
type: 'group',
|
2273 |
+
|
2274 |
events: {
|
2275 |
'click [data-name="edit"]': 'onClick',
|
2276 |
+
'duplicateField': 'onDuplicate'
|
2277 |
},
|
2278 |
+
|
2279 |
+
initialize: function() {
|
2280 |
+
|
2281 |
+
if (this.has('acfeGroupModal')) {
|
2282 |
+
|
2283 |
var edit = this.get('acfeGroupModalButton');
|
2284 |
+
|
2285 |
this.$el.find('> .acf-input > .acf-fields, > .acf-input > .acf-table').wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>');
|
2286 |
this.$el.find('> .acf-input').append('<a data-name="edit" class="acf-button button" href="#">' + edit + '</a>');
|
2287 |
+
|
2288 |
}
|
2289 |
+
|
2290 |
},
|
2291 |
+
|
2292 |
+
onClick: function(e, $el) {
|
2293 |
+
|
2294 |
+
var title = this.$labelWrap().find('label').text().trim();
|
2295 |
+
var $modal = this.$el.find('> .acf-input > .acfe-modal').addClass('acfe-modal-edit-' + this.get('name') + ' acfe-modal-edit-' + this.get('key'));
|
2296 |
+
|
2297 |
// Title
|
2298 |
+
if (!title.length) {
|
|
|
2299 |
title = this.get('acfeGroupModalButton');
|
|
|
2300 |
}
|
2301 |
+
|
2302 |
// Close
|
2303 |
var close = false;
|
2304 |
+
|
2305 |
+
if (this.has('acfeGroupModalClose')) {
|
|
|
2306 |
close = acf.__('Close');
|
|
|
2307 |
}
|
2308 |
+
|
2309 |
// Size
|
2310 |
var size = 'large';
|
2311 |
+
|
2312 |
+
if (this.has('acfeGroupModalSize')) {
|
|
|
2313 |
size = this.get('acfeGroupModalSize');
|
|
|
2314 |
}
|
2315 |
+
|
2316 |
// Open modal
|
2317 |
new acfe.Popup($modal, {
|
2318 |
+
title: title,
|
2319 |
+
size: size,
|
2320 |
footer: close
|
2321 |
});
|
2322 |
+
|
2323 |
},
|
2324 |
|
2325 |
+
onDuplicate: function(e, $el, $duplicate) {
|
2326 |
$duplicate.find('a[data-name="edit"]').remove();
|
2327 |
}
|
2328 |
+
|
2329 |
});
|
2330 |
|
2331 |
acf.registerFieldType(Group);
|
2332 |
+
|
2333 |
/*
|
2334 |
* Field: Clone
|
2335 |
*/
|
2336 |
var Clone = acf.Field.extend({
|
2337 |
|
2338 |
wait: false,
|
2339 |
+
|
2340 |
type: 'clone',
|
2341 |
+
|
2342 |
events: {
|
2343 |
'click [data-name="edit"]': 'onClick',
|
2344 |
+
'duplicateField': 'onDuplicate'
|
2345 |
},
|
2346 |
+
|
2347 |
+
initialize: function() {
|
2348 |
+
|
2349 |
+
if (this.has('acfeCloneModal')) {
|
2350 |
+
|
2351 |
var edit = this.get('acfeCloneModalButton');
|
2352 |
+
|
2353 |
this.$el.find('> .acf-input > .acf-fields, > .acf-input > .acf-table').wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>');
|
2354 |
this.$el.find('> .acf-input').append('<a data-name="edit" class="acf-button button" href="#">' + edit + '</a>');
|
2355 |
+
|
2356 |
}
|
2357 |
+
|
2358 |
},
|
2359 |
+
|
2360 |
+
onClick: function(e, $el) {
|
2361 |
+
|
2362 |
+
var title = this.$labelWrap().find('label').text().trim();
|
2363 |
+
var $modal = this.$el.find('> .acf-input > .acfe-modal').addClass('acfe-modal-edit-' + this.get('name') + ' acfe-modal-edit-' + this.get('key'));
|
2364 |
+
|
2365 |
+
|
2366 |
// Title
|
2367 |
+
if (!title.length) {
|
|
|
2368 |
title = this.get('acfeCloneModalButton');
|
|
|
2369 |
}
|
2370 |
+
|
2371 |
// Close
|
2372 |
var close = false;
|
2373 |
+
|
2374 |
+
if (this.has('acfeCloneModalClose')) {
|
|
|
2375 |
close = acf.__('Close');
|
|
|
2376 |
}
|
2377 |
+
|
2378 |
// Size
|
2379 |
var size = 'large';
|
2380 |
+
|
2381 |
+
if (this.has('acfeCloneModalSize')) {
|
|
|
2382 |
size = this.get('acfeCloneModalSize');
|
|
|
2383 |
}
|
2384 |
+
|
2385 |
// Open modal
|
2386 |
new acfe.Popup($modal, {
|
2387 |
+
title: title,
|
2388 |
+
size: size,
|
2389 |
footer: close
|
2390 |
});
|
2391 |
+
|
2392 |
},
|
2393 |
|
2394 |
+
onDuplicate: function(e, $el, $duplicate) {
|
2395 |
$duplicate.find('a[data-name="edit"]').remove();
|
2396 |
}
|
2397 |
+
|
2398 |
});
|
2399 |
|
2400 |
acf.registerFieldType(Clone);
|
2401 |
+
|
2402 |
/*
|
2403 |
* Field: Column
|
2404 |
*/
|
2405 |
var Column = acf.Field.extend({
|
2406 |
+
|
2407 |
wait: 'new_field',
|
2408 |
+
|
2409 |
type: 'acfe_column',
|
2410 |
|
2411 |
+
$control: function() {
|
2412 |
+
return this.$('.acf-fields:first');
|
2413 |
+
},
|
2414 |
+
|
2415 |
+
initialize: function() {
|
2416 |
+
|
2417 |
+
if (this.$el.is('td')) {
|
2418 |
+
|
2419 |
var $table = this.$el.closest('.acf-table').find('th[data-type="acfe_column"]').remove();
|
2420 |
this.remove();
|
2421 |
+
|
2422 |
}
|
2423 |
+
|
2424 |
+
if (this.get('endpoint')) {
|
2425 |
+
|
2426 |
this.$el.find('> .acf-label').remove();
|
2427 |
this.$el.find('> .acf-input').remove();
|
2428 |
+
|
2429 |
return;
|
2430 |
+
|
2431 |
}
|
2432 |
+
|
2433 |
var $field = this.$el;
|
2434 |
var $label = this.$el.find('> .acf-label');
|
2435 |
+
var $input = this.$inputWrap();
|
2436 |
+
var $wrap = this.$control();
|
2437 |
+
|
2438 |
$label.remove();
|
2439 |
+
|
2440 |
var $parent = $field.parent();
|
2441 |
+
$wrap.addClass($parent.hasClass('-left') ? '-left' : '');
|
2442 |
+
$wrap.addClass($parent.hasClass('-clear') ? '-clear' : '');
|
2443 |
+
|
2444 |
$wrap.append($field.nextUntil('.acf-field-acfe-column', '.acf-field'));
|
2445 |
+
|
2446 |
}
|
2447 |
+
|
2448 |
});
|
2449 |
|
2450 |
acf.registerFieldType(Column);
|
2458 |
'new_field/type=select': 'newField',
|
2459 |
},
|
2460 |
|
2461 |
+
newField: function(field) {
|
2462 |
|
2463 |
field.inherit(field.$input());
|
2464 |
|
2465 |
// Remove "- -" characters from placeholder
|
2466 |
+
if (!field.get('ui') && field.get('allow_null')) {
|
2467 |
|
2468 |
+
field.$input().find('option').each(function(i, option) {
|
2469 |
|
2470 |
+
if (option.value)
|
2471 |
return;
|
2472 |
|
2473 |
+
if (!option.text.startsWith('- ') || !option.text.endsWith(' -'))
|
2474 |
return;
|
2475 |
|
2476 |
option.text = option.text.substring(2);
|
2480 |
|
2481 |
}
|
2482 |
|
2483 |
+
if (field.has('acfePrepend') || field.has('acfeAppend')) {
|
2484 |
|
2485 |
+
if (!field.$input().parent('.acf-input-wrap').length) {
|
2486 |
|
2487 |
field.$input().wrapAll('<div class="acf-input-wrap"></div>');
|
2488 |
|
2489 |
+
if (field.get('ui')) {
|
2490 |
|
2491 |
field.$('.acf-input-wrap:first').append(field.$('.select2'));
|
2492 |
|
2493 |
}
|
2494 |
|
2495 |
+
if (field.has('acfePrepend')) {
|
2496 |
|
2497 |
field.$('.acf-input-wrap:first').before('<div class="acf-input-prepend">' + field.get('acfePrepend') + '</div>');
|
2498 |
field.$input().addClass('acf-is-prepended');
|
2499 |
|
2500 |
}
|
2501 |
|
2502 |
+
if (field.has('acfeAppend')) {
|
2503 |
|
2504 |
field.$('.acf-input-wrap:first').before('<div class="acf-input-append">' + field.get('acfeAppend') + '</div>');
|
2505 |
field.$input().addClass('acf-is-appended');
|
2519 |
*/
|
2520 |
new acf.Model({
|
2521 |
|
2522 |
+
actions: {
|
2523 |
+
'select2_init': 'select2Init',
|
2524 |
},
|
2525 |
|
2526 |
filters: {
|
2527 |
+
'select2_args': 'select2Args',
|
2528 |
+
'select2_ajax_data': 'select2Ajax',
|
2529 |
},
|
2530 |
|
2531 |
+
select2Init: function($select, options, data, field, instance) {
|
2532 |
|
2533 |
// Search Placeholder
|
2534 |
+
if (field.get('acfeSearchPlaceholder')) {
|
2535 |
|
2536 |
var search_placeholder = field.get('acfeSearchPlaceholder');
|
2537 |
|
2538 |
+
$select.on('select2:open', function(e) {
|
2539 |
|
2540 |
+
if (field.get('multiple')) {
|
2541 |
|
2542 |
+
if (!$select.val()) {
|
2543 |
|
2544 |
field.$('.select2-search__field').attr('placeholder', search_placeholder);
|
2545 |
|
2546 |
}
|
2547 |
|
2548 |
+
} else {
|
2549 |
|
2550 |
$('.select2-search.select2-search--dropdown > .select2-search__field').attr('placeholder', search_placeholder);
|
2551 |
|
2553 |
|
2554 |
});
|
2555 |
|
2556 |
+
if (field.get('multiple')) {
|
2557 |
|
2558 |
+
$select.on('select2:close', function(e) {
|
2559 |
|
2560 |
+
if (!$select.val()) {
|
2561 |
|
2562 |
field.$('.select2-search__field').attr('placeholder', field.get('placeholder'));
|
2563 |
|
2569 |
|
2570 |
}
|
2571 |
|
2572 |
+
// Add Class on Dropdown with Field Name + key for developers <3
|
2573 |
+
$select.data('select2').$dropdown
|
2574 |
+
.addClass('select2-dropdown-acf-field-' + field.get('name'))
|
2575 |
+
.addClass('select2-dropdown-acf-field-' + field.get('key'));
|
2576 |
+
|
2577 |
+
acf.doAction('select2_init/type=' + field.get('type'), $select, options, data, field, instance);
|
2578 |
+
acf.doAction('select2_init/name=' + field.get('name'), $select, options, data, field, instance);
|
2579 |
+
acf.doAction('select2_init/key=' + field.get('key'), $select, options, data, field, instance);
|
2580 |
|
2581 |
},
|
2582 |
|
2583 |
+
select2Args: function(options, $select, data, field, instance) {
|
2584 |
|
2585 |
// Allow Custom tags
|
2586 |
+
if (field.get('acfeAllowCustom')) {
|
2587 |
|
2588 |
options.tags = true;
|
2589 |
|
2590 |
+
options.createTag = function(params) {
|
2591 |
|
2592 |
var term = $.trim(params.term);
|
2593 |
|
2594 |
+
if (term === '')
|
2595 |
return null;
|
2596 |
|
2597 |
var optionsMatch = false;
|
2598 |
|
2599 |
+
this.$element.find('option').each(function() {
|
2600 |
|
2601 |
+
if (this.value.toLowerCase() !== term.toLowerCase())
|
2602 |
return;
|
2603 |
|
2604 |
optionsMatch = true;
|
2606 |
|
2607 |
});
|
2608 |
|
2609 |
+
if (optionsMatch)
|
2610 |
return null;
|
2611 |
|
2612 |
return {
|
2617 |
};
|
2618 |
|
2619 |
|
2620 |
+
options.insertTag = function(data, tag) {
|
2621 |
|
2622 |
var found = false;
|
2623 |
|
2624 |
+
$.each(data, function() {
|
2625 |
|
2626 |
+
if ($.trim(tag.text).toUpperCase() !== $.trim(this.text).toUpperCase())
|
2627 |
return;
|
2628 |
|
2629 |
found = true;
|
2631 |
|
2632 |
});
|
2633 |
|
2634 |
+
if (!found)
|
2635 |
data.unshift(tag);
|
2636 |
|
2637 |
};
|
2638 |
|
2639 |
}
|
2640 |
|
2641 |
+
options = acf.applyFilters('select2_args/type=' + field.get('type'), options, $select, data, field, instance);
|
2642 |
+
options = acf.applyFilters('select2_args/name=' + field.get('name'), options, $select, data, field, instance);
|
2643 |
+
options = acf.applyFilters('select2_args/key=' + field.get('key'), options, $select, data, field, instance);
|
2644 |
|
2645 |
return options;
|
2646 |
|
2647 |
},
|
2648 |
|
2649 |
+
select2Ajax: function(ajaxData, data, $el, field, instance) {
|
2650 |
|
2651 |
+
ajaxData = acf.applyFilters('select2_ajax_data/type=' + field.get('type'), ajaxData, data, $el, field, instance);
|
2652 |
+
ajaxData = acf.applyFilters('select2_ajax_data/name=' + field.get('name'), ajaxData, data, $el, field, instance);
|
2653 |
+
ajaxData = acf.applyFilters('select2_ajax_data/key=' + field.get('key'), ajaxData, data, $el, field, instance);
|
2654 |
|
2655 |
+
if (ajaxData.action) {
|
2656 |
|
2657 |
ajaxData = acf.applyFilters('select2_ajax_data/action=' + ajaxData.action, ajaxData, data, $el, field, instance);
|
2658 |
|
2673 |
'prepare_field/type=tab': 'prepareField',
|
2674 |
},
|
2675 |
|
2676 |
+
prepareField: function(field) {
|
2677 |
|
2678 |
+
if (!field.has('noPreference'))
|
2679 |
return;
|
2680 |
|
2681 |
var $tabs = field.findTabs();
|
2682 |
var tabs = acf.getInstances($tabs);
|
2683 |
var key = field.get('key');
|
2684 |
|
2685 |
+
if (tabs.length) {
|
2686 |
|
2687 |
var preference = acf.getPreference('this.tabs');
|
2688 |
|
2689 |
+
if (!preference)
|
2690 |
return;
|
2691 |
|
2692 |
+
$.each(tabs, function(i, group) {
|
2693 |
|
2694 |
var groupIndex = group.get('index');
|
2695 |
|
2696 |
+
if (group.data.key !== key)
|
2697 |
return;
|
2698 |
|
2699 |
preference[groupIndex] = 0;
|
2718 |
'new_field/type=checkbox': 'newField',
|
2719 |
},
|
2720 |
|
2721 |
+
newField: function(field) {
|
2722 |
|
2723 |
+
if (!field.has('acfeLabels'))
|
2724 |
return;
|
2725 |
|
2726 |
+
$.each(field.get('acfeLabels'), function(group, key) {
|
2727 |
|
2728 |
field.$control().find('input[type=checkbox][value="' + key + '"]').closest('ul').before('<strong>' + group + '</strong>');
|
2729 |
|
2742 |
'new_field/type=radio': 'newField',
|
2743 |
},
|
2744 |
|
2745 |
+
newField: function(field) {
|
2746 |
|
2747 |
+
if (!field.has('acfeLabels'))
|
2748 |
return;
|
2749 |
|
2750 |
+
$.each(field.get('acfeLabels'), function(group, key) {
|
2751 |
|
2752 |
field.$control().find('input[type=radio][value="' + key + '"]').closest('li').addClass('parent').prepend('<strong>' + group + '</strong>');
|
2753 |
|
2754 |
});
|
2755 |
|
2756 |
+
if (field.$control().hasClass('acf-hl')) {
|
2757 |
|
2758 |
+
field.$control().find('li.parent').each(function() {
|
2759 |
|
2760 |
$(this).nextUntil('li.parent').addBack().wrapAll('<li><ul></ul></li>');
|
2761 |
|
2779 |
'new_field': 'newField',
|
2780 |
},
|
2781 |
|
2782 |
+
newField: function(field) {
|
2783 |
|
2784 |
this.field = field;
|
2785 |
|
2786 |
+
if (field.has('instructionTooltip')) {
|
2787 |
this.setTooltip();
|
2788 |
}
|
2789 |
|
2790 |
+
if (field.has('instructionAboveField')) {
|
2791 |
this.setAboveField();
|
2792 |
}
|
2793 |
|
2794 |
+
if (field.has('instructionPlacement')) {
|
2795 |
this.overridePlacement(field.get('instructionPlacement'));
|
2796 |
}
|
2797 |
|
2798 |
},
|
2799 |
|
2800 |
+
setTooltip: function() {
|
2801 |
|
2802 |
this.field.$labelWrap().prepend('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="' + _.escape(this.field.get('instructionTooltip')) + '"></span>');
|
2803 |
this.field.$labelWrap().find('.description').remove();
|
2804 |
|
2805 |
},
|
2806 |
|
2807 |
+
setAboveField: function() {
|
2808 |
|
2809 |
this.field.$inputWrap().prepend('<p class="description">' + this.field.get('instructionAboveField') + '</p>');
|
2810 |
this.field.$labelWrap().find('.description').remove();
|
2811 |
|
2812 |
},
|
2813 |
|
2814 |
+
overridePlacement: function(target) {
|
2815 |
|
2816 |
var current = this.getPlacement();
|
2817 |
|
2818 |
// No instruction
|
2819 |
+
if (!current)
|
2820 |
return;
|
2821 |
|
2822 |
// Placement is correct
|
2823 |
+
if (current === target)
|
2824 |
return;
|
2825 |
|
2826 |
this.setPlacement(target);
|
2827 |
|
2828 |
},
|
2829 |
|
2830 |
+
getPlacement: function() {
|
2831 |
|
2832 |
var placement = false;
|
2833 |
|
2834 |
+
if (this.field.$labelWrap().find('>.description').length)
|
2835 |
placement = 'label';
|
2836 |
|
2837 |
+
else if (this.field.$inputWrap().find('>.description:first-child').length)
|
2838 |
placement = 'above_field';
|
2839 |
|
2840 |
+
else if (this.field.$inputWrap().find('>.description:last-child').length)
|
2841 |
placement = 'field';
|
2842 |
|
2843 |
+
else if (this.field.$labelWrap().find('>.acfe-field-tooltip').length)
|
2844 |
placement = 'tooltip';
|
2845 |
|
2846 |
this.placement = placement;
|
2849 |
|
2850 |
},
|
2851 |
|
2852 |
+
$getInstruction: function() {
|
2853 |
|
2854 |
var placement = this.getPlacement();
|
2855 |
|
2856 |
+
if (placement === 'label') {
|
2857 |
|
2858 |
return this.field.$labelWrap().find('>.description');
|
2859 |
|
2860 |
+
} else if (placement === 'above_field') {
|
2861 |
|
2862 |
return this.field.$inputWrap().find('>.description:first-child');
|
2863 |
|
2864 |
+
} else if (placement === 'field') {
|
2865 |
|
2866 |
return this.field.$inputWrap().find('>.description:last-child');
|
2867 |
|
2868 |
+
} else if (placement === 'tooltip') {
|
2869 |
|
2870 |
return this.field.$labelWrap().find('>.acfe-field-tooltip');
|
2871 |
|
2875 |
|
2876 |
},
|
2877 |
|
2878 |
+
setPlacement: function(target) {
|
2879 |
|
2880 |
var $instruction = this.$getInstruction();
|
2881 |
|
2882 |
+
if (this.placement === 'tooltip') {
|
2883 |
|
2884 |
var text = $instruction.attr('title');
|
2885 |
|
2888 |
|
2889 |
}
|
2890 |
|
2891 |
+
if (target === 'label') {
|
2892 |
|
2893 |
this.field.$labelWrap().append($instruction);
|
2894 |
|
2895 |
+
} else if (target === 'above_field') {
|
2896 |
|
2897 |
this.field.$inputWrap().prepend($instruction);
|
2898 |
|
2899 |
+
} else if (target === 'field') {
|
2900 |
|
2901 |
this.field.$inputWrap().append($instruction);
|
2902 |
|
2903 |
+
} else if (target === 'tooltip') {
|
2904 |
|
2905 |
this.field.$labelWrap().prepend($('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="' + _.escape($instruction.html()) + '"></span>'));
|
2906 |
$instruction.remove();
|
2912 |
});
|
2913 |
|
2914 |
})(jQuery);
|
2915 |
+
(function($) {
|
2916 |
+
|
2917 |
+
if (typeof acf === 'undefined')
|
2918 |
return;
|
2919 |
|
2920 |
+
/*
|
2921 |
+
* Field Conditions: Checkbox & Radio
|
2922 |
+
*/
|
2923 |
+
acf.registerConditionForFieldType('contains', 'checkbox');
|
2924 |
+
acf.registerConditionForFieldType('contains', 'radio');
|
2925 |
+
|
2926 |
/*
|
2927 |
* Field Conditions: Code Editor
|
2928 |
*/
|
2929 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_code_editor');
|
2930 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_code_editor');
|
2931 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_code_editor');
|
2932 |
+
acf.registerConditionForFieldType('contains', 'acfe_code_editor');
|
2933 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_code_editor');
|
2934 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_code_editor');
|
2935 |
|
2936 |
/*
|
2937 |
* Field Conditions: Datepicker
|
2938 |
*/
|
2939 |
+
acf.registerConditionForFieldType('equalTo', 'date_picker');
|
2940 |
+
acf.registerConditionForFieldType('notEqualTo', 'date_picker');
|
2941 |
+
acf.registerConditionForFieldType('patternMatch', 'date_picker');
|
2942 |
+
acf.registerConditionForFieldType('contains', 'date_picker');
|
2943 |
+
acf.registerConditionForFieldType('greaterThan', 'date_picker');
|
2944 |
+
acf.registerConditionForFieldType('lessThan', 'date_picker');
|
2945 |
|
2946 |
/*
|
2947 |
* Field Conditions: Datetime picker
|
2948 |
*/
|
2949 |
+
acf.registerConditionForFieldType('equalTo', 'date_time_picker');
|
2950 |
+
acf.registerConditionForFieldType('notEqualTo', 'date_time_picker');
|
2951 |
+
acf.registerConditionForFieldType('patternMatch', 'date_time_picker');
|
2952 |
+
acf.registerConditionForFieldType('contains', 'date_time_picker');
|
2953 |
|
2954 |
/*
|
2955 |
* Field Conditions: Timepicker
|
2956 |
*/
|
2957 |
+
acf.registerConditionForFieldType('equalTo', 'time_picker');
|
2958 |
+
acf.registerConditionForFieldType('notEqualTo', 'time_picker');
|
2959 |
+
acf.registerConditionForFieldType('patternMatch', 'time_picker');
|
2960 |
+
acf.registerConditionForFieldType('contains', 'time_picker');
|
2961 |
|
2962 |
/*
|
2963 |
* Field Conditions: Taxonomy
|
2964 |
*/
|
2965 |
+
acf.registerConditionForFieldType('equalTo', 'taxonomy');
|
2966 |
+
acf.registerConditionForFieldType('notEqualTo', 'taxonomy');
|
2967 |
+
acf.registerConditionForFieldType('patternMatch', 'taxonomy');
|
2968 |
+
acf.registerConditionForFieldType('contains', 'taxonomy');
|
2969 |
+
acf.registerConditionForFieldType('hasValue', 'taxonomy');
|
2970 |
+
acf.registerConditionForFieldType('hasNoValue', 'taxonomy');
|
2971 |
|
2972 |
/*
|
2973 |
* Field Conditions: Forms
|
2974 |
*/
|
2975 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_forms');
|
2976 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_forms');
|
2977 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_forms');
|
2978 |
+
acf.registerConditionForFieldType('contains', 'acfe_forms');
|
2979 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_forms');
|
2980 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_forms');
|
2981 |
|
2982 |
/*
|
2983 |
* Field Conditions: Hidden
|
2984 |
*/
|
2985 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_hidden');
|
2986 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_hidden');
|
2987 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_hidden');
|
2988 |
+
acf.registerConditionForFieldType('contains', 'acfe_hidden');
|
2989 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_hidden');
|
2990 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_hidden');
|
2991 |
|
2992 |
/*
|
2993 |
* Field Conditions: Post Status
|
2994 |
*/
|
2995 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_post_statuses');
|
2996 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_post_statuses');
|
2997 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_post_statuses');
|
2998 |
+
acf.registerConditionForFieldType('contains', 'acfe_post_statuses');
|
2999 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_post_statuses');
|
3000 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_post_statuses');
|
3001 |
|
3002 |
/*
|
3003 |
* Field Conditions: Post Types
|
3004 |
*/
|
3005 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_post_types');
|
3006 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_post_types');
|
3007 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_post_types');
|
3008 |
+
acf.registerConditionForFieldType('contains', 'acfe_post_types');
|
3009 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_post_types');
|
3010 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_post_types');
|
3011 |
|
3012 |
/*
|
3013 |
* Field Conditions: Slug
|
3014 |
*/
|
3015 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_slug');
|
3016 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_slug');
|
3017 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_slug');
|
3018 |
+
acf.registerConditionForFieldType('contains', 'acfe_slug');
|
3019 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_slug');
|
3020 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_slug');
|
3021 |
|
3022 |
/*
|
3023 |
* Field Conditions: Taxonomies
|
3024 |
*/
|
3025 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_taxonomies');
|
3026 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_taxonomies');
|
3027 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_taxonomies');
|
3028 |
+
acf.registerConditionForFieldType('contains', 'acfe_taxonomies');
|
3029 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_taxonomies');
|
3030 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_taxonomies');
|
3031 |
|
3032 |
/*
|
3033 |
* Field Conditions: Taxonomy Terms
|
3034 |
*/
|
3035 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_taxonomy_terms');
|
3036 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_taxonomy_terms');
|
3037 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_taxonomy_terms');
|
3038 |
+
acf.registerConditionForFieldType('contains', 'acfe_taxonomy_terms');
|
3039 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_taxonomy_terms');
|
3040 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_taxonomy_terms');
|
3041 |
|
3042 |
/*
|
3043 |
* Field Conditions: User Roles
|
3044 |
*/
|
3045 |
+
acf.registerConditionForFieldType('equalTo', 'acfe_user_roles');
|
3046 |
+
acf.registerConditionForFieldType('notEqualTo', 'acfe_user_roles');
|
3047 |
+
acf.registerConditionForFieldType('patternMatch', 'acfe_user_roles');
|
3048 |
+
acf.registerConditionForFieldType('contains', 'acfe_user_roles');
|
3049 |
+
acf.registerConditionForFieldType('hasValue', 'acfe_user_roles');
|
3050 |
+
acf.registerConditionForFieldType('hasNoValue', 'acfe_user_roles');
|
3051 |
|
3052 |
})(jQuery);
|
3053 |
+
(function($) {
|
3054 |
+
|
3055 |
+
if (typeof acf === 'undefined')
|
3056 |
return;
|
3057 |
|
3058 |
/*
|
3061 |
new acf.Model({
|
3062 |
|
3063 |
actions: {
|
3064 |
+
'prepare': 'prepare',
|
3065 |
+
'new_field/type=date_picker': 'datePicker',
|
3066 |
+
'new_field/type=date_time_picker': 'datePicker',
|
3067 |
+
'new_field/type=time_picker': 'datePicker',
|
3068 |
+
'new_field/type=google_map': 'googleMap',
|
3069 |
+
'invalid_field': 'invalidField',
|
3070 |
+
'validation_begin': 'validationBegin',
|
3071 |
},
|
3072 |
|
3073 |
+
prepare: function() {
|
3074 |
|
3075 |
+
if (acfe.get('is_admin'))
|
3076 |
return;
|
3077 |
|
3078 |
// Fix Image/File WP Media upload
|
3079 |
+
if (acf.isset(window, 'wp', 'media', 'view', 'settings', 'post')) {
|
3080 |
|
3081 |
// Unset Post ID
|
3082 |
wp.media.view.settings.post = false;
|
3083 |
|
3084 |
}
|
3085 |
|
3086 |
+
if ($('.acfe-form[data-hide-unload="1"]').length) {
|
3087 |
|
3088 |
acf.unload.disable();
|
3089 |
|
3091 |
|
3092 |
var $form_success = $('.acfe-form-success');
|
3093 |
|
3094 |
+
if ($form_success.length) {
|
3095 |
|
3096 |
// Prevent refresh sending post fields again
|
3097 |
+
if (window.history.replaceState) {
|
3098 |
window.history.replaceState(null, null, window.location.href);
|
3099 |
}
|
3100 |
|
3101 |
+
$form_success.each(function() {
|
3102 |
|
3103 |
var form_name = $(this).data('form-name');
|
3104 |
var form_id = $(this).data('form-id');
|
3112 |
}
|
3113 |
|
3114 |
// Prevent form submission click spam
|
3115 |
+
$('.acf-form .button, .acf-form [type="submit"], .acfe-form .button, .acfe-form [type="submit"]').click(function(e) {
|
3116 |
|
3117 |
+
if (!$(this).hasClass('disabled'))
|
3118 |
return;
|
3119 |
|
3120 |
e.preventDefault();
|
3124 |
},
|
3125 |
|
3126 |
// Datepicker: Add field class
|
3127 |
+
datePicker: function(field) {
|
3128 |
|
3129 |
+
if (acfe.get('is_admin'))
|
3130 |
return;
|
3131 |
|
3132 |
var $form = field.$el.closest('.acfe-form');
|
3133 |
|
3134 |
+
if (!$form.length)
|
3135 |
return;
|
3136 |
|
3137 |
var field_class = $form.data('fields-class');
|
3138 |
|
3139 |
+
if (field_class)
|
3140 |
field.$inputText().addClass(field_class);
|
3141 |
|
3142 |
},
|
3143 |
|
3144 |
// Google Maps: Add field class
|
3145 |
+
googleMap: function(field) {
|
3146 |
|
3147 |
+
if (acfe.get('is_admin'))
|
3148 |
return;
|
3149 |
|
3150 |
var $form = field.$el.closest('.acfe-form');
|
3151 |
|
3152 |
+
if (!$form.length)
|
3153 |
return;
|
3154 |
|
3155 |
var field_class = $form.data('fields-class');
|
3156 |
|
3157 |
+
if (field_class)
|
3158 |
field.$search().addClass(field_class);
|
3159 |
|
3160 |
},
|
3161 |
|
3162 |
// Error: Move error
|
3163 |
+
invalidField: function(field) {
|
3164 |
|
3165 |
+
if (acfe.get('is_admin'))
|
3166 |
return;
|
3167 |
|
3168 |
var $form = field.$el.closest('.acfe-form');
|
3169 |
|
3170 |
+
if (!$form.length)
|
3171 |
return;
|
3172 |
|
3173 |
var errors_position = $form.data('errors-position');
|
3174 |
var errors_class = $form.data('errors-class');
|
3175 |
|
3176 |
// Class
|
3177 |
+
if (errors_class && errors_class.length) {
|
3178 |
|
3179 |
field.$el.find('.acf-notice.-error').addClass(errors_class);
|
3180 |
|
3181 |
}
|
3182 |
|
3183 |
// Move below
|
3184 |
+
if (errors_position && errors_position === 'below') {
|
3185 |
|
3186 |
+
if (field.$control().length) {
|
3187 |
|
3188 |
field.$el.find('.acf-notice.-error').insertAfter(field.$control());
|
3189 |
|
3190 |
+
} else if (field.$input().length) {
|
3191 |
|
3192 |
field.$el.find('.acf-notice.-error').insertAfter(field.$input());
|
3193 |
|
3195 |
|
3196 |
var $selector = false;
|
3197 |
|
3198 |
+
if (field.$control().length) {
|
3199 |
|
3200 |
$selector = field.$control();
|
3201 |
|
3202 |
+
} else if (field.$input().length) {
|
3203 |
|
3204 |
$selector = field.$input();
|
3205 |
|
3206 |
}
|
3207 |
|
3208 |
+
if ($selector)
|
3209 |
field.$el.find('.acf-notice.-error').insertAfter($selector);
|
3210 |
|
3211 |
}
|
3212 |
|
3213 |
// Group errors
|
3214 |
+
else if (errors_position && errors_position === 'group') {
|
3215 |
|
3216 |
var label = field.$el.find('.acf-label label').text().trim();
|
3217 |
var placeholder = field.$el.find('.acf-input-wrap [placeholder!=""]').attr('placeholder');
|
3220 |
field.$el.find('.acf-notice.-error').remove();
|
3221 |
|
3222 |
// Try label
|
3223 |
+
if (label && label.length && label !== '*') {
|
3224 |
|
3225 |
message = label + ': ' + message;
|
3226 |
|
3227 |
}
|
3228 |
|
3229 |
// Try placeholder
|
3230 |
+
else if (placeholder && placeholder.length && placeholder !== '') {
|
3231 |
|
3232 |
message = placeholder + ': ' + message;
|
3233 |
|
3234 |
}
|
3235 |
|
3236 |
// If everything fails, use field name
|
3237 |
+
else {
|
3238 |
|
3239 |
message = field.get('name') + ': ' + message;
|
3240 |
|
3242 |
|
3243 |
var $form_error = $form.find('> .acfe-form-error')
|
3244 |
|
3245 |
+
if (!$form_error.length)
|
3246 |
$form_error = $('<div class="acf-notice -error acf-error-message acfe-form-error" />').prependTo($form);
|
3247 |
|
3248 |
$form_error.append('<p>' + message + '</p>');
|
3250 |
}
|
3251 |
|
3252 |
// Hide errors
|
3253 |
+
else if (errors_position && errors_position === 'hide') {
|
3254 |
|
3255 |
field.$el.find('.acf-notice.-error').remove();
|
3256 |
|
3259 |
},
|
3260 |
|
3261 |
// Ajax Validation
|
3262 |
+
validationBegin: function($form) {
|
3263 |
|
3264 |
+
if (acfe.get('is_admin'))
|
3265 |
return;
|
3266 |
|
3267 |
+
if (typeof $form === 'undefined')
|
3268 |
return;
|
3269 |
|
3270 |
$form.find('.acf-error-message').remove();
|
3275 |
|
3276 |
// Rewrite ACF New Condition
|
3277 |
// Allow conditions to work within wrapped div
|
3278 |
+
acf.newCondition = function(rule, conditions) {
|
3279 |
|
3280 |
// currently setting up conditions for fieldX, this field is the 'target'
|
3281 |
var target = conditions.get('field');
|
3282 |
|
3283 |
// use the 'target' to find the 'trigger' field.
|
3284 |
// - this field is used to setup the conditional logic events
|
3285 |
+
var field = target.getField(rule.field);
|
3286 |
|
3287 |
// ACF Extended: Check in all form if targeted field not found
|
3288 |
+
if (target && !field) {
|
3289 |
|
3290 |
+
field = acf.getField(rule.field);
|
3291 |
|
3292 |
}
|
3293 |
|
3294 |
// bail ealry if no target or no field (possible if field doesn't exist due to HTML error)
|
3295 |
+
if (!target || !field) {
|
3296 |
return false;
|
3297 |
}
|
3298 |
|
3318 |
var model = conditionTypes[0] || acf.Condition;
|
3319 |
|
3320 |
// instantiate
|
3321 |
+
var condition = new model(args);
|
3322 |
|
3323 |
// return
|
3324 |
return condition;
|
3325 |
|
3326 |
};
|
3327 |
+
|
3328 |
})(jQuery);
|
3329 |
+
(function($) {
|
3330 |
+
|
3331 |
+
if (typeof acf === 'undefined')
|
3332 |
return;
|
3333 |
+
|
3334 |
/*
|
3335 |
* Init
|
3336 |
*/
|
3337 |
var repeater = acf.getFieldType('repeater');
|
3338 |
var model = repeater.prototype;
|
3339 |
+
|
3340 |
// Repeater: Lock Layouts
|
3341 |
+
model.acfeOnHover = function() {
|
3342 |
+
|
3343 |
var repeater = this;
|
3344 |
+
|
3345 |
// remove event
|
3346 |
repeater.off('mouseover');
|
3347 |
+
|
3348 |
}
|
3349 |
+
|
3350 |
/*
|
3351 |
* Spawn
|
3352 |
*/
|
3353 |
+
acf.addAction('new_field/type=repeater', function(repeater) {
|
3354 |
+
|
3355 |
// ACFE: Lock
|
3356 |
+
if (repeater.has('acfeRepeaterLock')) {
|
3357 |
+
|
3358 |
+
repeater.removeEvents({
|
3359 |
+
'mouseover': 'onHover'
|
3360 |
+
});
|
3361 |
+
|
3362 |
+
repeater.addEvents({
|
3363 |
+
'mouseover': 'acfeOnHover'
|
3364 |
+
});
|
3365 |
+
|
3366 |
}
|
3367 |
+
|
3368 |
// ACFE: Remove Actions
|
3369 |
+
if (repeater.has('acfeRepeaterRemoveActions')) {
|
3370 |
+
|
3371 |
repeater.$actions().remove();
|
3372 |
+
|
3373 |
repeater.$el.find('thead:first > tr > th.acf-row-handle:last').remove();
|
3374 |
repeater.$rows().find('> .acf-row-handle:last').remove();
|
3375 |
+
|
3376 |
repeater.$control().find('> .acfe-repeater-stylised-button').remove();
|
3377 |
+
|
3378 |
+
|
3379 |
}
|
3380 |
+
|
3381 |
// ACFE: Stylised button
|
3382 |
+
if (repeater.has('acfeRepeaterStylisedButton')) {
|
3383 |
+
|
3384 |
repeater.$button().removeClass('button-primary');
|
3385 |
repeater.$actions().wrap('<div class="acfe-repeater-stylised-button" />');
|
3386 |
+
|
3387 |
}
|
3388 |
|
3389 |
});
|
3390 |
+
|
3391 |
})(jQuery);
|
@@ -1 +1 @@
|
|
1 |
-
function acfe_recaptcha(){var e;e=jQuery,"undefined"!=typeof acf&&e.each(acf.getFields({type:"acfe_recaptcha"}),function(){this.render()})}!function(c){var e;"undefined"!=typeof acf&&((e=acf.getFieldType("flexible_content").prototype).addSortable=function(a){1!=this.get("max")&&this.$layoutsWrap().sortable({items:" > .layout",handle:"> .acf-fc-layout-handle",forceHelperSize:!1,forcePlaceholderSize:!0,revert:50,tolerance:"pointer",scroll:!0,stop:function(e,t){a.render()},update:function(e,t){a.$input().trigger("change")}})},e.acfeOneClick=function(e,t){var a=this.$clones(),i=c(a[0]).data("layout"),a=null;t.hasClass("acf-icon")&&(a=t.closest(".layout"));this.add({layout:i,before:a});a=c(".acf-fc-popup");a.length&&a.hide()},e.acfeLayoutInit=function(t){var e,a,i=this,n=(t.find("> .acf-fc-layout-controls"),t.find("> .acf-fc-layout-handle"),t.find("> .acfe-fc-placeholder"));n.removeClass("acf-hidden"),i.has("acfeFlexibleModalEdition")||i.isLayoutClosed(t)||n.addClass("acf-hidden"),i.isLayoutClosed(t)&&i.has("acfeFlexiblePreview")&&!n.hasClass("-loading")&&(n.addClass("acfe-fc-preview -loading").find("> .acfe-flexible-placeholder").prepend('<span class="spinner"></span>'),n.find("> .acfe-fc-overlay").addClass("-hover"),e=t.children("input").attr("name").replace("[acf_fc_layout]",""),a={action:"acfe/flexible/layout_preview",field_key:i.get("key"),i:t.index(),layout:t.data("layout"),value:acf.serialize(t,e)},acf.doAction("acfe/fields/flexible_content/before_preview",i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/name="+i.get("name"),i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/key="+i.get("key"),i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/name="+i.get("name")+"&layout="+t.data("layout"),i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/key="+i.get("key")+"&layout="+t.data("layout"),i.$el,t,a),c.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),dataType:"html",type:"post",success:function(e){e?n.find("> .acfe-flexible-placeholder").html(e):n.removeClass("acfe-fc-preview"),acf.doAction("acfe/fields/flexible_content/preview",e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/name="+i.get("name"),e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/key="+i.get("key"),e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/name="+i.get("name")+"&layout="+t.data("layout"),e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/key="+i.get("key")+"&layout="+t.data("layout"),e,i.$el,t,a)},complete:function(){n.find("> .acfe-fc-overlay").removeClass("-hover"),n.removeClass("-loading").find("> .acfe-flexible-placeholder > .spinner").remove()}}))},acf.getFieldType("wysiwyg").prototype.initialize=function(){this.has("id")||this.$control().hasClass("delay")||this.initializeEditor()},acf.addAction("show_field/type=wysiwyg",e=function(e){var t;e.has("id")||!e.$el.is(":visible")||acfe.isFilterEnabled("acfeForceOpen")||(t=e.$control()).hasClass("delay")&&(t.removeClass("delay"),t.find(".acf-editor-toolbar").remove(),e.initializeEditor())}),acf.addAction("ready_field/type=wysiwyg",e),acf.addAction("new_field/type=flexible_content",function(a){var e=a.$clones(),t=a.$layouts();c.merge(t,e);t.each(function(){var e=c(this),t=e.data("layout");acf.doAction("acfe/flexible/layouts",e,a),acf.doAction("acfe/flexible/layout/name="+t,e,a)}),1===e.length&&(a.removeEvents({'click [data-name="add-layout"]':"onClickAdd"}),a.addEvents({'click [data-name="add-layout"]':"acfeOneClick"})),a.addEvents({"click .acfe-fc-placeholder":"onClickCollapse"}),a.addEvents({"click .acfe-flexible-opened-actions > a":"onClickCollapse"}),a.has("acfeFlexibleAjax")&&(a.add=function(n){var o=this;if(n=acf.parseArgs(n,{layout:"",before:!1}),!this.allowAdd())return!1;c.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax({action:"acfe/flexible/models",field_key:this.get("key"),layout:n.layout}),dataType:"html",type:"post",beforeSend:function(){c("body").addClass("-loading")},success:function(e){if(e){var t=c(e),a=acf.uniqid(),i="acf["+o.get("key")+"][acfcloneindex]",e=o.$control().find("> input[type=hidden]").attr("name")+"["+a+"]",e=acf.duplicate({target:t,search:i,replace:e,append:o.proxy(function(e,t){n.before?n.before.before(t):o.$layoutsWrap().append(t),acf.enable(t,o.cid),o.render()})});return e.attr("data-id",a),o.$input().trigger("change"),e}},complete:function(){c("body").removeClass("-loading")}})})}),acf.addAction("acfe/flexible/layouts",function(e,t){t.isLayoutClosed(e)&&(e.find("> .acfe-fc-placeholder").removeClass("acf-hidden"),t.has("acfeFlexibleOpen")&&(acfe.enableFilter("acfeForceOpen"),t.openLayout(e),acfe.disableFilter("acfeForceOpen")))}),acf.addAction("show",function(e,t){"collapse"===t&&e.is(".layout")&&(acf.getInstance(e.closest(".acf-field-flexible-content")).has("acfeFlexibleModalEdition")||e.find("> .acfe-fc-placeholder").addClass("acf-hidden"))}),acf.addAction("hide",function(e,t){"collapse"===t&&e.is(".layout")&&!e.is(".acf-clone")&&((t=acf.getInstance(e.closest(".acf-field-flexible-content"))).has("acfeFlexibleRemoveAjaxTitle")&&(t.renderLayout=function(e){}),t.acfeLayoutInit(e))}),acf.addAction("append",function(e){var t;e.is(".layout")&&(t=acf.getInstance(e.closest(".acf-field-flexible-content")),e.is(".acfe-layout-duplicated")||(t.has("acfeFlexibleModalEdition")?e.find('> [data-action="acfe-flexible-modal-edit"]:first').trigger("click"):t.openLayout(e)),t.acfeLayoutInit(e),(t=t.$el.closest(".acfe-modal.-open")).length?t.find("> .acfe-modal-wrapper > .acfe-modal-content").animate({scrollTop:parseInt(e.offset().top)-200},200):!(parseFloat(acf.get("acf_version"))<5.9)&&e.hasClass("-focused")||c("html, body").animate({scrollTop:parseInt(e.offset().top)-200},200))}),acf.addAction("invalid_field",function(e){e.$el.parents(".layout").addClass("acfe-flexible-modal-edit-error")}),acf.addAction("valid_field",function(e){e.$el.parents(".layout").each(function(){var e=c(this);e.find(".acf-error").length||e.removeClass("acfe-flexible-modal-edit-error")})}))}(jQuery),function(r){var n;"undefined"!=typeof acf&&((n=acf.getFieldType("flexible_content").prototype).events["click .acf-fc-layout-handle"]="acfeEditLayoutTitleToggleHandle",n.acfeEditLayoutTitleToggleHandle=function(e,t){!this.has("acfeFlexibleTitleEdition")||(t=t.closest(".layout")).hasClass("acfe-flexible-title-edition")&&t.find("> .acf-fc-layout-handle > .acfe-layout-title > input.acfe-flexible-control-title").trigger("blur")},n.events["click .acfe-layout-title-text"]="acfeEditLayoutTitle",n.acfeEditLayoutTitle=function(e,t){this.has("acfeFlexibleTitleEdition")&&(e.stopPropagation(),this.acfeEditLayoutTitleToggle(e,t))},n.events["blur input.acfe-flexible-control-title"]="acfeEditLayoutTitleToggle",n.acfeEditLayoutTitleToggle=function(e,t){var a,i=t.closest(".layout"),n=i.find("> .acf-fc-layout-handle"),t=n.find(".acfe-layout-title");i.hasClass("acfe-flexible-title-edition")?(""===(a=t.find("> input[data-acfe-flexible-control-title-input]")).val()&&a.val(a.attr("placeholder")).trigger("input"),i.removeClass("acfe-flexible-title-edition"),a.insertAfter(n)):(a=(a=i.find("> input[data-acfe-flexible-control-title-input]")).appendTo(t),i.addClass("acfe-flexible-title-edition"),a.focus().attr("size",a.val().length))},n.events["click input.acfe-flexible-control-title"]="acfeEditLayoutTitlePropagation",n.acfeEditLayoutTitlePropagation=function(e,t){e.stopPropagation()},n.events["input [data-acfe-flexible-control-title-input]"]="acfeEditLayoutTitleInput",n.acfeEditLayoutTitleInput=function(e,t){var a=t.closest(".layout").find("> .acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text"),i=t.val();t.attr("size",i.length),a.html(i)},n.events["keypress [data-acfe-flexible-control-title-input]"]="acfeEditLayoutTitleInputEnter",n.acfeEditLayoutTitleInputEnter=function(e,t){13===e.keyCode&&(e.preventDefault(),t.blur())},n.events["click [data-acfe-flexible-settings]"]="acfeLayoutSettings",n.acfeLayoutSettings=function(e,t){var a=this,i=t.closest(".layout"),n=i.find("> .acfe-modal.-settings"),o=i.find("> .acf-fc-layout-handle"),t=o.find("> .acf-fc-layout-order").outerHTML(),o=o.find(".acfe-layout-title-text").text();new acfe.Popup(n,{title:t+" "+o,footer:acf.__("Close"),onClose:function(){a.has("acfeFlexiblePreview")&&a.closeLayout(i)}})},n.events["click [data-acfe-flexible-control-toggle]"]="acfeLayoutToggle",n.acfeLayoutToggle=function(e,t){var a=t.closest(".layout"),t=a.find("> .acfe-flexible-layout-toggle");t.length&&("1"===t.val()?(a.removeClass("acfe-flexible-layout-hidden"),t.val("")):(a.addClass("acfe-flexible-layout-hidden"),t.val("1")))},acf.addAction("acfe/flexible/layouts",function(e,t){!t.has("acfeFlexibleToggle")||(t=e.find("> .acfe-flexible-layout-toggle")).length&&("1"===t.val()?e.addClass("acfe-flexible-layout-hidden"):e.removeClass("acfe-flexible-layout-hidden"))}),n.events["click [data-acfe-flexible-control-clone]"]="acfeCloneLayout",n.acfeCloneLayout=function(e,t){var a,i=this,n=t.closest(".layout"),o=n.data("layout"),c=r(i.$popup().html()),l=i.$layouts(),c=c.find('[data-layout="'+o+'"]'),c=(c.data("min"),c.data("max")||0),o=(a=o,l.filter(function(){return r(this).data("layout")===a}).length);if(c&&c<=o)return t.addClass("disabled"),!1;t.removeClass("disabled"),i.acfeFixInputs(n);o=n.clone();i.acfeCleanLayouts(o);t=t.closest(".acf-flexible-content").find("> input[type=hidden]").attr("name"),i.acfeDuplicate({layout:o,before:n,parent:t})},n.events["click [data-acfe-flexible-control-copy]"]="acfeCopyLayout",n.acfeCopyLayout=function(e,t){var a=t.closest(".layout").clone(),t=this.$control().find("> input[type=hidden]").attr("name");this.acfeFixInputs(a),this.acfeCleanLayouts(a);t=JSON.stringify({source:t,layouts:a[0].outerHTML}),a=r('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo(r("body"));a.attr("value",t).select(),document.execCommand("copy")?alert("Layout has been transferred to your clipboard"):prompt("Copy the following layout data to your clipboard",t),a.remove()},n.acfeCopyLayouts=function(){var e=this,t=e.$layoutsWrap().clone(),a=e.$control().find("> input[type=hidden]").attr("name");e.acfeFixInputs(t),e.acfeCleanLayouts(t);t=JSON.stringify({source:a,layouts:t.html()}),e=r('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo(e.$el);e.attr("value",t).select(),document.execCommand("copy")?alert("Layouts have been transferred to your clipboard"):prompt("Copy the following layouts data to your clipboard",t),e.remove()},n.acfePasteLayouts=function(){var n=this,e=prompt("Paste layouts data in the following field");if(null!=e&&""!==e)try{var t=JSON.parse(e),i=t.source,t=r(t.layouts).closest("[data-layout]");if(!t.length)return alert("No layouts data available");var o=r(n.$popup().html()),c=n.$layouts(),l=[];if(t.each(function(){var e,t=r(this),a=t.data("layout"),i=o.find('[data-layout="'+a+'"]'),i=(i.data("min"),i.data("max")||0),a=(e=a,c.filter(function(){return r(this).data("layout")===e}).length);i&&i<=a||n.$clone(t.attr("data-layout")).length&&l.push(t)}),!l.length)return alert("No layouts could be pasted");r.each(l,function(){var e=r(this),t=i+"["+e.attr("data-id")+"]",a=n.$control().find("> input[type=hidden]").attr("name");n.acfeDuplicate({layout:e,before:!1,search:t,parent:a})})}catch(e){console.log(e),alert("Invalid data")}},n.events['click [data-name="acfe-flexible-control-button"]']="acfeControl",n.acfeControl=function(e,t){var a=this,i=t.next(".tmpl-acfe-flexible-control-popup").html();new(acf.models.TooltipConfirm.extend({render:function(){this.html(this.get("text")),this.$el.addClass("acf-fc-popup")}}))({target:t,targetConfirm:!1,text:i,context:a,confirm:function(e,t){"paste"===t.attr("data-acfe-flexible-control-action")?a.acfePasteLayouts():"copy"===t.attr("data-acfe-flexible-control-action")&&a.acfeCopyLayouts()}}).on("click","a","onConfirm")},n.acfeDuplicate=function(a){if(a=acf.parseArgs(a,{layout:"",before:!1,parent:!1,search:"",replace:""}),!this.allowAdd())return!1;var i=acf.uniqid();a.parent&&(a.search||(a.search=a.parent+"["+a.layout.attr("data-id")+"]"),a.replace=a.parent+"["+i+"]");var e,t={target:a.layout,search:a.search,replace:a.replace,append:this.proxy(function(e,t){t.addClass("acfe-layout-duplicated"),t.attr("data-id",i),a.before?a.before.after(t):this.$layoutsWrap().append(t),acf.enable(t,this.cid),this.render()})};e=parseFloat(acf.get("acf_version"))<5.9?acf.duplicate(t):n.acfeNewAcfDuplicate(t),this.$input().trigger("change");t=acf.getFields({type:"tab",parent:e});return t.length&&r.each(t,function(){this.$el.hasClass("acf-hidden")&&this.tab.$el.addClass("acf-hidden")}),e},n.acfeNewAcfDuplicate=function(e){e instanceof jQuery&&(e={target:e}),(e=acf.parseArgs(e,{target:!1,search:"",replace:"",rename:!0,before:function(e){},after:function(e,t){},append:function(e,t){e.after(t)}})).target=e.target||e.$el;var t=e.target;e.search=e.search||t.attr("data-id"),e.replace=e.replace||acf.uniqid(),e.before(t),acf.doAction("before_duplicate",t);var a=t.clone();return e.rename&&acf.rename({target:a,search:e.search,replace:e.replace,replacer:"function"==typeof e.rename?e.rename:null}),a.removeClass("acf-clone"),a.find(".ui-sortable").removeClass("ui-sortable"),e.after(t,a),acf.doAction("after_duplicate",t,a),e.append(t,a),acf.doAction("append",a),a},n.acfeFixInputs=function(e){e.find("input").each(function(){r(this).attr("value",this.value)}),e.find("textarea").each(function(){r(this).html(this.value)}),e.find("input:radio,input:checkbox").each(function(){this.checked?r(this).attr("checked","checked"):r(this).attr("checked",!1)}),e.find("option").each(function(){this.selected?r(this).attr("selected","selected"):r(this).attr("selected",!1)})},n.acfeCleanLayouts=function(e){e.find(".acf-editor-wrap").each(function(){var e=r(this);e.find(".wp-editor-container div").remove(),e.find(".wp-editor-container textarea").css("display","")}),e.find(".acf-date-picker").each(function(){r(this).find("input.input").removeClass("hasDatepicker").removeAttr("id")}),e.find(".acf-time-picker").each(function(){r(this).find("input.input").removeClass("hasDatepicker").removeAttr("id")}),e.find(".acf-date-time-picker").each(function(){r(this).find("input.input").removeClass("hasDatepicker").removeAttr("id")}),e.find(".acfe-field-code-editor").each(function(){r(this).find(".CodeMirror").remove()}),e.find(".acf-color-picker").each(function(){var e=r(this),t=e.find("> input"),a=e.find(".wp-picker-container input.wp-color-picker").clone();t.after(a),e.find(".wp-picker-container").remove()}),e.find(".acf-field-post-object").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden").removeClass()}),e.find(".acf-field-page-link").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden").removeClass()}),e.find(".acf-field-select").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden").removeClass()}),e.find(".acf-field-font-awesome").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden")}),e.find(".acf-tab-wrap").each(function(){var e=r(this),t=e.closest(".acf-fields"),a=[];r.each(e.find("li a"),function(){a.push(r(this))}),t.find("> .acf-field-tab").each(function(){$current_tab=r(this),r.each(a,function(){var e=r(this);e.attr("data-key")===$current_tab.attr("data-key")&&$current_tab.find("> .acf-input").append(e)})}),e.remove()}),e.find(".acf-field-accordion").each(function(){var e=r(this);e.find("> .acf-accordion-title > .acf-accordion-icon").remove(),e.after('<div class="acf-field acf-field-accordion" data-type="accordion"><div class="acf-input"><div class="acf-fields" data-endpoint="1"></div></div></div>')})},acf.addAction("new_field/type=flexible_content",function(e){e.has("acfeFlexibleLock")&&e.removeEvents({mouseover:"onHover"})}))}(jQuery),function(l){"undefined"!=typeof acf&&(acf.getFieldType("flexible_content").prototype.acfeModalSelect=function(e,t){var a=this;if(!a.validateAdd())return!1;var i=null;t.hasClass("acf-icon")&&(i=t.closest(".layout"));var n=a.getPopupHTML(),o={array:[],html:""};l(n).find("li a span[data-acfe-flexible-category]").each(function(){var e=l(this).data("acfe-flexible-category");l.each(e,function(){-1===function(e,t){for(var a=t.length,i=e.toString().toLowerCase(),n=0;n<a;n++)if(t[n].toLowerCase()===i)return n;return-1}(this,o.array)&&o.array.push(this)})}),o.array.length&&(o.array.sort(),o.html+='<h2 class="acfe-flexible-categories nav-tab-wrapper">',o.html+='<a href="#" data-acfe-flexible-category="acfe-all" class="nav-tab nav-tab-active"><span class="dashicons dashicons-menu"></span></a>',l(o.array).each(function(e,t){o.html+='<a href="#" data-acfe-flexible-category="'+t+'" class="nav-tab">'+t+"</a>"}),o.html+="</h2>");t=acf.__("Add Row");a.has("acfeFlexibleModalTitle")&&(t=a.get("acfeFlexibleModalTitle"));var c=l('<div class="acfe-modal">'+o.html+'<div class="acfe-flex-container">'+n+"</div></div>").appendTo("body");new acfe.Popup(c,{title:t,size:"full",destroy:!0}),a.has("acfeFlexibleModalCol")&&c.find(".acfe-modal-content .acfe-flex-container").addClass("acfe-col-"+a.get("acfeFlexibleModalCol")),a.has("acfeFlexibleThumbnails")&&c.find(".acfe-modal-content .acfe-flex-container").addClass("acfe-flex-thumbnails"),c.find("li:first-of-type a").blur(),c.find("li a span.badge").each(function(){l(this).addClass("acf-js-tooltip dashicons dashicons-info")}),c.find(".acfe-flexible-categories a").click(function(e){e.preventDefault();e=l(this);e.closest(".acfe-flexible-categories").find("a").removeClass("nav-tab-active"),e.addClass("nav-tab-active");var i=e.data("acfe-flexible-category");c.find("a[data-layout] span[data-acfe-flexible-category]").each(function(){var a=l(this);a.closest("li").show();var e=a.data("acfe-flexible-category");"acfe-all"!==i&&(a.closest("li").hide(),l.each(e,function(e,t){if(i.toLowerCase()===t.toLowerCase())return a.closest("li").show(),!1}))})}),c.on("click","a[data-layout]",function(e){e.preventDefault(),acfe.closePopup(),a.add({layout:l(this).data("layout"),before:i})})},acf.addAction("new_field/type=flexible_content",function(e){e.has("acfeFlexibleModal")&&(e.$clones().length<=1||(e.removeEvents({'click [data-name="add-layout"]':"onClickAdd"}),e.addEvents({'click [data-name="add-layout"]':"acfeModalSelect"})))}))}(jQuery),function(){var e;"undefined"!=typeof acf&&((e=acf.getFieldType("flexible_content").prototype).events['click [data-action="acfe-flexible-modal-edit"]']="acfeModalEdit",e.acfeModalEdit=function(e,t){var a=this,i=t.closest(".layout"),n=i.find("> .acfe-modal.-fields"),o=i.find("> .acf-fc-layout-handle"),c=o.find("> .acf-fc-layout-order").outerHTML(),t=o.find(".acfe-layout-title-text").text(),o=!1;a.has("acfeFlexibleCloseButton")&&(o=acf.__("Close")),new acfe.Popup(n,{title:c+" "+t,footer:o,onOpen:function(){a.openLayout(i)},onClose:function(){a.closeLayout(i)}})},acf.addAction("new_field/type=flexible_content",function(e){e.has("acfeFlexibleModalEdition")&&(e.has("acfeFlexiblePlaceholder")||e.has("acfeFlexiblePreview"))&&(e.removeEvents({'click [data-name="collapse-layout"]':"onClickCollapse"}),e.removeEvents({"click .acfe-fc-placeholder":"onClickCollapse"}))}))}(jQuery),function(c){var e;"undefined"!=typeof acf&&(e=acf.Field.extend({type:"acfe_recaptcha",actions:{validation_failure:"validationFailure"},$control:function(){return this.$(".acfe-field-recaptcha")},$input:function(){return this.$('input[type="hidden"]')},$selector:function(){return this.$control().find("> div")},selector:function(){return this.$selector()[0]},version:function(){return this.get("version")},render:function(){var t=this;"v2"===this.version()?this.recaptcha=grecaptcha.render(t.selector(),{sitekey:t.$control().data("site-key"),theme:t.$control().data("theme"),size:t.$control().data("size"),callback:function(e){t.$input().val(e).change(),t.$input().closest(".acf-input").find("> .acf-notice.-error").hide()},"error-callback":function(){t.$input().val("error").change()},"expired-callback":function(){t.$input().val("expired").change()}}):"v3"===this.version()&&grecaptcha.ready(function(){grecaptcha.execute(t.$control().data("site-key"),{action:"homepage"}).then(function(e){t.$input().val(e).change(),t.$input().closest(".acf-input").find("> .acf-notice.-error").hide()})})},validationFailure:function(e){"v2"===this.version()&&grecaptcha.reset(this.recaptcha)}}),acf.registerFieldType(e),e=acf.Field.extend({wait:"ready",type:"acfe_code_editor",events:{showField:"onShow"},$control:function(){return this.$el.find("> .acf-input > .acf-input-wrap")},$input:function(){return this.$el.find("> .acf-input > .acf-input-wrap > textarea")},input:function(){return this.$input()[0]},rows:function(){return this.$input().attr("rows")},initialize:function(){this.rows=this.$control().data("rows"),this.max_rows=this.$control().data("max-rows"),this.mode=this.$control().data("mode"),this.lines=this.$control().data("lines"),this.indentUnit=this.$control().data("indent-unit");var e=[],t=wp.codeEditor.defaultSettings.codemirror,a={lineNumbers:this.lines,lineWrapping:!0,styleActiveLine:!1,continueComments:!0,indentUnit:this.indentUnit,tabSize:1,indentWithTabs:!0,mode:this.mode,extraKeys:{Tab:function(e){e.execCommand("indentMore")},"Shift-Tab":function(e){e.execCommand("indentLess")}}},a=jQuery.extend(t,a);e.codemirror=a,this.editor=wp.codeEditor.initialize(this.input(),e),(this.rows||this.max_rows)&&(this.rows&&(this.editor.codemirror.getScrollerElement().style.minHeight=18.5*this.rows+"px"),this.max_rows&&(this.editor.codemirror.getScrollerElement().style.maxHeight=18.5*this.max_rows+"px"),this.editor.codemirror.refresh()),(field=this).editor.codemirror.on("change",function(){field.editor.codemirror.save(),field.$input().change()})},onShow:function(){this.editor.codemirror&&this.editor.codemirror.refresh()}}),acf.registerFieldType(e),e=acf.Field.extend({type:"textarea",events:{"keydown textarea":"onInput"},onInput:function(e,t){var a,i;this.has("acfeTextareaCode")&&9===e.keyCode&&(e.preventDefault(),a=this.$el.find("textarea")[0],i=a.selectionStart,this.$el.find("textarea").val(function(e,t){return t.substring(0,i)+" "+t.substring(a.selectionEnd)}),a.selectionEnd=i+4)}}),acf.registerFieldType(e),e=acf.Field.extend({type:"acfe_slug",events:{"input input":"onInput","focusout input":"onFocusOut"},onInput:function(e,t){t.val(t.val().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/\_\_+/g,"_").replace(/^-+/,""))},onFocusOut:function(e,t){t.val(t.val().toLowerCase().replace(/-+$/,"").replace(/_+$/,""))}}),acf.registerFieldType(e),e=acf.Field.extend({type:"acfe_button",events:{"click input":"onClick","click button":"onClick"},$input:function(){return this.$("input").length?this.$("input"):this.$("button").length?this.$("button"):void 0},initialize:function(){var e=this.$input();this.inherit(e)},onClick:function(e,t){var a;this.get("ajax")&&(e.preventDefault(),a={action:"acfe/fields/button",field_name:this.get("name"),field_key:this.get("key")},acf.doAction("acfe/fields/button/before_ajax",this.$el,a),acf.doAction("acfe/fields/button/before",this.$el,a),acf.doAction("acfe/fields/button/before/key="+this.get("key"),this.$el,a),acf.doAction("acfe/fields/button/before/name="+this.get("name"),this.$el,a),c.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",context:this,success:function(e){acf.doAction("acfe/fields/button/ajax_success",e,this.$el,a),acf.doAction("acfe/fields/button/success",e,this.$el,a),acf.doAction("acfe/fields/button/success/key="+this.get("key"),e,this.$el,a),acf.doAction("acfe/fields/button/success/name="+this.get("name"),e,this.$el,a)},complete:function(e){e=e.responseText;acf.doAction("acfe/fields/button/complete",e,this.$el,a),acf.doAction("acfe/fields/button/complete/key="+this.get("key"),e,this.$el,a),acf.doAction("acfe/fields/button/complete/name="+this.get("name"),e,this.$el,a)}}))}}),acf.registerFieldType(e),e=acf.Field.extend({type:"acfe_advanced_link",events:{'click a[data-name="add"]':"onClickEdit",'click a[data-name="edit"]':"onClickEdit",'click a[data-name="remove"]':"onClickRemove"},$control:function(){return this.$(".acf-link")},initialize:function(){},getValue:function(){var e={type:this.$(".input-type :checked").val(),title:this.$(".input-title").val(),url:this.$(".input-url").val(),post:this.$(".input-post :selected").text(),term:this.$(".input-term :selected").text(),target:this.$(".input-target").is(":checked")};return"post"===e.type?e.url=e.post:"term"===e.type&&(e.url=e.term),e},setValue:function(e){e=acf.parseArgs(e,{remove:!1,title:"",url:"",target:!1});var t=this.$control();t.removeClass("-value -external"),e.url&&t.addClass("-value"),e.target&&t.addClass("-external"),this.$(".link-title").html(e.title),this.$(".link-url").attr("href",e.url).html(e.url),e.remove&&(this.$(".input-type :checked").prop("checked",!1),this.$('.input-type [value="url"]').prop("checked",!0).trigger("change"),this.$(".input-title").val(""),this.$(".input-target").prop("checked",!1),this.$(".input-url").val("").trigger("change"),this.$(".input-post").val("").trigger("change"),this.$(".input-term").val("").trigger("change"))},onClickEdit:function(e,t){var a=t.closest(".acf-input").find(".acfe-modal"),t=a.attr("data-modal-title"),i=this;new acfe.Popup(a,{title:t,size:"medium",footer:acf.__("Close"),onClose:function(){i.onChange()}})},onClickRemove:function(e,t){this.setValue({remove:!0})},onChange:function(e,t){var a=this.getValue();this.setValue(a)}}),acf.registerFieldType(e),new acf.Model({actions:{invalid_field:"invalidField"},filters:{"select2_ajax_data/type=post_object":"ajaxField"},invalidField:function(e){var t=e.$el.closest(".acf-field-acfe-advanced-link").not(".acf-error");t.length&&acf.getInstance(t).showError(e.notice.get("text"))},ajaxField:function(e,t,a,i,n){if("post"!==i.get("key"))return e;a=acf.getInstance(a.closest(".acf-field-acfe-advanced-link"));return a&&(e.field_key=a.get("key")),e}}),e=acf.Field.extend({wait:!1,type:"group",events:{'click [data-name="edit"]':"onClick",duplicateField:"onDuplicate"},initialize:function(){var e;this.has("acfeGroupModal")&&(e=this.get("acfeGroupModalButton"),this.$el.find("> .acf-input > .acf-fields, > .acf-input > .acf-table").wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>'),this.$el.find("> .acf-input").append('<a data-name="edit" class="acf-button button" href="#">'+e+"</a>"))},onClick:function(e,t){var a=this.$el.find("> .acf-label").text().trim(),i=this.$el.find("> .acf-input > .acfe-modal");a.length||(a=this.get("acfeGroupModalButton"));var n=!1;this.has("acfeGroupModalClose")&&(n=acf.__("Close"));var o="large";this.has("acfeGroupModalSize")&&(o=this.get("acfeGroupModalSize")),new acfe.Popup(i,{title:a,size:o,footer:n})},onDuplicate:function(e,t,a){a.find('a[data-name="edit"]').remove()}}),acf.registerFieldType(e),e=acf.Field.extend({wait:!1,type:"clone",events:{'click [data-name="edit"]':"onClick",duplicateField:"onDuplicate"},initialize:function(){var e;this.has("acfeCloneModal")&&(e=this.get("acfeCloneModalButton"),this.$el.find("> .acf-input > .acf-fields, > .acf-input > .acf-table").wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>'),this.$el.find("> .acf-input").append('<a data-name="edit" class="acf-button button" href="#">'+e+"</a>"))},onClick:function(e,t){var a=this.$el.find("> .acf-label").text().trim(),i=this.$el.find("> .acf-input > .acfe-modal");a.length||(a=this.get("acfeCloneModalButton"));var n=!1;this.has("acfeCloneModalClose")&&(n=acf.__("Close"));var o="large";this.has("acfeCloneModalSize")&&(o=this.get("acfeCloneModalSize")),new acfe.Popup(i,{title:a,size:o,footer:n})},onDuplicate:function(e,t,a){a.find('a[data-name="edit"]').remove()}}),acf.registerFieldType(e),e=acf.Field.extend({wait:"new_field",type:"acfe_column",$control:function(){return this.$(".acf-fields:first")},initialize:function(){if(this.$el.is("td")&&(this.$el.closest(".acf-table").find('th[data-type="acfe_column"]').remove(),this.remove()),this.get("endpoint"))return this.$el.find("> .acf-label").remove(),void this.$el.find("> .acf-input").remove();var e=this.$el,t=this.$el.find("> .acf-label"),a=(this.$inputWrap(),this.$control());t.remove();t=e.parent();a.addClass(t.hasClass("-left")?"-left":""),a.addClass(t.hasClass("-clear")?"-clear":""),a.append(e.nextUntil(".acf-field-acfe-column",".acf-field"))}}),acf.registerFieldType(e),new acf.Model({actions:{"new_field/type=select":"newField"},newField:function(e){e.inherit(e.$input()),!e.get("ui")&&e.get("allow_null")&&e.$input().find("option").each(function(e,t){t.value||t.text.startsWith("- ")&&t.text.endsWith(" -")&&(t.text=t.text.substring(2),t.text=t.text.substring(0,t.text.length-2))}),(e.has("acfePrepend")||e.has("acfeAppend"))&&(e.$input().parent(".acf-input-wrap").length||(e.$input().wrapAll('<div class="acf-input-wrap"></div>'),e.get("ui")&&e.$(".acf-input-wrap:first").append(e.$(".select2")),e.has("acfePrepend")&&(e.$(".acf-input-wrap:first").before('<div class="acf-input-prepend">'+e.get("acfePrepend")+"</div>"),e.$input().addClass("acf-is-prepended")),e.has("acfeAppend")&&(e.$(".acf-input-wrap:first").before('<div class="acf-input-append">'+e.get("acfeAppend")+"</div>"),e.$input().addClass("acf-is-appended"))))}}),new acf.Model({actions:{select2_init:"select2Init"},filters:{select2_args:"select2Args",select2_ajax_data:"select2Ajax"},select2Init:function(t,e,a,i,n){var o;i.get("acfeSearchPlaceholder")&&(o=i.get("acfeSearchPlaceholder"),t.on("select2:open",function(e){i.get("multiple")?t.val()||i.$(".select2-search__field").attr("placeholder",o):c(".select2-search.select2-search--dropdown > .select2-search__field").attr("placeholder",o)}),i.get("multiple")&&t.on("select2:close",function(e){t.val()||i.$(".select2-search__field").attr("placeholder",i.get("placeholder"))})),acf.doAction("select2_init/type="+i.get("type"),t,e,a,i,n),acf.doAction("select2_init/name="+i.get("name"),t,e,a,i,n),acf.doAction("select2_init/key="+i.get("key"),t,e,a,i,n)},select2Args:function(e,t,a,i,n){return i.get("acfeAllowCustom")&&(e.tags=!0,e.createTag=function(e){var t=c.trim(e.term);if(""===t)return null;var a=!1;return this.$element.find("option").each(function(){if(this.value.toLowerCase()===t.toLowerCase())return!(a=!0)}),a?null:{id:t,text:t}},e.insertTag=function(e,t){var a=!1;c.each(e,function(){if(c.trim(t.text).toUpperCase()===c.trim(this.text).toUpperCase())return!(a=!0)}),a||e.unshift(t)}),e=acf.applyFilters("select2_args/type="+i.get("type"),e,t,a,i,n),e=acf.applyFilters("select2_args/name="+i.get("name"),e,t,a,i,n),e=acf.applyFilters("select2_args/key="+i.get("key"),e,t,a,i,n)},select2Ajax:function(e,t,a,i,n){return e=acf.applyFilters("select2_ajax_data/type="+i.get("type"),e,t,a,i,n),e=acf.applyFilters("select2_ajax_data/name="+i.get("name"),e,t,a,i,n),(e=acf.applyFilters("select2_ajax_data/key="+i.get("key"),e,t,a,i,n)).action&&(e=acf.applyFilters("select2_ajax_data/action="+e.action,e,t,a,i,n)),e}}),new acf.Model({actions:{"prepare_field/type=tab":"prepareField"},prepareField:function(e){if(e.has("noPreference")){var t=e.findTabs(),t=acf.getInstances(t),i=e.get("key");if(t.length){var n=acf.getPreference("this.tabs");if(!n)return;c.each(t,function(e,t){var a=t.get("index");t.data.key===i&&(n[a]=0)}),acf.setPreference("this.tabs",n)}}}}),new acf.Model({actions:{"new_field/type=checkbox":"newField"},newField:function(a){a.has("acfeLabels")&&c.each(a.get("acfeLabels"),function(e,t){a.$control().find('input[type=checkbox][value="'+t+'"]').closest("ul").before("<strong>"+e+"</strong>")})}}),new acf.Model({actions:{"new_field/type=radio":"newField"},newField:function(a){a.has("acfeLabels")&&(c.each(a.get("acfeLabels"),function(e,t){a.$control().find('input[type=radio][value="'+t+'"]').closest("li").addClass("parent").prepend("<strong>"+e+"</strong>")}),a.$control().hasClass("acf-hl")&&a.$control().find("li.parent").each(function(){c(this).nextUntil("li.parent").addBack().wrapAll("<li><ul></ul></li>")}))}}),new acf.Model({field:!1,placement:!1,actions:{new_field:"newField"},newField:function(e){(this.field=e).has("instructionTooltip")&&this.setTooltip(),e.has("instructionAboveField")&&this.setAboveField(),e.has("instructionPlacement")&&this.overridePlacement(e.get("instructionPlacement"))},setTooltip:function(){this.field.$labelWrap().prepend('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="'+_.escape(this.field.get("instructionTooltip"))+'"></span>'),this.field.$labelWrap().find(".description").remove()},setAboveField:function(){this.field.$inputWrap().prepend('<p class="description">'+this.field.get("instructionAboveField")+"</p>"),this.field.$labelWrap().find(".description").remove()},overridePlacement:function(e){var t=this.getPlacement();t&&t!==e&&this.setPlacement(e)},getPlacement:function(){var e=!1;return this.field.$labelWrap().find(">.description").length?e="label":this.field.$inputWrap().find(">.description:first-child").length?e="above_field":this.field.$inputWrap().find(">.description:last-child").length?e="field":this.field.$labelWrap().find(">.acfe-field-tooltip").length&&(e="tooltip"),this.placement=e,this.placement},$getInstruction:function(){var e=this.getPlacement();return"label"===e?this.field.$labelWrap().find(">.description"):"above_field"===e?this.field.$inputWrap().find(">.description:first-child"):"field"===e?this.field.$inputWrap().find(">.description:last-child"):"tooltip"===e&&this.field.$labelWrap().find(">.acfe-field-tooltip")},setPlacement:function(e){var t,a=this.$getInstruction();"tooltip"===this.placement&&(t=a.attr("title"),a.remove(),a=c('<p class="description">'+t+"</p>")),"label"===e?this.field.$labelWrap().append(a):"above_field"===e?this.field.$inputWrap().prepend(a):"field"===e?this.field.$inputWrap().append(a):"tooltip"===e&&(this.field.$labelWrap().prepend(c('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="'+_.escape(a.html())+'"></span>')),a.remove())}}))}(jQuery),jQuery,"undefined"!=typeof acf&&(acf.registerConditionForFieldType("equalTo","acfe_code_editor"),acf.registerConditionForFieldType("notEqualTo","acfe_code_editor"),acf.registerConditionForFieldType("patternMatch","acfe_code_editor"),acf.registerConditionForFieldType("contains","acfe_code_editor"),acf.registerConditionForFieldType("hasValue","acfe_code_editor"),acf.registerConditionForFieldType("hasNoValue","acfe_code_editor"),acf.registerConditionForFieldType("equalTo","date_picker"),acf.registerConditionForFieldType("notEqualTo","date_picker"),acf.registerConditionForFieldType("patternMatch","date_picker"),acf.registerConditionForFieldType("contains","date_picker"),acf.registerConditionForFieldType("greaterThan","date_picker"),acf.registerConditionForFieldType("lessThan","date_picker"),acf.registerConditionForFieldType("equalTo","date_time_picker"),acf.registerConditionForFieldType("notEqualTo","date_time_picker"),acf.registerConditionForFieldType("patternMatch","date_time_picker"),acf.registerConditionForFieldType("contains","date_time_picker"),acf.registerConditionForFieldType("equalTo","time_picker"),acf.registerConditionForFieldType("notEqualTo","time_picker"),acf.registerConditionForFieldType("patternMatch","time_picker"),acf.registerConditionForFieldType("contains","time_picker"),acf.registerConditionForFieldType("equalTo","taxonomy"),acf.registerConditionForFieldType("notEqualTo","taxonomy"),acf.registerConditionForFieldType("patternMatch","taxonomy"),acf.registerConditionForFieldType("contains","taxonomy"),acf.registerConditionForFieldType("hasValue","taxonomy"),acf.registerConditionForFieldType("hasNoValue","taxonomy"),acf.registerConditionForFieldType("equalTo","acfe_forms"),acf.registerConditionForFieldType("notEqualTo","acfe_forms"),acf.registerConditionForFieldType("patternMatch","acfe_forms"),acf.registerConditionForFieldType("contains","acfe_forms"),acf.registerConditionForFieldType("hasValue","acfe_forms"),acf.registerConditionForFieldType("hasNoValue","acfe_forms"),acf.registerConditionForFieldType("equalTo","acfe_hidden"),acf.registerConditionForFieldType("notEqualTo","acfe_hidden"),acf.registerConditionForFieldType("patternMatch","acfe_hidden"),acf.registerConditionForFieldType("contains","acfe_hidden"),acf.registerConditionForFieldType("hasValue","acfe_hidden"),acf.registerConditionForFieldType("hasNoValue","acfe_hidden"),acf.registerConditionForFieldType("equalTo","acfe_post_statuses"),acf.registerConditionForFieldType("notEqualTo","acfe_post_statuses"),acf.registerConditionForFieldType("patternMatch","acfe_post_statuses"),acf.registerConditionForFieldType("contains","acfe_post_statuses"),acf.registerConditionForFieldType("hasValue","acfe_post_statuses"),acf.registerConditionForFieldType("hasNoValue","acfe_post_statuses"),acf.registerConditionForFieldType("equalTo","acfe_post_types"),acf.registerConditionForFieldType("notEqualTo","acfe_post_types"),acf.registerConditionForFieldType("patternMatch","acfe_post_types"),acf.registerConditionForFieldType("contains","acfe_post_types"),acf.registerConditionForFieldType("hasValue","acfe_post_types"),acf.registerConditionForFieldType("hasNoValue","acfe_post_types"),acf.registerConditionForFieldType("equalTo","acfe_slug"),acf.registerConditionForFieldType("notEqualTo","acfe_slug"),acf.registerConditionForFieldType("patternMatch","acfe_slug"),acf.registerConditionForFieldType("contains","acfe_slug"),acf.registerConditionForFieldType("hasValue","acfe_slug"),acf.registerConditionForFieldType("hasNoValue","acfe_slug"),acf.registerConditionForFieldType("equalTo","acfe_taxonomies"),acf.registerConditionForFieldType("notEqualTo","acfe_taxonomies"),acf.registerConditionForFieldType("patternMatch","acfe_taxonomies"),acf.registerConditionForFieldType("contains","acfe_taxonomies"),acf.registerConditionForFieldType("hasValue","acfe_taxonomies"),acf.registerConditionForFieldType("hasNoValue","acfe_taxonomies"),acf.registerConditionForFieldType("equalTo","acfe_taxonomy_terms"),acf.registerConditionForFieldType("notEqualTo","acfe_taxonomy_terms"),acf.registerConditionForFieldType("patternMatch","acfe_taxonomy_terms"),acf.registerConditionForFieldType("contains","acfe_taxonomy_terms"),acf.registerConditionForFieldType("hasValue","acfe_taxonomy_terms"),acf.registerConditionForFieldType("hasNoValue","acfe_taxonomy_terms"),acf.registerConditionForFieldType("equalTo","acfe_user_roles"),acf.registerConditionForFieldType("notEqualTo","acfe_user_roles"),acf.registerConditionForFieldType("patternMatch","acfe_user_roles"),acf.registerConditionForFieldType("contains","acfe_user_roles"),acf.registerConditionForFieldType("hasValue","acfe_user_roles"),acf.registerConditionForFieldType("hasNoValue","acfe_user_roles")),function(c){"undefined"!=typeof acf&&(new acf.Model({actions:{prepare:"prepare","new_field/type=date_picker":"datePicker","new_field/type=date_time_picker":"datePicker","new_field/type=time_picker":"datePicker","new_field/type=google_map":"googleMap",invalid_field:"invalidField",validation_begin:"validationBegin"},prepare:function(){var e;acfe.get("is_admin")||(acf.isset(window,"wp","media","view","settings","post")&&(wp.media.view.settings.post=!1),c('.acfe-form[data-hide-unload="1"]').length&&acf.unload.disable(),(e=c(".acfe-form-success")).length&&(window.history.replaceState&&window.history.replaceState(null,null,window.location.href),e.each(function(){var e=c(this).data("form-name"),t=c(this).data("form-id");acf.doAction("acfe/form/submit/success"),acf.doAction("acfe/form/submit/success/id="+t),acf.doAction("acfe/form/submit/success/name="+e)})),c('.acf-form .button, .acf-form [type="submit"], .acfe-form .button, .acfe-form [type="submit"]').click(function(e){c(this).hasClass("disabled")&&e.preventDefault()}))},datePicker:function(e){var t;acfe.get("is_admin")||(!(t=e.$el.closest(".acfe-form")).length||(t=t.data("fields-class"))&&e.$inputText().addClass(t))},googleMap:function(e){var t;acfe.get("is_admin")||(!(t=e.$el.closest(".acfe-form")).length||(t=t.data("fields-class"))&&e.$search().addClass(t))},invalidField:function(e){var t,a,i,n,o;acfe.get("is_admin")||(t=e.$el.closest(".acfe-form")).length&&(a=t.data("errors-position"),(o=t.data("errors-class"))&&o.length&&e.$el.find(".acf-notice.-error").addClass(o),a&&"below"===a?(e.$control().length?e.$el.find(".acf-notice.-error").insertAfter(e.$control()):e.$input().length&&e.$el.find(".acf-notice.-error").insertAfter(e.$input()),n=!1,e.$control().length?n=e.$control():e.$input().length&&(n=e.$input()),n&&e.$el.find(".acf-notice.-error").insertAfter(n)):a&&"group"===a?(i=e.$el.find(".acf-label label").text().trim(),o=e.$el.find('.acf-input-wrap [placeholder!=""]').attr("placeholder"),n=e.$el.find(".acf-notice.-error").text().trim(),e.$el.find(".acf-notice.-error").remove(),n=i&&i.length&&"*"!==i?i+": "+n:o&&o.length&&""!==o?o+": "+n:e.get("name")+": "+n,(o=t.find("> .acfe-form-error")).length||(o=c('<div class="acf-notice -error acf-error-message acfe-form-error" />').prependTo(t)),o.append("<p>"+n+"</p>")):a&&"hide"===a&&e.$el.find(".acf-notice.-error").remove())},validationBegin:function(e){acfe.get("is_admin")||void 0!==e&&e.find(".acf-error-message").remove()}}),acf.newCondition=function(e,t){var a=t.get("field"),i=a.getField(e.field);if(a&&!i&&(i=acf.getField(e.field)),!a||!i)return!1;t={rule:e,target:a,conditions:t,field:i},i=i.get("type"),e=e.operator;return new(acf.getConditionTypes({fieldType:i,operator:e})[0]||acf.Condition)(t)})}(jQuery),jQuery,"undefined"!=typeof acf&&(acf.getFieldType("repeater").prototype.acfeOnHover=function(){this.off("mouseover")},acf.addAction("new_field/type=repeater",function(e){e.has("acfeRepeaterLock")&&(e.removeEvents({mouseover:"onHover"}),e.addEvents({mouseover:"acfeOnHover"})),e.has("acfeRepeaterRemoveActions")&&(e.$actions().remove(),e.$el.find("thead:first > tr > th.acf-row-handle:last").remove(),e.$rows().find("> .acf-row-handle:last").remove(),e.$control().find("> .acfe-repeater-stylised-button").remove()),e.has("acfeRepeaterStylisedButton")&&(e.$button().removeClass("button-primary"),e.$actions().wrap('<div class="acfe-repeater-stylised-button" />'))}));
|
1 |
+
function acfe_recaptcha(){var e;e=jQuery,"undefined"!=typeof acf&&e.each(acf.getFields({type:"acfe_recaptcha"}),function(){this.render()})}!function(c){var e;"undefined"!=typeof acf&&((e=acf.getFieldType("flexible_content").prototype).addSortable=function(a){1!=this.get("max")&&this.$layoutsWrap().sortable({items:" > .layout",handle:"> .acf-fc-layout-handle",forceHelperSize:!1,forcePlaceholderSize:!0,revert:50,tolerance:"pointer",scroll:!0,stop:function(e,t){a.render()},update:function(e,t){a.$input().trigger("change")}})},e.acfeOneClick=function(e,t){var a=this.$clones(),i=c(a[0]).data("layout"),a=null;t.hasClass("acf-icon")&&(a=t.closest(".layout"));this.add({layout:i,before:a});a=c(".acf-fc-popup");a.length&&a.hide()},e.acfeLayoutInit=function(t){var e,a,i=this,n=(t.find("> .acf-fc-layout-controls"),t.find("> .acf-fc-layout-handle"),t.find("> .acfe-fc-placeholder"));n.removeClass("acf-hidden"),i.has("acfeFlexibleModalEdition")||i.isLayoutClosed(t)||n.addClass("acf-hidden"),i.isLayoutClosed(t)&&i.has("acfeFlexiblePreview")&&!n.hasClass("-loading")&&(n.addClass("acfe-fc-preview -loading").find("> .acfe-flexible-placeholder").prepend('<span class="spinner"></span>'),n.find("> .acfe-fc-overlay").addClass("-hover"),e=t.children("input").attr("name").replace("[acf_fc_layout]",""),a={action:"acfe/flexible/layout_preview",field_key:i.get("key"),i:t.index(),layout:t.data("layout"),value:acf.serialize(t,e)},acf.doAction("acfe/fields/flexible_content/before_preview",i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/name="+i.get("name"),i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/key="+i.get("key"),i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/name="+i.get("name")+"&layout="+t.data("layout"),i.$el,t,a),acf.doAction("acfe/fields/flexible_content/before_preview/key="+i.get("key")+"&layout="+t.data("layout"),i.$el,t,a),c.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),dataType:"html",type:"post",success:function(e){e?n.find("> .acfe-flexible-placeholder").html(e):n.removeClass("acfe-fc-preview"),acf.doAction("acfe/fields/flexible_content/preview",e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/name="+i.get("name"),e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/key="+i.get("key"),e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/name="+i.get("name")+"&layout="+t.data("layout"),e,i.$el,t,a),acf.doAction("acfe/fields/flexible_content/preview/key="+i.get("key")+"&layout="+t.data("layout"),e,i.$el,t,a)},complete:function(){n.find("> .acfe-fc-overlay").removeClass("-hover"),n.removeClass("-loading").find("> .acfe-flexible-placeholder > .spinner").remove()}}))},acf.getFieldType("wysiwyg").prototype.initialize=function(){this.has("id")||this.$control().hasClass("delay")||this.initializeEditor()},acf.addAction("show_field/type=wysiwyg",e=function(e){var t;e.has("id")||!e.$el.is(":visible")||acfe.isFilterEnabled("acfeForceOpen")||(t=e.$control()).hasClass("delay")&&(t.removeClass("delay"),t.find(".acf-editor-toolbar").remove(),e.initializeEditor())}),acf.addAction("ready_field/type=wysiwyg",e),acf.addAction("new_field/type=flexible_content",function(a){var e=a.$clones(),t=a.$layouts();c.merge(t,e);t.each(function(){var e=c(this),t=e.data("layout");acf.doAction("acfe/flexible/layouts",e,a),acf.doAction("acfe/flexible/layout/name="+t,e,a)}),1===e.length&&(a.removeEvents({'click [data-name="add-layout"]':"onClickAdd"}),a.addEvents({'click [data-name="add-layout"]':"acfeOneClick"})),a.addEvents({"click .acfe-fc-placeholder":"onClickCollapse"}),a.addEvents({"click .acfe-flexible-opened-actions > a":"onClickCollapse"}),a.has("acfeFlexibleAjax")&&(a.add=function(n){var o=this;if(n=acf.parseArgs(n,{layout:"",before:!1}),!this.allowAdd())return!1;c.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax({action:"acfe/flexible/models",field_key:this.get("key"),layout:n.layout}),dataType:"html",type:"post",beforeSend:function(){c("body").addClass("-loading")},success:function(e){if(e){var t=c(e),a=acf.uniqid(),i="acf["+o.get("key")+"][acfcloneindex]",e=o.$control().find("> input[type=hidden]").attr("name")+"["+a+"]",e=acf.duplicate({target:t,search:i,replace:e,append:o.proxy(function(e,t){n.before?n.before.before(t):o.$layoutsWrap().append(t),acf.enable(t,o.cid),o.render()})});return e.attr("data-id",a),o.$input().trigger("change"),e}},complete:function(){c("body").removeClass("-loading")}})})}),acf.addAction("acfe/flexible/layouts",function(e,t){t.isLayoutClosed(e)&&(e.find("> .acfe-fc-placeholder").removeClass("acf-hidden"),t.has("acfeFlexibleOpen")&&(acfe.enableFilter("acfeForceOpen"),t.openLayout(e),acfe.disableFilter("acfeForceOpen")))}),acf.addAction("show",function(e,t){"collapse"===t&&e.is(".layout")&&(acf.getInstance(e.closest(".acf-field-flexible-content")).has("acfeFlexibleModalEdition")||e.find("> .acfe-fc-placeholder").addClass("acf-hidden"))}),acf.addAction("hide",function(e,t){"collapse"===t&&e.is(".layout")&&!e.is(".acf-clone")&&((t=acf.getInstance(e.closest(".acf-field-flexible-content"))).has("acfeFlexibleRemoveAjaxTitle")&&(t.renderLayout=function(e){}),t.acfeLayoutInit(e))}),acf.addAction("append",function(e){var t;e.is(".layout")&&(t=acf.getInstance(e.closest(".acf-field-flexible-content")),e.is(".acfe-layout-duplicated")||(t.has("acfeFlexibleModalEdition")?e.find('> [data-action="acfe-flexible-modal-edit"]:first').trigger("click"):t.openLayout(e)),t.acfeLayoutInit(e),(t=t.$el.closest(".acfe-modal.-open")).length?t.find("> .acfe-modal-wrapper > .acfe-modal-content").animate({scrollTop:parseInt(e.offset().top)-200},200):!(parseFloat(acf.get("acf_version"))<5.9)&&e.hasClass("-focused")||c("html, body").animate({scrollTop:parseInt(e.offset().top)-200},200))}),acf.addAction("invalid_field",function(e){e.$el.parents(".layout").addClass("acfe-flexible-modal-edit-error")}),acf.addAction("valid_field",function(e){e.$el.parents(".layout").each(function(){var e=c(this);e.find(".acf-error").length||e.removeClass("acfe-flexible-modal-edit-error")})}))}(jQuery),function(r){var n;"undefined"!=typeof acf&&((n=acf.getFieldType("flexible_content").prototype).events["click .acf-fc-layout-handle"]="acfeEditLayoutTitleToggleHandle",n.acfeEditLayoutTitleToggleHandle=function(e,t){!this.has("acfeFlexibleTitleEdition")||(t=t.closest(".layout")).hasClass("acfe-flexible-title-edition")&&t.find("> .acf-fc-layout-handle > .acfe-layout-title > input.acfe-flexible-control-title").trigger("blur")},n.events["click .acfe-layout-title-text"]="acfeEditLayoutTitle",n.acfeEditLayoutTitle=function(e,t){this.has("acfeFlexibleTitleEdition")&&(e.stopPropagation(),this.acfeEditLayoutTitleToggle(e,t))},n.events["blur input.acfe-flexible-control-title"]="acfeEditLayoutTitleToggle",n.acfeEditLayoutTitleToggle=function(e,t){var a,i=t.closest(".layout"),n=i.find("> .acf-fc-layout-handle"),t=n.find(".acfe-layout-title");i.hasClass("acfe-flexible-title-edition")?(""===(a=t.find("> input[data-acfe-flexible-control-title-input]")).val()&&a.val(a.attr("placeholder")).trigger("input"),i.removeClass("acfe-flexible-title-edition"),a.insertAfter(n)):(a=(a=i.find("> input[data-acfe-flexible-control-title-input]")).appendTo(t),i.addClass("acfe-flexible-title-edition"),a.focus().attr("size",a.val().length))},n.events["click input.acfe-flexible-control-title"]="acfeEditLayoutTitlePropagation",n.acfeEditLayoutTitlePropagation=function(e,t){e.stopPropagation()},n.events["input [data-acfe-flexible-control-title-input]"]="acfeEditLayoutTitleInput",n.acfeEditLayoutTitleInput=function(e,t){var a=t.closest(".layout").find("> .acf-fc-layout-handle .acfe-layout-title .acfe-layout-title-text"),i=t.val();t.attr("size",i.length),a.html(i)},n.events["keypress [data-acfe-flexible-control-title-input]"]="acfeEditLayoutTitleInputEnter",n.acfeEditLayoutTitleInputEnter=function(e,t){13===e.keyCode&&(e.preventDefault(),t.blur())},n.events["click [data-acfe-flexible-settings]"]="acfeLayoutSettings",n.acfeLayoutSettings=function(e,t){var a=this,i=t.closest(".layout"),n=i.find("> .acfe-modal.-settings"),o=i.find("> .acf-fc-layout-handle"),t=o.find("> .acf-fc-layout-order").outerHTML(),o=o.find(".acfe-layout-title-text").text();new acfe.Popup(n,{title:t+" "+o,footer:acf.__("Close"),onClose:function(){a.has("acfeFlexiblePreview")&&a.closeLayout(i)}})},n.events["click [data-acfe-flexible-control-toggle]"]="acfeLayoutToggle",n.acfeLayoutToggle=function(e,t){var a=t.closest(".layout"),t=a.find("> .acfe-flexible-layout-toggle");t.length&&("1"===t.val()?(a.removeClass("acfe-flexible-layout-hidden"),t.val("")):(a.addClass("acfe-flexible-layout-hidden"),t.val("1")))},acf.addAction("acfe/flexible/layouts",function(e,t){!t.has("acfeFlexibleToggle")||(t=e.find("> .acfe-flexible-layout-toggle")).length&&("1"===t.val()?e.addClass("acfe-flexible-layout-hidden"):e.removeClass("acfe-flexible-layout-hidden"))}),n.events["click [data-acfe-flexible-control-clone]"]="acfeCloneLayout",n.acfeCloneLayout=function(e,t){var a,i=this,n=t.closest(".layout"),o=n.data("layout"),c=r(i.$popup().html()),l=i.$layouts(),c=c.find('[data-layout="'+o+'"]'),c=(c.data("min"),c.data("max")||0),o=(a=o,l.filter(function(){return r(this).data("layout")===a}).length);if(c&&c<=o)return t.addClass("disabled"),!1;t.removeClass("disabled"),i.acfeFixInputs(n);o=n.clone();i.acfeCleanLayouts(o);t=t.closest(".acf-flexible-content").find("> input[type=hidden]").attr("name"),i.acfeDuplicate({layout:o,before:n,parent:t})},n.events["click [data-acfe-flexible-control-copy]"]="acfeCopyLayout",n.acfeCopyLayout=function(e,t){var a=t.closest(".layout").clone(),t=this.$control().find("> input[type=hidden]").attr("name");this.acfeFixInputs(a),this.acfeCleanLayouts(a);t=JSON.stringify({source:t,layouts:a[0].outerHTML}),a=r('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo(r("body"));a.attr("value",t).select(),document.execCommand("copy")?alert("Layout has been transferred to your clipboard"):prompt("Copy the following layout data to your clipboard",t),a.remove()},n.acfeCopyLayouts=function(){var e=this,t=e.$layoutsWrap().clone(),a=e.$control().find("> input[type=hidden]").attr("name");e.acfeFixInputs(t),e.acfeCleanLayouts(t);t=JSON.stringify({source:a,layouts:t.html()}),e=r('<input type="text" style="clip:rect(0,0,0,0);clip-path:rect(0,0,0,0);position:absolute;" value="" />').appendTo(e.$el);e.attr("value",t).select(),document.execCommand("copy")?alert("Layouts have been transferred to your clipboard"):prompt("Copy the following layouts data to your clipboard",t),e.remove()},n.acfePasteLayouts=function(){var n=this,e=prompt("Paste layouts data in the following field");if(null!=e&&""!==e)try{var t=JSON.parse(e),i=t.source,t=r(t.layouts).closest("[data-layout]");if(!t.length)return alert("No layouts data available");var o=r(n.$popup().html()),c=n.$layouts(),l=[];if(t.each(function(){var e,t=r(this),a=t.data("layout"),i=o.find('[data-layout="'+a+'"]'),i=(i.data("min"),i.data("max")||0),a=(e=a,c.filter(function(){return r(this).data("layout")===e}).length);i&&i<=a||n.$clone(t.attr("data-layout")).length&&l.push(t)}),!l.length)return alert("No layouts could be pasted");r.each(l,function(){var e=r(this),t=i+"["+e.attr("data-id")+"]",a=n.$control().find("> input[type=hidden]").attr("name");n.acfeDuplicate({layout:e,before:!1,search:t,parent:a})})}catch(e){console.log(e),alert("Invalid data")}},n.events['click [data-name="acfe-flexible-control-button"]']="acfeControl",n.acfeControl=function(e,t){var a=this,i=t.next(".tmpl-acfe-flexible-control-popup").html();new(acf.models.TooltipConfirm.extend({render:function(){this.html(this.get("text")),this.$el.addClass("acf-fc-popup")}}))({target:t,targetConfirm:!1,text:i,context:a,confirm:function(e,t){"paste"===t.attr("data-acfe-flexible-control-action")?a.acfePasteLayouts():"copy"===t.attr("data-acfe-flexible-control-action")&&a.acfeCopyLayouts()}}).on("click","a","onConfirm")},n.acfeDuplicate=function(a){if(a=acf.parseArgs(a,{layout:"",before:!1,parent:!1,search:"",replace:""}),!this.allowAdd())return!1;var i=acf.uniqid();a.parent&&(a.search||(a.search=a.parent+"["+a.layout.attr("data-id")+"]"),a.replace=a.parent+"["+i+"]");var e,t={target:a.layout,search:a.search,replace:a.replace,append:this.proxy(function(e,t){t.addClass("acfe-layout-duplicated"),t.attr("data-id",i),a.before?a.before.after(t):this.$layoutsWrap().append(t),acf.enable(t,this.cid),this.render()})};e=parseFloat(acf.get("acf_version"))<5.9?acf.duplicate(t):n.acfeNewAcfDuplicate(t),this.$input().trigger("change");t=acf.getFields({type:"tab",parent:e});return t.length&&r.each(t,function(){this.$el.hasClass("acf-hidden")&&this.tab.$el.addClass("acf-hidden")}),e},n.acfeNewAcfDuplicate=function(e){e instanceof jQuery&&(e={target:e}),(e=acf.parseArgs(e,{target:!1,search:"",replace:"",rename:!0,before:function(e){},after:function(e,t){},append:function(e,t){e.after(t)}})).target=e.target||e.$el;var t=e.target;e.search=e.search||t.attr("data-id"),e.replace=e.replace||acf.uniqid(),e.before(t),acf.doAction("before_duplicate",t);var a=t.clone();return e.rename&&acf.rename({target:a,search:e.search,replace:e.replace,replacer:"function"==typeof e.rename?e.rename:null}),a.removeClass("acf-clone"),a.find(".ui-sortable").removeClass("ui-sortable"),e.after(t,a),acf.doAction("after_duplicate",t,a),e.append(t,a),acf.doAction("append",a),a},n.acfeFixInputs=function(e){e.find("input").each(function(){r(this).attr("value",this.value)}),e.find("textarea").each(function(){r(this).html(this.value)}),e.find("input:radio,input:checkbox").each(function(){this.checked?r(this).attr("checked","checked"):r(this).attr("checked",!1)}),e.find("option").each(function(){this.selected?r(this).attr("selected","selected"):r(this).attr("selected",!1)})},n.acfeCleanLayouts=function(e){e.find(".acf-editor-wrap").each(function(){var e=r(this);e.find(".wp-editor-container div").remove(),e.find(".wp-editor-container textarea").css("display","")}),e.find(".acf-date-picker").each(function(){r(this).find("input.input").removeClass("hasDatepicker").removeAttr("id")}),e.find(".acf-time-picker").each(function(){r(this).find("input.input").removeClass("hasDatepicker").removeAttr("id")}),e.find(".acf-date-time-picker").each(function(){r(this).find("input.input").removeClass("hasDatepicker").removeAttr("id")}),e.find(".acfe-field-code-editor").each(function(){r(this).find(".CodeMirror").remove()}),e.find(".acf-color-picker").each(function(){var e=r(this),t=e.find("> input"),a=e.find(".wp-picker-container input.wp-color-picker").clone();t.after(a),e.find(".wp-picker-container").remove()}),e.find(".acf-field-post-object").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden").removeClass()}),e.find(".acf-field-page-link").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden").removeClass()}),e.find(".acf-field-select").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden").removeClass()}),e.find(".acf-field-font-awesome").each(function(){var e=r(this);e.find("> .acf-input span").remove(),e.find("> .acf-input select").removeAttr("tabindex aria-hidden")}),e.find(".acf-tab-wrap").each(function(){var e=r(this),t=e.closest(".acf-fields"),a=[];r.each(e.find("li a"),function(){a.push(r(this))}),t.find("> .acf-field-tab").each(function(){$current_tab=r(this),r.each(a,function(){var e=r(this);e.attr("data-key")===$current_tab.attr("data-key")&&$current_tab.find("> .acf-input").append(e)})}),e.remove()}),e.find(".acf-field-accordion").each(function(){var e=r(this);e.find("> .acf-accordion-title > .acf-accordion-icon").remove(),e.after('<div class="acf-field acf-field-accordion" data-type="accordion"><div class="acf-input"><div class="acf-fields" data-endpoint="1"></div></div></div>')})},acf.addAction("new_field/type=flexible_content",function(e){e.has("acfeFlexibleLock")&&e.removeEvents({mouseover:"onHover"})}))}(jQuery),function(l){"undefined"!=typeof acf&&(acf.getFieldType("flexible_content").prototype.acfeModalSelect=function(e,t){var a=this;if(!a.validateAdd())return!1;var i=null;t.hasClass("acf-icon")&&(i=t.closest(".layout"));var n=a.getPopupHTML(),o={array:[],html:""};l(n).find("li a span[data-acfe-flexible-category]").each(function(){var e=l(this).data("acfe-flexible-category");l.each(e,function(){-1===function(e,t){for(var a=t.length,i=e.toString().toLowerCase(),n=0;n<a;n++)if(t[n].toLowerCase()===i)return n;return-1}(this,o.array)&&o.array.push(this)})}),o.array.length&&(o.array.sort(),o.html+='<h2 class="acfe-flexible-categories nav-tab-wrapper">',o.html+='<a href="#" data-acfe-flexible-category="acfe-all" class="nav-tab nav-tab-active"><span class="dashicons dashicons-menu"></span></a>',l(o.array).each(function(e,t){o.html+='<a href="#" data-acfe-flexible-category="'+t+'" class="nav-tab">'+t+"</a>"}),o.html+="</h2>");t=acf.__("Add Row");a.has("acfeFlexibleModalTitle")&&(t=a.get("acfeFlexibleModalTitle"));var c=l('<div class="acfe-modal acfe-modal-select-'+a.get("name")+" acfe-modal-select-"+a.get("key")+'">'+o.html+'<div class="acfe-flex-container">'+n+"</div></div>").appendTo("body");new acfe.Popup(c,{title:t,size:"full",destroy:!0}),a.has("acfeFlexibleModalCol")&&c.find(".acfe-modal-content .acfe-flex-container").addClass("acfe-col-"+a.get("acfeFlexibleModalCol")),a.has("acfeFlexibleThumbnails")&&c.find(".acfe-modal-content .acfe-flex-container").addClass("acfe-flex-thumbnails"),c.find("li:first-of-type a").blur(),c.find("li a span.badge").each(function(){l(this).addClass("acf-js-tooltip dashicons dashicons-info")}),c.find(".acfe-flexible-categories a").click(function(e){e.preventDefault();e=l(this);e.closest(".acfe-flexible-categories").find("a").removeClass("nav-tab-active"),e.addClass("nav-tab-active");var i=e.data("acfe-flexible-category");c.find("a[data-layout] span[data-acfe-flexible-category]").each(function(){var a=l(this);a.closest("li").show();var e=a.data("acfe-flexible-category");"acfe-all"!==i&&(a.closest("li").hide(),l.each(e,function(e,t){if(i.toLowerCase()===t.toLowerCase())return a.closest("li").show(),!1}))})}),c.on("click","a[data-layout]",function(e){e.preventDefault(),acfe.closePopup(),a.add({layout:l(this).data("layout"),before:i})})},acf.addAction("new_field/type=flexible_content",function(e){e.has("acfeFlexibleModal")&&(e.$clones().length<=1||(e.removeEvents({'click [data-name="add-layout"]':"onClickAdd"}),e.addEvents({'click [data-name="add-layout"]':"acfeModalSelect"})))}))}(jQuery),function(){var e;"undefined"!=typeof acf&&((e=acf.getFieldType("flexible_content").prototype).events['click [data-action="acfe-flexible-modal-edit"]']="acfeModalEdit",e.acfeModalEdit=function(e,t){var a=this,i=t.closest(".layout"),n=i.find("> .acfe-modal.-fields").addClass("acfe-modal-edit-"+a.get("name")+" acfe-modal-edit-"+a.get("key")).addClass("acfe-modal-edit-"+i.data("layout")),o=i.find("> .acf-fc-layout-handle"),c=o.find("> .acf-fc-layout-order").outerHTML(),t=o.find(".acfe-layout-title-text").text(),o=!1;a.has("acfeFlexibleCloseButton")&&(o=acf.__("Close")),new acfe.Popup(n,{title:c+" "+t,footer:o,onOpen:function(){a.openLayout(i)},onClose:function(){a.closeLayout(i)}})},acf.addAction("new_field/type=flexible_content",function(e){e.has("acfeFlexibleModalEdition")&&(e.has("acfeFlexiblePlaceholder")||e.has("acfeFlexiblePreview"))&&(e.removeEvents({'click [data-name="collapse-layout"]':"onClickCollapse"}),e.removeEvents({"click .acfe-fc-placeholder":"onClickCollapse"}))}))}(jQuery),function(c){var e;"undefined"!=typeof acf&&(e=acf.Field.extend({type:"acfe_recaptcha",actions:{validation_failure:"validationFailure"},$control:function(){return this.$(".acfe-field-recaptcha")},$input:function(){return this.$('input[type="hidden"]')},$selector:function(){return this.$control().find("> div")},selector:function(){return this.$selector()[0]},version:function(){return this.get("version")},render:function(){var t=this;"v2"===this.version()?this.recaptcha=grecaptcha.render(t.selector(),{sitekey:t.$control().data("site-key"),theme:t.$control().data("theme"),size:t.$control().data("size"),callback:function(e){t.$input().val(e).change(),t.$input().closest(".acf-input").find("> .acf-notice.-error").hide()},"error-callback":function(){t.$input().val("error").change()},"expired-callback":function(){t.$input().val("expired").change()}}):"v3"===this.version()&&grecaptcha.ready(function(){grecaptcha.execute(t.$control().data("site-key"),{action:"homepage"}).then(function(e){t.$input().val(e).change(),t.$input().closest(".acf-input").find("> .acf-notice.-error").hide()})})},validationFailure:function(e){"v2"===this.version()&&grecaptcha.reset(this.recaptcha)}}),acf.registerFieldType(e),e=acf.Field.extend({wait:"ready",type:"acfe_code_editor",events:{showField:"onShow"},$control:function(){return this.$el.find("> .acf-input > .acf-input-wrap")},$input:function(){return this.$el.find("> .acf-input > .acf-input-wrap > textarea")},input:function(){return this.$input()[0]},rows:function(){return this.$input().attr("rows")},initialize:function(){this.rows=this.$control().data("rows"),this.max_rows=this.$control().data("max-rows"),this.mode=this.$control().data("mode"),this.lines=this.$control().data("lines"),this.indentUnit=this.$control().data("indent-unit");var e=[],t=wp.codeEditor.defaultSettings.codemirror,a={lineNumbers:this.lines,lineWrapping:!0,styleActiveLine:!1,continueComments:!0,indentUnit:this.indentUnit,tabSize:1,indentWithTabs:!0,mode:this.mode,extraKeys:{Tab:function(e){e.execCommand("indentMore")},"Shift-Tab":function(e){e.execCommand("indentLess")}}},a=jQuery.extend(t,a);e.codemirror=a,this.editor=wp.codeEditor.initialize(this.input(),e),(this.rows||this.max_rows)&&(this.rows&&(this.editor.codemirror.getScrollerElement().style.minHeight=18.5*this.rows+"px"),this.max_rows&&(this.editor.codemirror.getScrollerElement().style.maxHeight=18.5*this.max_rows+"px"),this.editor.codemirror.refresh()),(field=this).editor.codemirror.on("change",function(){field.editor.codemirror.save(),field.$input().change()})},onShow:function(){this.editor.codemirror&&this.editor.codemirror.refresh()}}),acf.registerFieldType(e),e=acf.Field.extend({type:"textarea",events:{"keydown textarea":"onInput"},onInput:function(e,t){var a,i;this.has("acfeTextareaCode")&&9===e.keyCode&&(e.preventDefault(),a=this.$el.find("textarea")[0],i=a.selectionStart,this.$el.find("textarea").val(function(e,t){return t.substring(0,i)+" "+t.substring(a.selectionEnd)}),a.selectionEnd=i+4)}}),acf.registerFieldType(e),e=acf.Field.extend({type:"acfe_slug",events:{"input input":"onInput","focusout input":"onFocusOut"},onInput:function(e,t){t.val(t.val().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/\_\_+/g,"_").replace(/^-+/,""))},onFocusOut:function(e,t){t.val(t.val().toLowerCase().replace(/-+$/,"").replace(/_+$/,""))}}),acf.registerFieldType(e),e=acf.Field.extend({type:"acfe_button",events:{"click input":"onClick","click button":"onClick"},$input:function(){return this.$("input").length?this.$("input"):this.$("button").length?this.$("button"):void 0},initialize:function(){var e=this.$input();this.inherit(e)},onClick:function(e,t){var a;this.get("ajax")&&(e.preventDefault(),a={action:"acfe/fields/button",field_name:this.get("name"),field_key:this.get("key")},acf.doAction("acfe/fields/button/before_ajax",this.$el,a),acf.doAction("acfe/fields/button/before",this.$el,a),acf.doAction("acfe/fields/button/before/key="+this.get("key"),this.$el,a),acf.doAction("acfe/fields/button/before/name="+this.get("name"),this.$el,a),c.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",context:this,success:function(e){acf.doAction("acfe/fields/button/ajax_success",e,this.$el,a),acf.doAction("acfe/fields/button/success",e,this.$el,a),acf.doAction("acfe/fields/button/success/key="+this.get("key"),e,this.$el,a),acf.doAction("acfe/fields/button/success/name="+this.get("name"),e,this.$el,a)},complete:function(e){e=e.responseText;acf.doAction("acfe/fields/button/complete",e,this.$el,a),acf.doAction("acfe/fields/button/complete/key="+this.get("key"),e,this.$el,a),acf.doAction("acfe/fields/button/complete/name="+this.get("name"),e,this.$el,a)}}))}}),acf.registerFieldType(e),e=acf.Field.extend({type:"acfe_advanced_link",events:{'click a[data-name="add"]':"onClickEdit",'click a[data-name="edit"]':"onClickEdit",'click a[data-name="remove"]':"onClickRemove"},$control:function(){return this.$(".acf-link")},initialize:function(){},getValue:function(){var e={type:this.$(".input-type :checked").val(),title:this.$(".input-title").val(),url:this.$(".input-url").val(),post:this.$(".input-post :selected").text(),term:this.$(".input-term :selected").text(),target:this.$(".input-target").is(":checked")};return"post"===e.type?e.url=e.post:"term"===e.type&&(e.url=e.term),e},setValue:function(e){e=acf.parseArgs(e,{remove:!1,title:"",url:"",target:!1});var t=this.$control();t.removeClass("-value -external"),e.url&&t.addClass("-value"),e.target&&t.addClass("-external"),this.$(".link-title").html(e.title),this.$(".link-url").attr("href",e.url).html(e.url),e.remove&&(this.$(".input-type :checked").prop("checked",!1),this.$('.input-type [value="url"]').prop("checked",!0).trigger("change"),this.$(".input-title").val(""),this.$(".input-target").prop("checked",!1),this.$(".input-url").val("").trigger("change"),this.$(".input-post").val("").trigger("change"),this.$(".input-term").val("").trigger("change"))},onClickEdit:function(e,t){var a=t.closest(".acf-input").find(".acfe-modal"),t=a.attr("data-modal-title"),i=this;new acfe.Popup(a,{title:t,size:"medium",footer:acf.__("Close"),onClose:function(){i.onChange()}})},onClickRemove:function(e,t){this.setValue({remove:!0})},onChange:function(e,t){var a=this.getValue();this.setValue(a)}}),acf.registerFieldType(e),new acf.Model({actions:{invalid_field:"invalidField"},filters:{"select2_ajax_data/type=post_object":"ajaxField"},invalidField:function(e){var t=e.$el.closest(".acf-field-acfe-advanced-link").not(".acf-error");t.length&&acf.getInstance(t).showError(e.notice.get("text"))},ajaxField:function(e,t,a,i,n){if("post"!==i.get("key"))return e;a=acf.getInstance(a.closest(".acf-field-acfe-advanced-link"));return a&&(e.field_key=a.get("key")),e}}),e=acf.Field.extend({wait:!1,type:"group",events:{'click [data-name="edit"]':"onClick",duplicateField:"onDuplicate"},initialize:function(){var e;this.has("acfeGroupModal")&&(e=this.get("acfeGroupModalButton"),this.$el.find("> .acf-input > .acf-fields, > .acf-input > .acf-table").wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>'),this.$el.find("> .acf-input").append('<a data-name="edit" class="acf-button button" href="#">'+e+"</a>"))},onClick:function(e,t){var a=this.$labelWrap().find("label").text().trim(),i=this.$el.find("> .acf-input > .acfe-modal").addClass("acfe-modal-edit-"+this.get("name")+" acfe-modal-edit-"+this.get("key"));a.length||(a=this.get("acfeGroupModalButton"));var n=!1;this.has("acfeGroupModalClose")&&(n=acf.__("Close"));var o="large";this.has("acfeGroupModalSize")&&(o=this.get("acfeGroupModalSize")),new acfe.Popup(i,{title:a,size:o,footer:n})},onDuplicate:function(e,t,a){a.find('a[data-name="edit"]').remove()}}),acf.registerFieldType(e),e=acf.Field.extend({wait:!1,type:"clone",events:{'click [data-name="edit"]':"onClick",duplicateField:"onDuplicate"},initialize:function(){var e;this.has("acfeCloneModal")&&(e=this.get("acfeCloneModalButton"),this.$el.find("> .acf-input > .acf-fields, > .acf-input > .acf-table").wrapAll('<div class="acfe-modal"><div class="acfe-modal-wrapper"><div class="acfe-modal-content"></div></div></div>'),this.$el.find("> .acf-input").append('<a data-name="edit" class="acf-button button" href="#">'+e+"</a>"))},onClick:function(e,t){var a=this.$labelWrap().find("label").text().trim(),i=this.$el.find("> .acf-input > .acfe-modal").addClass("acfe-modal-edit-"+this.get("name")+" acfe-modal-edit-"+this.get("key"));a.length||(a=this.get("acfeCloneModalButton"));var n=!1;this.has("acfeCloneModalClose")&&(n=acf.__("Close"));var o="large";this.has("acfeCloneModalSize")&&(o=this.get("acfeCloneModalSize")),new acfe.Popup(i,{title:a,size:o,footer:n})},onDuplicate:function(e,t,a){a.find('a[data-name="edit"]').remove()}}),acf.registerFieldType(e),e=acf.Field.extend({wait:"new_field",type:"acfe_column",$control:function(){return this.$(".acf-fields:first")},initialize:function(){if(this.$el.is("td")&&(this.$el.closest(".acf-table").find('th[data-type="acfe_column"]').remove(),this.remove()),this.get("endpoint"))return this.$el.find("> .acf-label").remove(),void this.$el.find("> .acf-input").remove();var e=this.$el,t=this.$el.find("> .acf-label"),a=(this.$inputWrap(),this.$control());t.remove();t=e.parent();a.addClass(t.hasClass("-left")?"-left":""),a.addClass(t.hasClass("-clear")?"-clear":""),a.append(e.nextUntil(".acf-field-acfe-column",".acf-field"))}}),acf.registerFieldType(e),new acf.Model({actions:{"new_field/type=select":"newField"},newField:function(e){e.inherit(e.$input()),!e.get("ui")&&e.get("allow_null")&&e.$input().find("option").each(function(e,t){t.value||t.text.startsWith("- ")&&t.text.endsWith(" -")&&(t.text=t.text.substring(2),t.text=t.text.substring(0,t.text.length-2))}),(e.has("acfePrepend")||e.has("acfeAppend"))&&(e.$input().parent(".acf-input-wrap").length||(e.$input().wrapAll('<div class="acf-input-wrap"></div>'),e.get("ui")&&e.$(".acf-input-wrap:first").append(e.$(".select2")),e.has("acfePrepend")&&(e.$(".acf-input-wrap:first").before('<div class="acf-input-prepend">'+e.get("acfePrepend")+"</div>"),e.$input().addClass("acf-is-prepended")),e.has("acfeAppend")&&(e.$(".acf-input-wrap:first").before('<div class="acf-input-append">'+e.get("acfeAppend")+"</div>"),e.$input().addClass("acf-is-appended"))))}}),new acf.Model({actions:{select2_init:"select2Init"},filters:{select2_args:"select2Args",select2_ajax_data:"select2Ajax"},select2Init:function(t,e,a,i,n){var o;i.get("acfeSearchPlaceholder")&&(o=i.get("acfeSearchPlaceholder"),t.on("select2:open",function(e){i.get("multiple")?t.val()||i.$(".select2-search__field").attr("placeholder",o):c(".select2-search.select2-search--dropdown > .select2-search__field").attr("placeholder",o)}),i.get("multiple")&&t.on("select2:close",function(e){t.val()||i.$(".select2-search__field").attr("placeholder",i.get("placeholder"))})),t.data("select2").$dropdown.addClass("select2-dropdown-acf-field-"+i.get("name")).addClass("select2-dropdown-acf-field-"+i.get("key")),acf.doAction("select2_init/type="+i.get("type"),t,e,a,i,n),acf.doAction("select2_init/name="+i.get("name"),t,e,a,i,n),acf.doAction("select2_init/key="+i.get("key"),t,e,a,i,n)},select2Args:function(e,t,a,i,n){return i.get("acfeAllowCustom")&&(e.tags=!0,e.createTag=function(e){var t=c.trim(e.term);if(""===t)return null;var a=!1;return this.$element.find("option").each(function(){if(this.value.toLowerCase()===t.toLowerCase())return!(a=!0)}),a?null:{id:t,text:t}},e.insertTag=function(e,t){var a=!1;c.each(e,function(){if(c.trim(t.text).toUpperCase()===c.trim(this.text).toUpperCase())return!(a=!0)}),a||e.unshift(t)}),e=acf.applyFilters("select2_args/type="+i.get("type"),e,t,a,i,n),e=acf.applyFilters("select2_args/name="+i.get("name"),e,t,a,i,n),e=acf.applyFilters("select2_args/key="+i.get("key"),e,t,a,i,n)},select2Ajax:function(e,t,a,i,n){return e=acf.applyFilters("select2_ajax_data/type="+i.get("type"),e,t,a,i,n),e=acf.applyFilters("select2_ajax_data/name="+i.get("name"),e,t,a,i,n),e=(e=acf.applyFilters("select2_ajax_data/key="+i.get("key"),e,t,a,i,n)).action?acf.applyFilters("select2_ajax_data/action="+e.action,e,t,a,i,n):e}}),new acf.Model({actions:{"prepare_field/type=tab":"prepareField"},prepareField:function(e){var t,i,n;e.has("noPreference")&&(t=e.findTabs(),t=acf.getInstances(t),i=e.get("key"),!t.length||(n=acf.getPreference("this.tabs"))&&(c.each(t,function(e,t){var a=t.get("index");t.data.key===i&&(n[a]=0)}),acf.setPreference("this.tabs",n)))}}),new acf.Model({actions:{"new_field/type=checkbox":"newField"},newField:function(a){a.has("acfeLabels")&&c.each(a.get("acfeLabels"),function(e,t){a.$control().find('input[type=checkbox][value="'+t+'"]').closest("ul").before("<strong>"+e+"</strong>")})}}),new acf.Model({actions:{"new_field/type=radio":"newField"},newField:function(a){a.has("acfeLabels")&&(c.each(a.get("acfeLabels"),function(e,t){a.$control().find('input[type=radio][value="'+t+'"]').closest("li").addClass("parent").prepend("<strong>"+e+"</strong>")}),a.$control().hasClass("acf-hl")&&a.$control().find("li.parent").each(function(){c(this).nextUntil("li.parent").addBack().wrapAll("<li><ul></ul></li>")}))}}),new acf.Model({field:!1,placement:!1,actions:{new_field:"newField"},newField:function(e){(this.field=e).has("instructionTooltip")&&this.setTooltip(),e.has("instructionAboveField")&&this.setAboveField(),e.has("instructionPlacement")&&this.overridePlacement(e.get("instructionPlacement"))},setTooltip:function(){this.field.$labelWrap().prepend('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="'+_.escape(this.field.get("instructionTooltip"))+'"></span>'),this.field.$labelWrap().find(".description").remove()},setAboveField:function(){this.field.$inputWrap().prepend('<p class="description">'+this.field.get("instructionAboveField")+"</p>"),this.field.$labelWrap().find(".description").remove()},overridePlacement:function(e){var t=this.getPlacement();t&&t!==e&&this.setPlacement(e)},getPlacement:function(){var e=!1;return this.field.$labelWrap().find(">.description").length?e="label":this.field.$inputWrap().find(">.description:first-child").length?e="above_field":this.field.$inputWrap().find(">.description:last-child").length?e="field":this.field.$labelWrap().find(">.acfe-field-tooltip").length&&(e="tooltip"),this.placement=e,this.placement},$getInstruction:function(){var e=this.getPlacement();return"label"===e?this.field.$labelWrap().find(">.description"):"above_field"===e?this.field.$inputWrap().find(">.description:first-child"):"field"===e?this.field.$inputWrap().find(">.description:last-child"):"tooltip"===e&&this.field.$labelWrap().find(">.acfe-field-tooltip")},setPlacement:function(e){var t,a=this.$getInstruction();"tooltip"===this.placement&&(t=a.attr("title"),a.remove(),a=c('<p class="description">'+t+"</p>")),"label"===e?this.field.$labelWrap().append(a):"above_field"===e?this.field.$inputWrap().prepend(a):"field"===e?this.field.$inputWrap().append(a):"tooltip"===e&&(this.field.$labelWrap().prepend(c('<span class="acfe-field-tooltip acf-js-tooltip dashicons dashicons-info" title="'+_.escape(a.html())+'"></span>')),a.remove())}}))}(jQuery),jQuery,"undefined"!=typeof acf&&(acf.registerConditionForFieldType("contains","checkbox"),acf.registerConditionForFieldType("contains","radio"),acf.registerConditionForFieldType("equalTo","acfe_code_editor"),acf.registerConditionForFieldType("notEqualTo","acfe_code_editor"),acf.registerConditionForFieldType("patternMatch","acfe_code_editor"),acf.registerConditionForFieldType("contains","acfe_code_editor"),acf.registerConditionForFieldType("hasValue","acfe_code_editor"),acf.registerConditionForFieldType("hasNoValue","acfe_code_editor"),acf.registerConditionForFieldType("equalTo","date_picker"),acf.registerConditionForFieldType("notEqualTo","date_picker"),acf.registerConditionForFieldType("patternMatch","date_picker"),acf.registerConditionForFieldType("contains","date_picker"),acf.registerConditionForFieldType("greaterThan","date_picker"),acf.registerConditionForFieldType("lessThan","date_picker"),acf.registerConditionForFieldType("equalTo","date_time_picker"),acf.registerConditionForFieldType("notEqualTo","date_time_picker"),acf.registerConditionForFieldType("patternMatch","date_time_picker"),acf.registerConditionForFieldType("contains","date_time_picker"),acf.registerConditionForFieldType("equalTo","time_picker"),acf.registerConditionForFieldType("notEqualTo","time_picker"),acf.registerConditionForFieldType("patternMatch","time_picker"),acf.registerConditionForFieldType("contains","time_picker"),acf.registerConditionForFieldType("equalTo","taxonomy"),acf.registerConditionForFieldType("notEqualTo","taxonomy"),acf.registerConditionForFieldType("patternMatch","taxonomy"),acf.registerConditionForFieldType("contains","taxonomy"),acf.registerConditionForFieldType("hasValue","taxonomy"),acf.registerConditionForFieldType("hasNoValue","taxonomy"),acf.registerConditionForFieldType("equalTo","acfe_forms"),acf.registerConditionForFieldType("notEqualTo","acfe_forms"),acf.registerConditionForFieldType("patternMatch","acfe_forms"),acf.registerConditionForFieldType("contains","acfe_forms"),acf.registerConditionForFieldType("hasValue","acfe_forms"),acf.registerConditionForFieldType("hasNoValue","acfe_forms"),acf.registerConditionForFieldType("equalTo","acfe_hidden"),acf.registerConditionForFieldType("notEqualTo","acfe_hidden"),acf.registerConditionForFieldType("patternMatch","acfe_hidden"),acf.registerConditionForFieldType("contains","acfe_hidden"),acf.registerConditionForFieldType("hasValue","acfe_hidden"),acf.registerConditionForFieldType("hasNoValue","acfe_hidden"),acf.registerConditionForFieldType("equalTo","acfe_post_statuses"),acf.registerConditionForFieldType("notEqualTo","acfe_post_statuses"),acf.registerConditionForFieldType("patternMatch","acfe_post_statuses"),acf.registerConditionForFieldType("contains","acfe_post_statuses"),acf.registerConditionForFieldType("hasValue","acfe_post_statuses"),acf.registerConditionForFieldType("hasNoValue","acfe_post_statuses"),acf.registerConditionForFieldType("equalTo","acfe_post_types"),acf.registerConditionForFieldType("notEqualTo","acfe_post_types"),acf.registerConditionForFieldType("patternMatch","acfe_post_types"),acf.registerConditionForFieldType("contains","acfe_post_types"),acf.registerConditionForFieldType("hasValue","acfe_post_types"),acf.registerConditionForFieldType("hasNoValue","acfe_post_types"),acf.registerConditionForFieldType("equalTo","acfe_slug"),acf.registerConditionForFieldType("notEqualTo","acfe_slug"),acf.registerConditionForFieldType("patternMatch","acfe_slug"),acf.registerConditionForFieldType("contains","acfe_slug"),acf.registerConditionForFieldType("hasValue","acfe_slug"),acf.registerConditionForFieldType("hasNoValue","acfe_slug"),acf.registerConditionForFieldType("equalTo","acfe_taxonomies"),acf.registerConditionForFieldType("notEqualTo","acfe_taxonomies"),acf.registerConditionForFieldType("patternMatch","acfe_taxonomies"),acf.registerConditionForFieldType("contains","acfe_taxonomies"),acf.registerConditionForFieldType("hasValue","acfe_taxonomies"),acf.registerConditionForFieldType("hasNoValue","acfe_taxonomies"),acf.registerConditionForFieldType("equalTo","acfe_taxonomy_terms"),acf.registerConditionForFieldType("notEqualTo","acfe_taxonomy_terms"),acf.registerConditionForFieldType("patternMatch","acfe_taxonomy_terms"),acf.registerConditionForFieldType("contains","acfe_taxonomy_terms"),acf.registerConditionForFieldType("hasValue","acfe_taxonomy_terms"),acf.registerConditionForFieldType("hasNoValue","acfe_taxonomy_terms"),acf.registerConditionForFieldType("equalTo","acfe_user_roles"),acf.registerConditionForFieldType("notEqualTo","acfe_user_roles"),acf.registerConditionForFieldType("patternMatch","acfe_user_roles"),acf.registerConditionForFieldType("contains","acfe_user_roles"),acf.registerConditionForFieldType("hasValue","acfe_user_roles"),acf.registerConditionForFieldType("hasNoValue","acfe_user_roles")),function(c){"undefined"!=typeof acf&&(new acf.Model({actions:{prepare:"prepare","new_field/type=date_picker":"datePicker","new_field/type=date_time_picker":"datePicker","new_field/type=time_picker":"datePicker","new_field/type=google_map":"googleMap",invalid_field:"invalidField",validation_begin:"validationBegin"},prepare:function(){var e;acfe.get("is_admin")||(acf.isset(window,"wp","media","view","settings","post")&&(wp.media.view.settings.post=!1),c('.acfe-form[data-hide-unload="1"]').length&&acf.unload.disable(),(e=c(".acfe-form-success")).length&&(window.history.replaceState&&window.history.replaceState(null,null,window.location.href),e.each(function(){var e=c(this).data("form-name"),t=c(this).data("form-id");acf.doAction("acfe/form/submit/success"),acf.doAction("acfe/form/submit/success/id="+t),acf.doAction("acfe/form/submit/success/name="+e)})),c('.acf-form .button, .acf-form [type="submit"], .acfe-form .button, .acfe-form [type="submit"]').click(function(e){c(this).hasClass("disabled")&&e.preventDefault()}))},datePicker:function(e){var t;acfe.get("is_admin")||(!(t=e.$el.closest(".acfe-form")).length||(t=t.data("fields-class"))&&e.$inputText().addClass(t))},googleMap:function(e){var t;acfe.get("is_admin")||(!(t=e.$el.closest(".acfe-form")).length||(t=t.data("fields-class"))&&e.$search().addClass(t))},invalidField:function(e){var t,a,i,n,o;acfe.get("is_admin")||(t=e.$el.closest(".acfe-form")).length&&(a=t.data("errors-position"),(o=t.data("errors-class"))&&o.length&&e.$el.find(".acf-notice.-error").addClass(o),a&&"below"===a?(e.$control().length?e.$el.find(".acf-notice.-error").insertAfter(e.$control()):e.$input().length&&e.$el.find(".acf-notice.-error").insertAfter(e.$input()),n=!1,e.$control().length?n=e.$control():e.$input().length&&(n=e.$input()),n&&e.$el.find(".acf-notice.-error").insertAfter(n)):a&&"group"===a?(i=e.$el.find(".acf-label label").text().trim(),o=e.$el.find('.acf-input-wrap [placeholder!=""]').attr("placeholder"),n=e.$el.find(".acf-notice.-error").text().trim(),e.$el.find(".acf-notice.-error").remove(),n=i&&i.length&&"*"!==i?i+": "+n:o&&o.length&&""!==o?o+": "+n:e.get("name")+": "+n,(o=!(o=t.find("> .acfe-form-error")).length?c('<div class="acf-notice -error acf-error-message acfe-form-error" />').prependTo(t):o).append("<p>"+n+"</p>")):a&&"hide"===a&&e.$el.find(".acf-notice.-error").remove())},validationBegin:function(e){acfe.get("is_admin")||void 0!==e&&e.find(".acf-error-message").remove()}}),acf.newCondition=function(e,t){var a=t.get("field"),i=a.getField(e.field);if(a&&!i&&(i=acf.getField(e.field)),!a||!i)return!1;t={rule:e,target:a,conditions:t,field:i},i=i.get("type"),e=e.operator;return new(acf.getConditionTypes({fieldType:i,operator:e})[0]||acf.Condition)(t)})}(jQuery),jQuery,"undefined"!=typeof acf&&(acf.getFieldType("repeater").prototype.acfeOnHover=function(){this.off("mouseover")},acf.addAction("new_field/type=repeater",function(e){e.has("acfeRepeaterLock")&&(e.removeEvents({mouseover:"onHover"}),e.addEvents({mouseover:"acfeOnHover"})),e.has("acfeRepeaterRemoveActions")&&(e.$actions().remove(),e.$el.find("thead:first > tr > th.acf-row-handle:last").remove(),e.$rows().find("> .acf-row-handle:last").remove(),e.$control().find("> .acfe-repeater-stylised-button").remove()),e.has("acfeRepeaterStylisedButton")&&(e.$button().removeClass("button-primary"),e.$actions().wrap('<div class="acfe-repeater-stylised-button" />'))}));
|
@@ -1,9 +1,9 @@
|
|
1 |
-
(function($){
|
2 |
|
3 |
-
if(typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
-
acfe.enhancedEditUI = function(props){
|
7 |
return new enhancedEditUI(props);
|
8 |
};
|
9 |
|
@@ -20,7 +20,7 @@
|
|
20 |
$main: false,
|
21 |
$sidebar: false,
|
22 |
|
23 |
-
setup: function(props){
|
24 |
|
25 |
// Extend data
|
26 |
$.extend(this.data, props);
|
@@ -40,7 +40,7 @@
|
|
40 |
this.$sidebar = this.$('.acf-column-2');
|
41 |
|
42 |
// Fake Page Title
|
43 |
-
if(this.get('pageTitle')){
|
44 |
this.$main.find('> table:first').before('<h2>' + this.title + '</h2>');
|
45 |
}
|
46 |
|
@@ -56,30 +56,30 @@
|
|
56 |
|
57 |
},
|
58 |
|
59 |
-
events:{
|
60 |
'submit form': 'onSubmit'
|
61 |
},
|
62 |
|
63 |
-
initialize: function(){
|
64 |
|
65 |
this.addActions({
|
66 |
-
'acfe/ui/user-edit':
|
67 |
-
'acfe/ui/user-new':
|
68 |
-
'acfe/ui/term-edit':
|
69 |
-
'acfe/ui/settings':
|
70 |
});
|
71 |
|
72 |
acf.doAction('acfe/ui/' + this.get('screen'), this);
|
73 |
|
74 |
},
|
75 |
|
76 |
-
onSubmit: function(e, $el){
|
77 |
|
78 |
acf.lockForm($el);
|
79 |
|
80 |
},
|
81 |
|
82 |
-
userEdit: function(){
|
83 |
|
84 |
// Vars
|
85 |
var $main = this.$main;
|
@@ -90,7 +90,7 @@
|
|
90 |
// Yoast Settings
|
91 |
var $yoastSettings = this.$('> form .yoast.yoast-settings');
|
92 |
|
93 |
-
if($yoastSettings.length){
|
94 |
|
95 |
$yoastSettings.addClass('postbox');
|
96 |
$yoastSettings.find('> h2').wrapAll('<div class="postbox-header"></div>');
|
@@ -99,7 +99,7 @@
|
|
99 |
$yoastSettings.find('.acf-fields > label:nth-of-type(1), .acf-fields > label:nth-of-type(1) ~ *').wrapAll('<div class="acf-field"></div>');
|
100 |
$yoastSettings.find('.acf-fields > br').remove();
|
101 |
|
102 |
-
$yoastSettings.find('.acf-field').each(function(){
|
103 |
|
104 |
var $this = $(this);
|
105 |
$this.find('label:nth-of-type(1)').wrapAll('<div class="acf-label"></div>');
|
@@ -112,7 +112,7 @@
|
|
112 |
// RankMath
|
113 |
var $rankMath = this.$('> form .rank-math-metabox-frame');
|
114 |
|
115 |
-
if($rankMath.length){
|
116 |
|
117 |
var rankMathTitle = $rankMath.find('h2').text();
|
118 |
|
@@ -126,14 +126,14 @@
|
|
126 |
// User Role Editor
|
127 |
var $userRoleEditor = this.$('#ure_select_other_roles');
|
128 |
|
129 |
-
if($userRoleEditor.length){
|
130 |
$userRoleEditor.closest('table').find('tr:eq(1) > td > br').remove();
|
131 |
}
|
132 |
|
133 |
// Application Passwords
|
134 |
var $applicationPasswords = $('#application-passwords-section');
|
135 |
|
136 |
-
if($applicationPasswords.length){
|
137 |
|
138 |
var title = $applicationPasswords.find('> h2').text();
|
139 |
|
@@ -151,7 +151,7 @@
|
|
151 |
// Nickname Field
|
152 |
var $userNickname = $('input#nickname');
|
153 |
|
154 |
-
if($userNickname.length){
|
155 |
|
156 |
$userNickname.wrapAll('<div id="titlediv"><div id="titlewrap"></div></div>');
|
157 |
$('#titlediv').append($('#edit-slug-box')).prependTo($main);
|
@@ -164,7 +164,7 @@
|
|
164 |
|
165 |
},
|
166 |
|
167 |
-
userNew: function(){
|
168 |
|
169 |
// Vars
|
170 |
var $main = this.$main;
|
@@ -173,7 +173,7 @@
|
|
173 |
|
174 |
},
|
175 |
|
176 |
-
termEdit: function(){
|
177 |
|
178 |
// Vars
|
179 |
var $main = this.$main;
|
@@ -181,7 +181,7 @@
|
|
181 |
// Term Name Field
|
182 |
var $termName = $('input#name');
|
183 |
|
184 |
-
if($termName.length){
|
185 |
|
186 |
$termName.wrapAll('<div id="titlediv"><div id="titlewrap"></div></div>');
|
187 |
$('#titlediv').append($('.permalink')).prependTo($main);
|
@@ -192,7 +192,7 @@
|
|
192 |
// WPML Widget
|
193 |
var $wpml = $('#icl_tax_menu');
|
194 |
|
195 |
-
if($wpml.length){
|
196 |
|
197 |
var widgetTitle = $wpml.find('h3.hndle').text();
|
198 |
$wpml.find('.inside').addClass('icl-tax-postbox-content').attr('style', '').insertAfter('#submitdiv');
|
@@ -203,7 +203,7 @@
|
|
203 |
// Yoast
|
204 |
var $yoast = $('.wpseo-taxonomy-metabox-postbox');
|
205 |
|
206 |
-
if($yoast.length){
|
207 |
|
208 |
var metaboxTitle = $yoast.find('> h2').text();
|
209 |
$yoast.find('> .inside').removeClass('inside').wrapAll('<div class="acf-fields -left"><div class="acf-field"><div class="acf-input"></div></div></div>');
|
@@ -214,7 +214,7 @@
|
|
214 |
// RankMath
|
215 |
var $rankMath = this.$('> form .rank-math-metabox-frame');
|
216 |
|
217 |
-
if($rankMath.length){
|
218 |
|
219 |
var rankMathTitle = $rankMath.find('h2').text();
|
220 |
|
@@ -227,10 +227,10 @@
|
|
227 |
|
228 |
},
|
229 |
|
230 |
-
settings: function(){
|
231 |
|
232 |
// Fix potential empty locale causing error
|
233 |
-
if(!acf.get('locale'))
|
234 |
acf.set('locale', 'en_US');
|
235 |
|
236 |
// Form Data
|
@@ -245,7 +245,7 @@
|
|
245 |
// Writing: Ping
|
246 |
var $pingSites = this.$('#ping_sites');
|
247 |
|
248 |
-
if($pingSites.length){
|
249 |
$pingSites.wrap('<table class="form-table"><tbody><td class="td-full"></td></tbody></table>');
|
250 |
$pingSites.css('width', '100%');
|
251 |
}
|
@@ -253,7 +253,7 @@
|
|
253 |
// Permlalinks
|
254 |
var $permalinks = this.$('.permalink-structure');
|
255 |
|
256 |
-
if($permalinks.length){
|
257 |
$permalinks.prev().prev('p').insertBefore($permalinks);
|
258 |
}
|
259 |
|
@@ -261,20 +261,20 @@
|
|
261 |
|
262 |
});
|
263 |
|
264 |
-
acfe.enhancedListUI = function(props){
|
265 |
return new enhancedListUI(props);
|
266 |
};
|
267 |
|
268 |
var enhancedListUI = acf.Model.extend({
|
269 |
|
270 |
-
setup: function(props){
|
271 |
|
272 |
// Extend data
|
273 |
$.extend(this.data, props);
|
274 |
|
275 |
},
|
276 |
|
277 |
-
initialize: function(){
|
278 |
|
279 |
// Add button
|
280 |
$('.wrap .wp-heading-inline').after($('#tmpl-button-add-term').html());
|
@@ -304,12 +304,12 @@
|
|
304 |
var $fields = $('.acfe-bt .inside .form-field, .acfe-bt .inside .submit');
|
305 |
$fields.addClass('acf-field');
|
306 |
|
307 |
-
$fields.each(function(){
|
308 |
|
309 |
var $this = $(this);
|
310 |
|
311 |
// Polylang Exception
|
312 |
-
if($this.is('#term-translations'))
|
313 |
return;
|
314 |
|
315 |
$this.append('<div class="acf-input"></div>');
|
@@ -317,11 +317,11 @@
|
|
317 |
|
318 |
// Add spacing when a meta field has no label
|
319 |
var $label = $this.find('> label');
|
320 |
-
if($label.length){
|
321 |
|
322 |
$label.wrap('<div class="acf-label"></div>');
|
323 |
|
324 |
-
}else{
|
325 |
|
326 |
$this.addClass('acfe-bt-no-label');
|
327 |
|
@@ -335,12 +335,12 @@
|
|
335 |
// Button
|
336 |
var $newButton = $('.acfe-bt-admin-button-add');
|
337 |
|
338 |
-
$newButton.click(function(e){
|
339 |
|
340 |
e.preventDefault();
|
341 |
var $wrap = $('.acfe-bt');
|
342 |
|
343 |
-
if($wrap.is(':visible'))
|
344 |
$wrap.hide();
|
345 |
else
|
346 |
$wrap.show();
|
@@ -348,10 +348,10 @@
|
|
348 |
});
|
349 |
|
350 |
// Label to left
|
351 |
-
if(typeof acf !== 'undefined'){
|
352 |
acf.postbox.render({
|
353 |
-
'id':
|
354 |
-
'label':
|
355 |
});
|
356 |
}
|
357 |
|
@@ -360,7 +360,7 @@
|
|
360 |
// WPML Widget
|
361 |
var $wpml = $('#icl_tax_menu');
|
362 |
|
363 |
-
if($wpml.length){
|
364 |
|
365 |
var $wpmlWidget = $wpml.find('.postbox').removeClass('postbox');
|
366 |
$wpmlWidget.find('.inside').removeClass('inside').css('padding', 0);
|
@@ -378,5 +378,5 @@
|
|
378 |
}
|
379 |
|
380 |
});
|
381 |
-
|
382 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
|
3 |
+
if (typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
+
acfe.enhancedEditUI = function(props) {
|
7 |
return new enhancedEditUI(props);
|
8 |
};
|
9 |
|
20 |
$main: false,
|
21 |
$sidebar: false,
|
22 |
|
23 |
+
setup: function(props) {
|
24 |
|
25 |
// Extend data
|
26 |
$.extend(this.data, props);
|
40 |
this.$sidebar = this.$('.acf-column-2');
|
41 |
|
42 |
// Fake Page Title
|
43 |
+
if (this.get('pageTitle')) {
|
44 |
this.$main.find('> table:first').before('<h2>' + this.title + '</h2>');
|
45 |
}
|
46 |
|
56 |
|
57 |
},
|
58 |
|
59 |
+
events: {
|
60 |
'submit form': 'onSubmit'
|
61 |
},
|
62 |
|
63 |
+
initialize: function() {
|
64 |
|
65 |
this.addActions({
|
66 |
+
'acfe/ui/user-edit': 'userEdit',
|
67 |
+
'acfe/ui/user-new': 'userNew',
|
68 |
+
'acfe/ui/term-edit': 'termEdit',
|
69 |
+
'acfe/ui/settings': 'settings',
|
70 |
});
|
71 |
|
72 |
acf.doAction('acfe/ui/' + this.get('screen'), this);
|
73 |
|
74 |
},
|
75 |
|
76 |
+
onSubmit: function(e, $el) {
|
77 |
|
78 |
acf.lockForm($el);
|
79 |
|
80 |
},
|
81 |
|
82 |
+
userEdit: function() {
|
83 |
|
84 |
// Vars
|
85 |
var $main = this.$main;
|
90 |
// Yoast Settings
|
91 |
var $yoastSettings = this.$('> form .yoast.yoast-settings');
|
92 |
|
93 |
+
if ($yoastSettings.length) {
|
94 |
|
95 |
$yoastSettings.addClass('postbox');
|
96 |
$yoastSettings.find('> h2').wrapAll('<div class="postbox-header"></div>');
|
99 |
$yoastSettings.find('.acf-fields > label:nth-of-type(1), .acf-fields > label:nth-of-type(1) ~ *').wrapAll('<div class="acf-field"></div>');
|
100 |
$yoastSettings.find('.acf-fields > br').remove();
|
101 |
|
102 |
+
$yoastSettings.find('.acf-field').each(function() {
|
103 |
|
104 |
var $this = $(this);
|
105 |
$this.find('label:nth-of-type(1)').wrapAll('<div class="acf-label"></div>');
|
112 |
// RankMath
|
113 |
var $rankMath = this.$('> form .rank-math-metabox-frame');
|
114 |
|
115 |
+
if ($rankMath.length) {
|
116 |
|
117 |
var rankMathTitle = $rankMath.find('h2').text();
|
118 |
|
126 |
// User Role Editor
|
127 |
var $userRoleEditor = this.$('#ure_select_other_roles');
|
128 |
|
129 |
+
if ($userRoleEditor.length) {
|
130 |
$userRoleEditor.closest('table').find('tr:eq(1) > td > br').remove();
|
131 |
}
|
132 |
|
133 |
// Application Passwords
|
134 |
var $applicationPasswords = $('#application-passwords-section');
|
135 |
|
136 |
+
if ($applicationPasswords.length) {
|
137 |
|
138 |
var title = $applicationPasswords.find('> h2').text();
|
139 |
|
151 |
// Nickname Field
|
152 |
var $userNickname = $('input#nickname');
|
153 |
|
154 |
+
if ($userNickname.length) {
|
155 |
|
156 |
$userNickname.wrapAll('<div id="titlediv"><div id="titlewrap"></div></div>');
|
157 |
$('#titlediv').append($('#edit-slug-box')).prependTo($main);
|
164 |
|
165 |
},
|
166 |
|
167 |
+
userNew: function() {
|
168 |
|
169 |
// Vars
|
170 |
var $main = this.$main;
|
173 |
|
174 |
},
|
175 |
|
176 |
+
termEdit: function() {
|
177 |
|
178 |
// Vars
|
179 |
var $main = this.$main;
|
181 |
// Term Name Field
|
182 |
var $termName = $('input#name');
|
183 |
|
184 |
+
if ($termName.length) {
|
185 |
|
186 |
$termName.wrapAll('<div id="titlediv"><div id="titlewrap"></div></div>');
|
187 |
$('#titlediv').append($('.permalink')).prependTo($main);
|
192 |
// WPML Widget
|
193 |
var $wpml = $('#icl_tax_menu');
|
194 |
|
195 |
+
if ($wpml.length) {
|
196 |
|
197 |
var widgetTitle = $wpml.find('h3.hndle').text();
|
198 |
$wpml.find('.inside').addClass('icl-tax-postbox-content').attr('style', '').insertAfter('#submitdiv');
|
203 |
// Yoast
|
204 |
var $yoast = $('.wpseo-taxonomy-metabox-postbox');
|
205 |
|
206 |
+
if ($yoast.length) {
|
207 |
|
208 |
var metaboxTitle = $yoast.find('> h2').text();
|
209 |
$yoast.find('> .inside').removeClass('inside').wrapAll('<div class="acf-fields -left"><div class="acf-field"><div class="acf-input"></div></div></div>');
|
214 |
// RankMath
|
215 |
var $rankMath = this.$('> form .rank-math-metabox-frame');
|
216 |
|
217 |
+
if ($rankMath.length) {
|
218 |
|
219 |
var rankMathTitle = $rankMath.find('h2').text();
|
220 |
|
227 |
|
228 |
},
|
229 |
|
230 |
+
settings: function() {
|
231 |
|
232 |
// Fix potential empty locale causing error
|
233 |
+
if (!acf.get('locale'))
|
234 |
acf.set('locale', 'en_US');
|
235 |
|
236 |
// Form Data
|
245 |
// Writing: Ping
|
246 |
var $pingSites = this.$('#ping_sites');
|
247 |
|
248 |
+
if ($pingSites.length) {
|
249 |
$pingSites.wrap('<table class="form-table"><tbody><td class="td-full"></td></tbody></table>');
|
250 |
$pingSites.css('width', '100%');
|
251 |
}
|
253 |
// Permlalinks
|
254 |
var $permalinks = this.$('.permalink-structure');
|
255 |
|
256 |
+
if ($permalinks.length) {
|
257 |
$permalinks.prev().prev('p').insertBefore($permalinks);
|
258 |
}
|
259 |
|
261 |
|
262 |
});
|
263 |
|
264 |
+
acfe.enhancedListUI = function(props) {
|
265 |
return new enhancedListUI(props);
|
266 |
};
|
267 |
|
268 |
var enhancedListUI = acf.Model.extend({
|
269 |
|
270 |
+
setup: function(props) {
|
271 |
|
272 |
// Extend data
|
273 |
$.extend(this.data, props);
|
274 |
|
275 |
},
|
276 |
|
277 |
+
initialize: function() {
|
278 |
|
279 |
// Add button
|
280 |
$('.wrap .wp-heading-inline').after($('#tmpl-button-add-term').html());
|
304 |
var $fields = $('.acfe-bt .inside .form-field, .acfe-bt .inside .submit');
|
305 |
$fields.addClass('acf-field');
|
306 |
|
307 |
+
$fields.each(function() {
|
308 |
|
309 |
var $this = $(this);
|
310 |
|
311 |
// Polylang Exception
|
312 |
+
if ($this.is('#term-translations'))
|
313 |
return;
|
314 |
|
315 |
$this.append('<div class="acf-input"></div>');
|
317 |
|
318 |
// Add spacing when a meta field has no label
|
319 |
var $label = $this.find('> label');
|
320 |
+
if ($label.length) {
|
321 |
|
322 |
$label.wrap('<div class="acf-label"></div>');
|
323 |
|
324 |
+
} else {
|
325 |
|
326 |
$this.addClass('acfe-bt-no-label');
|
327 |
|
335 |
// Button
|
336 |
var $newButton = $('.acfe-bt-admin-button-add');
|
337 |
|
338 |
+
$newButton.click(function(e) {
|
339 |
|
340 |
e.preventDefault();
|
341 |
var $wrap = $('.acfe-bt');
|
342 |
|
343 |
+
if ($wrap.is(':visible'))
|
344 |
$wrap.hide();
|
345 |
else
|
346 |
$wrap.show();
|
348 |
});
|
349 |
|
350 |
// Label to left
|
351 |
+
if (typeof acf !== 'undefined') {
|
352 |
acf.postbox.render({
|
353 |
+
'id': 'acfe-bt-form',
|
354 |
+
'label': 'left'
|
355 |
});
|
356 |
}
|
357 |
|
360 |
// WPML Widget
|
361 |
var $wpml = $('#icl_tax_menu');
|
362 |
|
363 |
+
if ($wpml.length) {
|
364 |
|
365 |
var $wpmlWidget = $wpml.find('.postbox').removeClass('postbox');
|
366 |
$wpmlWidget.find('.inside').removeClass('inside').css('padding', 0);
|
378 |
}
|
379 |
|
380 |
});
|
381 |
+
|
382 |
})(jQuery);
|
@@ -1,6 +1,6 @@
|
|
1 |
-
(function($){
|
2 |
|
3 |
-
if(typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
/*
|
@@ -18,21 +18,21 @@
|
|
18 |
/*
|
19 |
* Get
|
20 |
*/
|
21 |
-
acfe.get = function(name){
|
22 |
return acf.data.acfe[name] || null;
|
23 |
};
|
24 |
|
25 |
/*
|
26 |
* Has
|
27 |
*/
|
28 |
-
acfe.has = function(name){
|
29 |
return this.get(name) !== null;
|
30 |
};
|
31 |
|
32 |
/*
|
33 |
* Set
|
34 |
*/
|
35 |
-
acfe.set = function(name, value){
|
36 |
acf.data.acfe[name] = value;
|
37 |
return this;
|
38 |
};
|
@@ -45,12 +45,12 @@
|
|
45 |
acfe.Popup = acf.Model.extend({
|
46 |
|
47 |
data: {
|
48 |
-
title:
|
49 |
-
footer:
|
50 |
-
size:
|
51 |
-
destroy:
|
52 |
-
onOpen:
|
53 |
-
onClose:
|
54 |
},
|
55 |
|
56 |
events: {
|
@@ -58,7 +58,7 @@
|
|
58 |
'click .acfe-modal-footer>button': 'onClickClose',
|
59 |
},
|
60 |
|
61 |
-
setup: function($content, args){
|
62 |
|
63 |
$.extend(this.data, args);
|
64 |
|
@@ -67,23 +67,23 @@
|
|
67 |
|
68 |
},
|
69 |
|
70 |
-
initialize: function(){
|
71 |
|
72 |
this.open();
|
73 |
|
74 |
},
|
75 |
|
76 |
-
render: function(){
|
77 |
|
78 |
// Size
|
79 |
-
if(this.get('size')){
|
80 |
|
81 |
this.$el.addClass('-' + this.get('size'));
|
82 |
|
83 |
}
|
84 |
|
85 |
// Wrapper
|
86 |
-
if(!this.$('> .acfe-modal-wrapper').length){
|
87 |
|
88 |
this.$el.wrapInner('<div class="acfe-modal-wrapper" />');
|
89 |
|
@@ -92,14 +92,14 @@
|
|
92 |
var $wrapper = this.$('> .acfe-modal-wrapper');
|
93 |
|
94 |
// Content
|
95 |
-
if(!$wrapper.find('> .acfe-modal-content').length){
|
96 |
|
97 |
$wrapper.wrapInner('<div class="acfe-modal-content" />');
|
98 |
|
99 |
}
|
100 |
|
101 |
// Title
|
102 |
-
if(this.get('title')){
|
103 |
|
104 |
$wrapper.prepend('<div class="acfe-modal-title"><span class="title">' + this.get('title') + '</span><button class="close"></button></div>');
|
105 |
|
@@ -109,7 +109,7 @@
|
|
109 |
$wrapper.prepend('<div class="acfe-modal-wrapper-overlay"></div>');
|
110 |
|
111 |
// Footer
|
112 |
-
if(this.get('footer')){
|
113 |
|
114 |
$wrapper.append('<div class="acfe-modal-footer"><button class="button button-primary">' + this.get('footer') + '</button></div>');
|
115 |
|
@@ -117,7 +117,7 @@
|
|
117 |
|
118 |
},
|
119 |
|
120 |
-
open: function(){
|
121 |
|
122 |
this.$el.addClass('-open');
|
123 |
|
@@ -125,13 +125,18 @@
|
|
125 |
|
126 |
acfe.syncPopup();
|
127 |
|
|
|
|
|
|
|
|
|
|
|
128 |
acf.doAction('acfe/modal/open', this.$el, this.data);
|
129 |
|
130 |
this.get('onOpen').apply(this.$el);
|
131 |
|
132 |
},
|
133 |
|
134 |
-
close: function(){
|
135 |
|
136 |
this.$('.acfe-modal-wrapper-overlay').remove();
|
137 |
this.$('.acfe-modal-title').remove();
|
@@ -148,7 +153,7 @@
|
|
148 |
|
149 |
this.remove();
|
150 |
|
151 |
-
if(this.get('destroy')){
|
152 |
|
153 |
this.$el.remove();
|
154 |
|
@@ -156,7 +161,7 @@
|
|
156 |
|
157 |
},
|
158 |
|
159 |
-
remove: function(){
|
160 |
|
161 |
this.removeEvents();
|
162 |
this.removeActions();
|
@@ -164,11 +169,11 @@
|
|
164 |
|
165 |
},
|
166 |
|
167 |
-
onClickClose: function(e){
|
168 |
|
169 |
e.preventDefault();
|
170 |
|
171 |
-
if(!popups.length)
|
172 |
return false;
|
173 |
|
174 |
popups.pop().close();
|
@@ -180,9 +185,9 @@
|
|
180 |
/*
|
181 |
* Popup: Close
|
182 |
*/
|
183 |
-
acfe.closePopup = function(){
|
184 |
|
185 |
-
if(!popups.length)
|
186 |
return false;
|
187 |
|
188 |
popups.pop().close();
|
@@ -192,18 +197,18 @@
|
|
192 |
/*
|
193 |
* Popup: Sync
|
194 |
*/
|
195 |
-
acfe.syncPopup = function(){
|
196 |
|
197 |
var $body = $('body');
|
198 |
|
199 |
-
if(popups.length){
|
200 |
|
201 |
// Prepare Body
|
202 |
-
if(!$body.hasClass('acfe-modal-opened')){
|
203 |
|
204 |
$body.addClass('acfe-modal-opened').append($('<div class="acfe-modal-overlay" />'));
|
205 |
|
206 |
-
$('.acfe-modal-overlay').on('click', function(e){
|
207 |
|
208 |
e.preventDefault();
|
209 |
acfe.closePopup();
|
@@ -213,17 +218,17 @@
|
|
213 |
}
|
214 |
|
215 |
// Prepare Multiple
|
216 |
-
popups.map(function(self, i){
|
217 |
|
218 |
-
if(i === popups.length - 1){
|
219 |
return self.$el.removeClass('acfe-modal-sub').css('margin-left', '');
|
220 |
}
|
221 |
|
222 |
-
self.$el.addClass('acfe-modal-sub').css('margin-left',
|
223 |
|
224 |
});
|
225 |
|
226 |
-
}else{
|
227 |
|
228 |
$('.acfe-modal-overlay').remove();
|
229 |
$body.removeClass('acfe-modal-opened');
|
@@ -232,9 +237,9 @@
|
|
232 |
|
233 |
};
|
234 |
|
235 |
-
$(window).on('keydown', function(e){
|
236 |
|
237 |
-
if(e.keyCode !== 27 || !$('body').hasClass('acfe-modal-opened'))
|
238 |
return;
|
239 |
|
240 |
e.preventDefault();
|
@@ -245,13 +250,13 @@
|
|
245 |
// Compatibility
|
246 |
acfe.modal = {
|
247 |
|
248 |
-
open: function($modal, args){
|
249 |
|
250 |
new acfe.Popup($modal, args);
|
251 |
|
252 |
},
|
253 |
|
254 |
-
close: function(){
|
255 |
|
256 |
acfe.closePopup();
|
257 |
|
@@ -264,30 +269,30 @@
|
|
264 |
*/
|
265 |
var filters = [];
|
266 |
|
267 |
-
acfe.disableFilters = function(){
|
268 |
filters = [];
|
269 |
};
|
270 |
|
271 |
-
acfe.getFilters = function(){
|
272 |
return filters;
|
273 |
};
|
274 |
|
275 |
-
acfe.isFilterEnabled = function(name){
|
276 |
return filters.indexOf(name) > -1;
|
277 |
};
|
278 |
|
279 |
-
acfe.enableFilter = function(name){
|
280 |
|
281 |
-
if(filters.indexOf(name) === -1)
|
282 |
filters.push(name);
|
283 |
|
284 |
};
|
285 |
|
286 |
-
acfe.disableFilter = function(name){
|
287 |
|
288 |
-
for(var i = filters.length; i--;){
|
289 |
|
290 |
-
if(filters[i] !== name)
|
291 |
continue;
|
292 |
|
293 |
filters.splice(i, 1);
|
@@ -299,16 +304,16 @@
|
|
299 |
/*
|
300 |
* Parse String
|
301 |
*/
|
302 |
-
acfe.parseString = function(val){
|
303 |
return val ? '' + val : '';
|
304 |
};
|
305 |
|
306 |
/*
|
307 |
* In Array
|
308 |
*/
|
309 |
-
acfe.inArray = function(v1, array){
|
310 |
|
311 |
-
array = array.map(function(v2){
|
312 |
return acfe.parseString(v2);
|
313 |
});
|
314 |
|
@@ -319,7 +324,7 @@
|
|
319 |
/*
|
320 |
* Parse URL
|
321 |
*/
|
322 |
-
acfe.parseURL = function(url){
|
323 |
|
324 |
url = url || acfe.currentURL;
|
325 |
|
@@ -332,7 +337,7 @@
|
|
332 |
|
333 |
var Pairs = queryString.split(/[;&]/);
|
334 |
|
335 |
-
for(var i = 0; i < Pairs.length; i++){
|
336 |
|
337 |
var KeyVal = Pairs[i].split('=');
|
338 |
|
@@ -355,7 +360,7 @@
|
|
355 |
/*
|
356 |
* Current URL
|
357 |
*/
|
358 |
-
acfe.currentURL = function(){
|
359 |
|
360 |
return self.location.href;
|
361 |
|
@@ -364,7 +369,7 @@
|
|
364 |
/*
|
365 |
* Current Path
|
366 |
*/
|
367 |
-
acfe.currentPath = function(){
|
368 |
|
369 |
return self.location.pathname;
|
370 |
|
@@ -373,7 +378,7 @@
|
|
373 |
/*
|
374 |
* Current Filename
|
375 |
*/
|
376 |
-
acfe.currentFilename = function(){
|
377 |
|
378 |
return acfe.currentPath().split('/').pop();
|
379 |
|
@@ -382,7 +387,7 @@
|
|
382 |
/*
|
383 |
* Parent Object
|
384 |
*/
|
385 |
-
acfe.parentObject = function(obj){
|
386 |
return Object.getPrototypeOf(Object.getPrototypeOf(obj));
|
387 |
}
|
388 |
|
@@ -397,13 +402,13 @@
|
|
397 |
'click .acfe-field-tooltip': 'showTitle',
|
398 |
},
|
399 |
|
400 |
-
showTitle: function(e, $el){
|
401 |
|
402 |
// vars
|
403 |
var title = $el.attr('title');
|
404 |
|
405 |
// bail ealry if no title
|
406 |
-
if(
|
407 |
return;
|
408 |
}
|
409 |
|
@@ -411,7 +416,7 @@
|
|
411 |
$el.attr('title', '');
|
412 |
|
413 |
// create
|
414 |
-
if(
|
415 |
this.tooltip = acf.newTooltip({
|
416 |
text: title,
|
417 |
target: $el
|
@@ -428,5 +433,57 @@
|
|
428 |
}
|
429 |
|
430 |
});
|
431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
})(jQuery);
|
1 |
+
(function($) {
|
2 |
|
3 |
+
if (typeof acf === 'undefined')
|
4 |
return;
|
5 |
|
6 |
/*
|
18 |
/*
|
19 |
* Get
|
20 |
*/
|
21 |
+
acfe.get = function(name) {
|
22 |
return acf.data.acfe[name] || null;
|
23 |
};
|
24 |
|
25 |
/*
|
26 |
* Has
|
27 |
*/
|
28 |
+
acfe.has = function(name) {
|
29 |
return this.get(name) !== null;
|
30 |
};
|
31 |
|
32 |
/*
|
33 |
* Set
|
34 |
*/
|
35 |
+
acfe.set = function(name, value) {
|
36 |
acf.data.acfe[name] = value;
|
37 |
return this;
|
38 |
};
|
45 |
acfe.Popup = acf.Model.extend({
|
46 |
|
47 |
data: {
|
48 |
+
title: false,
|
49 |
+
footer: false,
|
50 |
+
size: false,
|
51 |
+
destroy: false,
|
52 |
+
onOpen: function() {},
|
53 |
+
onClose: function() {},
|
54 |
},
|
55 |
|
56 |
events: {
|
58 |
'click .acfe-modal-footer>button': 'onClickClose',
|
59 |
},
|
60 |
|
61 |
+
setup: function($content, args) {
|
62 |
|
63 |
$.extend(this.data, args);
|
64 |
|
67 |
|
68 |
},
|
69 |
|
70 |
+
initialize: function() {
|
71 |
|
72 |
this.open();
|
73 |
|
74 |
},
|
75 |
|
76 |
+
render: function() {
|
77 |
|
78 |
// Size
|
79 |
+
if (this.get('size')) {
|
80 |
|
81 |
this.$el.addClass('-' + this.get('size'));
|
82 |
|
83 |
}
|
84 |
|
85 |
// Wrapper
|
86 |
+
if (!this.$('> .acfe-modal-wrapper').length) {
|
87 |
|
88 |
this.$el.wrapInner('<div class="acfe-modal-wrapper" />');
|
89 |
|
92 |
var $wrapper = this.$('> .acfe-modal-wrapper');
|
93 |
|
94 |
// Content
|
95 |
+
if (!$wrapper.find('> .acfe-modal-content').length) {
|
96 |
|
97 |
$wrapper.wrapInner('<div class="acfe-modal-content" />');
|
98 |
|
99 |
}
|
100 |
|
101 |
// Title
|
102 |
+
if (this.get('title')) {
|
103 |
|
104 |
$wrapper.prepend('<div class="acfe-modal-title"><span class="title">' + this.get('title') + '</span><button class="close"></button></div>');
|
105 |
|
109 |
$wrapper.prepend('<div class="acfe-modal-wrapper-overlay"></div>');
|
110 |
|
111 |
// Footer
|
112 |
+
if (this.get('footer')) {
|
113 |
|
114 |
$wrapper.append('<div class="acfe-modal-footer"><button class="button button-primary">' + this.get('footer') + '</button></div>');
|
115 |
|
117 |
|
118 |
},
|
119 |
|
120 |
+
open: function() {
|
121 |
|
122 |
this.$el.addClass('-open');
|
123 |
|
125 |
|
126 |
acfe.syncPopup();
|
127 |
|
128 |
+
// show fields
|
129 |
+
acf.getFields(this.$el.find('.acf-field')).map(function(field) {
|
130 |
+
acf.doAction('show_field', field, 'group');
|
131 |
+
}, this);
|
132 |
+
|
133 |
acf.doAction('acfe/modal/open', this.$el, this.data);
|
134 |
|
135 |
this.get('onOpen').apply(this.$el);
|
136 |
|
137 |
},
|
138 |
|
139 |
+
close: function() {
|
140 |
|
141 |
this.$('.acfe-modal-wrapper-overlay').remove();
|
142 |
this.$('.acfe-modal-title').remove();
|
153 |
|
154 |
this.remove();
|
155 |
|
156 |
+
if (this.get('destroy')) {
|
157 |
|
158 |
this.$el.remove();
|
159 |
|
161 |
|
162 |
},
|
163 |
|
164 |
+
remove: function() {
|
165 |
|
166 |
this.removeEvents();
|
167 |
this.removeActions();
|
169 |
|
170 |
},
|
171 |
|
172 |
+
onClickClose: function(e) {
|
173 |
|
174 |
e.preventDefault();
|
175 |
|
176 |
+
if (!popups.length)
|
177 |
return false;
|
178 |
|
179 |
popups.pop().close();
|
185 |
/*
|
186 |
* Popup: Close
|
187 |
*/
|
188 |
+
acfe.closePopup = function() {
|
189 |
|
190 |
+
if (!popups.length)
|
191 |
return false;
|
192 |
|
193 |
popups.pop().close();
|
197 |
/*
|
198 |
* Popup: Sync
|
199 |
*/
|
200 |
+
acfe.syncPopup = function() {
|
201 |
|
202 |
var $body = $('body');
|
203 |
|
204 |
+
if (popups.length) {
|
205 |
|
206 |
// Prepare Body
|
207 |
+
if (!$body.hasClass('acfe-modal-opened')) {
|
208 |
|
209 |
$body.addClass('acfe-modal-opened').append($('<div class="acfe-modal-overlay" />'));
|
210 |
|
211 |
+
$('.acfe-modal-overlay').on('click', function(e) {
|
212 |
|
213 |
e.preventDefault();
|
214 |
acfe.closePopup();
|
218 |
}
|
219 |
|
220 |
// Prepare Multiple
|
221 |
+
popups.map(function(self, i) {
|
222 |
|
223 |
+
if (i === popups.length - 1) {
|
224 |
return self.$el.removeClass('acfe-modal-sub').css('margin-left', '');
|
225 |
}
|
226 |
|
227 |
+
self.$el.addClass('acfe-modal-sub').css('margin-left', -(500 / (i + 1)));
|
228 |
|
229 |
});
|
230 |
|
231 |
+
} else {
|
232 |
|
233 |
$('.acfe-modal-overlay').remove();
|
234 |
$body.removeClass('acfe-modal-opened');
|
237 |
|
238 |
};
|
239 |
|
240 |
+
$(window).on('keydown', function(e) {
|
241 |
|
242 |
+
if (e.keyCode !== 27 || !$('body').hasClass('acfe-modal-opened'))
|
243 |
return;
|
244 |
|
245 |
e.preventDefault();
|
250 |
// Compatibility
|
251 |
acfe.modal = {
|
252 |
|
253 |
+
open: function($modal, args) {
|
254 |
|
255 |
new acfe.Popup($modal, args);
|
256 |
|
257 |
},
|
258 |
|
259 |
+
close: function() {
|
260 |
|
261 |
acfe.closePopup();
|
262 |
|
269 |
*/
|
270 |
var filters = [];
|
271 |
|
272 |
+
acfe.disableFilters = function() {
|
273 |
filters = [];
|
274 |
};
|
275 |
|
276 |
+
acfe.getFilters = function() {
|
277 |
return filters;
|
278 |
};
|
279 |
|
280 |
+
acfe.isFilterEnabled = function(name) {
|
281 |
return filters.indexOf(name) > -1;
|
282 |
};
|
283 |
|
284 |
+
acfe.enableFilter = function(name) {
|
285 |
|
286 |
+
if (filters.indexOf(name) === -1)
|
287 |
filters.push(name);
|
288 |
|
289 |
};
|
290 |
|
291 |
+
acfe.disableFilter = function(name) {
|
292 |
|
293 |
+
for (var i = filters.length; i--;) {
|
294 |
|
295 |
+
if (filters[i] !== name)
|
296 |
continue;
|
297 |
|
298 |
filters.splice(i, 1);
|
304 |
/*
|
305 |
* Parse String
|
306 |
*/
|
307 |
+
acfe.parseString = function(val) {
|
308 |
return val ? '' + val : '';
|
309 |
};
|
310 |
|
311 |
/*
|
312 |
* In Array
|
313 |
*/
|
314 |
+
acfe.inArray = function(v1, array) {
|
315 |
|
316 |
+
array = array.map(function(v2) {
|
317 |
return acfe.parseString(v2);
|
318 |
});
|
319 |
|
324 |
/*
|
325 |
* Parse URL
|
326 |
*/
|
327 |
+
acfe.parseURL = function(url) {
|
328 |
|
329 |
url = url || acfe.currentURL;
|
330 |
|
337 |
|
338 |
var Pairs = queryString.split(/[;&]/);
|
339 |
|
340 |
+
for (var i = 0; i < Pairs.length; i++) {
|
341 |
|
342 |
var KeyVal = Pairs[i].split('=');
|
343 |
|
360 |
/*
|
361 |
* Current URL
|
362 |
*/
|
363 |
+
acfe.currentURL = function() {
|
364 |
|
365 |
return self.location.href;
|
366 |
|
369 |
/*
|
370 |
* Current Path
|
371 |
*/
|
372 |
+
acfe.currentPath = function() {
|
373 |
|
374 |
return self.location.pathname;
|
375 |
|
378 |
/*
|
379 |
* Current Filename
|
380 |
*/
|
381 |
+
acfe.currentFilename = function() {
|
382 |
|
383 |
return acfe.currentPath().split('/').pop();
|
384 |
|
387 |
/*
|
388 |
* Parent Object
|
389 |
*/
|
390 |
+
acfe.parentObject = function(obj) {
|
391 |
return Object.getPrototypeOf(Object.getPrototypeOf(obj));
|
392 |
}
|
393 |
|
402 |
'click .acfe-field-tooltip': 'showTitle',
|
403 |
},
|
404 |
|
405 |
+
showTitle: function(e, $el) {
|
406 |
|
407 |
// vars
|
408 |
var title = $el.attr('title');
|
409 |
|
410 |
// bail ealry if no title
|
411 |
+
if (!title) {
|
412 |
return;
|
413 |
}
|
414 |
|
416 |
$el.attr('title', '');
|
417 |
|
418 |
// create
|
419 |
+
if (!this.tooltip) {
|
420 |
this.tooltip = acf.newTooltip({
|
421 |
text: title,
|
422 |
target: $el
|
433 |
}
|
434 |
|
435 |
});
|
436 |
+
|
437 |
+
/*
|
438 |
+
* Fix acf.getFileInputData
|
439 |
+
* Source: /advanced-custom-fields-pro/assets/js/acf.js:1927
|
440 |
+
*/
|
441 |
+
acf.getFileInputData = function($input, callback) {
|
442 |
+
|
443 |
+
// vars
|
444 |
+
var value = $input.val();
|
445 |
+
|
446 |
+
// bail early if no value
|
447 |
+
if (!value) {
|
448 |
+
return false;
|
449 |
+
}
|
450 |
+
|
451 |
+
// data
|
452 |
+
var data = {
|
453 |
+
url: value
|
454 |
+
};
|
455 |
+
|
456 |
+
// fix
|
457 |
+
var file = $input[0].files.length ? acf.isget($input[0].files, 0) : false;
|
458 |
+
|
459 |
+
if (file) {
|
460 |
+
|
461 |
+
// update data
|
462 |
+
data.size = file.size;
|
463 |
+
data.type = file.type;
|
464 |
+
|
465 |
+
// image
|
466 |
+
if (file.type.indexOf('image') > -1) {
|
467 |
+
|
468 |
+
// vars
|
469 |
+
var windowURL = window.URL || window.webkitURL;
|
470 |
+
var img = new Image();
|
471 |
+
|
472 |
+
img.onload = function() {
|
473 |
+
|
474 |
+
// update
|
475 |
+
data.width = this.width;
|
476 |
+
data.height = this.height;
|
477 |
+
|
478 |
+
callback(data);
|
479 |
+
};
|
480 |
+
img.src = windowURL.createObjectURL(file);
|
481 |
+
} else {
|
482 |
+
callback(data);
|
483 |
+
}
|
484 |
+
} else {
|
485 |
+
callback(data);
|
486 |
+
}
|
487 |
+
};
|
488 |
+
|
489 |
})(jQuery);
|
@@ -1 +1 @@
|
|
1 |
-
!function(
|
1 |
+
!function(n){var l,o,i;"undefined"!=typeof acf&&(acf.data.acfe={},l={},(window.acfe=l).get=function(e){return acf.data.acfe[e]||null},l.has=function(e){return null!==this.get(e)},l.set=function(e,t){return acf.data.acfe[e]=t,this},o=[],l.Popup=acf.Model.extend({data:{title:!1,footer:!1,size:!1,destroy:!1,onOpen:function(){},onClose:function(){}},events:{"click .acfe-modal-title>.close":"onClickClose","click .acfe-modal-footer>button":"onClickClose"},setup:function(e,t){n.extend(this.data,t),this.$el=e,this.render()},initialize:function(){this.open()},render:function(){this.get("size")&&this.$el.addClass("-"+this.get("size")),this.$("> .acfe-modal-wrapper").length||this.$el.wrapInner('<div class="acfe-modal-wrapper" />');var e=this.$("> .acfe-modal-wrapper");e.find("> .acfe-modal-content").length||e.wrapInner('<div class="acfe-modal-content" />'),this.get("title")&&e.prepend('<div class="acfe-modal-title"><span class="title">'+this.get("title")+'</span><button class="close"></button></div>'),e.prepend('<div class="acfe-modal-wrapper-overlay"></div>'),this.get("footer")&&e.append('<div class="acfe-modal-footer"><button class="button button-primary">'+this.get("footer")+"</button></div>")},open:function(){this.$el.addClass("-open"),o.push(this),l.syncPopup(),acf.getFields(this.$el.find(".acf-field")).map(function(e){acf.doAction("show_field",e,"group")},this),acf.doAction("acfe/modal/open",this.$el,this.data),this.get("onOpen").apply(this.$el)},close:function(){this.$(".acfe-modal-wrapper-overlay").remove(),this.$(".acfe-modal-title").remove(),this.$(".acfe-modal-footer").remove(),this.$el.removeAttr("style"),this.$el.removeClass("-open"),l.syncPopup(),acf.doAction("acfe/modal/close",this.$el,this.data),this.get("onClose").apply(this.$el),this.remove(),this.get("destroy")&&this.$el.remove()},remove:function(){this.removeEvents(),this.removeActions(),this.removeFilters()},onClickClose:function(e){if(e.preventDefault(),!o.length)return!1;o.pop().close()}}),l.closePopup=function(){if(!o.length)return!1;o.pop().close()},l.syncPopup=function(){var e=n("body");o.length?(e.hasClass("acfe-modal-opened")||(e.addClass("acfe-modal-opened").append(n('<div class="acfe-modal-overlay" />')),n(".acfe-modal-overlay").on("click",function(e){e.preventDefault(),l.closePopup()})),o.map(function(e,t){return t===o.length-1?e.$el.removeClass("acfe-modal-sub").css("margin-left",""):void e.$el.addClass("acfe-modal-sub").css("margin-left",-500/(t+1))})):(n(".acfe-modal-overlay").remove(),e.removeClass("acfe-modal-opened"))},n(window).on("keydown",function(e){27===e.keyCode&&n("body").hasClass("acfe-modal-opened")&&(e.preventDefault(),l.closePopup())}),l.modal={open:function(e,t){new l.Popup(e,t)},close:function(){l.closePopup()}},i=[],l.disableFilters=function(){i=[]},l.getFilters=function(){return i},l.isFilterEnabled=function(e){return-1<i.indexOf(e)},l.enableFilter=function(e){-1===i.indexOf(e)&&i.push(e)},l.disableFilter=function(e){for(var t=i.length;t--;)i[t]===e&&i.splice(t,1)},l.parseString=function(e){return e?""+e:""},l.inArray=function(e,t){return-1<(t=t.map(function(e){return l.parseString(e)})).indexOf(e)},l.parseURL=function(e){var t={},e=(e=e||l.currentURL).replace(/^[^\?]+\??/,"");if(!e)return t;for(var n=e.split(/[;&]/),o=0;o<n.length;o++){var i,a=n[o].split("=");a&&2===a.length&&(i=decodeURI(a[0]),a=(a=decodeURI(a[1])).replace(/\+/g," "),t[i]=a)}return t},l.currentURL=function(){return self.location.href},l.currentPath=function(){return self.location.pathname},l.currentFilename=function(){return l.currentPath().split("/").pop()},l.parentObject=function(e){return Object.getPrototypeOf(Object.getPrototypeOf(e))},new acf.Model({tooltip:!1,events:{"click .acfe-field-tooltip":"showTitle"},showTitle:function(e,t){var n=t.attr("title");n&&(t.attr("title",""),this.tooltip?this.tooltip.update({text:n,target:t}):this.tooltip=acf.newTooltip({text:n,target:t}))}}),acf.getFileInputData=function(e,t){var n=e.val();if(!n)return!1;var o={url:n},i=!!e[0].files.length&&acf.isget(e[0].files,0);i?(o.size=i.size,o.type=i.type,-1<i.type.indexOf("image")?(n=window.URL||window.webkitURL,(e=new Image).onload=function(){o.width=this.width,o.height=this.height,t(o)},e.src=n.createObjectURL(i)):t(o)):t(o)})}(jQuery);
|
@@ -20,13 +20,10 @@ require_once(ACFE_PATH . 'includes/admin/options.class.php');
|
|
20 |
add_action('admin_menu', 'acfe_options_menu');
|
21 |
function acfe_options_menu(){
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
acf_get_setting('capability'),
|
28 |
-
'acfe-options'
|
29 |
-
);
|
30 |
|
31 |
}
|
32 |
|
20 |
add_action('admin_menu', 'acfe_options_menu');
|
21 |
function acfe_options_menu(){
|
22 |
|
23 |
+
if(!acf_get_setting('show_admin'))
|
24 |
+
return;
|
25 |
+
|
26 |
+
add_submenu_page('options-general.php', __('Options'), __('Options'), acf_get_setting('capability'), 'acfe-options' );
|
|
|
|
|
|
|
27 |
|
28 |
}
|
29 |
|
@@ -3,451 +3,698 @@
|
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
-
|
7 |
-
|
|
|
8 |
|
9 |
-
|
10 |
-
|
|
|
11 |
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
|
|
|
|
25 |
|
26 |
-
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
array(
|
45 |
-
'name' => 'path',
|
46 |
-
'label' => 'Path',
|
47 |
-
'value' => '<code>' . acf_get_setting('path') . '</code>',
|
48 |
-
'description' => 'Absolute path to ACF plugin folder including trailing slash.<br />Defaults to plugin_dir_path'
|
49 |
-
),
|
50 |
-
array(
|
51 |
-
'name' => 'dir',
|
52 |
-
'label' => 'Directory',
|
53 |
-
'value' => '<code>' . acf_get_setting('dir') . '</code>',
|
54 |
-
'description' => 'URL to ACF plugin folder including trailing slash. Defaults to plugin_dir_url'
|
55 |
-
),
|
56 |
-
array(
|
57 |
-
'name' => 'show_admin',
|
58 |
-
'label' => 'Show menu',
|
59 |
-
'value' => '<code>' . (acf_get_setting('show_admin') ? __('True'): __('False')) . '</code>',
|
60 |
-
'description' => 'Show/hide ACF menu item. Defaults to true'
|
61 |
-
),
|
62 |
-
array(
|
63 |
-
'name' => 'stripslashes',
|
64 |
-
'label' => 'Strip slashes',
|
65 |
-
'value' => '<code>' . (acf_get_setting('stripslashes') ? __('True'): __('False')) . '</code>',
|
66 |
-
'description' => 'Runs the function stripslashes on all $_POST data. Some servers / WP instals may require this extra functioanlity. Defaults to false'
|
67 |
-
),
|
68 |
-
array(
|
69 |
-
'name' => 'local',
|
70 |
-
'label' => 'PHP/Json',
|
71 |
-
'value' => '<code>' . (acf_get_setting('local') ? __('True'): __('False')) . '</code>',
|
72 |
-
'description' => 'Enable/Disable local (PHP/json) fields. Defaults to true'
|
73 |
-
),
|
74 |
-
array(
|
75 |
-
'name' => 'json',
|
76 |
-
'label' => 'Json',
|
77 |
-
'value' => '<code>' . (acf_get_setting('json') ? __('True'): __('False')) . '</code>',
|
78 |
-
'description' => 'Enable/Disable json fields. Defaults to true'
|
79 |
-
),
|
80 |
-
array(
|
81 |
-
'name' => 'save_json',
|
82 |
-
'label' => 'Json folder (save)',
|
83 |
-
'value' => '<code>' . acf_get_setting('save_json') . '</code>',
|
84 |
-
'description' => 'Absolute path to folder where json files will be created when field groups are saved.<br />Defaults to ‘acf-json’ folder within current theme'
|
85 |
-
),
|
86 |
-
array(
|
87 |
-
'name' => 'load_json',
|
88 |
-
'label' => 'Json folder (load)',
|
89 |
-
'value' => '<code>' . implode("<br />", (array) acf_get_setting('load_json')) . '</code>',
|
90 |
-
'description' => 'Array of absolutes paths to folders where field group json files can be read.<br />Defaults to an array containing at index 0, the ‘acf-json’ folder within current theme'
|
91 |
-
),
|
92 |
-
array(
|
93 |
-
'name' => 'default_language',
|
94 |
-
'label' => 'Default language',
|
95 |
-
'value' => '<code>' . acf_get_setting('default_language') . '</code>',
|
96 |
-
'description' => 'Language code of the default language. Defaults to ”.<br />If WPML is active, ACF will default this to the WPML default language setting'
|
97 |
-
),
|
98 |
-
array(
|
99 |
-
'name' => 'current_language',
|
100 |
-
'label' => 'Current language',
|
101 |
-
'value' => '<code>' . acf_get_setting('current_language') . '</code>',
|
102 |
-
'description' => 'Language code of the current post’s language. Defaults to ”.<br />If WPML is active, ACF will default this to the WPML current language'
|
103 |
-
),
|
104 |
-
array(
|
105 |
-
'name' => 'capability',
|
106 |
-
'label' => 'Capability',
|
107 |
-
'value' => '<code>' . acf_get_setting('capability') . '</code>',
|
108 |
-
'description' => 'Capability used for ACF post types and if the current user can see the ACF menu item.<br />Defaults to ‘manage_options’.'
|
109 |
-
),
|
110 |
-
array(
|
111 |
-
'name' => 'show_updates',
|
112 |
-
'label' => 'Show updates',
|
113 |
-
'value' => '<code>' . (acf_get_setting('show_updates') ? __('True'): __('False')) . '</code>',
|
114 |
-
'description' => 'Enable/Disable updates to appear in plugin list and show/hide the ACF updates admin page.<br />Defaults to true.'
|
115 |
-
),
|
116 |
-
array(
|
117 |
-
'name' => 'export_textdomain',
|
118 |
-
'label' => 'Export textdomain',
|
119 |
-
'value' => '<code>' . (acf_get_setting('export_textdomain') ? __('True'): __('False')) . '</code>',
|
120 |
-
'description' => 'Array of keys used during the ‘Export to PHP’ feature to wrap strings within the __() function.<br />Defaults to array(’title’, ’label’, ’instructions’). Depreciated in v5.3.4 – please see l10n_field and l10n_field_group'
|
121 |
-
),
|
122 |
-
array(
|
123 |
-
'name' => 'export_translate',
|
124 |
-
'label' => 'Export translate',
|
125 |
-
'value' => '<code>' . print_r(acf_get_setting('export_translate'), true) . '</code>',
|
126 |
-
'description' => 'Used during the ‘Export to PHP’ feature to wrap strings within the __() function.<br />Depreciated in v5.4.4 – please see l10n_textdomain'
|
127 |
-
),
|
128 |
-
array(
|
129 |
-
'name' => 'autoload',
|
130 |
-
'label' => 'Auto load',
|
131 |
-
'value' => '<code>' . (acf_get_setting('autoload') ? __('True'): __('False')) . '</code>',
|
132 |
-
'description' => 'Sets the text domain used when translating field and field group settings.<br />Defaults to ”. Strings will not be translated if this setting is empty'
|
133 |
-
),
|
134 |
-
array(
|
135 |
-
'name' => 'l10n',
|
136 |
-
'label' => 'l10n',
|
137 |
-
'value' => '<code>' . (acf_get_setting('l10n') ? __('True'): __('False')) . '</code>',
|
138 |
-
'description' => 'Allows ACF to translate field and field group settings using the __() function.<br />Defaults to true. Useful to override translation without modifying the textdomain'
|
139 |
-
),
|
140 |
-
array(
|
141 |
-
'name' => 'l10n_textdomain',
|
142 |
-
'label' => 'l10n Textdomain',
|
143 |
-
'value' => '<code>' . print_r(acf_get_setting('l10n_textdomain'), true) . '</code>',
|
144 |
-
'description' => 'Sets the text domain used when translating field and field group settings.<br />Defaults to ”. Strings will not be translated if this setting is empty'
|
145 |
-
),
|
146 |
-
array(
|
147 |
-
'name' => 'l10n_field',
|
148 |
-
'label' => 'l10n Field',
|
149 |
-
'value' => '<code>' . print_r(acf_get_setting('l10n_field'), true) . '</code>',
|
150 |
-
'description' => 'An array of settings to translate when loading and exporting a field.<br />Defaults to array(’label’, ’instructions’). Depreciated in v5.3.6 – please see acf/translate_field filter'
|
151 |
-
),
|
152 |
-
array(
|
153 |
-
'name' => 'l10n_field_group',
|
154 |
-
'label' => 'l10n Field group',
|
155 |
-
'value' => '<code>' . print_r(acf_get_setting('l10n_field_group'), true) . '</code>',
|
156 |
-
'description' => 'An array of settings to translate when loading and exporting a field group.<br />Defaults to array(’title’). Depreciated in v5.3.6 – please see acf/translate_field_group filter'
|
157 |
-
),
|
158 |
-
array(
|
159 |
-
'name' => 'google_api_key',
|
160 |
-
'label' => 'Google API Key',
|
161 |
-
'value' => '<code>' . acf_get_setting('google_api_key') . '</code>',
|
162 |
-
'description' => 'Specify a Google Maps API authentication key to prevent usage limits.<br />Defaults to ”'
|
163 |
-
),
|
164 |
-
array(
|
165 |
-
'name' => 'google_api_client',
|
166 |
-
'label' => 'Google API Key',
|
167 |
-
'value' => '<code>' . acf_get_setting('google_api_client') . '</code>',
|
168 |
-
'description' => 'Specify a Google Maps API Client ID to prevent usage limits.<br />Not needed if using <code>google_api_key</code>. Defaults to ”'
|
169 |
-
),
|
170 |
-
array(
|
171 |
-
'name' => 'enqueue_google_maps',
|
172 |
-
'label' => 'Enqueue Google Maps',
|
173 |
-
'value' => '<code>' . (acf_get_setting('enqueue_google_maps') ? __('True'): __('False')) . '</code>',
|
174 |
-
'description' => 'Allows ACF to enqueue and load the Google Maps API JS library.<br />Defaults to true'
|
175 |
-
),
|
176 |
-
array(
|
177 |
-
'name' => 'enqueue_select2',
|
178 |
-
'label' => 'Enqueue Select2',
|
179 |
-
'value' => '<code>' . (acf_get_setting('enqueue_select2') ? __('True'): __('False')) . '</code>',
|
180 |
-
'description' => 'Allows ACF to enqueue and load the Select2 JS/CSS library.<br />Defaults to true'
|
181 |
-
),
|
182 |
-
array(
|
183 |
-
'name' => 'select2_version',
|
184 |
-
'label' => 'Select2 version',
|
185 |
-
'value' => '<code>' . acf_get_setting('select2_version') . '</code>',
|
186 |
-
'description' => 'Defines which version of Select2 library to enqueue. Either 3 or 4.<br />Defaults to 4 since ACF 5.6.0'
|
187 |
-
),
|
188 |
-
array(
|
189 |
-
'name' => 'enqueue_datepicker',
|
190 |
-
'label' => 'Enqueue Datepicker',
|
191 |
-
'value' => '<code>' . (acf_get_setting('enqueue_datepicker') ? __('True'): __('False')) . '</code>',
|
192 |
-
'description' => 'Allows ACF to enqueue and load the WP datepicker JS/CSS library.<br />Defaults to true'
|
193 |
-
),
|
194 |
-
array(
|
195 |
-
'name' => 'enqueue_datetimepicker',
|
196 |
-
'label' => 'Enqueue Date/timepicker',
|
197 |
-
'value' => '<code>' . (acf_get_setting('enqueue_datetimepicker') ? __('True'): __('False')) . '</code>',
|
198 |
-
'description' => 'Allows ACF to enqueue and load the datetimepicker JS/CSS library.<br />Defaults to true'
|
199 |
-
),
|
200 |
-
array(
|
201 |
-
'name' => 'row_index_offset',
|
202 |
-
'label' => 'Row index offset',
|
203 |
-
'value' => '<code>' . acf_get_setting('row_index_offset') . '</code>',
|
204 |
-
'description' => 'Defines the starting index used in all ‘loop’ and ‘row’ functions.<br />Defaults to 1 (1 is the first row), can be changed to 0 (0 is the first row)'
|
205 |
-
),
|
206 |
-
array(
|
207 |
-
'name' => 'remove_wp_meta_box',
|
208 |
-
'label' => 'Remove WP meta box',
|
209 |
-
'value' => '<code>' . (acf_get_setting('remove_wp_meta_box') ? __('True'): __('False')) . '</code>',
|
210 |
-
'description' => 'Allows ACF to remove the default WP custom fields metabox. Defaults to true'
|
211 |
-
),
|
212 |
-
);
|
213 |
|
214 |
-
|
|
|
|
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
</div>
|
|
|
225 |
</div>
|
226 |
-
<?php } ?>
|
227 |
|
228 |
-
|
229 |
-
acf_render_field_wrap(array(
|
230 |
-
'type' => 'tab',
|
231 |
-
'label' => 'ACF: Extended',
|
232 |
-
));
|
233 |
-
?>
|
234 |
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
'label' => 'Module: Dynamic Block Types',
|
255 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/dynamic_block_types', true) ? __('True'): __('False')) . '</code>',
|
256 |
-
'description' => 'Show/hide the Block Types module. Defaults to true'
|
257 |
-
),
|
258 |
-
array(
|
259 |
-
'name' => 'acfe/modules/dynamic_forms',
|
260 |
-
'label' => 'Module: Dynamic Forms',
|
261 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/dynamic_forms', true) ? __('True'): __('False')) . '</code>',
|
262 |
-
'description' => 'Show/hide the Forms module. Defaults to true'
|
263 |
-
),
|
264 |
-
array(
|
265 |
-
'name' => 'acfe/modules/dynamic_post_types',
|
266 |
-
'label' => 'Module: Dynamic Post Types',
|
267 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/dynamic_post_types', true) ? __('True'): __('False')) . '</code>',
|
268 |
-
'description' => 'Show/hide the Post Types module. Defaults to true'
|
269 |
-
),
|
270 |
-
array(
|
271 |
-
'name' => 'acfe/modules/dynamic_taxonomies',
|
272 |
-
'label' => 'Module: Dynamic Taxonomies',
|
273 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/dynamic_taxonomies', true) ? __('True'): __('False')) . '</code>',
|
274 |
-
'description' => 'Show/hide the Taxonomies module. Defaults to true'
|
275 |
-
),
|
276 |
-
array(
|
277 |
-
'name' => 'acfe/modules/dynamic_options_pages',
|
278 |
-
'label' => 'Module: Dynamic Options Pages',
|
279 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/dynamic_options_pages', true) ? __('True'): __('False')) . '</code>',
|
280 |
-
'description' => 'Show/hide the Options Pages module. Defaults to true'
|
281 |
-
),
|
282 |
-
array(
|
283 |
-
'name' => 'acfe/modules/multilang',
|
284 |
-
'label' => 'Module: Multilang',
|
285 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/multilang', true) ? __('True'): __('False')) . '</code>',
|
286 |
-
'description' => 'Enable/disable Multilang compatibility module for WPML & Polylang. Defaults to true'
|
287 |
-
),
|
288 |
-
array(
|
289 |
-
'name' => 'acfe/modules/options',
|
290 |
-
'label' => 'Module: Options',
|
291 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/options', true) ? __('True'): __('False')) . '</code>',
|
292 |
-
'description' => 'Show/hide the Options module. Defaults to true'
|
293 |
-
),
|
294 |
-
array(
|
295 |
-
'name' => 'acfe/modules/single_meta',
|
296 |
-
'label' => 'Module: Single Meta',
|
297 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/single_meta', true) ? __('True'): __('False')) . '</code>',
|
298 |
-
'description' => 'Enable/disable Single Meta Save module. Defaults to false'
|
299 |
-
),
|
300 |
-
array(
|
301 |
-
'name' => 'acfe/modules/ui',
|
302 |
-
'label' => 'Module: UI Enhancements',
|
303 |
-
'value' => '<code>' . (acf_get_setting('acfe/modules/ui', true) ? __('True'): __('False')) . '</code>',
|
304 |
-
'description' => 'Show/hide the UI enhancements module. Defaults to true'
|
305 |
-
),
|
306 |
-
|
307 |
-
// Recaptcha
|
308 |
-
array(
|
309 |
-
'name' => 'acfe/field/recaptcha/site_key',
|
310 |
-
'label' => 'Field: reCaptcha site key',
|
311 |
-
'value' => '<code>' . acf_get_setting('acfe/field/recaptcha/site_key') . '</code>',
|
312 |
-
'description' => 'The default reCaptcha site key'
|
313 |
-
),
|
314 |
-
array(
|
315 |
-
'name' => 'acfe/field/recaptcha/secret_key',
|
316 |
-
'label' => 'Field: reCaptcha secret key',
|
317 |
-
'value' => '<code>' . acf_get_setting('acfe/field/recaptcha/secret_key') . '</code>',
|
318 |
-
'description' => 'The default reCaptcha secret key'
|
319 |
-
),
|
320 |
-
array(
|
321 |
-
'name' => 'acfe/field/recaptcha/version',
|
322 |
-
'label' => 'Field: reCaptcha version',
|
323 |
-
'value' => '<code>' . acf_get_setting('acfe/field/recaptcha/version', 'v2') . '</code>',
|
324 |
-
'description' => 'The default reCaptcha version'
|
325 |
-
),
|
326 |
-
array(
|
327 |
-
'name' => 'acfe/field/recaptcha/v2/theme',
|
328 |
-
'label' => 'Field: reCaptcha v2 theme',
|
329 |
-
'value' => '<code>' . acf_get_setting('acfe/field/recaptcha/v2/theme', 'light') . '</code>',
|
330 |
-
'description' => 'The default reCaptcha v2 theme'
|
331 |
-
),
|
332 |
-
array(
|
333 |
-
'name' => 'acfe/field/recaptcha/v2/size',
|
334 |
-
'label' => 'Field: reCaptcha v2 size',
|
335 |
-
'value' => '<code>' . acf_get_setting('acfe/field/recaptcha/v2/size', 'normal') . '</code>',
|
336 |
-
'description' => 'The default reCaptcha v2 size'
|
337 |
-
),
|
338 |
-
array(
|
339 |
-
'name' => 'acfe/field/recaptcha/v3/hide_logo',
|
340 |
-
'label' => 'Field: reCaptcha v3 hide logo',
|
341 |
-
'value' => '<code>' . acf_get_setting('acfe/field/recaptcha/v3/hide_logo') . '</code>',
|
342 |
-
'description' => 'Show/hide reCaptcha v3 logo'
|
343 |
-
),
|
344 |
-
array(
|
345 |
-
'name' => 'acfe/dev',
|
346 |
-
'label' => 'Dev mode',
|
347 |
-
'value' => '<code>' . (acf_get_setting('acfe/dev') ? __('True'): __('False')) . '</code>',
|
348 |
-
'description' => 'Show/hide the advanced WP post meta box. Defaults to false'
|
349 |
-
),
|
350 |
-
|
351 |
-
// PHP
|
352 |
-
array(
|
353 |
-
'name' => 'acfe/php',
|
354 |
-
'label' => 'PHP',
|
355 |
-
'value' => '<code>' . (acf_get_setting('acfe/php') ? __('True'): __('False')) . '</code>',
|
356 |
-
'description' => 'Whenever PHP AutoSync is enabled'
|
357 |
-
),
|
358 |
-
array(
|
359 |
-
'name' => 'acfe/php_found',
|
360 |
-
'label' => 'PHP: Found',
|
361 |
-
'value' => '<code>' . (acf_get_setting('acfe/php_found') ? __('True'): __('False')) . '</code>',
|
362 |
-
'description' => 'Whenever PHP AutoSync folder has been found, based on acfe/php_load setting'
|
363 |
-
),
|
364 |
-
array(
|
365 |
-
'name' => 'acfe/php_save',
|
366 |
-
'label' => 'PHP: Save',
|
367 |
-
'value' => '<code>' . acf_get_setting('acfe/php_save') . '</code>',
|
368 |
-
'description' => 'PHP AutoSync saving path'
|
369 |
-
),
|
370 |
-
array(
|
371 |
-
'name' => 'acfe/php_load',
|
372 |
-
'label' => 'PHP: Load',
|
373 |
-
'value' => '<code>' . implode("<br />", (array) acf_get_setting('acfe/php_load')) . '</code>',
|
374 |
-
'description' => 'PHP AutoSync loading path'
|
375 |
-
),
|
376 |
-
|
377 |
-
// Json
|
378 |
-
array(
|
379 |
-
'name' => 'acfe/json',
|
380 |
-
'label' => 'Json',
|
381 |
-
'value' => '<code>' . (acf_get_setting('acfe/json') ? __('True'): __('False')) . '</code>',
|
382 |
-
'description' => 'Whenever Json AutoSync is enabled'
|
383 |
-
),
|
384 |
-
array(
|
385 |
-
'name' => 'acfe/json_found',
|
386 |
-
'label' => 'Json: Found',
|
387 |
-
'value' => '<code>' . (acf_get_setting('acfe/json_found') ? __('True'): __('False')) . '</code>',
|
388 |
-
'description' => 'Whenever Json AutoSync folder has been found, based on acfe/json_load setting'
|
389 |
-
),
|
390 |
-
array(
|
391 |
-
'name' => 'acfe/json_save',
|
392 |
-
'label' => 'Json: Save',
|
393 |
-
'value' => '<code>' . acf_get_setting('acfe/json_save') . '</code>',
|
394 |
-
'description' => 'Json AutoSync saving path'
|
395 |
-
),
|
396 |
-
array(
|
397 |
-
'name' => 'acfe/json_load',
|
398 |
-
'label' => 'Json: Load',
|
399 |
-
'value' => '<code>' . implode("<br />", (array) acf_get_setting('acfe/json_load')) . '</code>',
|
400 |
-
'description' => 'Json AutoSync loading paths'
|
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 |
<div class="acf-field">
|
427 |
<div class="acf-label">
|
428 |
-
<label><span class="acf-js-tooltip dashicons dashicons-info"
|
429 |
-
|
|
|
|
|
430 |
</div>
|
431 |
<div class="acf-input">
|
432 |
-
<?php echo $setting['value']; ?>
|
433 |
-
</div>
|
434 |
-
</div>
|
435 |
-
<?php } ?>
|
436 |
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
acf.newPostbox({
|
441 |
-
'id': 'acfe-settings',
|
442 |
-
'label': 'left'
|
443 |
-
});
|
444 |
|
|
|
|
|
|
|
|
|
445 |
}
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
|
|
|
|
450 |
|
451 |
-
|
452 |
-
|
453 |
-
|
|
|
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
+
if(!class_exists('acfe_admin_settings')):
|
7 |
+
|
8 |
+
class acfe_admin_settings{
|
9 |
|
10 |
+
public $defaults = array();
|
11 |
+
public $updated = array();
|
12 |
+
public $fields = array();
|
13 |
|
14 |
+
function __construct(){
|
15 |
|
16 |
+
add_action('acf/init', array($this, 'acf_pre_init'), 1);
|
17 |
+
add_action('acf/init', array($this, 'acf_post_init'), 100);
|
18 |
+
|
19 |
+
$this->register_fields();
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
/*
|
24 |
+
* Pre Init
|
25 |
+
*/
|
26 |
+
function acf_pre_init(){
|
27 |
+
$this->defaults = acf()->settings;
|
28 |
+
}
|
29 |
+
|
30 |
+
/*
|
31 |
+
* Post Init
|
32 |
+
*/
|
33 |
+
function acf_post_init(){
|
34 |
+
$this->updated = acf()->settings;
|
35 |
+
}
|
36 |
+
|
37 |
+
/*
|
38 |
+
* Register Fields
|
39 |
+
*/
|
40 |
+
function register_fields(){
|
41 |
+
|
42 |
+
$this->fields = array(
|
43 |
+
|
44 |
+
// ACF
|
45 |
+
'acf' => array(
|
46 |
+
|
47 |
+
array(
|
48 |
+
'label' => 'Path',
|
49 |
+
'name' => 'path',
|
50 |
+
'type' => 'text',
|
51 |
+
'description' => 'Absolute path to ACF plugin folder including trailing slash.<br />Defaults to plugin_dir_path',
|
52 |
+
'category' => 'acf',
|
53 |
+
),
|
54 |
+
array(
|
55 |
+
'label' => 'URL',
|
56 |
+
'name' => 'url',
|
57 |
+
'type' => 'text',
|
58 |
+
'description' => 'URL to ACF plugin folder including trailing slash. Defaults to plugin_dir_url',
|
59 |
+
'category' => 'acf',
|
60 |
+
),
|
61 |
+
array(
|
62 |
+
'label' => 'Show admin',
|
63 |
+
'name' => 'show_admin',
|
64 |
+
'type' => 'true_false',
|
65 |
+
'description' => 'Show/hide ACF menu item. Defaults to true',
|
66 |
+
'category' => 'acf',
|
67 |
+
),
|
68 |
+
array(
|
69 |
+
'label' => 'Strip slashes',
|
70 |
+
'name' => 'stripslashes',
|
71 |
+
'type' => 'true_false',
|
72 |
+
'description' => 'Runs the function stripslashes on all $_POST data. Some servers / WP instals may require this extra functioanlity. Defaults to false',
|
73 |
+
'category' => 'acf',
|
74 |
+
),
|
75 |
+
array(
|
76 |
+
'label' => 'Local',
|
77 |
+
'name' => 'local',
|
78 |
+
'type' => 'true_false',
|
79 |
+
'description' => 'Enable/Disable local (PHP/json) fields. Defaults to true',
|
80 |
+
'category' => 'acf',
|
81 |
+
),
|
82 |
+
array(
|
83 |
+
'label' => 'Json',
|
84 |
+
'name' => 'json',
|
85 |
+
'type' => 'true_false',
|
86 |
+
'description' => 'Enable/Disable json fields. Defaults to true',
|
87 |
+
'category' => 'acf',
|
88 |
+
),
|
89 |
+
array(
|
90 |
+
'label' => 'Json folder (save)',
|
91 |
+
'name' => 'save_json',
|
92 |
+
'type' => 'text',
|
93 |
+
'description' => 'Absolute path to folder where json files will be created when field groups are saved.<br />Defaults to ‘acf-json’ folder within current theme',
|
94 |
+
'category' => 'acf',
|
95 |
+
),
|
96 |
+
array(
|
97 |
+
'label' => 'Json folder (load)',
|
98 |
+
'name' => 'load_json',
|
99 |
+
'type' => 'text',
|
100 |
+
'description' => 'Array of absolutes paths to folders where field group json files can be read.<br />Defaults to an array containing at index 0, the ‘acf-json’ folder within current theme',
|
101 |
+
'category' => 'acf',
|
102 |
+
'format' => 'array',
|
103 |
+
),
|
104 |
+
array(
|
105 |
+
'label' => 'Default language',
|
106 |
+
'name' => 'default_language',
|
107 |
+
'type' => 'true_false',
|
108 |
+
'description' => 'Language code of the default language. Defaults to ”.<br />If WPML is active, ACF will default this to the WPML default language setting',
|
109 |
+
'category' => 'acf',
|
110 |
+
),
|
111 |
+
array(
|
112 |
+
'label' => 'Current language',
|
113 |
+
'name' => 'current_language',
|
114 |
+
'type' => 'true_false',
|
115 |
+
'description' => 'Language code of the current post’s language. Defaults to ”.<br />If WPML is active, ACF will default this to the WPML current language',
|
116 |
+
'category' => 'acf',
|
117 |
+
),
|
118 |
+
array(
|
119 |
+
'label' => 'Capability',
|
120 |
+
'name' => 'capability',
|
121 |
+
'type' => 'text',
|
122 |
+
'description' => 'Capability used for ACF post types and if the current user can see the ACF menu item.<br />Defaults to ‘manage_options’.',
|
123 |
+
'category' => 'acf',
|
124 |
+
),
|
125 |
+
array(
|
126 |
+
'label' => 'Show updates',
|
127 |
+
'name' => 'show_updates',
|
128 |
+
'type' => 'true_false',
|
129 |
+
'description' => 'Enable/Disable updates to appear in plugin list and show/hide the ACF updates admin page.<br />Defaults to true.',
|
130 |
+
'category' => 'acf',
|
131 |
+
),
|
132 |
+
array(
|
133 |
+
'label' => 'Auto load',
|
134 |
+
'name' => 'autoload',
|
135 |
+
'type' => 'true_false',
|
136 |
+
'description' => 'Sets the text domain used when translating field and field group settings.<br />Defaults to ”. Strings will not be translated if this setting is empty',
|
137 |
+
'category' => 'acf',
|
138 |
+
),
|
139 |
+
array(
|
140 |
+
'label' => 'l10n',
|
141 |
+
'name' => 'l10n',
|
142 |
+
'type' => 'true_false',
|
143 |
+
'description' => 'Allows ACF to translate field and field group settings using the __() function.<br />Defaults to true. Useful to override translation without modifying the textdomain',
|
144 |
+
'category' => 'acf',
|
145 |
+
),
|
146 |
+
array(
|
147 |
+
'label' => 'l10n textdomain',
|
148 |
+
'name' => 'l10n_textdomain',
|
149 |
+
'type' => 'true_false',
|
150 |
+
'description' => 'Sets the text domain used when translating field and field group settings.<br />Defaults to ”. Strings will not be translated if this setting is empty',
|
151 |
+
'category' => 'acf',
|
152 |
+
),
|
153 |
+
array(
|
154 |
+
'label' => 'Google API key',
|
155 |
+
'name' => 'google_api_key',
|
156 |
+
'type' => 'text',
|
157 |
+
'description' => 'Specify a Google Maps API authentication key to prevent usage limits.<br />Defaults to ”',
|
158 |
+
'category' => 'acf',
|
159 |
+
),
|
160 |
+
array(
|
161 |
+
'label' => 'Google API client',
|
162 |
+
'name' => 'google_api_client',
|
163 |
+
'type' => 'text',
|
164 |
+
'description' => 'Specify a Google Maps API Client ID to prevent usage limits.<br />Not needed if using <code>google_api_key</code>. Defaults to ”',
|
165 |
+
'category' => 'acf',
|
166 |
+
),
|
167 |
+
array(
|
168 |
+
'label' => 'Enqueue Google Maps',
|
169 |
+
'name' => 'enqueue_google_maps',
|
170 |
+
'type' => 'true_false',
|
171 |
+
'description' => 'Allows ACF to enqueue and load the Google Maps API JS library.<br />Defaults to true',
|
172 |
+
'category' => 'acf',
|
173 |
+
),
|
174 |
+
array(
|
175 |
+
'label' => 'Enqueue Select2',
|
176 |
+
'name' => 'enqueue_select2',
|
177 |
+
'type' => 'true_false',
|
178 |
+
'description' => 'Allows ACF to enqueue and load the Select2 JS/CSS library.<br />Defaults to true',
|
179 |
+
'category' => 'acf',
|
180 |
+
),
|
181 |
+
array(
|
182 |
+
'label' => 'Select2 version',
|
183 |
+
'name' => 'select2_version',
|
184 |
+
'type' => 'text',
|
185 |
+
'description' => 'Defines which version of Select2 library to enqueue. Either 3 or 4.<br />Defaults to 4 since ACF 5.6.0',
|
186 |
+
'category' => 'acf',
|
187 |
+
),
|
188 |
+
array(
|
189 |
+
'label' => 'Enqueue Date picker',
|
190 |
+
'name' => 'enqueue_datepicker',
|
191 |
+
'type' => 'true_false',
|
192 |
+
'description' => 'Allows ACF to enqueue and load the WP datepicker JS/CSS library.<br />Defaults to true',
|
193 |
+
'category' => 'acf',
|
194 |
+
),
|
195 |
+
array(
|
196 |
+
'label' => 'Enqueue Date Time picker',
|
197 |
+
'name' => 'enqueue_datetimepicker',
|
198 |
+
'type' => 'true_false',
|
199 |
+
'description' => 'Allows ACF to enqueue and load the datetimepicker JS/CSS library.<br />Defaults to true',
|
200 |
+
'category' => 'acf',
|
201 |
+
),
|
202 |
+
array(
|
203 |
+
'label' => 'Row index offset',
|
204 |
+
'name' => 'row_index_offset',
|
205 |
+
'type' => 'text',
|
206 |
+
'description' => 'Defines the starting index used in all ‘loop’ and ‘row’ functions.<br />Defaults to 1 (1 is the first row), can be changed to 0 (0 is the first row)',
|
207 |
+
'category' => 'acf',
|
208 |
+
),
|
209 |
+
array(
|
210 |
+
'label' => 'Remove WP meta box',
|
211 |
+
'name' => 'remove_wp_meta_box',
|
212 |
+
'type' => 'true_false',
|
213 |
+
'description' => 'Allows ACF to remove the default WP custom fields metabox. Defaults to true',
|
214 |
+
'category' => 'acf',
|
215 |
+
),
|
216 |
+
|
217 |
+
),
|
218 |
+
|
219 |
+
|
220 |
+
// ACFE
|
221 |
+
'acfe' => array(
|
222 |
+
|
223 |
+
array(
|
224 |
+
'label' => 'Theme Folder',
|
225 |
+
'name' => 'acfe/theme_folder',
|
226 |
+
'type' => 'text',
|
227 |
+
'description' => 'Detected Theme Folder',
|
228 |
+
'category' => 'acfe',
|
229 |
+
),
|
230 |
+
array(
|
231 |
+
'label' => 'Theme Path',
|
232 |
+
'name' => 'acfe/theme_path',
|
233 |
+
'type' => 'text',
|
234 |
+
'description' => 'Detected Theme Path',
|
235 |
+
'category' => 'acfe',
|
236 |
+
),
|
237 |
+
array(
|
238 |
+
'label' => 'Theme URL',
|
239 |
+
'name' => 'acfe/theme_url',
|
240 |
+
'type' => 'text',
|
241 |
+
'description' => 'Detected Theme URL',
|
242 |
+
'category' => 'acfe',
|
243 |
+
),
|
244 |
+
|
245 |
+
),
|
246 |
+
|
247 |
+
// AutoSync
|
248 |
+
'autosync' => array(
|
249 |
+
|
250 |
+
array(
|
251 |
+
'label' => 'Json',
|
252 |
+
'name' => 'acfe/json',
|
253 |
+
'type' => 'true_false',
|
254 |
+
'description' => 'Whenever Json AutoSync is enabled',
|
255 |
+
'category' => 'autosync',
|
256 |
+
),
|
257 |
+
array(
|
258 |
+
'label' => 'Json: Load',
|
259 |
+
'name' => 'acfe/json_load',
|
260 |
+
'type' => 'text',
|
261 |
+
'description' => 'Json AutoSync load paths (array)',
|
262 |
+
'category' => 'autosync',
|
263 |
+
'format' => 'array',
|
264 |
+
),
|
265 |
+
array(
|
266 |
+
'label' => 'Json: Save',
|
267 |
+
'name' => 'acfe/json_save',
|
268 |
+
'type' => 'text',
|
269 |
+
'description' => 'Json AutoSync saving path',
|
270 |
+
'category' => 'autosync',
|
271 |
+
),
|
272 |
+
array(
|
273 |
+
'label' => 'PHP',
|
274 |
+
'name' => 'acfe/php',
|
275 |
+
'type' => 'true_false',
|
276 |
+
'description' => 'Whenever PHP AutoSync is enabled',
|
277 |
+
'category' => 'autosync',
|
278 |
+
),
|
279 |
+
array(
|
280 |
+
'label' => 'PHP: Load',
|
281 |
+
'name' => 'acfe/php_load',
|
282 |
+
'type' => 'text',
|
283 |
+
'description' => 'PHP AutoSync load paths (array)',
|
284 |
+
'category' => 'autosync',
|
285 |
+
'format' => 'array',
|
286 |
+
),
|
287 |
+
array(
|
288 |
+
'label' => 'PHP: Save',
|
289 |
+
'name' => 'acfe/php_save',
|
290 |
+
'type' => 'text',
|
291 |
+
'description' => 'PHP AutoSync saving path',
|
292 |
+
'category' => 'autosync',
|
293 |
+
),
|
294 |
+
|
295 |
+
),
|
296 |
+
|
297 |
+
// Modules
|
298 |
+
'modules' => array(
|
299 |
+
|
300 |
+
array(
|
301 |
+
'label' => 'Author',
|
302 |
+
'name' => 'acfe/modules/author',
|
303 |
+
'type' => 'true_false',
|
304 |
+
'description' => 'Show/hide the Author module. Defaults to true',
|
305 |
+
'category' => 'modules',
|
306 |
+
),
|
307 |
+
array(
|
308 |
+
'label' => 'Block Types',
|
309 |
+
'name' => 'acfe/modules/block_types',
|
310 |
+
'type' => 'true_false',
|
311 |
+
'description' => 'Show/hide the Block Types module. Defaults to true',
|
312 |
+
'category' => 'modules',
|
313 |
+
),
|
314 |
+
array(
|
315 |
+
'label' => 'Categories',
|
316 |
+
'name' => 'acfe/modules/categories',
|
317 |
+
'type' => 'true_false',
|
318 |
+
'description' => 'Enable/disable the Field Group Categories taxonomy. Defaults to true',
|
319 |
+
'category' => 'modules',
|
320 |
+
),
|
321 |
+
array(
|
322 |
+
'label' => 'Developer mode',
|
323 |
+
'name' => 'acfe/dev',
|
324 |
+
'type' => 'true_false',
|
325 |
+
'description' => 'Show/hide the advanced WP post meta box. Defaults to false',
|
326 |
+
'category' => 'modules',
|
327 |
+
),
|
328 |
+
array(
|
329 |
+
'label' => 'Forms',
|
330 |
+
'name' => 'acfe/modules/forms',
|
331 |
+
'type' => 'true_false',
|
332 |
+
'description' => 'Show/hide the Forms module. Defaults to true',
|
333 |
+
'category' => 'modules',
|
334 |
+
),
|
335 |
+
array(
|
336 |
+
'label' => 'Multilangual',
|
337 |
+
'name' => 'acfe/modules/multilang',
|
338 |
+
'type' => 'true_false',
|
339 |
+
'description' => 'Enable/disable Multilang compatibility module for WPML & Polylang. Defaults to true',
|
340 |
+
'category' => 'modules',
|
341 |
+
),
|
342 |
+
array(
|
343 |
+
'label' => 'Options',
|
344 |
+
'name' => 'acfe/modules/options',
|
345 |
+
'type' => 'true_false',
|
346 |
+
'description' => 'Show/hide the Options module. Defaults to true',
|
347 |
+
'category' => 'modules',
|
348 |
+
),
|
349 |
+
array(
|
350 |
+
'label' => 'Options Pages',
|
351 |
+
'name' => 'acfe/modules/options_pages',
|
352 |
+
'type' => 'true_false',
|
353 |
+
'description' => 'Show/hide the Options Pages module. Defaults to true',
|
354 |
+
'category' => 'modules',
|
355 |
+
),
|
356 |
+
array(
|
357 |
+
'label' => 'Post Types',
|
358 |
+
'name' => 'acfe/modules/post_types',
|
359 |
+
'type' => 'true_false',
|
360 |
+
'description' => 'Show/hide the Post Types module. Defaults to true',
|
361 |
+
'category' => 'modules',
|
362 |
+
),
|
363 |
+
array(
|
364 |
+
'label' => 'Single Meta',
|
365 |
+
'name' => 'acfe/modules/single_meta',
|
366 |
+
'type' => 'true_false',
|
367 |
+
'description' => 'Enable/disable Single Meta Save module. Defaults to false',
|
368 |
+
'category' => 'modules',
|
369 |
+
),
|
370 |
+
array(
|
371 |
+
'label' => 'Taxonomies',
|
372 |
+
'name' => 'acfe/modules/taxonomies',
|
373 |
+
'type' => 'true_false',
|
374 |
+
'description' => 'Show/hide the Taxonomies module. Defaults to true',
|
375 |
+
'category' => 'modules',
|
376 |
+
),
|
377 |
+
array(
|
378 |
+
'label' => 'UI Enhancements',
|
379 |
+
'name' => 'acfe/modules/ui',
|
380 |
+
'type' => 'true_false',
|
381 |
+
'description' => 'Show/hide the UI enhancements module. Defaults to true',
|
382 |
+
'category' => 'modules',
|
383 |
+
),
|
384 |
+
|
385 |
+
),
|
386 |
+
|
387 |
+
// Fields
|
388 |
+
'fields' => array(
|
389 |
+
|
390 |
+
array(
|
391 |
+
'label' => 'reCaptcha: Secret key',
|
392 |
+
'name' => 'acfe/field/recaptcha/secret_key',
|
393 |
+
'type' => 'text',
|
394 |
+
'description' => 'The default reCaptcha secret key',
|
395 |
+
'category' => 'fields',
|
396 |
+
),
|
397 |
+
array(
|
398 |
+
'label' => 'reCaptcha: Site key',
|
399 |
+
'name' => 'acfe/field/recaptcha/site_key',
|
400 |
+
'type' => 'text',
|
401 |
+
'description' => 'The default reCaptcha site key',
|
402 |
+
'category' => 'fields',
|
403 |
+
),
|
404 |
+
array(
|
405 |
+
'label' => 'reCaptcha: Version',
|
406 |
+
'name' => 'acfe/field/recaptcha/version',
|
407 |
+
'type' => 'text',
|
408 |
+
'description' => 'The default reCaptcha version',
|
409 |
+
'category' => 'fields',
|
410 |
+
),
|
411 |
+
array(
|
412 |
+
'label' => 'reCaptcha: V2 size',
|
413 |
+
'name' => 'acfe/field/recaptcha/v2/size',
|
414 |
+
'type' => 'text',
|
415 |
+
'description' => 'The default reCaptcha v2 size',
|
416 |
+
'category' => 'fields',
|
417 |
+
),
|
418 |
+
array(
|
419 |
+
'label' => 'reCaptcha: V2 theme',
|
420 |
+
'name' => 'acfe/field/recaptcha/v2/theme',
|
421 |
+
'type' => 'text',
|
422 |
+
'description' => 'The default reCaptcha v2 theme',
|
423 |
+
'category' => 'fields',
|
424 |
+
),
|
425 |
+
array(
|
426 |
+
'label' => 'reCaptcha: V3 hide logo',
|
427 |
+
'name' => 'acfe/field/recaptcha/v3/hide_logo',
|
428 |
+
'type' => 'true_false',
|
429 |
+
'description' => 'Show/hide reCaptcha v3 logo',
|
430 |
+
'category' => 'fields',
|
431 |
+
),
|
432 |
+
|
433 |
+
),
|
434 |
+
|
435 |
+
);
|
436 |
+
|
437 |
+
}
|
438 |
|
439 |
}
|
440 |
|
441 |
+
acf_new_instance('acfe_admin_settings');
|
442 |
+
|
443 |
+
endif;
|
444 |
+
|
445 |
+
if(!class_exists('acfe_admin_settings_ui')):
|
446 |
+
|
447 |
+
class acfe_admin_settings_ui{
|
448 |
|
449 |
+
public $defaults = array();
|
450 |
+
public $updated = array();
|
451 |
+
public $fields = array();
|
452 |
|
453 |
+
function __construct(){
|
454 |
|
455 |
+
add_action('admin_menu', array($this, 'admin_menu'));
|
456 |
+
add_action('acfe/admin_settings/load', array($this, 'load'));
|
457 |
+
add_action('acfe/admin_settings/html', array($this, 'html'));
|
458 |
+
|
459 |
+
}
|
460 |
+
|
461 |
+
/*
|
462 |
+
* Admin Menu
|
463 |
+
*/
|
464 |
+
function admin_menu(){
|
465 |
+
|
466 |
+
if(!acf_get_setting('show_admin'))
|
467 |
+
return;
|
468 |
+
|
469 |
+
$page = add_submenu_page('edit.php?post_type=acf-field-group', __('Settings'), __('Settings'), acf_get_setting('capability'), 'acfe-settings', array($this, 'menu_html'));
|
470 |
+
|
471 |
+
add_action('load-' . $page, array($this, 'menu_load'));
|
472 |
+
|
473 |
+
}
|
474 |
+
|
475 |
+
/*
|
476 |
+
* Menu Load
|
477 |
+
*/
|
478 |
+
function menu_load(){
|
479 |
+
do_action('acfe/admin_settings/load');
|
480 |
+
}
|
481 |
+
|
482 |
+
/*
|
483 |
+
* Menu HTML
|
484 |
+
*/
|
485 |
+
function menu_html(){
|
486 |
+
do_action('acfe/admin_settings/html');
|
487 |
+
}
|
488 |
+
|
489 |
+
/*
|
490 |
+
* Load
|
491 |
+
*/
|
492 |
+
function load(){
|
493 |
+
|
494 |
+
$acfe_admin_settings = acf_get_instance('acfe_admin_settings');
|
495 |
+
|
496 |
+
$this->defaults = $acfe_admin_settings->defaults;
|
497 |
+
$this->updated = $acfe_admin_settings->updated;
|
498 |
+
$this->fields = $acfe_admin_settings->fields;
|
499 |
+
|
500 |
+
// Enqueue
|
501 |
+
acf_enqueue_scripts();
|
502 |
+
|
503 |
+
}
|
504 |
+
|
505 |
+
/*
|
506 |
+
* Prepare Setting
|
507 |
+
*/
|
508 |
+
function prepare_setting($setting){
|
509 |
+
|
510 |
+
$setting = wp_parse_args($setting, array(
|
511 |
+
'label' => '',
|
512 |
+
'name' => '',
|
513 |
+
'type' => '',
|
514 |
+
'description' => '',
|
515 |
+
'category' => '',
|
516 |
+
'format' => '',
|
517 |
+
'default' => '',
|
518 |
+
'updated' => '',
|
519 |
+
'diff' => false,
|
520 |
+
));
|
521 |
+
|
522 |
+
$name = $setting['name'];
|
523 |
+
$type = $setting['type'];
|
524 |
+
|
525 |
+
$vars = array(
|
526 |
+
'default' => $this->defaults[$name],
|
527 |
+
'updated' => $this->updated[$name]
|
528 |
+
);
|
529 |
+
|
530 |
+
foreach($vars as $v => $var){
|
531 |
+
|
532 |
+
$result = $var;
|
533 |
+
|
534 |
+
if($type === 'true_false'){
|
535 |
|
536 |
+
$result = $var ? '<span class="dashicons dashicons-saved"></span>' : '<span class="dashicons dashicons-no-alt"></span>';
|
537 |
+
|
538 |
+
}elseif($type === 'text'){
|
539 |
+
|
540 |
+
$result = '<span class="dashicons dashicons-no-alt"></span>';
|
541 |
+
|
542 |
+
if(!empty($var)){
|
543 |
|
544 |
+
if(!is_array($var)){
|
545 |
+
$var = explode(',', $var);
|
546 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
|
548 |
+
foreach($var as &$r){
|
549 |
+
$r = '<div class="acf-js-tooltip acfe-settings-text" title="' . $r . '"><code>' . $r . '</code></div>';
|
550 |
+
}
|
551 |
|
552 |
+
$result = implode('', $var);
|
553 |
+
|
554 |
+
}
|
555 |
+
|
556 |
+
}
|
557 |
+
|
558 |
+
$setting[$v] = $result;
|
559 |
+
|
560 |
+
}
|
561 |
+
|
562 |
+
// Local Changes
|
563 |
+
if($this->defaults[$name] !== $this->updated[$name]){
|
564 |
+
$setting['diff'] = true;
|
565 |
+
}
|
566 |
+
|
567 |
+
return $setting;
|
568 |
+
|
569 |
+
}
|
570 |
+
|
571 |
+
/*
|
572 |
+
* HTML
|
573 |
+
*/
|
574 |
+
function html(){
|
575 |
+
|
576 |
+
?>
|
577 |
+
<div class="wrap" id="acfe-admin-settings">
|
578 |
+
|
579 |
+
<h1><?php _e('Settings'); ?></h1>
|
580 |
+
|
581 |
+
<div id="poststuff">
|
582 |
+
|
583 |
+
<div id="post-body" class="metabox-holder">
|
584 |
+
|
585 |
+
<!-- Metabox -->
|
586 |
+
<div id="postbox-container-2" class="postbox-container">
|
587 |
+
|
588 |
+
<div class="postbox acf-postbox">
|
589 |
+
|
590 |
+
<div class="postbox-header">
|
591 |
+
<h2 class="hndle ui-sortable-handle"><span><?php _e('Settings'); ?></span></h2>
|
592 |
+
</div>
|
593 |
+
<div class="inside acf-fields -left">
|
594 |
+
|
595 |
+
<?php $this->render_fields(); ?>
|
596 |
+
|
597 |
+
<script type="text/javascript">
|
598 |
+
if(typeof acf !== 'undefined'){
|
599 |
+
acf.newPostbox({
|
600 |
+
'id': 'acfe-settings',
|
601 |
+
'label': 'left'
|
602 |
+
});
|
603 |
+
}
|
604 |
+
</script>
|
605 |
+
</div>
|
606 |
</div>
|
607 |
+
|
608 |
</div>
|
|
|
609 |
|
610 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
611 |
|
612 |
+
</div>
|
613 |
+
|
614 |
+
</div>
|
615 |
+
<?php
|
616 |
+
}
|
617 |
+
|
618 |
+
function render_fields(){
|
619 |
+
|
620 |
+
foreach(array('ACF', 'ACFE', 'AutoSync', 'Modules', 'Fields') as $tab){
|
621 |
+
|
622 |
+
// Category
|
623 |
+
$category = sanitize_title($tab);
|
624 |
+
|
625 |
+
if(isset($this->fields[$category])){
|
626 |
+
|
627 |
+
$fields = array();
|
628 |
+
$count = 0;
|
629 |
+
|
630 |
+
foreach($this->fields[$category] as $field){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
631 |
|
632 |
+
$field = $this->prepare_setting($field);
|
633 |
+
$fields[] = $field;
|
634 |
+
|
635 |
+
}
|
636 |
+
|
637 |
+
foreach($fields as $field){
|
638 |
+
|
639 |
+
if(!$field['diff']) continue;
|
640 |
+
$count++;
|
641 |
+
|
642 |
+
}
|
643 |
+
|
644 |
+
$tab_style = $count === 0 ? 'style="display:none;"' : '';
|
645 |
+
$tab .= ' <span class="acfe-tab-badge" ' . $tab_style . '>' . $count . '</span>';
|
646 |
+
|
647 |
+
// Tab
|
648 |
+
acf_render_field_wrap(array(
|
649 |
+
'type' => 'tab',
|
650 |
+
'label' => $tab,
|
651 |
+
'key' => 'field_acfe_settings_tabs',
|
652 |
+
'wrapper' => array(
|
653 |
+
'data-no-preference' => true,
|
654 |
),
|
655 |
+
));
|
656 |
+
|
657 |
+
// Thead
|
658 |
+
acf_render_field_wrap(array(
|
659 |
+
'type' => 'acfe_dynamic_message',
|
660 |
+
'label' => '',
|
661 |
+
'key' => 'field_acfe_settings_thead',
|
662 |
+
'render' => function($field){
|
663 |
+
?>
|
664 |
+
<div>Default</div>
|
665 |
+
<div>Registered</div>
|
666 |
+
<?php
|
667 |
+
}
|
668 |
+
));
|
669 |
+
|
670 |
+
foreach($fields as $field){ ?>
|
671 |
+
|
672 |
<div class="acf-field">
|
673 |
<div class="acf-label">
|
674 |
+
<label><span class="acf-js-tooltip dashicons dashicons-info" title="<?php echo $field['name']; ?>"></span><?php echo $field['label']; ?></label>
|
675 |
+
<?php if($field['description']){ ?>
|
676 |
+
<p class="description"><?php echo $field['description']; ?></p>
|
677 |
+
<?php } ?>
|
678 |
</div>
|
679 |
<div class="acf-input">
|
|
|
|
|
|
|
|
|
680 |
|
681 |
+
<div><?php echo $field['default']; ?></div>
|
682 |
+
<div><?php echo $field['updated']; ?></div>
|
|
|
|
|
|
|
|
|
|
|
683 |
|
684 |
+
</div>
|
685 |
+
</div>
|
686 |
+
|
687 |
+
<?php
|
688 |
}
|
689 |
+
|
690 |
+
}
|
691 |
+
|
692 |
+
}
|
693 |
+
|
694 |
+
}
|
695 |
|
696 |
+
}
|
697 |
+
|
698 |
+
acf_new_instance('acfe_admin_settings_ui');
|
699 |
+
|
700 |
+
endif;
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/block_types'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_block_types_export')):
|
11 |
+
|
12 |
+
class acfe_dynamic_block_types_export extends acfe_module_export{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->name = 'acfe_dynamic_block_types_export';
|
18 |
+
$this->title = __('Export Block Types');
|
19 |
+
$this->description = __('Export Block Types');
|
20 |
+
$this->select = __('Select Block Types');
|
21 |
+
$this->default_action = 'json';
|
22 |
+
$this->allowed_actions = array('json', 'php');
|
23 |
+
$this->instance = acf_get_instance('acfe_dynamic_block_types');
|
24 |
+
$this->file = 'block-type';
|
25 |
+
$this->files = 'block-types';
|
26 |
+
$this->messages = array(
|
27 |
+
'not_found' => __('No block type available.'),
|
28 |
+
'not_selected' => __('No block types selected'),
|
29 |
+
'success_single' => '1 block type exported',
|
30 |
+
'success_multiple' => '%s block types exported',
|
31 |
+
);
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
acf_register_admin_tool('acfe_dynamic_block_types_export');
|
38 |
+
|
39 |
+
endif;
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/block_types'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_block_types_import')):
|
11 |
+
|
12 |
+
class acfe_dynamic_block_types_import extends acfe_module_import{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->hook = 'block_type';
|
18 |
+
$this->name = 'acfe_dynamic_block_types_import';
|
19 |
+
$this->title = __('Import Block Types');
|
20 |
+
$this->description = __('Import Block Types');
|
21 |
+
$this->instance = acf_get_instance('acfe_dynamic_block_types');
|
22 |
+
$this->messages = array(
|
23 |
+
'success_single' => '1 block type imported',
|
24 |
+
'success_multiple' => '%s block types imported',
|
25 |
+
);
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
+
|
31 |
+
acf_register_admin_tool('acfe_dynamic_block_types_import');
|
32 |
+
|
33 |
+
endif;
|
@@ -1,397 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_block_types'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Export_DBT')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Export_DBT extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
public $action = false;
|
15 |
-
public $data = array();
|
16 |
-
|
17 |
-
function initialize(){
|
18 |
-
|
19 |
-
// vars
|
20 |
-
$this->name = 'acfe_tool_dbt_export';
|
21 |
-
$this->title = __('Export Block Types');
|
22 |
-
$this->icon = 'dashicons-upload';
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
function html(){
|
27 |
-
|
28 |
-
// Single
|
29 |
-
if($this->is_active()){
|
30 |
-
|
31 |
-
$this->html_single();
|
32 |
-
|
33 |
-
|
34 |
-
// Archive
|
35 |
-
}else{
|
36 |
-
|
37 |
-
$this->html_archive();
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
function html_archive(){
|
44 |
-
|
45 |
-
// vars
|
46 |
-
$choices = array();
|
47 |
-
|
48 |
-
$dynamic_block_types = acfe_settings('modules.dynamic_block_type.data');
|
49 |
-
|
50 |
-
if($dynamic_block_types){
|
51 |
-
|
52 |
-
foreach($dynamic_block_types as $block_type_name => $args){
|
53 |
-
|
54 |
-
$choices[$block_type_name] = esc_html($args['title']);
|
55 |
-
|
56 |
-
}
|
57 |
-
|
58 |
-
}
|
59 |
-
|
60 |
-
?>
|
61 |
-
<p><?php _e('Export Block Types', 'acf'); ?></p>
|
62 |
-
|
63 |
-
<div class="acf-fields">
|
64 |
-
<?php
|
65 |
-
|
66 |
-
if(!empty($choices)){
|
67 |
-
|
68 |
-
// render
|
69 |
-
acf_render_field_wrap(array(
|
70 |
-
'label' => __('Select Block Types', 'acf'),
|
71 |
-
'type' => 'checkbox',
|
72 |
-
'name' => 'keys',
|
73 |
-
'prefix' => false,
|
74 |
-
'value' => false,
|
75 |
-
'toggle' => true,
|
76 |
-
'choices' => $choices,
|
77 |
-
));
|
78 |
-
|
79 |
-
}
|
80 |
-
|
81 |
-
else{
|
82 |
-
|
83 |
-
echo '<div style="padding:15px 12px;">';
|
84 |
-
_e('No dynamic block type available.');
|
85 |
-
echo '</div>';
|
86 |
-
|
87 |
-
}
|
88 |
-
|
89 |
-
?>
|
90 |
-
</div>
|
91 |
-
|
92 |
-
<?php
|
93 |
-
|
94 |
-
$disabled = '';
|
95 |
-
if(empty($choices))
|
96 |
-
$disabled = 'disabled="disabled"';
|
97 |
-
|
98 |
-
?>
|
99 |
-
|
100 |
-
<p class="acf-submit">
|
101 |
-
<button type="submit" name="action" class="button button-primary" value="json" <?php echo $disabled; ?>><?php _e('Export File'); ?></button>
|
102 |
-
<button type="submit" name="action" class="button" value="php" <?php echo $disabled; ?>><?php _e('Generate PHP'); ?></button>
|
103 |
-
</p>
|
104 |
-
<?php
|
105 |
-
|
106 |
-
}
|
107 |
-
|
108 |
-
function html_single(){
|
109 |
-
|
110 |
-
?>
|
111 |
-
<div class="acf-postbox-columns">
|
112 |
-
<div class="acf-postbox-main">
|
113 |
-
|
114 |
-
<?php
|
115 |
-
// prevent default translation and fake __() within string
|
116 |
-
acf_update_setting('l10n_var_export', true);
|
117 |
-
|
118 |
-
$str_replace = array(
|
119 |
-
" " => "\t",
|
120 |
-
"'!!__(!!\'" => "__('",
|
121 |
-
"!!\', !!\'" => "', '",
|
122 |
-
"!!\')!!'" => "')",
|
123 |
-
"array (" => "array("
|
124 |
-
);
|
125 |
-
|
126 |
-
$preg_replace = array(
|
127 |
-
'/([\t\r\n]+?)array/' => 'array',
|
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 |
-
|
138 |
-
<div id="acf-admin-tool-export">
|
139 |
-
|
140 |
-
<textarea id="acf-export-textarea" readonly="true"><?php
|
141 |
-
|
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);
|
156 |
-
|
157 |
-
|
158 |
-
// change double spaces to tabs
|
159 |
-
$code = str_replace( array_keys($str_replace), array_values($str_replace), $code );
|
160 |
-
|
161 |
-
|
162 |
-
// correctly formats "=> array("
|
163 |
-
$code = preg_replace( array_keys($preg_replace), array_values($preg_replace), $code );
|
164 |
-
|
165 |
-
|
166 |
-
// esc_textarea
|
167 |
-
$code = esc_textarea( $code );
|
168 |
-
|
169 |
-
|
170 |
-
// echo
|
171 |
-
echo "acf_register_block_type({$code});" . "\r\n" . "\r\n";
|
172 |
-
|
173 |
-
}
|
174 |
-
|
175 |
-
echo "endif;";
|
176 |
-
|
177 |
-
?></textarea>
|
178 |
-
|
179 |
-
</div>
|
180 |
-
|
181 |
-
<p class="acf-submit">
|
182 |
-
<a class="button" id="acf-export-copy"><?php _e( 'Copy to clipboard', 'acf' ); ?></a>
|
183 |
-
</p>
|
184 |
-
<script type="text/javascript">
|
185 |
-
(function($){
|
186 |
-
|
187 |
-
// vars
|
188 |
-
var $a = $('#acf-export-copy');
|
189 |
-
var $textarea = $('#acf-export-textarea');
|
190 |
-
|
191 |
-
|
192 |
-
// remove $a if 'copy' is not supported
|
193 |
-
if( !document.queryCommandSupported('copy') ) {
|
194 |
-
return $a.remove();
|
195 |
-
}
|
196 |
-
|
197 |
-
|
198 |
-
// event
|
199 |
-
$a.on('click', function( e ){
|
200 |
-
|
201 |
-
// prevent default
|
202 |
-
e.preventDefault();
|
203 |
-
|
204 |
-
|
205 |
-
// select
|
206 |
-
$textarea.get(0).select();
|
207 |
-
|
208 |
-
|
209 |
-
// try
|
210 |
-
try {
|
211 |
-
|
212 |
-
// copy
|
213 |
-
var copy = document.execCommand('copy');
|
214 |
-
if( !copy ) return;
|
215 |
-
|
216 |
-
|
217 |
-
// tooltip
|
218 |
-
acf.newTooltip({
|
219 |
-
text: "<?php _e('Copied', 'acf' ); ?>",
|
220 |
-
timeout: 250,
|
221 |
-
target: $(this),
|
222 |
-
});
|
223 |
-
|
224 |
-
} catch (err) {
|
225 |
-
|
226 |
-
// do nothing
|
227 |
-
|
228 |
-
}
|
229 |
-
|
230 |
-
});
|
231 |
-
|
232 |
-
})(jQuery);
|
233 |
-
</script>
|
234 |
-
</div>
|
235 |
-
</div>
|
236 |
-
<?php
|
237 |
-
|
238 |
-
}
|
239 |
-
|
240 |
-
function load(){
|
241 |
-
|
242 |
-
if($this->is_active()){
|
243 |
-
|
244 |
-
$this->action = $this->get_action();
|
245 |
-
$this->data = $this->get_selected();
|
246 |
-
|
247 |
-
// Json submit
|
248 |
-
if($this->action === 'json')
|
249 |
-
$this->submit();
|
250 |
-
|
251 |
-
// add notice
|
252 |
-
if(!empty($this->data)){
|
253 |
-
|
254 |
-
$count = count($this->data);
|
255 |
-
$text = sprintf(_n( 'Exported 1 block type.', 'Exported %s block types.', $count, 'acf' ), $count);
|
256 |
-
|
257 |
-
acf_add_admin_notice($text, 'success');
|
258 |
-
|
259 |
-
}
|
260 |
-
|
261 |
-
}
|
262 |
-
|
263 |
-
}
|
264 |
-
|
265 |
-
function submit(){
|
266 |
-
|
267 |
-
$this->action = $this->get_action();
|
268 |
-
$this->data = $this->get_selected();
|
269 |
-
|
270 |
-
// validate
|
271 |
-
if($this->data === false)
|
272 |
-
return acf_add_admin_notice(__('No block types selected'), 'warning');
|
273 |
-
|
274 |
-
$keys = array();
|
275 |
-
foreach($this->data as $key => $args){
|
276 |
-
|
277 |
-
$keys[] = $key;
|
278 |
-
|
279 |
-
}
|
280 |
-
|
281 |
-
if($this->action === 'json'){
|
282 |
-
|
283 |
-
// Prefix
|
284 |
-
$prefix = (count($keys) > 1) ? 'block-types' : 'block-type';
|
285 |
-
|
286 |
-
// Slugs
|
287 |
-
$slugs = implode('-', $keys);
|
288 |
-
|
289 |
-
// Date
|
290 |
-
$date = date('Y-m-d');
|
291 |
-
|
292 |
-
// file
|
293 |
-
$file_name = 'acfe-export-' . $prefix . '-' . $slugs . '-' . $date . '.json';
|
294 |
-
|
295 |
-
// headers
|
296 |
-
header("Content-Description: File Transfer");
|
297 |
-
header("Content-Disposition: attachment; filename={$file_name}");
|
298 |
-
header("Content-Type: application/json; charset=utf-8");
|
299 |
-
|
300 |
-
// return
|
301 |
-
echo acf_json_encode($this->data);
|
302 |
-
die;
|
303 |
-
|
304 |
-
}
|
305 |
-
|
306 |
-
elseif($this->action === 'php'){
|
307 |
-
|
308 |
-
// url
|
309 |
-
$url = add_query_arg(array(
|
310 |
-
'keys' => implode('+', $keys),
|
311 |
-
'action' => 'php'
|
312 |
-
), $this->get_url());
|
313 |
-
|
314 |
-
// redirect
|
315 |
-
wp_redirect($url);
|
316 |
-
exit;
|
317 |
-
|
318 |
-
}
|
319 |
-
|
320 |
-
}
|
321 |
-
|
322 |
-
function get_selected(){
|
323 |
-
|
324 |
-
// vars
|
325 |
-
$selected = $this->get_selected_keys();
|
326 |
-
|
327 |
-
if(!$selected)
|
328 |
-
return false;
|
329 |
-
|
330 |
-
$dynamic_block_types = acfe_settings('modules.dynamic_block_type.data');
|
331 |
-
|
332 |
-
if(empty($dynamic_block_types))
|
333 |
-
return false;
|
334 |
-
|
335 |
-
$data = array();
|
336 |
-
|
337 |
-
// construct data
|
338 |
-
foreach($selected as $key){
|
339 |
-
|
340 |
-
if(!isset($dynamic_block_types[$key]))
|
341 |
-
continue;
|
342 |
-
|
343 |
-
// add to data array
|
344 |
-
$data[$key] = $dynamic_block_types[$key];
|
345 |
-
|
346 |
-
}
|
347 |
-
|
348 |
-
// return
|
349 |
-
return $data;
|
350 |
-
|
351 |
-
}
|
352 |
-
|
353 |
-
function get_selected_keys(){
|
354 |
-
|
355 |
-
// check $_POST
|
356 |
-
if($keys = acf_maybe_get_POST('keys')){
|
357 |
-
|
358 |
-
return (array) $keys;
|
359 |
-
|
360 |
-
}
|
361 |
-
|
362 |
-
// check $_GET
|
363 |
-
if($keys = acf_maybe_get_GET('keys')){
|
364 |
-
|
365 |
-
$keys = str_replace(' ', '+', $keys);
|
366 |
-
return explode('+', $keys);
|
367 |
-
|
368 |
-
}
|
369 |
-
|
370 |
-
// return
|
371 |
-
return false;
|
372 |
-
|
373 |
-
}
|
374 |
-
|
375 |
-
function get_action(){
|
376 |
-
|
377 |
-
// init
|
378 |
-
$type = 'json';
|
379 |
-
|
380 |
-
// check GET / POST
|
381 |
-
if(($action = acf_maybe_get_GET('action')) || ($action = acf_maybe_get_POST('action'))){
|
382 |
-
|
383 |
-
if(in_array($action, array('json', 'php')))
|
384 |
-
$type = $action;
|
385 |
-
|
386 |
-
}
|
387 |
-
|
388 |
-
// return
|
389 |
-
return $type;
|
390 |
-
|
391 |
-
}
|
392 |
-
|
393 |
-
}
|
394 |
-
|
395 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Export_DBT');
|
396 |
-
|
397 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,209 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_block_types'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Import_DBT')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Import_DBT extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
function initialize(){
|
15 |
-
|
16 |
-
// vars
|
17 |
-
$this->name = 'acfe_tool_dbt_import';
|
18 |
-
$this->title = __('Import Block Types');
|
19 |
-
$this->icon = 'dashicons-upload';
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
function html(){
|
24 |
-
|
25 |
-
?>
|
26 |
-
<p><?php _e('Import Block Types', 'acf'); ?></p>
|
27 |
-
|
28 |
-
<div class="acf-fields">
|
29 |
-
<?php
|
30 |
-
|
31 |
-
acf_render_field_wrap(array(
|
32 |
-
'label' => __('Select File', 'acf'),
|
33 |
-
'type' => 'file',
|
34 |
-
'name' => 'acf_import_file',
|
35 |
-
'value' => false,
|
36 |
-
'uploader' => 'basic',
|
37 |
-
));
|
38 |
-
|
39 |
-
?>
|
40 |
-
</div>
|
41 |
-
|
42 |
-
<p class="acf-submit">
|
43 |
-
<button type="submit" name="action" class="button button-primary"><?php _e('Import File'); ?></button>
|
44 |
-
</p>
|
45 |
-
<?php
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
function submit(){
|
50 |
-
|
51 |
-
// Check file size.
|
52 |
-
if(empty($_FILES['acf_import_file']['size']))
|
53 |
-
return acf_add_admin_notice(__("No file selected", 'acf'), 'warning');
|
54 |
-
|
55 |
-
// Get file data.
|
56 |
-
$file = $_FILES['acf_import_file'];
|
57 |
-
|
58 |
-
// Check errors.
|
59 |
-
if($file['error'])
|
60 |
-
return acf_add_admin_notice(__("Error uploading file. Please try again", 'acf'), 'warning');
|
61 |
-
|
62 |
-
// Check file type.
|
63 |
-
if(pathinfo($file['name'], PATHINFO_EXTENSION) !== 'json')
|
64 |
-
return acf_add_admin_notice(__("Incorrect file type", 'acf'), 'warning');
|
65 |
-
|
66 |
-
// Read JSON.
|
67 |
-
$json = file_get_contents($file['tmp_name']);
|
68 |
-
$json = json_decode($json, true);
|
69 |
-
|
70 |
-
// Check if empty.
|
71 |
-
if(!$json || !is_array($json))
|
72 |
-
return acf_add_admin_notice(__("Import file empty", 'acf'), 'warning');
|
73 |
-
|
74 |
-
$ids = array();
|
75 |
-
|
76 |
-
$dynamic_block_types = acfe_settings('modules.dynamic_block_type.data');
|
77 |
-
|
78 |
-
// Loop over json
|
79 |
-
foreach($json as $block_type_name => $args){
|
80 |
-
|
81 |
-
// Check if already exists
|
82 |
-
if(isset($dynamic_block_types[$block_type_name])){
|
83 |
-
|
84 |
-
acf_add_admin_notice(__("Block type {$dynamic_block_types[$block_type_name]['title']} already exists. Import aborted."), 'warning');
|
85 |
-
continue;
|
86 |
-
|
87 |
-
}
|
88 |
-
|
89 |
-
// Vars
|
90 |
-
$title = $args['title'];
|
91 |
-
$name = $block_type_name;
|
92 |
-
|
93 |
-
// Insert post
|
94 |
-
$post_id = wp_insert_post(array(
|
95 |
-
'post_title' => $title,
|
96 |
-
'post_name' => $name,
|
97 |
-
'post_type' => 'acfe-dbt',
|
98 |
-
'post_status' => 'publish'
|
99 |
-
));
|
100 |
-
|
101 |
-
// Insert error
|
102 |
-
if(is_wp_error($post_id)){
|
103 |
-
|
104 |
-
acf_add_admin_notice(__("Something went wrong with the block type {$title}. Import aborted."), 'warning');
|
105 |
-
continue;
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
// Register Args
|
110 |
-
update_field('name', $name, $post_id);
|
111 |
-
update_field('description', $args['description'], $post_id);
|
112 |
-
update_field('category', $args['category'], $post_id);
|
113 |
-
update_field('keywords', acf_encode_choices($args['keywords'], false), $post_id);
|
114 |
-
update_field('post_types', $args['post_types'], $post_id);
|
115 |
-
update_field('mode', $args['mode'], $post_id);
|
116 |
-
update_field('align', $args['align'], $post_id);
|
117 |
-
update_field('render_callback', $args['render_callback'], $post_id);
|
118 |
-
update_field('enqueue_assets', $args['enqueue_assets'], $post_id);
|
119 |
-
update_field('render_template', $args['render_template'], $post_id);
|
120 |
-
update_field('enqueue_style', $args['enqueue_style'], $post_id);
|
121 |
-
update_field('enqueue_script', $args['enqueue_script'], $post_id);
|
122 |
-
|
123 |
-
// Align
|
124 |
-
if(empty($args['align']))
|
125 |
-
update_field('align', 'none', $post_id);
|
126 |
-
|
127 |
-
// Icon
|
128 |
-
if(!empty($args['icon'])){
|
129 |
-
|
130 |
-
// Simple
|
131 |
-
if(is_string($args['icon'])){
|
132 |
-
|
133 |
-
update_field('icon_type', 'simple', $post_id);
|
134 |
-
|
135 |
-
update_field('icon_text', $args['icon'], $post_id);
|
136 |
-
|
137 |
-
}
|
138 |
-
|
139 |
-
// Colors
|
140 |
-
elseif(is_array($args['icon'])){
|
141 |
-
|
142 |
-
update_field('icon_type', 'colors', $post_id);
|
143 |
-
|
144 |
-
update_field('icon_background', $args['icon']['background'], $post_id);
|
145 |
-
update_field('icon_foreground', $args['icon']['foreground'], $post_id);
|
146 |
-
update_field('icon_src', $args['icon']['src'], $post_id);
|
147 |
-
|
148 |
-
}
|
149 |
-
|
150 |
-
}
|
151 |
-
|
152 |
-
// Supports: Align
|
153 |
-
update_field('supports_align', $args['supports']['align'], $post_id);
|
154 |
-
|
155 |
-
if(is_array($args['supports']['align'])){
|
156 |
-
|
157 |
-
update_field('supports_align_args', acf_encode_choices($args['supports']['align'], false), $post_id);
|
158 |
-
|
159 |
-
}
|
160 |
-
|
161 |
-
// Supports: Mode
|
162 |
-
update_field('supports_mode', $args['supports']['mode'], $post_id);
|
163 |
-
|
164 |
-
// Supports: Multiple
|
165 |
-
update_field('supports_multiple', $args['supports']['multiple'], $post_id);
|
166 |
-
|
167 |
-
// Create ACFE option
|
168 |
-
$dynamic_block_types[$block_type_name] = $args;
|
169 |
-
|
170 |
-
// Sort keys ASC
|
171 |
-
ksort($dynamic_block_types);
|
172 |
-
|
173 |
-
// Update ACFE option
|
174 |
-
acfe_settings('modules.dynamic_block_type.data', $dynamic_block_types, true);
|
175 |
-
|
176 |
-
// append message
|
177 |
-
$ids[] = $post_id;
|
178 |
-
|
179 |
-
}
|
180 |
-
|
181 |
-
if(empty($ids))
|
182 |
-
return;
|
183 |
-
|
184 |
-
// Count total
|
185 |
-
$total = count($ids);
|
186 |
-
|
187 |
-
// Generate text
|
188 |
-
$text = sprintf(_n('1 block type imported', '%s block types imported', $total, 'acf'), $total);
|
189 |
-
|
190 |
-
// Add links to text
|
191 |
-
$links = array();
|
192 |
-
foreach($ids as $id){
|
193 |
-
|
194 |
-
$links[] = '<a href="' . get_edit_post_link($id) . '">' . get_the_title($id) . '</a>';
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
$text .= ': ' . implode(', ', $links);
|
199 |
-
|
200 |
-
// Add notice
|
201 |
-
acf_add_admin_notice($text, 'success');
|
202 |
-
|
203 |
-
}
|
204 |
-
|
205 |
-
}
|
206 |
-
|
207 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Import_DBT');
|
208 |
-
|
209 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,395 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_options_pages'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Export_DOP')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Export_DOP extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
public $action = false;
|
15 |
-
public $data = array();
|
16 |
-
|
17 |
-
function initialize(){
|
18 |
-
|
19 |
-
// vars
|
20 |
-
$this->name = 'acfe_tool_dop_export';
|
21 |
-
$this->title = __('Export Options Pages');
|
22 |
-
$this->icon = 'dashicons-upload';
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
function html(){
|
27 |
-
|
28 |
-
// Single
|
29 |
-
if($this->is_active()){
|
30 |
-
|
31 |
-
$this->html_single();
|
32 |
-
|
33 |
-
|
34 |
-
// Archive
|
35 |
-
}else{
|
36 |
-
|
37 |
-
$this->html_archive();
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
function html_archive(){
|
44 |
-
|
45 |
-
// vars
|
46 |
-
$choices = array();
|
47 |
-
|
48 |
-
$dynamic_options_pages = acfe_settings('modules.dynamic_option.data');
|
49 |
-
|
50 |
-
if($dynamic_options_pages){
|
51 |
-
foreach($dynamic_options_pages as $options_page_name => $args){
|
52 |
-
|
53 |
-
$choices[$options_page_name] = esc_html($args['page_title']);
|
54 |
-
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
?>
|
59 |
-
<p><?php _e('Export Options Pages', 'acf'); ?></p>
|
60 |
-
|
61 |
-
<div class="acf-fields">
|
62 |
-
<?php
|
63 |
-
|
64 |
-
if(!empty($choices)){
|
65 |
-
|
66 |
-
// render
|
67 |
-
acf_render_field_wrap(array(
|
68 |
-
'label' => __('Select Options Pages', 'acf'),
|
69 |
-
'type' => 'checkbox',
|
70 |
-
'name' => 'keys',
|
71 |
-
'prefix' => false,
|
72 |
-
'value' => false,
|
73 |
-
'toggle' => true,
|
74 |
-
'choices' => $choices,
|
75 |
-
));
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
else{
|
80 |
-
|
81 |
-
echo '<div style="padding:15px 12px;">';
|
82 |
-
_e('No options page available.');
|
83 |
-
echo '</div>';
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
?>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<?php
|
91 |
-
|
92 |
-
$disabled = '';
|
93 |
-
if(empty($choices))
|
94 |
-
$disabled = 'disabled="disabled"';
|
95 |
-
|
96 |
-
?>
|
97 |
-
|
98 |
-
<p class="acf-submit">
|
99 |
-
<button type="submit" name="action" class="button button-primary" value="json" <?php echo $disabled; ?>><?php _e('Export File'); ?></button>
|
100 |
-
<button type="submit" name="action" class="button" value="php" <?php echo $disabled; ?>><?php _e('Generate PHP'); ?></button>
|
101 |
-
</p>
|
102 |
-
<?php
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
function html_single(){
|
107 |
-
|
108 |
-
?>
|
109 |
-
<div class="acf-postbox-columns">
|
110 |
-
<div class="acf-postbox-main">
|
111 |
-
|
112 |
-
<?php
|
113 |
-
// prevent default translation and fake __() within string
|
114 |
-
acf_update_setting('l10n_var_export', true);
|
115 |
-
|
116 |
-
$str_replace = array(
|
117 |
-
" " => "\t",
|
118 |
-
"'!!__(!!\'" => "__('",
|
119 |
-
"!!\', !!\'" => "', '",
|
120 |
-
"!!\')!!'" => "')",
|
121 |
-
"array (" => "array("
|
122 |
-
);
|
123 |
-
|
124 |
-
$preg_replace = array(
|
125 |
-
'/([\t\r\n]+?)array/' => 'array',
|
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 |
-
|
136 |
-
<div id="acf-admin-tool-export">
|
137 |
-
|
138 |
-
<textarea id="acf-export-textarea" readonly="true"><?php
|
139 |
-
|
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);
|
156 |
-
|
157 |
-
|
158 |
-
// change double spaces to tabs
|
159 |
-
$code = str_replace( array_keys($str_replace), array_values($str_replace), $code );
|
160 |
-
|
161 |
-
|
162 |
-
// correctly formats "=> array("
|
163 |
-
$code = preg_replace( array_keys($preg_replace), array_values($preg_replace), $code );
|
164 |
-
|
165 |
-
|
166 |
-
// esc_textarea
|
167 |
-
$code = esc_textarea( $code );
|
168 |
-
|
169 |
-
|
170 |
-
// echo
|
171 |
-
echo "acf_add_options_page({$code});" . "\r\n" . "\r\n";
|
172 |
-
|
173 |
-
}
|
174 |
-
|
175 |
-
echo "endif;";
|
176 |
-
|
177 |
-
?></textarea>
|
178 |
-
|
179 |
-
</div>
|
180 |
-
|
181 |
-
<p class="acf-submit">
|
182 |
-
<a class="button" id="acf-export-copy"><?php _e( 'Copy to clipboard', 'acf' ); ?></a>
|
183 |
-
</p>
|
184 |
-
<script type="text/javascript">
|
185 |
-
(function($){
|
186 |
-
|
187 |
-
// vars
|
188 |
-
var $a = $('#acf-export-copy');
|
189 |
-
var $textarea = $('#acf-export-textarea');
|
190 |
-
|
191 |
-
|
192 |
-
// remove $a if 'copy' is not supported
|
193 |
-
if( !document.queryCommandSupported('copy') ) {
|
194 |
-
return $a.remove();
|
195 |
-
}
|
196 |
-
|
197 |
-
|
198 |
-
// event
|
199 |
-
$a.on('click', function( e ){
|
200 |
-
|
201 |
-
// prevent default
|
202 |
-
e.preventDefault();
|
203 |
-
|
204 |
-
|
205 |
-
// select
|
206 |
-
$textarea.get(0).select();
|
207 |
-
|
208 |
-
|
209 |
-
// try
|
210 |
-
try {
|
211 |
-
|
212 |
-
// copy
|
213 |
-
var copy = document.execCommand('copy');
|
214 |
-
if( !copy ) return;
|
215 |
-
|
216 |
-
|
217 |
-
// tooltip
|
218 |
-
acf.newTooltip({
|
219 |
-
text: "<?php _e('Copied', 'acf' ); ?>",
|
220 |
-
timeout: 250,
|
221 |
-
target: $(this),
|
222 |
-
});
|
223 |
-
|
224 |
-
} catch (err) {
|
225 |
-
|
226 |
-
// do nothing
|
227 |
-
|
228 |
-
}
|
229 |
-
|
230 |
-
});
|
231 |
-
|
232 |
-
})(jQuery);
|
233 |
-
</script>
|
234 |
-
</div>
|
235 |
-
</div>
|
236 |
-
<?php
|
237 |
-
|
238 |
-
}
|
239 |
-
|
240 |
-
function load(){
|
241 |
-
|
242 |
-
if($this->is_active()){
|
243 |
-
|
244 |
-
$this->action = $this->get_action();
|
245 |
-
$this->data = $this->get_selected();
|
246 |
-
|
247 |
-
// Json submit
|
248 |
-
if($this->action === 'json')
|
249 |
-
$this->submit();
|
250 |
-
|
251 |
-
// add notice
|
252 |
-
if(!empty($this->data)){
|
253 |
-
|
254 |
-
$count = count($this->data);
|
255 |
-
$text = sprintf(_n( 'Exported 1 option page.', 'Exported %s option pages.', $count, 'acf' ), $count);
|
256 |
-
|
257 |
-
acf_add_admin_notice($text, 'success');
|
258 |
-
|
259 |
-
}
|
260 |
-
|
261 |
-
}
|
262 |
-
|
263 |
-
}
|
264 |
-
|
265 |
-
function submit(){
|
266 |
-
|
267 |
-
$this->action = $this->get_action();
|
268 |
-
$this->data = $this->get_selected();
|
269 |
-
|
270 |
-
// validate
|
271 |
-
if($this->data === false)
|
272 |
-
return acf_add_admin_notice(__('No options page selected'), 'warning');
|
273 |
-
|
274 |
-
$keys = array();
|
275 |
-
foreach($this->data as $key => $args){
|
276 |
-
|
277 |
-
$keys[] = $key;
|
278 |
-
|
279 |
-
}
|
280 |
-
|
281 |
-
if($this->action === 'json'){
|
282 |
-
|
283 |
-
// Prefix
|
284 |
-
$prefix = (count($keys) > 1) ? 'options-pages' : 'options-page';
|
285 |
-
|
286 |
-
// Slugs
|
287 |
-
$slugs = implode('-', $keys);
|
288 |
-
|
289 |
-
// Date
|
290 |
-
$date = date('Y-m-d');
|
291 |
-
|
292 |
-
// file
|
293 |
-
$file_name = 'acfe-export-' . $prefix . '-' . $slugs . '-' . $date . '.json';
|
294 |
-
|
295 |
-
// headers
|
296 |
-
header("Content-Description: File Transfer");
|
297 |
-
header("Content-Disposition: attachment; filename={$file_name}");
|
298 |
-
header("Content-Type: application/json; charset=utf-8");
|
299 |
-
|
300 |
-
// return
|
301 |
-
echo acf_json_encode($this->data);
|
302 |
-
die;
|
303 |
-
|
304 |
-
}
|
305 |
-
|
306 |
-
elseif($this->action === 'php'){
|
307 |
-
|
308 |
-
// url
|
309 |
-
$url = add_query_arg(array(
|
310 |
-
'keys' => implode('+', $keys),
|
311 |
-
'action' => 'php'
|
312 |
-
), $this->get_url());
|
313 |
-
|
314 |
-
// redirect
|
315 |
-
wp_redirect($url);
|
316 |
-
exit;
|
317 |
-
|
318 |
-
}
|
319 |
-
|
320 |
-
}
|
321 |
-
|
322 |
-
function get_selected(){
|
323 |
-
|
324 |
-
// vars
|
325 |
-
$selected = $this->get_selected_keys();
|
326 |
-
$data = array();
|
327 |
-
|
328 |
-
if(!$selected)
|
329 |
-
return false;
|
330 |
-
$dynamic_options_pages = acfe_settings('modules.dynamic_option.data');
|
331 |
-
|
332 |
-
if(empty($dynamic_options_pages))
|
333 |
-
return false;
|
334 |
-
|
335 |
-
// construct data
|
336 |
-
foreach($selected as $key){
|
337 |
-
|
338 |
-
if(!isset($dynamic_options_pages[$key]))
|
339 |
-
continue;
|
340 |
-
|
341 |
-
// add to data array
|
342 |
-
$data[$key] = $dynamic_options_pages[$key];
|
343 |
-
|
344 |
-
}
|
345 |
-
|
346 |
-
// return
|
347 |
-
return $data;
|
348 |
-
|
349 |
-
}
|
350 |
-
|
351 |
-
function get_selected_keys(){
|
352 |
-
|
353 |
-
// check $_POST
|
354 |
-
if($keys = acf_maybe_get_POST('keys')){
|
355 |
-
|
356 |
-
return (array) $keys;
|
357 |
-
|
358 |
-
}
|
359 |
-
|
360 |
-
// check $_GET
|
361 |
-
if($keys = acf_maybe_get_GET('keys')){
|
362 |
-
|
363 |
-
$keys = str_replace(' ', '+', $keys);
|
364 |
-
return explode('+', $keys);
|
365 |
-
|
366 |
-
}
|
367 |
-
|
368 |
-
// return
|
369 |
-
return false;
|
370 |
-
|
371 |
-
}
|
372 |
-
|
373 |
-
function get_action(){
|
374 |
-
|
375 |
-
// init
|
376 |
-
$type = 'json';
|
377 |
-
|
378 |
-
// check GET / POST
|
379 |
-
if(($action = acf_maybe_get_GET('action')) || ($action = acf_maybe_get_POST('action'))){
|
380 |
-
|
381 |
-
if(in_array($action, array('json', 'php')))
|
382 |
-
$type = $action;
|
383 |
-
|
384 |
-
}
|
385 |
-
|
386 |
-
// return
|
387 |
-
return $type;
|
388 |
-
|
389 |
-
}
|
390 |
-
|
391 |
-
}
|
392 |
-
|
393 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Export_DOP');
|
394 |
-
|
395 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,207 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_options_pages'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Import_DOP')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Import_DOP extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
function initialize(){
|
15 |
-
|
16 |
-
// vars
|
17 |
-
$this->name = 'acfe_tool_dop_import';
|
18 |
-
$this->title = __('Import Options Pages');
|
19 |
-
$this->icon = 'dashicons-upload';
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
function html(){
|
24 |
-
|
25 |
-
?>
|
26 |
-
<p><?php _e('Import Options Pages', 'acf'); ?></p>
|
27 |
-
|
28 |
-
<div class="acf-fields">
|
29 |
-
<?php
|
30 |
-
|
31 |
-
acf_render_field_wrap(array(
|
32 |
-
'label' => __('Select File', 'acf'),
|
33 |
-
'type' => 'file',
|
34 |
-
'name' => 'acf_import_file',
|
35 |
-
'value' => false,
|
36 |
-
'uploader' => 'basic',
|
37 |
-
));
|
38 |
-
|
39 |
-
?>
|
40 |
-
</div>
|
41 |
-
|
42 |
-
<p class="acf-submit">
|
43 |
-
<button type="submit" name="action" class="button button-primary"><?php _e('Import File'); ?></button>
|
44 |
-
</p>
|
45 |
-
<?php
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
function submit(){
|
50 |
-
|
51 |
-
// Check file size.
|
52 |
-
if(empty($_FILES['acf_import_file']['size']))
|
53 |
-
return acf_add_admin_notice(__("No file selected", 'acf'), 'warning');
|
54 |
-
|
55 |
-
// Get file data.
|
56 |
-
$file = $_FILES['acf_import_file'];
|
57 |
-
|
58 |
-
// Check errors.
|
59 |
-
if($file['error'])
|
60 |
-
return acf_add_admin_notice(__("Error uploading file. Please try again", 'acf'), 'warning');
|
61 |
-
|
62 |
-
// Check file type.
|
63 |
-
if(pathinfo($file['name'], PATHINFO_EXTENSION) !== 'json')
|
64 |
-
return acf_add_admin_notice(__("Incorrect file type", 'acf'), 'warning');
|
65 |
-
|
66 |
-
// Read JSON.
|
67 |
-
$json = file_get_contents($file['tmp_name']);
|
68 |
-
$json = json_decode($json, true);
|
69 |
-
|
70 |
-
// Check if empty.
|
71 |
-
if(!$json || !is_array($json))
|
72 |
-
return acf_add_admin_notice(__("Import file empty", 'acf'), 'warning');
|
73 |
-
|
74 |
-
$ids = array();
|
75 |
-
|
76 |
-
$dynamic_options_pages = acfe_settings('modules.dynamic_option.data');
|
77 |
-
|
78 |
-
$dynamic_options_sub_pages = array();
|
79 |
-
|
80 |
-
// Loop over json
|
81 |
-
foreach($json as $options_page_name => $args){
|
82 |
-
|
83 |
-
// Check if already exists
|
84 |
-
if(isset($dynamic_options_pages[$options_page_name])){
|
85 |
-
|
86 |
-
acf_add_admin_notice(__("Options page {$dynamic_options_pages[$options_page_name]['page_title']} already exists. Import aborted."), 'warning');
|
87 |
-
continue;
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
// Vars
|
92 |
-
$page_title = $args['page_title'];
|
93 |
-
$menu_slug = $args['menu_slug'];
|
94 |
-
|
95 |
-
// Insert post
|
96 |
-
$post_id = wp_insert_post(array(
|
97 |
-
'post_title' => $page_title,
|
98 |
-
'post_name' => $menu_slug,
|
99 |
-
'post_type' => 'acfe-dop',
|
100 |
-
'post_status' => 'publish'
|
101 |
-
));
|
102 |
-
|
103 |
-
// Insert error
|
104 |
-
if(is_wp_error($post_id)){
|
105 |
-
|
106 |
-
acf_add_admin_notice(__("Something went wrong with the options page {$page_title}. Import aborted."), 'warning');
|
107 |
-
continue;
|
108 |
-
|
109 |
-
}
|
110 |
-
|
111 |
-
// Register Args
|
112 |
-
update_field('menu_title', $args['menu_title'], $post_id);
|
113 |
-
update_field('menu_slug', $args['menu_slug'], $post_id);
|
114 |
-
update_field('capability', $args['capability'], $post_id);
|
115 |
-
update_field('position', $args['position'], $post_id);
|
116 |
-
update_field('parent_slug', $args['parent_slug'], $post_id);
|
117 |
-
update_field('icon_url', $args['icon_url'], $post_id);
|
118 |
-
update_field('redirect', $args['redirect'], $post_id);
|
119 |
-
update_field('post_id', $args['post_id'], $post_id);
|
120 |
-
update_field('autoload', $args['autoload'], $post_id);
|
121 |
-
update_field('update_button', $args['update_button'], $post_id);
|
122 |
-
update_field('updated_message', $args['updated_message'], $post_id);
|
123 |
-
|
124 |
-
// Create ACFE option
|
125 |
-
$dynamic_options_pages[$options_page_name] = $args;
|
126 |
-
|
127 |
-
// Sort keys ASC
|
128 |
-
ksort($dynamic_options_pages);
|
129 |
-
|
130 |
-
// Update ACFE option
|
131 |
-
acfe_settings('modules.dynamic_option.data', $dynamic_options_pages, true);
|
132 |
-
|
133 |
-
// Append message
|
134 |
-
$ids[] = $post_id;
|
135 |
-
|
136 |
-
// Add Sub Page
|
137 |
-
if(isset($args['parent_slug']) && !empty($args['parent_slug']))
|
138 |
-
$dynamic_options_sub_pages[$post_id] = $args;
|
139 |
-
|
140 |
-
}
|
141 |
-
|
142 |
-
// Check if pages have been added
|
143 |
-
if(empty($ids))
|
144 |
-
return;
|
145 |
-
|
146 |
-
// Update Options Sub Pages
|
147 |
-
if(!empty($dynamic_options_sub_pages)){
|
148 |
-
|
149 |
-
foreach($dynamic_options_sub_pages as $post_id => $args){
|
150 |
-
|
151 |
-
// Get possible parent options pages
|
152 |
-
$get_dop_parent = get_posts(array(
|
153 |
-
'post_type' => 'acfe-dop',
|
154 |
-
'posts_per_page' => 1,
|
155 |
-
'fields' => 'ids',
|
156 |
-
'meta_query' => array(
|
157 |
-
array(
|
158 |
-
'key' => 'menu_slug',
|
159 |
-
'value' => $args['parent_slug']
|
160 |
-
)
|
161 |
-
)
|
162 |
-
));
|
163 |
-
|
164 |
-
if(empty($get_dop_parent))
|
165 |
-
continue;
|
166 |
-
|
167 |
-
$parent = $get_dop_parent[0];
|
168 |
-
|
169 |
-
// Update sub page post
|
170 |
-
wp_update_post(array(
|
171 |
-
'ID' => $post_id,
|
172 |
-
'post_parent' => $parent,
|
173 |
-
));
|
174 |
-
|
175 |
-
}
|
176 |
-
|
177 |
-
}
|
178 |
-
|
179 |
-
// Count total
|
180 |
-
$total = count($ids);
|
181 |
-
|
182 |
-
// Generate text
|
183 |
-
$text = sprintf(_n('1 options page imported', '%s options pages imported', $total, 'acf'), $total);
|
184 |
-
|
185 |
-
// Add links to text
|
186 |
-
$links = array();
|
187 |
-
foreach($ids as $id){
|
188 |
-
|
189 |
-
$links[] = '<a href="' . get_edit_post_link($id) . '">' . get_the_title($id) . '</a>';
|
190 |
-
|
191 |
-
}
|
192 |
-
|
193 |
-
$text .= ': ' . implode(', ', $links);
|
194 |
-
|
195 |
-
// Add notice
|
196 |
-
acf_add_admin_notice($text, 'success');
|
197 |
-
|
198 |
-
// Flush permalinks
|
199 |
-
flush_rewrite_rules();
|
200 |
-
|
201 |
-
}
|
202 |
-
|
203 |
-
}
|
204 |
-
|
205 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Import_DOP');
|
206 |
-
|
207 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,401 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_post_types'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Export_DPT')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Export_DPT extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
public $action = false;
|
15 |
-
public $data = array();
|
16 |
-
|
17 |
-
function initialize(){
|
18 |
-
|
19 |
-
// vars
|
20 |
-
$this->name = 'acfe_tool_dpt_export';
|
21 |
-
$this->title = __('Export Post Types');
|
22 |
-
$this->icon = 'dashicons-upload';
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
function html(){
|
27 |
-
|
28 |
-
// Single
|
29 |
-
if($this->is_active()){
|
30 |
-
|
31 |
-
$this->html_single();
|
32 |
-
|
33 |
-
|
34 |
-
// Archive
|
35 |
-
}else{
|
36 |
-
|
37 |
-
$this->html_archive();
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
function html_archive(){
|
44 |
-
|
45 |
-
// vars
|
46 |
-
$choices = array();
|
47 |
-
|
48 |
-
$dynamic_post_types = acfe_settings('modules.dynamic_post_type.data');
|
49 |
-
|
50 |
-
if($dynamic_post_types){
|
51 |
-
foreach($dynamic_post_types as $post_type_name => $args){
|
52 |
-
|
53 |
-
$choices[$post_type_name] = esc_html($args['label']);
|
54 |
-
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
?>
|
59 |
-
<p><?php _e('Export Post Types', 'acf'); ?></p>
|
60 |
-
|
61 |
-
<div class="acf-fields">
|
62 |
-
<?php
|
63 |
-
|
64 |
-
if(!empty($choices)){
|
65 |
-
|
66 |
-
// render
|
67 |
-
acf_render_field_wrap(array(
|
68 |
-
'label' => __('Select Post Types', 'acf'),
|
69 |
-
'type' => 'checkbox',
|
70 |
-
'name' => 'keys',
|
71 |
-
'prefix' => false,
|
72 |
-
'value' => false,
|
73 |
-
'toggle' => true,
|
74 |
-
'choices' => $choices,
|
75 |
-
));
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
else{
|
80 |
-
|
81 |
-
echo '<div style="padding:15px 12px;">';
|
82 |
-
_e('No dynamic post type available.');
|
83 |
-
echo '</div>';
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
?>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<?php
|
91 |
-
|
92 |
-
$disabled = '';
|
93 |
-
if(empty($choices))
|
94 |
-
$disabled = 'disabled="disabled"';
|
95 |
-
|
96 |
-
?>
|
97 |
-
|
98 |
-
<p class="acf-submit">
|
99 |
-
<button type="submit" name="action" class="button button-primary" value="json" <?php echo $disabled; ?>><?php _e('Export File'); ?></button>
|
100 |
-
<button type="submit" name="action" class="button" value="php" <?php echo $disabled; ?>><?php _e('Generate PHP'); ?></button>
|
101 |
-
</p>
|
102 |
-
<?php
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
function html_single(){
|
107 |
-
|
108 |
-
?>
|
109 |
-
<div class="acf-postbox-columns">
|
110 |
-
<div class="acf-postbox-main">
|
111 |
-
|
112 |
-
<?php
|
113 |
-
// prevent default translation and fake __() within string
|
114 |
-
acf_update_setting('l10n_var_export', true);
|
115 |
-
|
116 |
-
$str_replace = array(
|
117 |
-
" " => "\t",
|
118 |
-
"'!!__(!!\'" => "__('",
|
119 |
-
"!!\', !!\'" => "', '",
|
120 |
-
"!!\')!!'" => "')",
|
121 |
-
"array (" => "array("
|
122 |
-
);
|
123 |
-
|
124 |
-
$preg_replace = array(
|
125 |
-
'/([\t\r\n]+?)array/' => 'array',
|
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>
|
135 |
-
|
136 |
-
<div id="acf-admin-tool-export">
|
137 |
-
|
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 |
-
|
163 |
-
|
164 |
-
// change double spaces to tabs
|
165 |
-
$code = str_replace( array_keys($str_replace), array_values($str_replace), $code );
|
166 |
-
|
167 |
-
|
168 |
-
// correctly formats "=> array("
|
169 |
-
$code = preg_replace( array_keys($preg_replace), array_values($preg_replace), $code );
|
170 |
-
|
171 |
-
|
172 |
-
// esc_textarea
|
173 |
-
$code = esc_textarea( $code );
|
174 |
-
|
175 |
-
|
176 |
-
// echo
|
177 |
-
echo "register_post_type('{$post_type}', {$code});" . "\r\n" . "\r\n";
|
178 |
-
|
179 |
-
}
|
180 |
-
|
181 |
-
?></textarea>
|
182 |
-
|
183 |
-
</div>
|
184 |
-
|
185 |
-
<p class="acf-submit">
|
186 |
-
<a class="button" id="acf-export-copy"><?php _e( 'Copy to clipboard', 'acf' ); ?></a>
|
187 |
-
</p>
|
188 |
-
<script type="text/javascript">
|
189 |
-
(function($){
|
190 |
-
|
191 |
-
// vars
|
192 |
-
var $a = $('#acf-export-copy');
|
193 |
-
var $textarea = $('#acf-export-textarea');
|
194 |
-
|
195 |
-
|
196 |
-
// remove $a if 'copy' is not supported
|
197 |
-
if( !document.queryCommandSupported('copy') ) {
|
198 |
-
return $a.remove();
|
199 |
-
}
|
200 |
-
|
201 |
-
|
202 |
-
// event
|
203 |
-
$a.on('click', function( e ){
|
204 |
-
|
205 |
-
// prevent default
|
206 |
-
e.preventDefault();
|
207 |
-
|
208 |
-
|
209 |
-
// select
|
210 |
-
$textarea.get(0).select();
|
211 |
-
|
212 |
-
|
213 |
-
// try
|
214 |
-
try {
|
215 |
-
|
216 |
-
// copy
|
217 |
-
var copy = document.execCommand('copy');
|
218 |
-
if( !copy ) return;
|
219 |
-
|
220 |
-
|
221 |
-
// tooltip
|
222 |
-
acf.newTooltip({
|
223 |
-
text: "<?php _e('Copied', 'acf' ); ?>",
|
224 |
-
timeout: 250,
|
225 |
-
target: $(this),
|
226 |
-
});
|
227 |
-
|
228 |
-
} catch (err) {
|
229 |
-
|
230 |
-
// do nothing
|
231 |
-
|
232 |
-
}
|
233 |
-
|
234 |
-
});
|
235 |
-
|
236 |
-
})(jQuery);
|
237 |
-
</script>
|
238 |
-
</div>
|
239 |
-
</div>
|
240 |
-
<?php
|
241 |
-
|
242 |
-
}
|
243 |
-
|
244 |
-
function load(){
|
245 |
-
|
246 |
-
if($this->is_active()){
|
247 |
-
|
248 |
-
$this->action = $this->get_action();
|
249 |
-
$this->data = $this->get_selected();
|
250 |
-
|
251 |
-
// Json submit
|
252 |
-
if($this->action === 'json')
|
253 |
-
$this->submit();
|
254 |
-
|
255 |
-
// add notice
|
256 |
-
if(!empty($this->data)){
|
257 |
-
|
258 |
-
$count = count($this->data);
|
259 |
-
$text = sprintf(_n( 'Exported 1 post type.', 'Exported %s post types.', $count, 'acf' ), $count);
|
260 |
-
|
261 |
-
acf_add_admin_notice($text, 'success');
|
262 |
-
|
263 |
-
}
|
264 |
-
|
265 |
-
}
|
266 |
-
|
267 |
-
}
|
268 |
-
|
269 |
-
function submit(){
|
270 |
-
|
271 |
-
$this->action = $this->get_action();
|
272 |
-
$this->data = $this->get_selected();
|
273 |
-
|
274 |
-
// validate
|
275 |
-
if($this->data === false)
|
276 |
-
return acf_add_admin_notice(__('No post types selected'), 'warning');
|
277 |
-
|
278 |
-
$keys = array();
|
279 |
-
foreach($this->data as $key => $args){
|
280 |
-
|
281 |
-
$keys[] = $key;
|
282 |
-
|
283 |
-
}
|
284 |
-
|
285 |
-
if($this->action === 'json'){
|
286 |
-
|
287 |
-
// Prefix
|
288 |
-
$prefix = (count($keys) > 1) ? 'post-types' : 'post-type';
|
289 |
-
|
290 |
-
// Slugs
|
291 |
-
$slugs = implode('-', $keys);
|
292 |
-
|
293 |
-
// Date
|
294 |
-
$date = date('Y-m-d');
|
295 |
-
|
296 |
-
// file
|
297 |
-
$file_name = 'acfe-export-' . $prefix . '-' . $slugs . '-' . $date . '.json';
|
298 |
-
|
299 |
-
// headers
|
300 |
-
header("Content-Description: File Transfer");
|
301 |
-
header("Content-Disposition: attachment; filename={$file_name}");
|
302 |
-
header("Content-Type: application/json; charset=utf-8");
|
303 |
-
|
304 |
-
// return
|
305 |
-
echo acf_json_encode($this->data);
|
306 |
-
die;
|
307 |
-
|
308 |
-
}
|
309 |
-
|
310 |
-
elseif($this->action === 'php'){
|
311 |
-
|
312 |
-
// url
|
313 |
-
$url = add_query_arg(array(
|
314 |
-
'keys' => implode('+', $keys),
|
315 |
-
'action' => 'php'
|
316 |
-
), $this->get_url());
|
317 |
-
|
318 |
-
// redirect
|
319 |
-
wp_redirect($url);
|
320 |
-
exit;
|
321 |
-
|
322 |
-
}
|
323 |
-
|
324 |
-
}
|
325 |
-
|
326 |
-
function get_selected(){
|
327 |
-
|
328 |
-
// vars
|
329 |
-
$selected = $this->get_selected_keys();
|
330 |
-
|
331 |
-
if(!$selected)
|
332 |
-
return false;
|
333 |
-
|
334 |
-
$dynamic_post_types = acfe_settings('modules.dynamic_post_type.data');
|
335 |
-
|
336 |
-
if(empty($dynamic_post_types))
|
337 |
-
return false;
|
338 |
-
|
339 |
-
$data = array();
|
340 |
-
|
341 |
-
// construct Data
|
342 |
-
foreach($selected as $key){
|
343 |
-
|
344 |
-
if(!isset($dynamic_post_types[$key]))
|
345 |
-
continue;
|
346 |
-
|
347 |
-
// add to data array
|
348 |
-
$data[$key] = $dynamic_post_types[$key];
|
349 |
-
|
350 |
-
}
|
351 |
-
|
352 |
-
// return
|
353 |
-
return $data;
|
354 |
-
|
355 |
-
}
|
356 |
-
|
357 |
-
function get_selected_keys(){
|
358 |
-
|
359 |
-
// check $_POST
|
360 |
-
if($keys = acf_maybe_get_POST('keys')){
|
361 |
-
|
362 |
-
return (array) $keys;
|
363 |
-
|
364 |
-
}
|
365 |
-
|
366 |
-
// check $_GET
|
367 |
-
if($keys = acf_maybe_get_GET('keys')){
|
368 |
-
|
369 |
-
$keys = str_replace(' ', '+', $keys);
|
370 |
-
return explode('+', $keys);
|
371 |
-
|
372 |
-
}
|
373 |
-
|
374 |
-
// return
|
375 |
-
return false;
|
376 |
-
|
377 |
-
}
|
378 |
-
|
379 |
-
function get_action(){
|
380 |
-
|
381 |
-
// init
|
382 |
-
$type = 'json';
|
383 |
-
|
384 |
-
// check GET / POST
|
385 |
-
if(($action = acf_maybe_get_GET('action')) || ($action = acf_maybe_get_POST('action'))){
|
386 |
-
|
387 |
-
if(in_array($action, array('json', 'php')))
|
388 |
-
$type = $action;
|
389 |
-
|
390 |
-
}
|
391 |
-
|
392 |
-
// return
|
393 |
-
return $type;
|
394 |
-
|
395 |
-
}
|
396 |
-
|
397 |
-
}
|
398 |
-
|
399 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Export_DPT');
|
400 |
-
|
401 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,242 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_post_types'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Import_DPT')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Import_DPT extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
function initialize(){
|
15 |
-
|
16 |
-
// vars
|
17 |
-
$this->name = 'acfe_tool_dpt_import';
|
18 |
-
$this->title = __('Import Post Types');
|
19 |
-
$this->icon = 'dashicons-upload';
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
function html(){
|
24 |
-
|
25 |
-
?>
|
26 |
-
<p><?php _e('Import Post Types', 'acf'); ?></p>
|
27 |
-
|
28 |
-
<div class="acf-fields">
|
29 |
-
<?php
|
30 |
-
|
31 |
-
acf_render_field_wrap(array(
|
32 |
-
'label' => __('Select File', 'acf'),
|
33 |
-
'type' => 'file',
|
34 |
-
'name' => 'acf_import_file',
|
35 |
-
'value' => false,
|
36 |
-
'uploader' => 'basic',
|
37 |
-
));
|
38 |
-
|
39 |
-
?>
|
40 |
-
</div>
|
41 |
-
|
42 |
-
<p class="acf-submit">
|
43 |
-
<button type="submit" name="action" class="button button-primary"><?php _e('Import File'); ?></button>
|
44 |
-
</p>
|
45 |
-
<?php
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
function submit(){
|
50 |
-
|
51 |
-
// Check file size.
|
52 |
-
if(empty($_FILES['acf_import_file']['size']))
|
53 |
-
return acf_add_admin_notice(__("No file selected", 'acf'), 'warning');
|
54 |
-
|
55 |
-
// Get file data.
|
56 |
-
$file = $_FILES['acf_import_file'];
|
57 |
-
|
58 |
-
// Check errors.
|
59 |
-
if($file['error'])
|
60 |
-
return acf_add_admin_notice(__("Error uploading file. Please try again", 'acf'), 'warning');
|
61 |
-
|
62 |
-
// Check file type.
|
63 |
-
if(pathinfo($file['name'], PATHINFO_EXTENSION) !== 'json')
|
64 |
-
return acf_add_admin_notice(__("Incorrect file type", 'acf'), 'warning');
|
65 |
-
|
66 |
-
// Read JSON.
|
67 |
-
$json = file_get_contents($file['tmp_name']);
|
68 |
-
$json = json_decode($json, true);
|
69 |
-
|
70 |
-
// Check if empty.
|
71 |
-
if(!$json || !is_array($json))
|
72 |
-
return acf_add_admin_notice(__("Import file empty", 'acf'), 'warning');
|
73 |
-
|
74 |
-
$ids = array();
|
75 |
-
|
76 |
-
$dynamic_post_types = acfe_settings('modules.dynamic_post_type.data');
|
77 |
-
|
78 |
-
// Loop over json
|
79 |
-
foreach($json as $post_type_name => $args){
|
80 |
-
|
81 |
-
// Check if already exists
|
82 |
-
if(isset($dynamic_post_types[$post_type_name])){
|
83 |
-
|
84 |
-
acf_add_admin_notice(__("Post type {$dynamic_post_types[$post_type_name]['label']} already exists. Import aborted."), 'warning');
|
85 |
-
continue;
|
86 |
-
|
87 |
-
}
|
88 |
-
|
89 |
-
// Vars
|
90 |
-
$title = $args['label'];
|
91 |
-
$name = $post_type_name;
|
92 |
-
|
93 |
-
// Insert post
|
94 |
-
$post_id = wp_insert_post(array(
|
95 |
-
'post_title' => $title,
|
96 |
-
'post_name' => $name,
|
97 |
-
'post_type' => 'acfe-dpt',
|
98 |
-
'post_status' => 'publish'
|
99 |
-
));
|
100 |
-
|
101 |
-
// Insert error
|
102 |
-
if(is_wp_error($post_id)){
|
103 |
-
|
104 |
-
acf_add_admin_notice(__("Something went wrong with the post type {$title}. Import aborted."), 'warning');
|
105 |
-
continue;
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
// Register Args
|
110 |
-
update_field('acfe_dpt_name', $post_type_name, $post_id);
|
111 |
-
update_field('description', $args['description'], $post_id);
|
112 |
-
update_field('hierarchical', $args['hierarchical'], $post_id);
|
113 |
-
update_field('supports', $args['supports'], $post_id);
|
114 |
-
update_field('taxonomies', $args['taxonomies'], $post_id);
|
115 |
-
update_field('public', $args['public'], $post_id);
|
116 |
-
update_field('exclude_from_search', $args['exclude_from_search'], $post_id);
|
117 |
-
update_field('publicly_queryable', $args['publicly_queryable'], $post_id);
|
118 |
-
update_field('can_export', $args['can_export'], $post_id);
|
119 |
-
update_field('delete_with_user', $args['delete_with_user'], $post_id);
|
120 |
-
|
121 |
-
// Labels
|
122 |
-
if(!empty($args['labels'])){
|
123 |
-
|
124 |
-
foreach($args['labels'] as $label_key => $label_value){
|
125 |
-
|
126 |
-
update_field('labels_' . $label_key, $label_value, $post_id);
|
127 |
-
|
128 |
-
}
|
129 |
-
|
130 |
-
}
|
131 |
-
|
132 |
-
// Menu
|
133 |
-
update_field('menu_position', $args['menu_position'], $post_id);
|
134 |
-
update_field('menu_icon', $args['menu_icon'], $post_id);
|
135 |
-
update_field('show_ui', $args['show_ui'], $post_id);
|
136 |
-
update_field('show_in_menu', $args['show_in_menu'], $post_id);
|
137 |
-
update_field('show_in_nav_menus', $args['show_in_nav_menus'], $post_id);
|
138 |
-
update_field('show_in_admin_bar', $args['show_in_admin_bar'], $post_id);
|
139 |
-
|
140 |
-
// Capability
|
141 |
-
update_field('capability_type', acf_encode_choices($args['capability_type'], false), $post_id);
|
142 |
-
update_field('map_meta_cap', $args['map_meta_cap'], $post_id);
|
143 |
-
|
144 |
-
if(isset($args['capabilities']))
|
145 |
-
update_field('capabilities', acf_encode_choices($args['capabilities'], false), $post_id);
|
146 |
-
|
147 |
-
// Archive
|
148 |
-
update_field('acfe_dpt_archive_template', $args['acfe_archive_template'], $post_id);
|
149 |
-
update_field('acfe_dpt_archive_posts_per_page', $args['acfe_archive_ppp'], $post_id);
|
150 |
-
update_field('acfe_dpt_archive_orderby', $args['acfe_archive_orderby'], $post_id);
|
151 |
-
update_field('acfe_dpt_archive_order', $args['acfe_archive_order'], $post_id);
|
152 |
-
update_field('has_archive', $args['has_archive'], $post_id);
|
153 |
-
|
154 |
-
// Single
|
155 |
-
update_field('acfe_dpt_single_template', $args['acfe_single_template'], $post_id);
|
156 |
-
update_field('rewrite', $args['rewrite'], $post_id);
|
157 |
-
|
158 |
-
// Admin
|
159 |
-
update_field('acfe_dpt_admin_posts_per_page', $args['acfe_admin_ppp'], $post_id);
|
160 |
-
update_field('acfe_dpt_admin_orderby', $args['acfe_admin_orderby'], $post_id);
|
161 |
-
update_field('acfe_dpt_admin_order', $args['acfe_admin_order'], $post_id);
|
162 |
-
|
163 |
-
// REST
|
164 |
-
update_field('show_in_rest', $args['show_in_rest'], $post_id);
|
165 |
-
update_field('rest_base', $args['rest_base'], $post_id);
|
166 |
-
update_field('rest_controller_class', $args['rest_controller_class'], $post_id);
|
167 |
-
|
168 |
-
// Has archive: override
|
169 |
-
if($args['has_archive'] && is_string($args['has_archive']))
|
170 |
-
update_field('has_archive_slug', $args['has_archive'], $post_id);
|
171 |
-
|
172 |
-
// Rewrite: override
|
173 |
-
if($args['rewrite'] && is_array($args['rewrite'])){
|
174 |
-
|
175 |
-
update_field('rewrite', true, $post_id);
|
176 |
-
|
177 |
-
update_field('rewrite_args_select', true, $post_id);
|
178 |
-
|
179 |
-
update_field('rewrite_args_acfe_dpt_rewrite_slug', $args['rewrite']['slug'], $post_id);
|
180 |
-
update_field('rewrite_args_acfe_dpt_rewrite_with_front', $args['rewrite']['with_front'], $post_id);
|
181 |
-
update_field('rewrite_args_feeds', $args['rewrite']['feeds'], $post_id);
|
182 |
-
update_field('rewrite_args_pages', $args['rewrite']['pages'], $post_id);
|
183 |
-
|
184 |
-
}
|
185 |
-
|
186 |
-
// Show in menu (text)
|
187 |
-
if($args['show_in_menu'] && is_string($args['show_in_menu']))
|
188 |
-
update_field('show_in_menu_text', $args['show_in_menu'], $post_id);
|
189 |
-
|
190 |
-
// Map meta cap
|
191 |
-
if($args['map_meta_cap'] === false)
|
192 |
-
update_field('map_meta_cap', 'false', $post_id);
|
193 |
-
|
194 |
-
elseif($args['map_meta_cap'] === true)
|
195 |
-
update_field('map_meta_cap', 'true', $post_id);
|
196 |
-
|
197 |
-
// Create ACFE option
|
198 |
-
$dynamic_post_types[$post_type_name] = $args;
|
199 |
-
|
200 |
-
// Sort keys ASC
|
201 |
-
ksort($dynamic_post_types);
|
202 |
-
|
203 |
-
// Update ACFE option
|
204 |
-
acfe_settings('modules.dynamic_post_type.data', $dynamic_post_types, true);
|
205 |
-
|
206 |
-
// append message
|
207 |
-
$ids[] = $post_id;
|
208 |
-
|
209 |
-
}
|
210 |
-
|
211 |
-
if(empty($ids))
|
212 |
-
return;
|
213 |
-
|
214 |
-
// Count total
|
215 |
-
$total = count($ids);
|
216 |
-
|
217 |
-
// Generate text
|
218 |
-
$text = sprintf(_n('1 post type imported', '%s post types imported', $total, 'acf'), $total);
|
219 |
-
|
220 |
-
// Add links to text
|
221 |
-
$links = array();
|
222 |
-
foreach($ids as $id){
|
223 |
-
|
224 |
-
$links[] = '<a href="' . get_edit_post_link($id) . '">' . get_the_title($id) . '</a>';
|
225 |
-
|
226 |
-
}
|
227 |
-
|
228 |
-
$text .= ': ' . implode(', ', $links);
|
229 |
-
|
230 |
-
// Add notice
|
231 |
-
acf_add_admin_notice($text, 'success');
|
232 |
-
|
233 |
-
// Flush permalinks
|
234 |
-
flush_rewrite_rules();
|
235 |
-
|
236 |
-
}
|
237 |
-
|
238 |
-
}
|
239 |
-
|
240 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Import_DPT');
|
241 |
-
|
242 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,411 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_taxonomies'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Export_DT')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Export_DT extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
public $action = false;
|
15 |
-
public $data = array();
|
16 |
-
|
17 |
-
function initialize(){
|
18 |
-
|
19 |
-
// vars
|
20 |
-
$this->name = 'acfe_tool_dt_export';
|
21 |
-
$this->title = __('Export Taxonomies');
|
22 |
-
$this->icon = 'dashicons-upload';
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
function html(){
|
27 |
-
|
28 |
-
// Single
|
29 |
-
if($this->is_active()){
|
30 |
-
|
31 |
-
$this->html_single();
|
32 |
-
|
33 |
-
|
34 |
-
// Archive
|
35 |
-
}else{
|
36 |
-
|
37 |
-
$this->html_archive();
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
function html_archive(){
|
44 |
-
|
45 |
-
// vars
|
46 |
-
$choices = array();
|
47 |
-
|
48 |
-
$dynamic_taxonomies = acfe_settings('modules.dynamic_taxonomy.data');
|
49 |
-
|
50 |
-
if($dynamic_taxonomies){
|
51 |
-
foreach($dynamic_taxonomies as $taxonomy_name => $args){
|
52 |
-
|
53 |
-
$choices[$taxonomy_name] = esc_html($args['label']);
|
54 |
-
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
?>
|
59 |
-
<p><?php _e('Export Taxonomies', 'acf'); ?></p>
|
60 |
-
|
61 |
-
<div class="acf-fields">
|
62 |
-
<?php
|
63 |
-
|
64 |
-
if(!empty($choices)){
|
65 |
-
|
66 |
-
// render
|
67 |
-
acf_render_field_wrap(array(
|
68 |
-
'label' => __('Select Taxonomies', 'acf'),
|
69 |
-
'type' => 'checkbox',
|
70 |
-
'name' => 'keys',
|
71 |
-
'prefix' => false,
|
72 |
-
'value' => false,
|
73 |
-
'toggle' => true,
|
74 |
-
'choices' => $choices,
|
75 |
-
));
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
else{
|
80 |
-
|
81 |
-
echo '<div style="padding:15px 12px;">';
|
82 |
-
_e('No dynamic taxonomy available.');
|
83 |
-
echo '</div>';
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
?>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<?php
|
91 |
-
|
92 |
-
$disabled = '';
|
93 |
-
if(empty($choices))
|
94 |
-
$disabled = 'disabled="disabled"';
|
95 |
-
|
96 |
-
?>
|
97 |
-
|
98 |
-
<p class="acf-submit">
|
99 |
-
<button type="submit" name="action" class="button button-primary" value="json" <?php echo $disabled; ?>><?php _e('Export File'); ?></button>
|
100 |
-
<button type="submit" name="action" class="button" value="php" <?php echo $disabled; ?>><?php _e('Generate PHP'); ?></button>
|
101 |
-
</p>
|
102 |
-
<?php
|
103 |
-
|
104 |
-
}
|
105 |
-
|
106 |
-
function html_single(){
|
107 |
-
|
108 |
-
?>
|
109 |
-
<div class="acf-postbox-columns">
|
110 |
-
<div class="acf-postbox-main">
|
111 |
-
|
112 |
-
<?php
|
113 |
-
// prevent default translation and fake __() within string
|
114 |
-
acf_update_setting('l10n_var_export', true);
|
115 |
-
|
116 |
-
$str_replace = array(
|
117 |
-
" " => "\t",
|
118 |
-
"'!!__(!!\'" => "__('",
|
119 |
-
"!!\', !!\'" => "', '",
|
120 |
-
"!!\')!!'" => "')",
|
121 |
-
"array (" => "array("
|
122 |
-
);
|
123 |
-
|
124 |
-
$preg_replace = array(
|
125 |
-
'/([\t\r\n]+?)array/' => 'array',
|
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 |
-
|
136 |
-
<div id="acf-admin-tool-export">
|
137 |
-
|
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')){
|
162 |
-
|
163 |
-
$post_types = $args['post_types'];
|
164 |
-
|
165 |
-
}
|
166 |
-
|
167 |
-
$post_types = var_export($post_types, true);
|
168 |
-
$post_types = str_replace( array_keys($str_replace), array_values($str_replace), $post_types );
|
169 |
-
$post_types = preg_replace( array_keys($preg_replace), array_values($preg_replace), $post_types );
|
170 |
-
|
171 |
-
|
172 |
-
// code
|
173 |
-
$code = var_export($args, true);
|
174 |
-
|
175 |
-
|
176 |
-
// change double spaces to tabs
|
177 |
-
$code = str_replace( array_keys($str_replace), array_values($str_replace), $code );
|
178 |
-
|
179 |
-
|
180 |
-
// correctly formats "=> array("
|
181 |
-
$code = preg_replace( array_keys($preg_replace), array_values($preg_replace), $code );
|
182 |
-
|
183 |
-
|
184 |
-
// esc_textarea
|
185 |
-
$code = esc_textarea( $code );
|
186 |
-
|
187 |
-
// echo
|
188 |
-
echo "register_taxonomy('{$taxonomy}', {$post_types}, {$code});" . "\r\n" . "\r\n";
|
189 |
-
|
190 |
-
}
|
191 |
-
|
192 |
-
?></textarea>
|
193 |
-
|
194 |
-
</div>
|
195 |
-
|
196 |
-
<p class="acf-submit">
|
197 |
-
<a class="button" id="acf-export-copy"><?php _e( 'Copy to clipboard', 'acf' ); ?></a>
|
198 |
-
</p>
|
199 |
-
<script type="text/javascript">
|
200 |
-
(function($){
|
201 |
-
|
202 |
-
// vars
|
203 |
-
var $a = $('#acf-export-copy');
|
204 |
-
var $textarea = $('#acf-export-textarea');
|
205 |
-
|
206 |
-
|
207 |
-
// remove $a if 'copy' is not supported
|
208 |
-
if( !document.queryCommandSupported('copy') ) {
|
209 |
-
return $a.remove();
|
210 |
-
}
|
211 |
-
|
212 |
-
|
213 |
-
// event
|
214 |
-
$a.on('click', function( e ){
|
215 |
-
|
216 |
-
// prevent default
|
217 |
-
e.preventDefault();
|
218 |
-
|
219 |
-
|
220 |
-
// select
|
221 |
-
$textarea.get(0).select();
|
222 |
-
|
223 |
-
|
224 |
-
// try
|
225 |
-
try {
|
226 |
-
|
227 |
-
// copy
|
228 |
-
var copy = document.execCommand('copy');
|
229 |
-
if( !copy ) return;
|
230 |
-
|
231 |
-
|
232 |
-
// tooltip
|
233 |
-
acf.newTooltip({
|
234 |
-
text: "<?php _e('Copied', 'acf' ); ?>",
|
235 |
-
timeout: 250,
|
236 |
-
target: $(this),
|
237 |
-
});
|
238 |
-
|
239 |
-
} catch (err) {
|
240 |
-
|
241 |
-
// do nothing
|
242 |
-
|
243 |
-
}
|
244 |
-
|
245 |
-
});
|
246 |
-
|
247 |
-
})(jQuery);
|
248 |
-
</script>
|
249 |
-
</div>
|
250 |
-
</div>
|
251 |
-
<?php
|
252 |
-
|
253 |
-
}
|
254 |
-
|
255 |
-
function load(){
|
256 |
-
|
257 |
-
if($this->is_active()){
|
258 |
-
|
259 |
-
$this->action = $this->get_action();
|
260 |
-
$this->data = $this->get_selected();
|
261 |
-
|
262 |
-
// Json submit
|
263 |
-
if($this->action === 'json')
|
264 |
-
$this->submit();
|
265 |
-
|
266 |
-
// add notice
|
267 |
-
if(!empty($this->data)){
|
268 |
-
|
269 |
-
$count = count($this->data);
|
270 |
-
$text = sprintf(_n( 'Exported 1 taxonomy.', 'Exported %s taxonomies.', $count, 'acf' ), $count);
|
271 |
-
|
272 |
-
acf_add_admin_notice($text, 'success');
|
273 |
-
|
274 |
-
}
|
275 |
-
|
276 |
-
}
|
277 |
-
|
278 |
-
}
|
279 |
-
|
280 |
-
function submit(){
|
281 |
-
|
282 |
-
$this->action = $this->get_action();
|
283 |
-
$this->data = $this->get_selected();
|
284 |
-
|
285 |
-
// validate
|
286 |
-
if($this->data === false)
|
287 |
-
return acf_add_admin_notice(__('No taxonomies selected'), 'warning');
|
288 |
-
|
289 |
-
$keys = array();
|
290 |
-
foreach($this->data as $key => $args){
|
291 |
-
|
292 |
-
$keys[] = $key;
|
293 |
-
|
294 |
-
}
|
295 |
-
|
296 |
-
if($this->action === 'json'){
|
297 |
-
|
298 |
-
// Prefix
|
299 |
-
$prefix = (count($keys) > 1) ? 'taxonomies' : 'taxonomy';
|
300 |
-
|
301 |
-
// Slugs
|
302 |
-
$slugs = implode('-', $keys);
|
303 |
-
|
304 |
-
// Date
|
305 |
-
$date = date('Y-m-d');
|
306 |
-
|
307 |
-
// file
|
308 |
-
$file_name = 'acfe-export-' . $prefix . '-' . $slugs . '-' . $date . '.json';
|
309 |
-
|
310 |
-
// headers
|
311 |
-
header("Content-Description: File Transfer");
|
312 |
-
header("Content-Disposition: attachment; filename={$file_name}");
|
313 |
-
header("Content-Type: application/json; charset=utf-8");
|
314 |
-
|
315 |
-
// return
|
316 |
-
echo acf_json_encode($this->data);
|
317 |
-
die;
|
318 |
-
|
319 |
-
}
|
320 |
-
|
321 |
-
elseif($this->action === 'php'){
|
322 |
-
|
323 |
-
// url
|
324 |
-
$url = add_query_arg(array(
|
325 |
-
'keys' => implode('+', $keys),
|
326 |
-
'action' => 'php'
|
327 |
-
), $this->get_url());
|
328 |
-
|
329 |
-
// redirect
|
330 |
-
wp_redirect($url);
|
331 |
-
exit;
|
332 |
-
|
333 |
-
}
|
334 |
-
|
335 |
-
}
|
336 |
-
|
337 |
-
function get_selected(){
|
338 |
-
|
339 |
-
// vars
|
340 |
-
$selected = $this->get_selected_keys();
|
341 |
-
$json = array();
|
342 |
-
|
343 |
-
if(!$selected)
|
344 |
-
return false;
|
345 |
-
|
346 |
-
$dynamic_taxonomies = acfe_settings('modules.dynamic_taxonomy.data');
|
347 |
-
|
348 |
-
if(empty($dynamic_taxonomies))
|
349 |
-
return false;
|
350 |
-
|
351 |
-
// construct JSON
|
352 |
-
foreach($selected as $key){
|
353 |
-
|
354 |
-
if(!isset($dynamic_taxonomies[$key]))
|
355 |
-
continue;
|
356 |
-
|
357 |
-
// add to json array
|
358 |
-
$json[$key] = $dynamic_taxonomies[$key];
|
359 |
-
|
360 |
-
}
|
361 |
-
|
362 |
-
// return
|
363 |
-
return $json;
|
364 |
-
|
365 |
-
}
|
366 |
-
|
367 |
-
function get_selected_keys(){
|
368 |
-
|
369 |
-
// check $_POST
|
370 |
-
if($keys = acf_maybe_get_POST('keys')){
|
371 |
-
|
372 |
-
return (array) $keys;
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
// check $_GET
|
377 |
-
if($keys = acf_maybe_get_GET('keys')){
|
378 |
-
|
379 |
-
$keys = str_replace(' ', '+', $keys);
|
380 |
-
return explode('+', $keys);
|
381 |
-
|
382 |
-
}
|
383 |
-
|
384 |
-
// return
|
385 |
-
return false;
|
386 |
-
|
387 |
-
}
|
388 |
-
|
389 |
-
function get_action(){
|
390 |
-
|
391 |
-
// init
|
392 |
-
$type = 'json';
|
393 |
-
|
394 |
-
// check GET / POST
|
395 |
-
if(($action = acf_maybe_get_GET('action')) || ($action = acf_maybe_get_POST('action'))){
|
396 |
-
|
397 |
-
if(in_array($action, array('json', 'php')))
|
398 |
-
$type = $action;
|
399 |
-
|
400 |
-
}
|
401 |
-
|
402 |
-
// return
|
403 |
-
return $type;
|
404 |
-
|
405 |
-
}
|
406 |
-
|
407 |
-
}
|
408 |
-
|
409 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Export_DT');
|
410 |
-
|
411 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,240 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_taxonomies'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Import_DT')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Import_DT extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
function initialize(){
|
15 |
-
|
16 |
-
// vars
|
17 |
-
$this->name = 'acfe_tool_dt_import';
|
18 |
-
$this->title = __('Import Taxonomies');
|
19 |
-
$this->icon = 'dashicons-upload';
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
function html(){
|
24 |
-
|
25 |
-
?>
|
26 |
-
<p><?php _e('Import Taxonomies', 'acf'); ?></p>
|
27 |
-
|
28 |
-
<div class="acf-fields">
|
29 |
-
<?php
|
30 |
-
|
31 |
-
acf_render_field_wrap(array(
|
32 |
-
'label' => __('Select File', 'acf'),
|
33 |
-
'type' => 'file',
|
34 |
-
'name' => 'acf_import_file',
|
35 |
-
'value' => false,
|
36 |
-
'uploader' => 'basic',
|
37 |
-
));
|
38 |
-
|
39 |
-
?>
|
40 |
-
</div>
|
41 |
-
|
42 |
-
<p class="acf-submit">
|
43 |
-
<button type="submit" name="action" class="button button-primary"><?php _e('Import File'); ?></button>
|
44 |
-
</p>
|
45 |
-
<?php
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
function submit(){
|
50 |
-
|
51 |
-
// Check file size.
|
52 |
-
if(empty($_FILES['acf_import_file']['size']))
|
53 |
-
return acf_add_admin_notice(__("No file selected", 'acf'), 'warning');
|
54 |
-
|
55 |
-
// Get file data.
|
56 |
-
$file = $_FILES['acf_import_file'];
|
57 |
-
|
58 |
-
// Check errors.
|
59 |
-
if($file['error'])
|
60 |
-
return acf_add_admin_notice(__("Error uploading file. Please try again", 'acf'), 'warning');
|
61 |
-
|
62 |
-
// Check file type.
|
63 |
-
if(pathinfo($file['name'], PATHINFO_EXTENSION) !== 'json')
|
64 |
-
return acf_add_admin_notice(__("Incorrect file type", 'acf'), 'warning');
|
65 |
-
|
66 |
-
// Read JSON.
|
67 |
-
$json = file_get_contents($file['tmp_name']);
|
68 |
-
$json = json_decode($json, true);
|
69 |
-
|
70 |
-
// Check if empty.
|
71 |
-
if(!$json || !is_array($json))
|
72 |
-
return acf_add_admin_notice(__("Import file empty", 'acf'), 'warning');
|
73 |
-
|
74 |
-
$ids = array();
|
75 |
-
|
76 |
-
$dynamic_taxonomies = acfe_settings('modules.dynamic_taxonomy.data');
|
77 |
-
|
78 |
-
// Loop over json
|
79 |
-
foreach($json as $taxonomy_name => $args){
|
80 |
-
|
81 |
-
// Check if already exists
|
82 |
-
if(isset($dynamic_taxonomies[$taxonomy_name])){
|
83 |
-
|
84 |
-
acf_add_admin_notice(__("Taxonomy {$dynamic_taxonomies[$taxonomy_name]['label']} already exists. Import aborted."), 'warning');
|
85 |
-
continue;
|
86 |
-
|
87 |
-
}
|
88 |
-
|
89 |
-
// Vars
|
90 |
-
$title = $args['label'];
|
91 |
-
$name = $taxonomy_name;
|
92 |
-
|
93 |
-
// Insert post
|
94 |
-
$post_id = wp_insert_post(array(
|
95 |
-
'post_title' => $title,
|
96 |
-
'post_name' => $name,
|
97 |
-
'post_type' => 'acfe-dt',
|
98 |
-
'post_status' => 'publish'
|
99 |
-
));
|
100 |
-
|
101 |
-
// Insert error
|
102 |
-
if(is_wp_error($post_id)){
|
103 |
-
|
104 |
-
acf_add_admin_notice(__("Something went wrong with the taxonomy {$title}. Import aborted."), 'warning');
|
105 |
-
continue;
|
106 |
-
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
// Register Args
|
111 |
-
update_field('acfe_dt_name', $taxonomy_name, $post_id);
|
112 |
-
update_field('description', $args['description'], $post_id);
|
113 |
-
update_field('hierarchical', $args['hierarchical'], $post_id);
|
114 |
-
update_field('post_types', $args['post_types'], $post_id);
|
115 |
-
update_field('public', $args['public'], $post_id);
|
116 |
-
update_field('publicly_queryable', $args['publicly_queryable'], $post_id);
|
117 |
-
update_field('update_count_callback', $args['update_count_callback'], $post_id);
|
118 |
-
update_field('sort', $args['sort'], $post_id);
|
119 |
-
|
120 |
-
// Meta box callback
|
121 |
-
if(!isset($args['meta_box_cb']) || $args['meta_box_cb'] === null){
|
122 |
-
|
123 |
-
update_field('meta_box_cb', 'null', $post_id);
|
124 |
-
update_field('meta_box_cb_custom', '', $post_id);
|
125 |
-
|
126 |
-
}
|
127 |
-
|
128 |
-
elseif($args['meta_box_cb'] === false){
|
129 |
-
|
130 |
-
update_field('meta_box_cb', 'false', $post_id);
|
131 |
-
update_field('meta_box_cb_custom', '', $post_id);
|
132 |
-
|
133 |
-
}
|
134 |
-
|
135 |
-
elseif(empty($args['meta_box_cb']) || is_string($args['meta_box_cb'])){
|
136 |
-
|
137 |
-
update_field('meta_box_cb', 'custom', $post_id);
|
138 |
-
update_field('meta_box_cb_custom', $args['meta_box_cb'], $post_id);
|
139 |
-
|
140 |
-
}
|
141 |
-
|
142 |
-
// Labels
|
143 |
-
if(!empty($args['labels'])){
|
144 |
-
|
145 |
-
foreach($args['labels'] as $label_key => $label_value){
|
146 |
-
|
147 |
-
update_field('labels_' . $label_key, $label_value, $post_id);
|
148 |
-
|
149 |
-
}
|
150 |
-
|
151 |
-
}
|
152 |
-
|
153 |
-
// Menu
|
154 |
-
update_field('show_ui', $args['show_ui'], $post_id);
|
155 |
-
update_field('show_in_menu', $args['show_in_menu'], $post_id);
|
156 |
-
update_field('show_in_nav_menus', $args['show_in_nav_menus'], $post_id);
|
157 |
-
update_field('show_tagcloud', $args['show_tagcloud'], $post_id);
|
158 |
-
update_field('show_in_quick_edit', $args['show_in_quick_edit'], $post_id);
|
159 |
-
update_field('show_admin_column', $args['show_admin_column'], $post_id);
|
160 |
-
|
161 |
-
// Capability
|
162 |
-
if(isset($args['capabilities']))
|
163 |
-
update_field('capabilities', acf_encode_choices($args['capabilities'], false), $post_id);
|
164 |
-
|
165 |
-
// Single
|
166 |
-
update_field('acfe_dt_single_template', $args['acfe_single_template'], $post_id);
|
167 |
-
update_field('acfe_dt_single_posts_per_page', $args['acfe_single_ppp'], $post_id);
|
168 |
-
update_field('acfe_dt_single_orderby', $args['acfe_single_orderby'], $post_id);
|
169 |
-
update_field('acfe_dt_single_order', $args['acfe_single_order'], $post_id);
|
170 |
-
update_field('rewrite', $args['rewrite'], $post_id);
|
171 |
-
|
172 |
-
// Admin
|
173 |
-
update_field('acfe_dt_admin_terms_per_page', $args['acfe_admin_ppp'], $post_id);
|
174 |
-
update_field('acfe_dt_admin_orderby', $args['acfe_admin_orderby'], $post_id);
|
175 |
-
update_field('acfe_dt_admin_order', $args['acfe_admin_order'], $post_id);
|
176 |
-
|
177 |
-
// REST
|
178 |
-
update_field('show_in_rest', $args['show_in_rest'], $post_id);
|
179 |
-
update_field('rest_base', $args['rest_base'], $post_id);
|
180 |
-
update_field('rest_controller_class', $args['rest_controller_class'], $post_id);
|
181 |
-
|
182 |
-
// Rewrite: override
|
183 |
-
if($args['rewrite'] && is_array($args['rewrite'])){
|
184 |
-
|
185 |
-
update_field('rewrite', true, $post_id);
|
186 |
-
|
187 |
-
update_field('rewrite_args_select', true, $post_id);
|
188 |
-
|
189 |
-
update_field('rewrite_args_acfe_dt_rewrite_slug', $args['rewrite']['slug'], $post_id);
|
190 |
-
update_field('rewrite_args_acfe_dt_rewrite_with_front', $args['rewrite']['with_front'], $post_id);
|
191 |
-
update_field('rewrite_args_hierarchical', $args['rewrite']['hierarchical'], $post_id);
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
// Create ACFE option
|
196 |
-
$dynamic_taxonomies[$taxonomy_name] = $args;
|
197 |
-
|
198 |
-
// Sort keys ASC
|
199 |
-
ksort($dynamic_taxonomies);
|
200 |
-
|
201 |
-
// Update ACFE option
|
202 |
-
acfe_settings('modules.dynamic_taxonomy.data', $dynamic_taxonomies, true);
|
203 |
-
|
204 |
-
// append message
|
205 |
-
$ids[] = $post_id;
|
206 |
-
|
207 |
-
}
|
208 |
-
|
209 |
-
if(empty($ids))
|
210 |
-
return;
|
211 |
-
|
212 |
-
// Count total
|
213 |
-
$total = count($ids);
|
214 |
-
|
215 |
-
// Generate text
|
216 |
-
$text = sprintf(_n('1 taxonomy imported', '%s taxonomies imported', $total, 'acf'), $total);
|
217 |
-
|
218 |
-
// Add links to text
|
219 |
-
$links = array();
|
220 |
-
foreach($ids as $id){
|
221 |
-
|
222 |
-
$links[] = '<a href="' . get_edit_post_link($id) . '">' . get_the_title($id) . '</a>';
|
223 |
-
|
224 |
-
}
|
225 |
-
|
226 |
-
$text .= ': ' . implode(', ', $links);
|
227 |
-
|
228 |
-
// Add notice
|
229 |
-
acf_add_admin_notice($text, 'success');
|
230 |
-
|
231 |
-
// Flush permalinks
|
232 |
-
flush_rewrite_rules();
|
233 |
-
|
234 |
-
}
|
235 |
-
|
236 |
-
}
|
237 |
-
|
238 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Import_DT');
|
239 |
-
|
240 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -3,13 +3,12 @@
|
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
-
if(!class_exists('
|
7 |
|
8 |
-
class
|
9 |
|
10 |
function initialize(){
|
11 |
-
|
12 |
-
// vars
|
13 |
$this->name = 'acfe-export';
|
14 |
|
15 |
}
|
@@ -31,35 +30,34 @@ class ACFE_Admin_Tool_Export_FG extends ACF_Admin_Tool{
|
|
31 |
$selected = acf()->admin_tools->get_tool('export')->get_selected_keys();
|
32 |
|
33 |
// add notice
|
34 |
-
if(
|
|
|
35 |
$count = count($selected);
|
36 |
-
$text = sprintf( _n(
|
|
|
37 |
acf_add_admin_notice( $text, 'success' );
|
|
|
38 |
}
|
39 |
}
|
40 |
|
41 |
}
|
42 |
|
43 |
function get_action(){
|
44 |
-
|
45 |
-
//
|
46 |
-
$
|
47 |
-
|
48 |
-
// check
|
49 |
-
if(($action
|
50 |
-
|
51 |
-
|
52 |
-
$type = $action;
|
53 |
-
|
54 |
-
}
|
55 |
-
|
56 |
// return
|
57 |
-
return $
|
58 |
|
59 |
}
|
60 |
|
61 |
}
|
62 |
|
63 |
-
acf_register_admin_tool('
|
64 |
|
65 |
endif;
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
+
if(!class_exists('acfe_field_groups_export')):
|
7 |
|
8 |
+
class acfe_field_groups_export extends ACF_Admin_Tool{
|
9 |
|
10 |
function initialize(){
|
11 |
+
|
|
|
12 |
$this->name = 'acfe-export';
|
13 |
|
14 |
}
|
30 |
$selected = acf()->admin_tools->get_tool('export')->get_selected_keys();
|
31 |
|
32 |
// add notice
|
33 |
+
if($selected){
|
34 |
+
|
35 |
$count = count($selected);
|
36 |
+
$text = sprintf( _n('Exported 1 field group.', 'Exported %s field groups.', $count, 'acf' ), $count);
|
37 |
+
|
38 |
acf_add_admin_notice( $text, 'success' );
|
39 |
+
|
40 |
}
|
41 |
}
|
42 |
|
43 |
}
|
44 |
|
45 |
function get_action(){
|
46 |
+
|
47 |
+
// vars
|
48 |
+
$action = acfe_maybe_get_REQUEST('action');
|
49 |
+
|
50 |
+
// check allowed
|
51 |
+
if(!in_array($action, array('json', 'php')))
|
52 |
+
$action = false;
|
53 |
+
|
|
|
|
|
|
|
|
|
54 |
// return
|
55 |
+
return $action;
|
56 |
|
57 |
}
|
58 |
|
59 |
}
|
60 |
|
61 |
+
acf_register_admin_tool('acfe_field_groups_export');
|
62 |
|
63 |
endif;
|
@@ -3,16 +3,15 @@
|
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
-
if(!class_exists('
|
7 |
|
8 |
-
class
|
9 |
|
10 |
function initialize(){
|
11 |
|
12 |
// vars
|
13 |
$this->title = __('Export Local Field Groups');
|
14 |
$this->name = 'acfe-fg-local';
|
15 |
-
$this->icon = 'dashicons-upload';
|
16 |
|
17 |
}
|
18 |
|
@@ -42,13 +41,14 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
42 |
|
43 |
if($this->is_active()){
|
44 |
|
45 |
-
$
|
46 |
-
$keys = $this->
|
47 |
$action = $this->get_action();
|
48 |
|
49 |
// validate
|
50 |
-
if($
|
51 |
return acf_add_admin_notice(__('No field group selected'), 'warning');
|
|
|
52 |
|
53 |
// Json
|
54 |
if($action === 'json'){
|
@@ -68,7 +68,7 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
68 |
header("Content-Type: application/json; charset=utf-8");
|
69 |
|
70 |
// return
|
71 |
-
echo acf_json_encode($
|
72 |
die;
|
73 |
|
74 |
}
|
@@ -76,14 +76,11 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
76 |
// Sync
|
77 |
elseif($action === 'sync'){
|
78 |
|
79 |
-
// Force array
|
80 |
-
$array = acf_array($array);
|
81 |
-
|
82 |
// Remeber imported field group ids.
|
83 |
$ids = array();
|
84 |
|
85 |
// Loop over json
|
86 |
-
foreach($
|
87 |
|
88 |
// Search database for existing field group.
|
89 |
$post = acf_get_field_group_post($field_group['key']);
|
@@ -116,19 +113,15 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
116 |
|
117 |
if($this->is_active()){
|
118 |
|
119 |
-
$
|
120 |
-
$action = $this->get_action();
|
121 |
|
122 |
?>
|
123 |
<div class="acf-postbox-columns">
|
124 |
<div class="acf-postbox-main">
|
125 |
|
126 |
<?php
|
127 |
-
// prevent default translation and fake __() within string
|
128 |
-
acf_update_setting('l10n_var_export', true);
|
129 |
|
130 |
-
|
131 |
-
$json = $array;
|
132 |
|
133 |
$str_replace = array(
|
134 |
" " => "\t",
|
@@ -142,8 +135,7 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
142 |
'/([\t\r\n]+?)array/' => 'array',
|
143 |
'/[0-9]+ => array/' => 'array'
|
144 |
);
|
145 |
-
|
146 |
-
|
147 |
?>
|
148 |
<p><?php _e("The following code can be used to register a local version of the selected field group(s). A local field group can provide many benefits such as faster load times, version control & dynamic fields/settings. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
149 |
|
@@ -153,23 +145,19 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
153 |
|
154 |
echo "if( function_exists('acf_add_local_field_group') ):" . "\r\n" . "\r\n";
|
155 |
|
156 |
-
foreach(
|
157 |
|
158 |
// code
|
159 |
$code = var_export($field_group, true);
|
160 |
|
161 |
-
|
162 |
// change double spaces to tabs
|
163 |
-
$code = str_replace(
|
164 |
-
|
165 |
|
166 |
// correctly formats "=> array("
|
167 |
-
$code = preg_replace(
|
168 |
-
|
169 |
|
170 |
// esc_textarea
|
171 |
-
$code = esc_textarea(
|
172 |
-
|
173 |
|
174 |
// echo
|
175 |
echo "acf_add_local_field_group({$code});" . "\r\n" . "\r\n";
|
@@ -185,55 +173,44 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
185 |
<p class="acf-submit">
|
186 |
<a class="button" id="acf-export-copy"><?php _e( 'Copy to clipboard', 'acf' ); ?></a>
|
187 |
</p>
|
|
|
188 |
<script type="text/javascript">
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
// remove $a if 'copy' is not supported
|
197 |
-
if( !document.queryCommandSupported('copy') ) {
|
198 |
-
return $a.remove();
|
199 |
-
}
|
200 |
-
|
201 |
-
|
202 |
-
// event
|
203 |
-
$a.on('click', function( e ){
|
204 |
-
|
205 |
-
// prevent default
|
206 |
-
e.preventDefault();
|
207 |
-
|
208 |
-
|
209 |
-
// select
|
210 |
-
$textarea.get(0).select();
|
211 |
-
|
212 |
-
|
213 |
-
// try
|
214 |
-
try {
|
215 |
-
|
216 |
-
// copy
|
217 |
-
var copy = document.execCommand('copy');
|
218 |
-
if( !copy ) return;
|
219 |
-
|
220 |
-
|
221 |
-
// tooltip
|
222 |
-
acf.newTooltip({
|
223 |
-
text: "<?php _e('Copied', 'acf' ); ?>",
|
224 |
-
timeout: 250,
|
225 |
-
target: $(this),
|
226 |
-
});
|
227 |
-
|
228 |
-
} catch (err) {
|
229 |
-
|
230 |
-
// do nothing
|
231 |
-
|
232 |
}
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
</script>
|
238 |
</div>
|
239 |
</div>
|
@@ -243,16 +220,14 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
243 |
|
244 |
}
|
245 |
|
246 |
-
function
|
247 |
|
248 |
// vars
|
249 |
-
|
|
|
250 |
|
251 |
-
if(!$
|
252 |
-
return
|
253 |
-
|
254 |
-
// Return
|
255 |
-
$array = array();
|
256 |
|
257 |
// Enable filters
|
258 |
acf_enable_filters();
|
@@ -269,7 +244,7 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
269 |
|
270 |
}
|
271 |
|
272 |
-
foreach($
|
273 |
|
274 |
$field_group = acf_get_field_group($field_group_key);
|
275 |
|
@@ -282,52 +257,59 @@ class ACFE_Admin_Tool_FG_Local extends ACF_Admin_Tool{
|
|
282 |
|
283 |
// prepare for export
|
284 |
$field_group = acf_prepare_field_group_for_export($field_group);
|
285 |
-
|
286 |
-
$
|
287 |
|
288 |
}
|
289 |
|
290 |
// return
|
291 |
-
return $
|
292 |
|
293 |
}
|
294 |
|
295 |
-
function
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
|
|
303 |
|
304 |
-
|
305 |
-
return explode('+', $keys);
|
306 |
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
|
312 |
}
|
313 |
|
314 |
function get_action(){
|
315 |
-
|
316 |
-
//
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
|
327 |
}
|
328 |
|
329 |
}
|
330 |
|
331 |
-
acf_register_admin_tool('
|
332 |
|
333 |
endif;
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
+
if(!class_exists('acfe_field_groups_local_export')):
|
7 |
|
8 |
+
class acfe_field_groups_local_export extends ACF_Admin_Tool{
|
9 |
|
10 |
function initialize(){
|
11 |
|
12 |
// vars
|
13 |
$this->title = __('Export Local Field Groups');
|
14 |
$this->name = 'acfe-fg-local';
|
|
|
15 |
|
16 |
}
|
17 |
|
41 |
|
42 |
if($this->is_active()){
|
43 |
|
44 |
+
$data = $this->get_data();
|
45 |
+
$keys = $this->get_keys();
|
46 |
$action = $this->get_action();
|
47 |
|
48 |
// validate
|
49 |
+
if(empty($data)){
|
50 |
return acf_add_admin_notice(__('No field group selected'), 'warning');
|
51 |
+
}
|
52 |
|
53 |
// Json
|
54 |
if($action === 'json'){
|
68 |
header("Content-Type: application/json; charset=utf-8");
|
69 |
|
70 |
// return
|
71 |
+
echo acf_json_encode($data);
|
72 |
die;
|
73 |
|
74 |
}
|
76 |
// Sync
|
77 |
elseif($action === 'sync'){
|
78 |
|
|
|
|
|
|
|
79 |
// Remeber imported field group ids.
|
80 |
$ids = array();
|
81 |
|
82 |
// Loop over json
|
83 |
+
foreach($data as $field_group){
|
84 |
|
85 |
// Search database for existing field group.
|
86 |
$post = acf_get_field_group_post($field_group['key']);
|
113 |
|
114 |
if($this->is_active()){
|
115 |
|
116 |
+
$data = $this->get_data();
|
|
|
117 |
|
118 |
?>
|
119 |
<div class="acf-postbox-columns">
|
120 |
<div class="acf-postbox-main">
|
121 |
|
122 |
<?php
|
|
|
|
|
123 |
|
124 |
+
acf_update_setting('l10n_var_export', true);
|
|
|
125 |
|
126 |
$str_replace = array(
|
127 |
" " => "\t",
|
135 |
'/([\t\r\n]+?)array/' => 'array',
|
136 |
'/[0-9]+ => array/' => 'array'
|
137 |
);
|
138 |
+
|
|
|
139 |
?>
|
140 |
<p><?php _e("The following code can be used to register a local version of the selected field group(s). A local field group can provide many benefits such as faster load times, version control & dynamic fields/settings. Simply copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
141 |
|
145 |
|
146 |
echo "if( function_exists('acf_add_local_field_group') ):" . "\r\n" . "\r\n";
|
147 |
|
148 |
+
foreach($data as $field_group){
|
149 |
|
150 |
// code
|
151 |
$code = var_export($field_group, true);
|
152 |
|
|
|
153 |
// change double spaces to tabs
|
154 |
+
$code = str_replace(array_keys($str_replace), array_values($str_replace), $code);
|
|
|
155 |
|
156 |
// correctly formats "=> array("
|
157 |
+
$code = preg_replace(array_keys($preg_replace), array_values($preg_replace), $code);
|
|
|
158 |
|
159 |
// esc_textarea
|
160 |
+
$code = esc_textarea($code);
|
|
|
161 |
|
162 |
// echo
|
163 |
echo "acf_add_local_field_group({$code});" . "\r\n" . "\r\n";
|
173 |
<p class="acf-submit">
|
174 |
<a class="button" id="acf-export-copy"><?php _e( 'Copy to clipboard', 'acf' ); ?></a>
|
175 |
</p>
|
176 |
+
|
177 |
<script type="text/javascript">
|
178 |
+
(function($){
|
179 |
+
|
180 |
+
var $a = $('#acf-export-copy');
|
181 |
+
var $textarea = $('#acf-export-textarea');
|
182 |
+
|
183 |
+
if(!document.queryCommandSupported('copy')){
|
184 |
+
return $a.remove();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
+
|
187 |
+
$a.on('click', function(e){
|
188 |
+
|
189 |
+
e.preventDefault();
|
190 |
+
|
191 |
+
$textarea.get(0).select();
|
192 |
+
|
193 |
+
try{
|
194 |
+
|
195 |
+
// copy
|
196 |
+
var copy = document.execCommand('copy');
|
197 |
+
if(!copy)
|
198 |
+
return;
|
199 |
+
|
200 |
+
// tooltip
|
201 |
+
acf.newTooltip({
|
202 |
+
text: "<?php _e('Copied', 'acf' ); ?>",
|
203 |
+
timeout: 250,
|
204 |
+
target: $(this),
|
205 |
+
});
|
206 |
+
|
207 |
+
}catch(err){
|
208 |
+
// do nothing
|
209 |
+
}
|
210 |
+
|
211 |
+
});
|
212 |
+
|
213 |
+
})(jQuery);
|
214 |
</script>
|
215 |
</div>
|
216 |
</div>
|
220 |
|
221 |
}
|
222 |
|
223 |
+
function get_data(){
|
224 |
|
225 |
// vars
|
226 |
+
$data = array();
|
227 |
+
$keys = $this->get_keys();
|
228 |
|
229 |
+
if(!$keys)
|
230 |
+
return $data;
|
|
|
|
|
|
|
231 |
|
232 |
// Enable filters
|
233 |
acf_enable_filters();
|
244 |
|
245 |
}
|
246 |
|
247 |
+
foreach($keys as $field_group_key){
|
248 |
|
249 |
$field_group = acf_get_field_group($field_group_key);
|
250 |
|
257 |
|
258 |
// prepare for export
|
259 |
$field_group = acf_prepare_field_group_for_export($field_group);
|
260 |
+
|
261 |
+
$data[] = $field_group;
|
262 |
|
263 |
}
|
264 |
|
265 |
// return
|
266 |
+
return $data;
|
267 |
|
268 |
}
|
269 |
|
270 |
+
function get_keys(){
|
271 |
+
|
272 |
+
// vars
|
273 |
+
$keys_post = acf_maybe_get_POST('keys');
|
274 |
+
$keys_get = acf_maybe_get_GET('keys');
|
275 |
+
$keys = array();
|
276 |
+
|
277 |
+
// $_POST
|
278 |
+
if($keys_post){
|
279 |
|
280 |
+
$keys = (array) $keys_post;
|
|
|
281 |
|
282 |
+
}
|
283 |
+
|
284 |
+
// $_GET
|
285 |
+
elseif($keys_get){
|
286 |
+
|
287 |
+
$keys_get = str_replace(' ', '+', $keys_get);
|
288 |
+
$keys = explode('+', $keys_get);
|
289 |
+
|
290 |
+
}
|
291 |
+
|
292 |
+
return $keys;
|
293 |
|
294 |
}
|
295 |
|
296 |
function get_action(){
|
297 |
+
|
298 |
+
// vars
|
299 |
+
$default = 'json';
|
300 |
+
$action = acfe_maybe_get_REQUEST('action', $default);
|
301 |
+
|
302 |
+
// check allowed
|
303 |
+
if(!in_array($action, array('json', 'php', 'sync')))
|
304 |
+
$action = $default;
|
305 |
+
|
306 |
+
// return
|
307 |
+
return $action;
|
308 |
|
309 |
}
|
310 |
|
311 |
}
|
312 |
|
313 |
+
acf_register_admin_tool('acfe_field_groups_local_export');
|
314 |
|
315 |
endif;
|
@@ -1,239 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_forms'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Export_Form')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Export_Form extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
public $action = false;
|
15 |
-
public $data = array();
|
16 |
-
|
17 |
-
function initialize(){
|
18 |
-
|
19 |
-
// vars
|
20 |
-
$this->name = 'acfe_tool_form_export';
|
21 |
-
$this->title = __('Export Forms');
|
22 |
-
$this->icon = 'dashicons-upload';
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
function html(){
|
27 |
-
|
28 |
-
// Archive
|
29 |
-
if(!$this->is_active()){
|
30 |
-
|
31 |
-
$this->html_archive();
|
32 |
-
|
33 |
-
}
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
function html_archive(){
|
38 |
-
|
39 |
-
// vars
|
40 |
-
$choices = array();
|
41 |
-
|
42 |
-
$get_forms = get_posts(array(
|
43 |
-
'post_type' => 'acfe-form',
|
44 |
-
'posts_per_page' => -1,
|
45 |
-
'fields' => 'ids'
|
46 |
-
));
|
47 |
-
|
48 |
-
if($get_forms){
|
49 |
-
foreach($get_forms as $form_id){
|
50 |
-
|
51 |
-
$name = get_field('acfe_form_name', $form_id);
|
52 |
-
|
53 |
-
$choices[$name] = esc_html(get_the_title($form_id));
|
54 |
-
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
?>
|
59 |
-
<p><?php _e('Export Forms', 'acf'); ?></p>
|
60 |
-
|
61 |
-
<div class="acf-fields">
|
62 |
-
<?php
|
63 |
-
|
64 |
-
if(!empty($choices)){
|
65 |
-
|
66 |
-
// render
|
67 |
-
acf_render_field_wrap(array(
|
68 |
-
'label' => __('Select Forms', 'acf'),
|
69 |
-
'type' => 'checkbox',
|
70 |
-
'name' => 'keys',
|
71 |
-
'prefix' => false,
|
72 |
-
'value' => false,
|
73 |
-
'toggle' => true,
|
74 |
-
'choices' => $choices,
|
75 |
-
));
|
76 |
-
|
77 |
-
}
|
78 |
-
|
79 |
-
else{
|
80 |
-
|
81 |
-
echo '<div style="padding:15px 12px;">';
|
82 |
-
_e('No dynamic form available.');
|
83 |
-
echo '</div>';
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
?>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<?php
|
91 |
-
|
92 |
-
$disabled = '';
|
93 |
-
if(empty($choices))
|
94 |
-
$disabled = 'disabled="disabled"';
|
95 |
-
|
96 |
-
?>
|
97 |
-
|
98 |
-
<p class="acf-submit">
|
99 |
-
<button type="submit" name="action" class="button button-primary" value="json" <?php echo $disabled; ?>><?php _e('Export File'); ?></button>
|
100 |
-
</p>
|
101 |
-
<?php
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
function load(){
|
106 |
-
|
107 |
-
if($this->is_active()){
|
108 |
-
|
109 |
-
$this->action = $this->get_action();
|
110 |
-
$this->data = $this->get_selected();
|
111 |
-
|
112 |
-
// Json submit
|
113 |
-
if($this->action === 'json')
|
114 |
-
$this->submit();
|
115 |
-
|
116 |
-
// add notice
|
117 |
-
if(!empty($this->data)){
|
118 |
-
|
119 |
-
$count = count($this->data);
|
120 |
-
$text = sprintf(_n( 'Exported 1 form.', 'Exported %s forms.', $count, 'acf' ), $count);
|
121 |
-
|
122 |
-
acf_add_admin_notice($text, 'success');
|
123 |
-
|
124 |
-
}
|
125 |
-
|
126 |
-
}
|
127 |
-
|
128 |
-
}
|
129 |
-
|
130 |
-
function submit(){
|
131 |
-
|
132 |
-
$this->action = $this->get_action();
|
133 |
-
$this->data = $this->get_selected();
|
134 |
-
|
135 |
-
// validate
|
136 |
-
if($this->data === false)
|
137 |
-
return acf_add_admin_notice(__('No forms selected'), 'warning');
|
138 |
-
|
139 |
-
$keys = array();
|
140 |
-
foreach($this->data as $args){
|
141 |
-
|
142 |
-
$keys[] = $args['acfe_form_name'];
|
143 |
-
|
144 |
-
}
|
145 |
-
|
146 |
-
if($this->action === 'json'){
|
147 |
-
|
148 |
-
// Prefix
|
149 |
-
$prefix = (count($keys) > 1) ? 'forms' : 'forms';
|
150 |
-
|
151 |
-
// Slugs
|
152 |
-
$slugs = implode('-', $keys);
|
153 |
-
|
154 |
-
// Date
|
155 |
-
$date = date('Y-m-d');
|
156 |
-
|
157 |
-
// file
|
158 |
-
$file_name = 'acfe-export-' . $prefix . '-' . $slugs . '-' . $date . '.json';
|
159 |
-
|
160 |
-
// headers
|
161 |
-
header("Content-Description: File Transfer");
|
162 |
-
header("Content-Disposition: attachment; filename={$file_name}");
|
163 |
-
header("Content-Type: application/json; charset=utf-8");
|
164 |
-
|
165 |
-
// return
|
166 |
-
echo acf_json_encode($this->data);
|
167 |
-
die;
|
168 |
-
|
169 |
-
}
|
170 |
-
|
171 |
-
}
|
172 |
-
|
173 |
-
function get_selected(){
|
174 |
-
|
175 |
-
// vars
|
176 |
-
$selected = $this->get_selected_keys();
|
177 |
-
|
178 |
-
if(!$selected)
|
179 |
-
return false;
|
180 |
-
|
181 |
-
$data = array();
|
182 |
-
|
183 |
-
acf_enable_filter('local');
|
184 |
-
|
185 |
-
// construct Data
|
186 |
-
foreach($selected as $key){
|
187 |
-
|
188 |
-
if(!$form = get_page_by_path($key, OBJECT, 'acfe-form'))
|
189 |
-
continue;
|
190 |
-
|
191 |
-
// add to data array
|
192 |
-
$data[] = array_merge(array('title' => get_the_title($form->ID)), get_fields($form->ID, false));
|
193 |
-
|
194 |
-
}
|
195 |
-
|
196 |
-
acf_disable_filter('local');
|
197 |
-
|
198 |
-
// return
|
199 |
-
return $data;
|
200 |
-
|
201 |
-
}
|
202 |
-
|
203 |
-
function get_selected_keys(){
|
204 |
-
|
205 |
-
// check $_POST
|
206 |
-
if($keys = acf_maybe_get_POST('keys')){
|
207 |
-
|
208 |
-
return (array) $keys;
|
209 |
-
|
210 |
-
}
|
211 |
-
|
212 |
-
// check $_GET
|
213 |
-
if($keys = acf_maybe_get_GET('keys')){
|
214 |
-
|
215 |
-
$keys = str_replace(' ', '+', $keys);
|
216 |
-
return explode('+', $keys);
|
217 |
-
|
218 |
-
}
|
219 |
-
|
220 |
-
// return
|
221 |
-
return false;
|
222 |
-
|
223 |
-
}
|
224 |
-
|
225 |
-
function get_action(){
|
226 |
-
|
227 |
-
// init
|
228 |
-
$type = 'json';
|
229 |
-
|
230 |
-
// return
|
231 |
-
return $type;
|
232 |
-
|
233 |
-
}
|
234 |
-
|
235 |
-
}
|
236 |
-
|
237 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Export_Form');
|
238 |
-
|
239 |
-
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1,459 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if(!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// Check setting
|
7 |
-
if(!acf_get_setting('acfe/modules/dynamic_forms'))
|
8 |
-
return;
|
9 |
-
|
10 |
-
if(!class_exists('ACFE_Admin_Tool_Import_Form')):
|
11 |
-
|
12 |
-
class ACFE_Admin_Tool_Import_Form extends ACF_Admin_Tool{
|
13 |
-
|
14 |
-
function initialize(){
|
15 |
-
|
16 |
-
// vars
|
17 |
-
$this->name = 'acfe_tool_form_import';
|
18 |
-
$this->title = __('Import Forms');
|
19 |
-
$this->icon = 'dashicons-upload';
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
function html(){
|
24 |
-
|
25 |
-
?>
|
26 |
-
<p><?php _e('Import Forms', 'acf'); ?></p>
|
27 |
-
|
28 |
-
<div class="acf-fields">
|
29 |
-
<?php
|
30 |
-
|
31 |
-
acf_render_field_wrap(array(
|
32 |
-
'label' => __('Select File', 'acf'),
|
33 |
-
'type' => 'file',
|
34 |
-
'name' => 'acf_import_file',
|
35 |
-
'value' => false,
|
36 |
-
'uploader' => 'basic',
|
37 |
-
));
|
38 |
-
|
39 |
-
?>
|
40 |
-
</div>
|
41 |
-
|
42 |
-
<p class="acf-submit">
|
43 |
-
<button type="submit" name="action" class="button button-primary"><?php _e('Import File'); ?></button>
|
44 |
-
</p>
|
45 |
-
<?php
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
function submit(){
|
50 |
-
|
51 |
-
// Check file size.
|
52 |
-
if(empty($_FILES['acf_import_file']['size']))
|
53 |
-
return acf_add_admin_notice(__("No file selected", 'acf'), 'warning');
|
54 |
-
|
55 |
-
// Get file data.
|
56 |
-
$file = $_FILES['acf_import_file'];
|
57 |
-
|
58 |
-
// Check errors.
|
59 |
-
if($file['error'])
|
60 |
-
return acf_add_admin_notice(__("Error uploading file. Please try again", 'acf'), 'warning');
|
61 |
-
|
62 |
-
// Check file type.
|
63 |
-
if(pathinfo($file['name'], PATHINFO_EXTENSION) !== 'json')
|
64 |
-
return acf_add_admin_notice(__("Incorrect file type", 'acf'), 'warning');
|
65 |
-
|
66 |
-
// Read JSON.
|
67 |
-
$json = file_get_contents($file['tmp_name']);
|
68 |
-
$json = json_decode($json, true);
|
69 |
-
|
70 |
-
// Check if empty.
|
71 |
-
if(!$json || !is_array($json))
|
72 |
-
return acf_add_admin_notice(__("Import file empty", 'acf'), 'warning');
|
73 |
-
|
74 |
-
$ids = array();
|
75 |
-
|
76 |
-
// Loop over json
|
77 |
-
foreach($json as $args){
|
78 |
-
|
79 |
-
// Check if already exists
|
80 |
-
if(get_page_by_path($args['acfe_form_name'], OBJECT, 'acfe-form')){
|
81 |
-
|
82 |
-
acf_add_admin_notice(__("Form {$args['title']} already exists. Import aborted."), 'warning');
|
83 |
-
|
84 |
-
continue;
|
85 |
-
|
86 |
-
}
|
87 |
-
|
88 |
-
// Import
|
89 |
-
$post_id = $this->import($args);
|
90 |
-
|
91 |
-
// Insert error
|
92 |
-
if(!$post_id){
|
93 |
-
|
94 |
-
acf_add_admin_notice(__("Something went wrong with the form {$args['title']}. Import aborted."), 'warning');
|
95 |
-
|
96 |
-
continue;
|
97 |
-
|
98 |
-
}
|
99 |
-
|
100 |
-
// append message
|
101 |
-
$ids[] = $post_id;
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
if(empty($ids))
|
106 |
-
return false;
|
107 |
-
|
108 |
-
// Count total
|
109 |
-
$total = count($ids);
|
110 |
-
|
111 |
-
// Generate text
|
112 |
-
$text = sprintf(_n('1 form imported', '%s forms imported', $total, 'acf'), $total);
|
113 |
-
|
114 |
-
// Add links to text
|
115 |
-
$links = array();
|
116 |
-
foreach($ids as $id){
|
117 |
-
|
118 |
-
$links[] = '<a href="' . get_edit_post_link($id) . '">' . get_the_title($id) . '</a>';
|
119 |
-
|
120 |
-
}
|
121 |
-
|
122 |
-
$text .= ': ' . implode(', ', $links);
|
123 |
-
|
124 |
-
// Add notice
|
125 |
-
acf_add_admin_notice($text, 'success');
|
126 |
-
|
127 |
-
}
|
128 |
-
|
129 |
-
function import($args){
|
130 |
-
|
131 |
-
// Vars
|
132 |
-
$title = acf_extract_var($args, 'title');
|
133 |
-
$name = $args['acfe_form_name'];
|
134 |
-
|
135 |
-
// Insert post
|
136 |
-
$post_id = wp_insert_post(array(
|
137 |
-
'post_title' => $title,
|
138 |
-
'post_name' => $name,
|
139 |
-
'post_type' => 'acfe-form',
|
140 |
-
'post_status' => 'publish'
|
141 |
-
));
|
142 |
-
|
143 |
-
// Insert error
|
144 |
-
if(is_wp_error($post_id))
|
145 |
-
return false;
|
146 |
-
|
147 |
-
acf_enable_filter('local');
|
148 |
-
|
149 |
-
// Import Compatibility
|
150 |
-
$args = $this->import_compatibility($args);
|
151 |
-
|
152 |
-
// Update Values
|
153 |
-
acf_update_values($args, $post_id);
|
154 |
-
|
155 |
-
acf_disable_filter('local');
|
156 |
-
|
157 |
-
return $post_id;
|
158 |
-
|
159 |
-
}
|
160 |
-
|
161 |
-
function import_compatibility($args){
|
162 |
-
|
163 |
-
// ACF Extended: 0.8.5 Compatibility - Step 1
|
164 |
-
// Groups upgrade
|
165 |
-
$has_upgraded = false;
|
166 |
-
|
167 |
-
$rules = array(
|
168 |
-
|
169 |
-
// Post: title
|
170 |
-
array(
|
171 |
-
'group' => 'field_acfe_form_post_save_post_title_group',
|
172 |
-
'sub_field' => 'field_acfe_form_post_save_post_title',
|
173 |
-
'sub_field_custom' => 'field_acfe_form_post_save_post_title_custom',
|
174 |
-
),
|
175 |
-
|
176 |
-
// Post: name
|
177 |
-
array(
|
178 |
-
'group' => 'field_acfe_form_post_save_post_name_group',
|
179 |
-
'sub_field' => 'field_acfe_form_post_save_post_name',
|
180 |
-
'sub_field_custom' => 'field_acfe_form_post_save_post_name_custom',
|
181 |
-
),
|
182 |
-
|
183 |
-
// Term: name
|
184 |
-
array(
|
185 |
-
'group' => 'field_acfe_form_term_save_name_group',
|
186 |
-
'sub_field' => 'field_acfe_form_term_save_name',
|
187 |
-
'sub_field_custom' => 'field_acfe_form_term_save_name_custom',
|
188 |
-
),
|
189 |
-
|
190 |
-
// Term: slug
|
191 |
-
array(
|
192 |
-
'group' => 'field_acfe_form_term_save_slug_group',
|
193 |
-
'sub_field' => 'field_acfe_form_term_save_slug',
|
194 |
-
'sub_field_custom' => 'field_acfe_form_term_save_slug_custom',
|
195 |
-
),
|
196 |
-
|
197 |
-
// User: e-mail
|
198 |
-
array(
|
199 |
-
'group' => 'field_acfe_form_user_save_email_group',
|
200 |
-
'sub_field' => 'field_acfe_form_user_save_email',
|
201 |
-
'sub_field_custom' => 'field_acfe_form_user_save_email_custom',
|
202 |
-
),
|
203 |
-
|
204 |
-
// User: username
|
205 |
-
array(
|
206 |
-
'group' => 'field_acfe_form_user_save_username_group',
|
207 |
-
'sub_field' => 'field_acfe_form_user_save_username',
|
208 |
-
'sub_field_custom' => 'field_acfe_form_user_save_username_custom',
|
209 |
-
),
|
210 |
-
|
211 |
-
// User: password
|
212 |
-
array(
|
213 |
-
'group' => 'field_acfe_form_user_save_password_group',
|
214 |
-
'sub_field' => 'field_acfe_form_user_save_password',
|
215 |
-
'sub_field_custom' => 'field_acfe_form_user_save_password_custom',
|
216 |
-
),
|
217 |
-
|
218 |
-
// User: first name
|
219 |
-
array(
|
220 |
-
'group' => 'field_acfe_form_user_save_first_name_group',
|
221 |
-
'sub_field' => 'field_acfe_form_user_save_first_name',
|
222 |
-
'sub_field_custom' => 'field_acfe_form_user_save_first_name_custom',
|
223 |
-
),
|
224 |
-
|
225 |
-
// User: last name
|
226 |
-
array(
|
227 |
-
'group' => 'field_acfe_form_user_save_last_name_group',
|
228 |
-
'sub_field' => 'field_acfe_form_user_save_last_name',
|
229 |
-
'sub_field_custom' => 'field_acfe_form_user_save_last_name_custom',
|
230 |
-
),
|
231 |
-
|
232 |
-
// User: nickname
|
233 |
-
array(
|
234 |
-
'group' => 'field_acfe_form_user_save_nickname_group',
|
235 |
-
'sub_field' => 'field_acfe_form_user_save_nickname',
|
236 |
-
'sub_field_custom' => 'field_acfe_form_user_save_nickname_custom',
|
237 |
-
),
|
238 |
-
|
239 |
-
// User: display name
|
240 |
-
array(
|
241 |
-
'group' => 'field_acfe_form_user_save_display_name_group',
|
242 |
-
'sub_field' => 'field_acfe_form_user_save_display_name',
|
243 |
-
'sub_field_custom' => 'field_acfe_form_user_save_display_name_custom',
|
244 |
-
),
|
245 |
-
|
246 |
-
// User: website
|
247 |
-
array(
|
248 |
-
'group' => 'field_acfe_form_user_save_website_group',
|
249 |
-
'sub_field' => 'field_acfe_form_user_save_website',
|
250 |
-
'sub_field_custom' => 'field_acfe_form_user_save_website_custom',
|
251 |
-
),
|
252 |
-
|
253 |
-
);
|
254 |
-
|
255 |
-
foreach($args['acfe_form_actions'] as &$row){
|
256 |
-
|
257 |
-
foreach($rules as $rule){
|
258 |
-
|
259 |
-
if(!acf_maybe_get($row, $rule['group']))
|
260 |
-
continue;
|
261 |
-
|
262 |
-
$value = null;
|
263 |
-
$group = $row[$rule['group']];
|
264 |
-
|
265 |
-
if(acf_maybe_get($group, $rule['sub_field']) === 'custom'){
|
266 |
-
|
267 |
-
$value = acf_maybe_get($group, $rule['sub_field_custom']);
|
268 |
-
|
269 |
-
}else{
|
270 |
-
|
271 |
-
$value = acf_maybe_get($group, $rule['sub_field']);
|
272 |
-
|
273 |
-
}
|
274 |
-
|
275 |
-
unset($row[$rule['group']]);
|
276 |
-
|
277 |
-
$row[$rule['sub_field']] = $value;
|
278 |
-
|
279 |
-
$has_upgraded = true;
|
280 |
-
|
281 |
-
}
|
282 |
-
|
283 |
-
}
|
284 |
-
|
285 |
-
// ACF Extended: 0.8.5 Compatibility - Step 2
|
286 |
-
// Field mapping upgrade
|
287 |
-
if($has_upgraded){
|
288 |
-
|
289 |
-
// Rules
|
290 |
-
$rules = array(
|
291 |
-
|
292 |
-
array(
|
293 |
-
'load_values' => 'field_acfe_form_post_load_values',
|
294 |
-
'fields' => array(
|
295 |
-
'field_acfe_form_post_map_post_type' => 'field_acfe_form_post_save_post_type',
|
296 |
-
'field_acfe_form_post_map_post_status' => 'field_acfe_form_post_save_post_status',
|
297 |
-
'field_acfe_form_post_map_post_title' => 'field_acfe_form_post_save_post_title',
|
298 |
-
'field_acfe_form_post_map_post_name' => 'field_acfe_form_post_save_post_name',
|
299 |
-
'field_acfe_form_post_map_post_content' => 'field_acfe_form_post_save_post_content',
|
300 |
-
'field_acfe_form_post_map_post_author' => 'field_acfe_form_post_save_post_author',
|
301 |
-
'field_acfe_form_post_map_post_parent' => 'field_acfe_form_post_save_post_parent',
|
302 |
-
'field_acfe_form_post_map_post_terms' => 'field_acfe_form_post_save_post_terms',
|
303 |
-
)
|
304 |
-
),
|
305 |
-
|
306 |
-
array(
|
307 |
-
'load_values' => 'field_acfe_form_term_load_values',
|
308 |
-
'fields' => array(
|
309 |
-
'field_acfe_form_term_map_name' => 'field_acfe_form_term_save_name',
|
310 |
-
'field_acfe_form_term_map_slug' => 'field_acfe_form_term_save_slug',
|
311 |
-
'field_acfe_form_term_map_taxonomy' => 'field_acfe_form_term_save_taxonomy',
|
312 |
-
'field_acfe_form_term_map_parent' => 'field_acfe_form_term_save_parent',
|
313 |
-
'field_acfe_form_term_map_description' => 'field_acfe_form_term_save_description',
|
314 |
-
)
|
315 |
-
),
|
316 |
-
|
317 |
-
array(
|
318 |
-
'load_values' => 'field_acfe_form_user_load_values',
|
319 |
-
'fields' => array(
|
320 |
-
'field_acfe_form_user_map_email' => 'field_acfe_form_user_save_email',
|
321 |
-
'field_acfe_form_user_map_username' => 'field_acfe_form_user_save_username',
|
322 |
-
'field_acfe_form_user_map_password' => 'field_acfe_form_user_save_password',
|
323 |
-
'field_acfe_form_user_map_first_name' => 'field_acfe_form_user_save_first_name',
|
324 |
-
'field_acfe_form_user_map_last_name' => 'field_acfe_form_user_save_last_name',
|
325 |
-
'field_acfe_form_user_map_nickname' => 'field_acfe_form_user_save_nickname',
|
326 |
-
'field_acfe_form_user_map_display_name' => 'field_acfe_form_user_save_display_name',
|
327 |
-
'field_acfe_form_user_map_website' => 'field_acfe_form_user_save_website',
|
328 |
-
'field_acfe_form_user_map_description' => 'field_acfe_form_user_save_description',
|
329 |
-
'field_acfe_form_user_map_role' => 'field_acfe_form_user_save_role',
|
330 |
-
)
|
331 |
-
),
|
332 |
-
|
333 |
-
);
|
334 |
-
|
335 |
-
foreach($args['acfe_form_actions'] as &$row){
|
336 |
-
|
337 |
-
foreach($rules as $rule){
|
338 |
-
|
339 |
-
$load_values = acf_maybe_get($row, $rule['load_values']);
|
340 |
-
$fields = $rule['fields'];
|
341 |
-
|
342 |
-
if(!empty($load_values))
|
343 |
-
continue;
|
344 |
-
|
345 |
-
foreach($fields as $map => $save){
|
346 |
-
|
347 |
-
$map_value = acf_maybe_get($row, $map);
|
348 |
-
|
349 |
-
if(empty($map_value))
|
350 |
-
continue;
|
351 |
-
|
352 |
-
if($save === 'field_acfe_form_post_save_post_content'){
|
353 |
-
|
354 |
-
$row['field_acfe_form_post_save_post_content_group'][$save] = $map_value;
|
355 |
-
|
356 |
-
}
|
357 |
-
|
358 |
-
elseif($save === 'field_acfe_form_term_save_description'){
|
359 |
-
|
360 |
-
$row['field_acfe_form_term_save_description_group'][$save] = $map_value;
|
361 |
-
|
362 |
-
}
|
363 |
-
|
364 |
-
elseif($save === 'field_acfe_form_user_save_description'){
|
365 |
-
|
366 |
-
$row['field_acfe_form_user_save_description_group'][$save] = $map_value;
|
367 |
-
|
368 |
-
}
|
369 |
-
|
370 |
-
else{
|
371 |
-
|
372 |
-
$row[$save] = $map_value;
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
}
|
377 |
-
|
378 |
-
}
|
379 |
-
|
380 |
-
}
|
381 |
-
|
382 |
-
}
|
383 |
-
|
384 |
-
return $args;
|
385 |
-
|
386 |
-
}
|
387 |
-
|
388 |
-
function import_external($data){
|
389 |
-
|
390 |
-
$ids = array();
|
391 |
-
|
392 |
-
// Loop over args
|
393 |
-
foreach($data as $args){
|
394 |
-
|
395 |
-
// Check if already exists
|
396 |
-
$form_exists = get_page_by_path($args['acfe_form_name'], OBJECT, 'acfe-form');
|
397 |
-
|
398 |
-
if($form_exists)
|
399 |
-
continue;
|
400 |
-
|
401 |
-
// Import
|
402 |
-
$post_id = $this->import($args);
|
403 |
-
|
404 |
-
// Insert error
|
405 |
-
if(!$post_id)
|
406 |
-
continue;
|
407 |
-
|
408 |
-
$name = get_field('acfe_form_name', $post_id);
|
409 |
-
|
410 |
-
$return = array(
|
411 |
-
'id' => $post_id,
|
412 |
-
'name' => $name,
|
413 |
-
);
|
414 |
-
|
415 |
-
// append message
|
416 |
-
$ids[] = $return;
|
417 |
-
|
418 |
-
}
|
419 |
-
|
420 |
-
if(empty($ids))
|
421 |
-
return false;
|
422 |
-
|
423 |
-
return $ids;
|
424 |
-
|
425 |
-
}
|
426 |
-
|
427 |
-
}
|
428 |
-
|
429 |
-
acf_register_admin_tool('ACFE_Admin_Tool_Import_Form');
|
430 |
-
|
431 |
-
endif;
|
432 |
-
|
433 |
-
/*
|
434 |
-
* ACFE: Import Dynamic Form
|
435 |
-
*
|
436 |
-
* $args: Accepts array() or json
|
437 |
-
* return: A list of form_id & form_name
|
438 |
-
*/
|
439 |
-
function acfe_import_dynamic_form($args = false){
|
440 |
-
|
441 |
-
if(!$args)
|
442 |
-
return false;
|
443 |
-
|
444 |
-
// json
|
445 |
-
if(is_string($args)){
|
446 |
-
|
447 |
-
$args = json_decode($args, true);
|
448 |
-
|
449 |
-
}
|
450 |
-
|
451 |
-
if(!is_array($args) || empty($args))
|
452 |
-
return false;
|
453 |
-
|
454 |
-
// Tool
|
455 |
-
$tool = acf()->admin_tools->get_tool('ACFE_Admin_Tool_Import_Form');
|
456 |
-
|
457 |
-
return $tool->import_external($args);
|
458 |
-
|
459 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/forms'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_forms_export')):
|
11 |
+
|
12 |
+
class acfe_dynamic_forms_export extends acfe_module_export{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->name = 'acfe_dynamic_forms_export';
|
18 |
+
$this->title = __('Export Forms');
|
19 |
+
$this->description = __('Export Forms');
|
20 |
+
$this->select = __('Select Forms');
|
21 |
+
$this->default_action = 'json';
|
22 |
+
$this->allowed_actions = array('json');
|
23 |
+
$this->instance = acf_get_instance('acfe_dynamic_forms');
|
24 |
+
$this->file = 'form';
|
25 |
+
$this->files = 'forms';
|
26 |
+
$this->messages = array(
|
27 |
+
'not_found' => __('No form available.'),
|
28 |
+
'not_selected' => __('No forms selected'),
|
29 |
+
'success_single' => '1 form exported',
|
30 |
+
'success_multiple' => '%s forms exported',
|
31 |
+
);
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
acf_register_admin_tool('acfe_dynamic_forms_export');
|
38 |
+
|
39 |
+
endif;
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/forms'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_forms_import')):
|
11 |
+
|
12 |
+
class acfe_dynamic_forms_import extends acfe_module_import{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->hook = 'form';
|
18 |
+
$this->name = 'acfe_dynamic_forms_import';
|
19 |
+
$this->title = __('Import Forms');
|
20 |
+
$this->description = __('Import Forms');
|
21 |
+
$this->instance = acf_get_instance('acfe_dynamic_forms');
|
22 |
+
$this->messages = array(
|
23 |
+
'success_single' => '1 form imported',
|
24 |
+
'success_multiple' => '%s forms imported',
|
25 |
+
);
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
+
|
31 |
+
acf_register_admin_tool('acfe_dynamic_forms_import');
|
32 |
+
|
33 |
+
endif;
|
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_module_export')):
|
7 |
+
|
8 |
+
class acfe_module_export extends ACF_Admin_Tool{
|
9 |
+
|
10 |
+
public $instance;
|
11 |
+
public $action;
|
12 |
+
public $data = array();
|
13 |
+
|
14 |
+
public $description;
|
15 |
+
public $select;
|
16 |
+
public $default_action;
|
17 |
+
public $allowed_actions = array();
|
18 |
+
public $file;
|
19 |
+
public $files;
|
20 |
+
public $messages = array();
|
21 |
+
|
22 |
+
function html(){
|
23 |
+
|
24 |
+
// Single
|
25 |
+
if($this->is_active()){
|
26 |
+
|
27 |
+
$this->html_single();
|
28 |
+
|
29 |
+
// Archive
|
30 |
+
}else{
|
31 |
+
|
32 |
+
$this->html_archive();
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
function html_archive(){
|
39 |
+
|
40 |
+
// vars
|
41 |
+
$choices = $this->instance->export_choices();
|
42 |
+
|
43 |
+
?>
|
44 |
+
<p><?php echo $this->description; ?></p>
|
45 |
+
|
46 |
+
<div class="acf-fields">
|
47 |
+
<?php
|
48 |
+
|
49 |
+
if(!empty($choices)){
|
50 |
+
|
51 |
+
// render
|
52 |
+
acf_render_field_wrap(array(
|
53 |
+
'label' => $this->select,
|
54 |
+
'type' => 'checkbox',
|
55 |
+
'name' => 'keys',
|
56 |
+
'prefix' => false,
|
57 |
+
'value' => false,
|
58 |
+
'toggle' => true,
|
59 |
+
'choices' => $choices,
|
60 |
+
));
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
else{
|
65 |
+
|
66 |
+
echo '<div style="padding:15px 12px;">';
|
67 |
+
echo $this->messages['not_found'];
|
68 |
+
echo '</div>';
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
?>
|
73 |
+
</div>
|
74 |
+
|
75 |
+
<?php $disabled = empty($choices) ? 'disabled="disabled"' : ''; ?>
|
76 |
+
|
77 |
+
<p class="acf-submit">
|
78 |
+
|
79 |
+
<?php if(in_array('json', $this->allowed_actions)){ ?>
|
80 |
+
<button type="submit" name="action" class="button button-primary" value="json" <?php echo $disabled; ?>><?php _e('Export File'); ?></button>
|
81 |
+
<?php } ?>
|
82 |
+
|
83 |
+
<?php if(in_array('php', $this->allowed_actions)){ ?>
|
84 |
+
<button type="submit" name="action" class="button" value="php" <?php echo $disabled; ?>><?php _e('Generate PHP'); ?></button>
|
85 |
+
<?php } ?>
|
86 |
+
|
87 |
+
</p>
|
88 |
+
<?php
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
function html_single(){
|
93 |
+
|
94 |
+
?>
|
95 |
+
<div class="acf-postbox-columns">
|
96 |
+
<div class="acf-postbox-main">
|
97 |
+
|
98 |
+
<p><?php _e("You can copy and paste the following code to your theme's functions.php file or include it within an external file.", 'acf'); ?></p>
|
99 |
+
|
100 |
+
<div id="acf-admin-tool-export">
|
101 |
+
<textarea id="acf-export-textarea" readonly="true"><?php $this->instance->export_php($this->data); ?></textarea>
|
102 |
+
</div>
|
103 |
+
|
104 |
+
<p class="acf-submit">
|
105 |
+
<a class="button" id="acf-export-copy"><?php _e( 'Copy to clipboard', 'acf' ); ?></a>
|
106 |
+
</p>
|
107 |
+
|
108 |
+
<script type="text/javascript">
|
109 |
+
(function($){
|
110 |
+
|
111 |
+
var $a = $('#acf-export-copy');
|
112 |
+
var $textarea = $('#acf-export-textarea');
|
113 |
+
|
114 |
+
if(!document.queryCommandSupported('copy')){
|
115 |
+
return $a.remove();
|
116 |
+
}
|
117 |
+
|
118 |
+
$a.on('click', function(e){
|
119 |
+
|
120 |
+
e.preventDefault();
|
121 |
+
|
122 |
+
$textarea.get(0).select();
|
123 |
+
|
124 |
+
try{
|
125 |
+
|
126 |
+
// copy
|
127 |
+
var copy = document.execCommand('copy');
|
128 |
+
if(!copy)
|
129 |
+
return;
|
130 |
+
|
131 |
+
// tooltip
|
132 |
+
acf.newTooltip({
|
133 |
+
text: "<?php _e('Copied', 'acf' ); ?>",
|
134 |
+
timeout: 250,
|
135 |
+
target: $(this),
|
136 |
+
});
|
137 |
+
|
138 |
+
}catch(err){
|
139 |
+
// do nothing
|
140 |
+
}
|
141 |
+
|
142 |
+
});
|
143 |
+
|
144 |
+
})(jQuery);
|
145 |
+
</script>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
<?php
|
149 |
+
|
150 |
+
}
|
151 |
+
|
152 |
+
function load(){
|
153 |
+
|
154 |
+
if(!$this->is_active())
|
155 |
+
return;
|
156 |
+
|
157 |
+
$this->action = $this->get_action();
|
158 |
+
$this->data = $this->get_data();
|
159 |
+
|
160 |
+
// Json
|
161 |
+
if($this->action === 'json'){
|
162 |
+
|
163 |
+
$this->submit();
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
// PHP
|
168 |
+
elseif($this->action === 'php'){
|
169 |
+
|
170 |
+
// add notice
|
171 |
+
if(!empty($this->data)){
|
172 |
+
|
173 |
+
$count = count($this->data);
|
174 |
+
$text = sprintf(_n($this->messages['success_single'], $this->messages['success_multiple'], $count, 'acf' ), $count);
|
175 |
+
|
176 |
+
acf_add_admin_notice($text, 'success');
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
181 |
+
|
182 |
+
}
|
183 |
+
|
184 |
+
function submit(){
|
185 |
+
|
186 |
+
$this->action = $this->get_action();
|
187 |
+
$this->data = $this->get_data();
|
188 |
+
$keys = array_keys($this->data);
|
189 |
+
|
190 |
+
// validate
|
191 |
+
if(!$this->data){
|
192 |
+
return acf_add_admin_notice($this->messages['not_selected'], 'warning');
|
193 |
+
}
|
194 |
+
|
195 |
+
// Json
|
196 |
+
if($this->action === 'json'){
|
197 |
+
|
198 |
+
// Prefix
|
199 |
+
$prefix = (count($keys) > 1) ? $this->file : $this->files;
|
200 |
+
|
201 |
+
// Slugs
|
202 |
+
$slugs = implode('-', $keys);
|
203 |
+
|
204 |
+
// Date
|
205 |
+
$date = date('Y-m-d');
|
206 |
+
|
207 |
+
// file
|
208 |
+
$file_name = 'acfe-export-' . $prefix . '-' . $slugs . '-' . $date . '.json';
|
209 |
+
|
210 |
+
// headers
|
211 |
+
header("Content-Description: File Transfer");
|
212 |
+
header("Content-Disposition: attachment; filename={$file_name}");
|
213 |
+
header("Content-Type: application/json; charset=utf-8");
|
214 |
+
|
215 |
+
// return
|
216 |
+
echo acf_json_encode($this->data);
|
217 |
+
|
218 |
+
}
|
219 |
+
|
220 |
+
// PHP
|
221 |
+
elseif($this->action === 'php'){
|
222 |
+
|
223 |
+
// url
|
224 |
+
$url = add_query_arg(array(
|
225 |
+
'keys' => implode('+', $keys),
|
226 |
+
'action' => 'php'
|
227 |
+
), $this->get_url());
|
228 |
+
|
229 |
+
// redirect
|
230 |
+
wp_redirect($url);
|
231 |
+
|
232 |
+
}
|
233 |
+
|
234 |
+
exit;
|
235 |
+
|
236 |
+
}
|
237 |
+
|
238 |
+
function get_data(){
|
239 |
+
|
240 |
+
// vars
|
241 |
+
$keys = $this->get_keys();
|
242 |
+
$data = array();
|
243 |
+
|
244 |
+
foreach($keys as $key){
|
245 |
+
|
246 |
+
// export
|
247 |
+
$args = $this->instance->export_data($key);
|
248 |
+
|
249 |
+
if(!$args)
|
250 |
+
continue;
|
251 |
+
|
252 |
+
$data[$key] = $args;
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
return $data;
|
257 |
+
|
258 |
+
}
|
259 |
+
|
260 |
+
function get_keys(){
|
261 |
+
|
262 |
+
// vars
|
263 |
+
$keys_post = acf_maybe_get_POST('keys');
|
264 |
+
$keys_get = acf_maybe_get_GET('keys');
|
265 |
+
$keys = array();
|
266 |
+
|
267 |
+
// $_POST
|
268 |
+
if($keys_post){
|
269 |
+
|
270 |
+
$keys = (array) $keys_post;
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
// $_GET
|
275 |
+
elseif($keys_get){
|
276 |
+
|
277 |
+
$keys_get = str_replace(' ', '+', $keys_get);
|
278 |
+
$keys = explode('+', $keys_get);
|
279 |
+
|
280 |
+
}
|
281 |
+
|
282 |
+
return $keys;
|
283 |
+
|
284 |
+
}
|
285 |
+
|
286 |
+
function get_action(){
|
287 |
+
|
288 |
+
// vars
|
289 |
+
$default = $this->default_action;
|
290 |
+
$action = acfe_maybe_get_REQUEST('action', $default);
|
291 |
+
|
292 |
+
// check allowed
|
293 |
+
if(!in_array($action, $this->allowed_actions))
|
294 |
+
$action = $default;
|
295 |
+
|
296 |
+
// return
|
297 |
+
return $action;
|
298 |
+
|
299 |
+
}
|
300 |
+
|
301 |
+
}
|
302 |
+
|
303 |
+
endif;
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_module_import')):
|
7 |
+
|
8 |
+
class acfe_module_import extends ACF_Admin_Tool{
|
9 |
+
|
10 |
+
public $hook;
|
11 |
+
public $description;
|
12 |
+
public $instance;
|
13 |
+
public $messages = array();
|
14 |
+
|
15 |
+
function html(){
|
16 |
+
|
17 |
+
?>
|
18 |
+
<p><?php echo $this->description; ?></p>
|
19 |
+
|
20 |
+
<div class="acf-fields">
|
21 |
+
<?php
|
22 |
+
|
23 |
+
acf_render_field_wrap(array(
|
24 |
+
'label' => __('Select File', 'acf'),
|
25 |
+
'type' => 'file',
|
26 |
+
'name' => 'acf_import_file',
|
27 |
+
'value' => false,
|
28 |
+
'uploader' => 'basic',
|
29 |
+
));
|
30 |
+
|
31 |
+
?>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<p class="acf-submit">
|
35 |
+
<button type="submit" name="action" class="button button-primary"><?php _e('Import File'); ?></button>
|
36 |
+
</p>
|
37 |
+
<?php
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
function submit(){
|
42 |
+
|
43 |
+
// Validate
|
44 |
+
$json = $this->validate_file();
|
45 |
+
|
46 |
+
if(!$json)
|
47 |
+
return;
|
48 |
+
|
49 |
+
$ids = array();
|
50 |
+
|
51 |
+
// Loop over json
|
52 |
+
foreach($json as $name => $args){
|
53 |
+
|
54 |
+
// Import
|
55 |
+
$post_id = $this->instance->import($name, $args);
|
56 |
+
|
57 |
+
// Insert error
|
58 |
+
if(is_wp_error($post_id)){
|
59 |
+
|
60 |
+
acf_add_admin_notice($post_id->get_error_message(), 'warning');
|
61 |
+
continue;
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
// append message
|
66 |
+
$ids[] = $post_id;
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
if(empty($ids))
|
71 |
+
return;
|
72 |
+
|
73 |
+
// Count total
|
74 |
+
$total = count($ids);
|
75 |
+
|
76 |
+
// Generate text
|
77 |
+
$text = sprintf(_n($this->messages['success_single'], $this->messages['success_multiple'], $total, 'acf'), $total);
|
78 |
+
|
79 |
+
// Add links to text
|
80 |
+
$links = array();
|
81 |
+
foreach($ids as $id){
|
82 |
+
$links[] = '<a href="' . get_edit_post_link($id) . '">' . get_the_title($id) . '</a>';
|
83 |
+
}
|
84 |
+
|
85 |
+
$text .= ': ' . implode(', ', $links);
|
86 |
+
|
87 |
+
// Add notice
|
88 |
+
acf_add_admin_notice($text, 'success');
|
89 |
+
|
90 |
+
// Do Action
|
91 |
+
do_action("acfe/{$this->hook}/import", $ids, $json);
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
function validate_file(){
|
96 |
+
|
97 |
+
// Check file size.
|
98 |
+
if(empty($_FILES['acf_import_file']['size'])){
|
99 |
+
|
100 |
+
acf_add_admin_notice(__("No file selected", 'acf'), 'warning');
|
101 |
+
return false;
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
// Get file data.
|
106 |
+
$file = $_FILES['acf_import_file'];
|
107 |
+
|
108 |
+
// Check errors.
|
109 |
+
if($file['error']){
|
110 |
+
|
111 |
+
acf_add_admin_notice(__("Error uploading file. Please try again", 'acf'), 'warning');
|
112 |
+
return false;
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
// Check file type.
|
117 |
+
if(pathinfo($file['name'], PATHINFO_EXTENSION) !== 'json'){
|
118 |
+
|
119 |
+
acf_add_admin_notice(__("Incorrect file type", 'acf'), 'warning');
|
120 |
+
return false;
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
+
// Read JSON.
|
125 |
+
$json = file_get_contents($file['tmp_name']);
|
126 |
+
$json = json_decode($json, true);
|
127 |
+
|
128 |
+
// Check if empty.
|
129 |
+
if(!$json || !is_array($json)){
|
130 |
+
|
131 |
+
acf_add_admin_notice(__("Import file empty", 'acf'), 'warning');
|
132 |
+
return false;
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
return $json;
|
137 |
+
|
138 |
+
}
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
endif;
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/options_pages'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_options_pages_export')):
|
11 |
+
|
12 |
+
class acfe_dynamic_options_pages_export extends acfe_module_export{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->name = 'acfe_dynamic_options_pages_export';
|
18 |
+
$this->title = __('Export Options Pages');
|
19 |
+
$this->description = __('Export Options Pages');
|
20 |
+
$this->select = __('Select Options Pages');
|
21 |
+
$this->default_action = 'json';
|
22 |
+
$this->allowed_actions = array('json', 'php');
|
23 |
+
$this->instance = acf_get_instance('acfe_dynamic_options_pages');
|
24 |
+
$this->file = 'options-page';
|
25 |
+
$this->files = 'options-pages';
|
26 |
+
$this->messages = array(
|
27 |
+
'not_found' => __('No options page available.'),
|
28 |
+
'not_selected' => __('No options pages selected'),
|
29 |
+
'success_single' => '1 options page exported',
|
30 |
+
'success_multiple' => '%s options pages exported',
|
31 |
+
);
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
acf_register_admin_tool('acfe_dynamic_options_pages_export');
|
38 |
+
|
39 |
+
endif;
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/options_pages'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_options_pages_import')):
|
11 |
+
|
12 |
+
class acfe_dynamic_options_pages_import extends acfe_module_import{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->hook = 'options_page';
|
18 |
+
$this->name = 'acfe_dynamic_options_pages_import';
|
19 |
+
$this->title = __('Import Options Pages');
|
20 |
+
$this->description = __('Import Options Pages');
|
21 |
+
$this->instance = acf_get_instance('acfe_dynamic_options_pages');
|
22 |
+
$this->messages = array(
|
23 |
+
'success_single' => '1 options page imported',
|
24 |
+
'success_multiple' => '%s options pages imported',
|
25 |
+
);
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
+
|
31 |
+
acf_register_admin_tool('acfe_dynamic_options_pages_import');
|
32 |
+
|
33 |
+
endif;
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/post_types'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_post_types_export')):
|
11 |
+
|
12 |
+
class acfe_dynamic_post_types_export extends acfe_module_export{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->name = 'acfe_dynamic_post_types_export';
|
18 |
+
$this->title = __('Export Post Types');
|
19 |
+
$this->description = __('Export Post Types');
|
20 |
+
$this->select = __('Select Post Types');
|
21 |
+
$this->default_action = 'json';
|
22 |
+
$this->allowed_actions = array('json', 'php');
|
23 |
+
$this->instance = acf_get_instance('acfe_dynamic_post_types');
|
24 |
+
$this->file = 'post-type';
|
25 |
+
$this->files = 'post-types';
|
26 |
+
$this->messages = array(
|
27 |
+
'not_found' => __('No post type available.'),
|
28 |
+
'not_selected' => __('No post types selected'),
|
29 |
+
'success_single' => '1 post type exported',
|
30 |
+
'success_multiple' => '%s post types exported',
|
31 |
+
);
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
acf_register_admin_tool('acfe_dynamic_post_types_export');
|
38 |
+
|
39 |
+
endif;
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/post_types'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_post_types_import')):
|
11 |
+
|
12 |
+
class acfe_dynamic_post_types_import extends acfe_module_import{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->hook = 'post_type';
|
18 |
+
$this->name = 'acfe_dynamic_post_types_import';
|
19 |
+
$this->title = __('Import Post Types');
|
20 |
+
$this->description = __('Import Post Types');
|
21 |
+
$this->instance = acf_get_instance('acfe_dynamic_post_types');
|
22 |
+
$this->messages = array(
|
23 |
+
'success_single' => '1 post type imported',
|
24 |
+
'success_multiple' => '%s post types imported',
|
25 |
+
);
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
+
|
31 |
+
acf_register_admin_tool('acfe_dynamic_post_types_import');
|
32 |
+
|
33 |
+
endif;
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/taxonomies'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_taxonomies_export')):
|
11 |
+
|
12 |
+
class acfe_dynamic_taxonomies_export extends acfe_module_export{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->name = 'acfe_dynamic_taxonomies_export';
|
18 |
+
$this->title = __('Export Taxonomies');
|
19 |
+
$this->description = __('Export Taxonomies');
|
20 |
+
$this->select = __('Select Taxonomies');
|
21 |
+
$this->default_action = 'json';
|
22 |
+
$this->allowed_actions = array('json', 'php');
|
23 |
+
$this->instance = acf_get_instance('acfe_dynamic_taxonomies');
|
24 |
+
$this->file = 'taxonomy';
|
25 |
+
$this->files = 'taxonomies';
|
26 |
+
$this->messages = array(
|
27 |
+
'not_found' => __('No taxonomy available.'),
|
28 |
+
'not_selected' => __('No taxonomies selected'),
|
29 |
+
'success_single' => '1 taxonomy exported',
|
30 |
+
'success_multiple' => '%s taxonomies exported',
|
31 |
+
);
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
acf_register_admin_tool('acfe_dynamic_taxonomies_export');
|
38 |
+
|
39 |
+
endif;
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
// Check setting
|
7 |
+
if(!acf_get_setting('acfe/modules/taxonomies'))
|
8 |
+
return;
|
9 |
+
|
10 |
+
if(!class_exists('acfe_dynamic_taxonomies_import')):
|
11 |
+
|
12 |
+
class acfe_dynamic_taxonomies_import extends acfe_module_import{
|
13 |
+
|
14 |
+
function initialize(){
|
15 |
+
|
16 |
+
// vars
|
17 |
+
$this->hook = 'taxonomy';
|
18 |
+
$this->name = 'acfe_dynamic_taxonomies_import';
|
19 |
+
$this->title = __('Import Taxonomies');
|
20 |
+
$this->description = __('Import Taxonomies');
|
21 |
+
$this->instance = acf_get_instance('acfe_dynamic_taxonomies');
|
22 |
+
$this->messages = array(
|
23 |
+
'success_single' => '1 taxonomy imported',
|
24 |
+
'success_multiple' => '%s taxonomies imported',
|
25 |
+
);
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
+
|
31 |
+
acf_register_admin_tool('acfe_dynamic_taxonomies_import');
|
32 |
+
|
33 |
+
endif;
|
@@ -11,13 +11,15 @@ class acfe_compatibility{
|
|
11 |
|
12 |
add_action('acf/init', array($this, 'init'), 98);
|
13 |
|
|
|
14 |
add_filter('pto/posts_orderby/ignore', array($this, 'pto_acf_field_group'), 10, 3);
|
15 |
add_filter('pto/get_options', array($this, 'pto_options_acf_field_group'));
|
16 |
|
17 |
add_action('admin_menu', array($this, 'cotto_submenu'), 999);
|
18 |
add_filter('rank_math/metabox/priority', array($this, 'rankmath_metaboxes_priority'));
|
19 |
add_filter('wpseo_metabox_prio', array($this, 'yoast_metaboxes_priority'));
|
20 |
-
add_filter('pll_get_post_types', array($this, 'polylang'), 10, 2
|
|
|
21 |
|
22 |
}
|
23 |
|
@@ -40,11 +42,12 @@ class acfe_compatibility{
|
|
40 |
* ACF Extended: Settings
|
41 |
*/
|
42 |
function update_settings(){
|
43 |
-
|
|
|
44 |
// ACF Extended: 0.8.6.3 - Renamed 'acfe/modules/taxonomies' to 'acfe/modules/ui'
|
45 |
-
if(acf_get_setting('acfe/modules/taxonomies') !== null){
|
46 |
-
|
47 |
-
}
|
48 |
|
49 |
// ACF Extended: 0.8 - Renamed 'acfe_php*' to 'acfe/php*'
|
50 |
if(acf_get_setting('acfe_php') !== null){
|
@@ -62,6 +65,27 @@ class acfe_compatibility{
|
|
62 |
if(acf_get_setting('php_found') !== null){
|
63 |
acf_update_setting('acfe/php_found', acf_get_setting('php_found'));
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
}
|
67 |
|
@@ -195,6 +219,237 @@ class acfe_compatibility{
|
|
195 |
|
196 |
return $field;
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
}
|
199 |
|
200 |
/**
|
@@ -280,6 +535,38 @@ class acfe_compatibility{
|
|
280 |
|
281 |
}
|
282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
}
|
284 |
|
285 |
new acfe_compatibility();
|
11 |
|
12 |
add_action('acf/init', array($this, 'init'), 98);
|
13 |
|
14 |
+
add_filter('acfe/form/import_args', array($this, 'acfe_form_import_compatibility'), 10, 3);
|
15 |
add_filter('pto/posts_orderby/ignore', array($this, 'pto_acf_field_group'), 10, 3);
|
16 |
add_filter('pto/get_options', array($this, 'pto_options_acf_field_group'));
|
17 |
|
18 |
add_action('admin_menu', array($this, 'cotto_submenu'), 999);
|
19 |
add_filter('rank_math/metabox/priority', array($this, 'rankmath_metaboxes_priority'));
|
20 |
add_filter('wpseo_metabox_prio', array($this, 'yoast_metaboxes_priority'));
|
21 |
+
add_filter('pll_get_post_types', array($this, 'polylang'), 10, 2);
|
22 |
+
add_action('elementor/documents/register_controls', array($this, 'elementor'));
|
23 |
|
24 |
}
|
25 |
|
42 |
* ACF Extended: Settings
|
43 |
*/
|
44 |
function update_settings(){
|
45 |
+
|
46 |
+
// ACF Extended: 0.8.8 - 'acfe/modules/taxonomies' is now used for the old 'acfe/modules/dynamic_taxonomies'
|
47 |
// ACF Extended: 0.8.6.3 - Renamed 'acfe/modules/taxonomies' to 'acfe/modules/ui'
|
48 |
+
//if(acf_get_setting('acfe/modules/taxonomies') !== null){
|
49 |
+
// acf_update_setting('acfe/modules/ui', acf_get_setting('acfe/modules/taxonomies'));
|
50 |
+
//}
|
51 |
|
52 |
// ACF Extended: 0.8 - Renamed 'acfe_php*' to 'acfe/php*'
|
53 |
if(acf_get_setting('acfe_php') !== null){
|
65 |
if(acf_get_setting('php_found') !== null){
|
66 |
acf_update_setting('acfe/php_found', acf_get_setting('php_found'));
|
67 |
}
|
68 |
+
|
69 |
+
// ACF Extended: 0.8.8 - renamed modules
|
70 |
+
if(acf_get_setting('acfe/modules/dynamic_block_types') !== null){
|
71 |
+
acf_update_setting('acfe/modules/block_types', acf_get_setting('acfe/modules/dynamic_block_types'));
|
72 |
+
}
|
73 |
+
|
74 |
+
if(acf_get_setting('acfe/modules/dynamic_forms') !== null){
|
75 |
+
acf_update_setting('acfe/modules/forms', acf_get_setting('acfe/modules/dynamic_forms'));
|
76 |
+
}
|
77 |
+
|
78 |
+
if(acf_get_setting('acfe/modules/dynamic_options_pages') !== null){
|
79 |
+
acf_update_setting('acfe/modules/options_pages', acf_get_setting('acfe/modules/dynamic_options_pages'));
|
80 |
+
}
|
81 |
+
|
82 |
+
if(acf_get_setting('acfe/modules/dynamic_post_types') !== null){
|
83 |
+
acf_update_setting('acfe/modules/post_types', acf_get_setting('acfe/modules/dynamic_post_types'));
|
84 |
+
}
|
85 |
+
|
86 |
+
if(acf_get_setting('acfe/modules/dynamic_taxonomies') !== null){
|
87 |
+
acf_update_setting('acfe/modules/taxonomies', acf_get_setting('acfe/modules/dynamic_taxonomies'));
|
88 |
+
}
|
89 |
|
90 |
}
|
91 |
|
219 |
|
220 |
return $field;
|
221 |
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* ACF Extended: 0.8.5
|
226 |
+
* Module Dynamic Forms: Upgrade previous versions
|
227 |
+
*/
|
228 |
+
function acfe_form_import_compatibility($args, $name, $post_id){
|
229 |
+
|
230 |
+
// ACF Extended: 0.8.5 Compatibility - Step 1
|
231 |
+
// Groups upgrade
|
232 |
+
$has_upgraded = false;
|
233 |
+
|
234 |
+
$rules = array(
|
235 |
+
|
236 |
+
// Post: title
|
237 |
+
array(
|
238 |
+
'group' => 'field_acfe_form_post_save_post_title_group',
|
239 |
+
'sub_field' => 'field_acfe_form_post_save_post_title',
|
240 |
+
'sub_field_custom' => 'field_acfe_form_post_save_post_title_custom',
|
241 |
+
),
|
242 |
+
|
243 |
+
// Post: name
|
244 |
+
array(
|
245 |
+
'group' => 'field_acfe_form_post_save_post_name_group',
|
246 |
+
'sub_field' => 'field_acfe_form_post_save_post_name',
|
247 |
+
'sub_field_custom' => 'field_acfe_form_post_save_post_name_custom',
|
248 |
+
),
|
249 |
+
|
250 |
+
// Term: name
|
251 |
+
array(
|
252 |
+
'group' => 'field_acfe_form_term_save_name_group',
|
253 |
+
'sub_field' => 'field_acfe_form_term_save_name',
|
254 |
+
'sub_field_custom' => 'field_acfe_form_term_save_name_custom',
|
255 |
+
),
|
256 |
+
|
257 |
+
// Term: slug
|
258 |
+
array(
|
259 |
+
'group' => 'field_acfe_form_term_save_slug_group',
|
260 |
+
'sub_field' => 'field_acfe_form_term_save_slug',
|
261 |
+
'sub_field_custom' => 'field_acfe_form_term_save_slug_custom',
|
262 |
+
),
|
263 |
+
|
264 |
+
// User: e-mail
|
265 |
+
array(
|
266 |
+
'group' => 'field_acfe_form_user_save_email_group',
|
267 |
+
'sub_field' => 'field_acfe_form_user_save_email',
|
268 |
+
'sub_field_custom' => 'field_acfe_form_user_save_email_custom',
|
269 |
+
),
|
270 |
+
|
271 |
+
// User: username
|
272 |
+
array(
|
273 |
+
'group' => 'field_acfe_form_user_save_username_group',
|
274 |
+
'sub_field' => 'field_acfe_form_user_save_username',
|
275 |
+
'sub_field_custom' => 'field_acfe_form_user_save_username_custom',
|
276 |
+
),
|
277 |
+
|
278 |
+
// User: password
|
279 |
+
array(
|
280 |
+
'group' => 'field_acfe_form_user_save_password_group',
|
281 |
+
'sub_field' => 'field_acfe_form_user_save_password',
|
282 |
+
'sub_field_custom' => 'field_acfe_form_user_save_password_custom',
|
283 |
+
),
|
284 |
+
|
285 |
+
// User: first name
|
286 |
+
array(
|
287 |
+
'group' => 'field_acfe_form_user_save_first_name_group',
|
288 |
+
'sub_field' => 'field_acfe_form_user_save_first_name',
|
289 |
+
'sub_field_custom' => 'field_acfe_form_user_save_first_name_custom',
|
290 |
+
),
|
291 |
+
|
292 |
+
// User: last name
|
293 |
+
array(
|
294 |
+
'group' => 'field_acfe_form_user_save_last_name_group',
|
295 |
+
'sub_field' => 'field_acfe_form_user_save_last_name',
|
296 |
+
'sub_field_custom' => 'field_acfe_form_user_save_last_name_custom',
|
297 |
+
),
|
298 |
+
|
299 |
+
// User: nickname
|
300 |
+
array(
|
301 |
+
'group' => 'field_acfe_form_user_save_nickname_group',
|
302 |
+
'sub_field' => 'field_acfe_form_user_save_nickname',
|
303 |
+
'sub_field_custom' => 'field_acfe_form_user_save_nickname_custom',
|
304 |
+
),
|
305 |
+
|
306 |
+
// User: display name
|
307 |
+
array(
|
308 |
+
'group' => 'field_acfe_form_user_save_display_name_group',
|
309 |
+
'sub_field' => 'field_acfe_form_user_save_display_name',
|
310 |
+
'sub_field_custom' => 'field_acfe_form_user_save_display_name_custom',
|
311 |
+
),
|
312 |
+
|
313 |
+
// User: website
|
314 |
+
array(
|
315 |
+
'group' => 'field_acfe_form_user_save_website_group',
|
316 |
+
'sub_field' => 'field_acfe_form_user_save_website',
|
317 |
+
'sub_field_custom' => 'field_acfe_form_user_save_website_custom',
|
318 |
+
),
|
319 |
+
|
320 |
+
);
|
321 |
+
|
322 |
+
foreach($args['acfe_form_actions'] as &$row){
|
323 |
+
|
324 |
+
foreach($rules as $rule){
|
325 |
+
|
326 |
+
if(!acf_maybe_get($row, $rule['group']))
|
327 |
+
continue;
|
328 |
+
|
329 |
+
$value = null;
|
330 |
+
$group = $row[$rule['group']];
|
331 |
+
|
332 |
+
if(acf_maybe_get($group, $rule['sub_field']) === 'custom'){
|
333 |
+
|
334 |
+
$value = acf_maybe_get($group, $rule['sub_field_custom']);
|
335 |
+
|
336 |
+
}else{
|
337 |
+
|
338 |
+
$value = acf_maybe_get($group, $rule['sub_field']);
|
339 |
+
|
340 |
+
}
|
341 |
+
|
342 |
+
unset($row[$rule['group']]);
|
343 |
+
|
344 |
+
$row[$rule['sub_field']] = $value;
|
345 |
+
|
346 |
+
$has_upgraded = true;
|
347 |
+
|
348 |
+
}
|
349 |
+
|
350 |
+
}
|
351 |
+
|
352 |
+
// ACF Extended: 0.8.5 Compatibility - Step 2
|
353 |
+
// Field mapping upgrade
|
354 |
+
if($has_upgraded){
|
355 |
+
|
356 |
+
// Rules
|
357 |
+
$rules = array(
|
358 |
+
|
359 |
+
array(
|
360 |
+
'load_values' => 'field_acfe_form_post_load_values',
|
361 |
+
'fields' => array(
|
362 |
+
'field_acfe_form_post_map_post_type' => 'field_acfe_form_post_save_post_type',
|
363 |
+
'field_acfe_form_post_map_post_status' => 'field_acfe_form_post_save_post_status',
|
364 |
+
'field_acfe_form_post_map_post_title' => 'field_acfe_form_post_save_post_title',
|
365 |
+
'field_acfe_form_post_map_post_name' => 'field_acfe_form_post_save_post_name',
|
366 |
+
'field_acfe_form_post_map_post_content' => 'field_acfe_form_post_save_post_content',
|
367 |
+
'field_acfe_form_post_map_post_author' => 'field_acfe_form_post_save_post_author',
|
368 |
+
'field_acfe_form_post_map_post_parent' => 'field_acfe_form_post_save_post_parent',
|
369 |
+
'field_acfe_form_post_map_post_terms' => 'field_acfe_form_post_save_post_terms',
|
370 |
+
)
|
371 |
+
),
|
372 |
+
|
373 |
+
array(
|
374 |
+
'load_values' => 'field_acfe_form_term_load_values',
|
375 |
+
'fields' => array(
|
376 |
+
'field_acfe_form_term_map_name' => 'field_acfe_form_term_save_name',
|
377 |
+
'field_acfe_form_term_map_slug' => 'field_acfe_form_term_save_slug',
|
378 |
+
'field_acfe_form_term_map_taxonomy' => 'field_acfe_form_term_save_taxonomy',
|
379 |
+
'field_acfe_form_term_map_parent' => 'field_acfe_form_term_save_parent',
|
380 |
+
'field_acfe_form_term_map_description' => 'field_acfe_form_term_save_description',
|
381 |
+
)
|
382 |
+
),
|
383 |
+
|
384 |
+
array(
|
385 |
+
'load_values' => 'field_acfe_form_user_load_values',
|
386 |
+
'fields' => array(
|
387 |
+
'field_acfe_form_user_map_email' => 'field_acfe_form_user_save_email',
|
388 |
+
'field_acfe_form_user_map_username' => 'field_acfe_form_user_save_username',
|
389 |
+
'field_acfe_form_user_map_password' => 'field_acfe_form_user_save_password',
|
390 |
+
'field_acfe_form_user_map_first_name' => 'field_acfe_form_user_save_first_name',
|
391 |
+
'field_acfe_form_user_map_last_name' => 'field_acfe_form_user_save_last_name',
|
392 |
+
'field_acfe_form_user_map_nickname' => 'field_acfe_form_user_save_nickname',
|
393 |
+
'field_acfe_form_user_map_display_name' => 'field_acfe_form_user_save_display_name',
|
394 |
+
'field_acfe_form_user_map_website' => 'field_acfe_form_user_save_website',
|
395 |
+
'field_acfe_form_user_map_description' => 'field_acfe_form_user_save_description',
|
396 |
+
'field_acfe_form_user_map_role' => 'field_acfe_form_user_save_role',
|
397 |
+
)
|
398 |
+
),
|
399 |
+
|
400 |
+
);
|
401 |
+
|
402 |
+
foreach($args['acfe_form_actions'] as &$row){
|
403 |
+
|
404 |
+
foreach($rules as $rule){
|
405 |
+
|
406 |
+
$load_values = acf_maybe_get($row, $rule['load_values']);
|
407 |
+
$fields = $rule['fields'];
|
408 |
+
|
409 |
+
if(!empty($load_values))
|
410 |
+
continue;
|
411 |
+
|
412 |
+
foreach($fields as $map => $save){
|
413 |
+
|
414 |
+
$map_value = acf_maybe_get($row, $map);
|
415 |
+
|
416 |
+
if(empty($map_value))
|
417 |
+
continue;
|
418 |
+
|
419 |
+
if($save === 'field_acfe_form_post_save_post_content'){
|
420 |
+
|
421 |
+
$row['field_acfe_form_post_save_post_content_group'][$save] = $map_value;
|
422 |
+
|
423 |
+
}
|
424 |
+
|
425 |
+
elseif($save === 'field_acfe_form_term_save_description'){
|
426 |
+
|
427 |
+
$row['field_acfe_form_term_save_description_group'][$save] = $map_value;
|
428 |
+
|
429 |
+
}
|
430 |
+
|
431 |
+
elseif($save === 'field_acfe_form_user_save_description'){
|
432 |
+
|
433 |
+
$row['field_acfe_form_user_save_description_group'][$save] = $map_value;
|
434 |
+
|
435 |
+
}
|
436 |
+
|
437 |
+
else{
|
438 |
+
|
439 |
+
$row[$save] = $map_value;
|
440 |
+
|
441 |
+
}
|
442 |
+
|
443 |
+
}
|
444 |
+
|
445 |
+
}
|
446 |
+
|
447 |
+
}
|
448 |
+
|
449 |
+
}
|
450 |
+
|
451 |
+
return $args;
|
452 |
+
|
453 |
}
|
454 |
|
455 |
/**
|
535 |
|
536 |
}
|
537 |
|
538 |
+
/*
|
539 |
+
* ACF Extended: 0.8.8
|
540 |
+
* Elementor Pro
|
541 |
+
* Fix Elementor listing all private ACF Extended Field Groups in Dynamic ACF Tags options list
|
542 |
+
*/
|
543 |
+
function elementor(){
|
544 |
+
|
545 |
+
add_filter('acf/load_field_groups', function($field_groups){
|
546 |
+
|
547 |
+
if(!$field_groups)
|
548 |
+
return $field_groups;
|
549 |
+
|
550 |
+
// Hidden Local Field Groups
|
551 |
+
$hidden = acfe_get_setting('reserved_field_groups', array());
|
552 |
+
|
553 |
+
foreach($field_groups as $i => $field_group){
|
554 |
+
|
555 |
+
if(!in_array($field_group['key'], $hidden))
|
556 |
+
continue;
|
557 |
+
|
558 |
+
unset($field_groups[$i]);
|
559 |
+
|
560 |
+
}
|
561 |
+
|
562 |
+
$field_groups = array_values($field_groups);
|
563 |
+
|
564 |
+
return $field_groups;
|
565 |
+
|
566 |
+
}, 30);
|
567 |
+
|
568 |
+
}
|
569 |
+
|
570 |
}
|
571 |
|
572 |
new acfe_compatibility();
|
@@ -3,8 +3,9 @@
|
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
-
|
7 |
-
* Get Flexible
|
|
|
8 |
*/
|
9 |
if(!function_exists('get_flexible')){
|
10 |
|
@@ -68,8 +69,9 @@ function get_flexible($selector, $post_id = false){
|
|
68 |
|
69 |
}
|
70 |
|
71 |
-
|
72 |
-
* The Flexible
|
|
|
73 |
*/
|
74 |
if(!function_exists('the_flexible')){
|
75 |
|
@@ -81,8 +83,9 @@ function the_flexible($selector, $post_id = false){
|
|
81 |
|
82 |
}
|
83 |
|
84 |
-
|
85 |
-
* Has Flexible
|
|
|
86 |
*/
|
87 |
if(!function_exists('has_flexible')){
|
88 |
|
@@ -94,8 +97,9 @@ function has_flexible($selector, $post_id = false){
|
|
94 |
|
95 |
}
|
96 |
|
97 |
-
|
98 |
-
*
|
|
|
99 |
*/
|
100 |
if(!function_exists('have_settings')){
|
101 |
|
@@ -107,8 +111,9 @@ function have_settings(){
|
|
107 |
|
108 |
}
|
109 |
|
110 |
-
|
111 |
-
*
|
|
|
112 |
*/
|
113 |
if(!function_exists('the_setting')){
|
114 |
|
@@ -120,8 +125,9 @@ function the_setting(){
|
|
120 |
|
121 |
}
|
122 |
|
123 |
-
|
124 |
-
*
|
|
|
125 |
*/
|
126 |
if(!function_exists('have_archive')){
|
127 |
|
@@ -165,8 +171,9 @@ function have_archive($_post_type = false){
|
|
165 |
|
166 |
}
|
167 |
|
168 |
-
|
169 |
-
*
|
|
|
170 |
*/
|
171 |
if(!function_exists('the_archive')){
|
172 |
|
@@ -182,6 +189,10 @@ function the_archive(){
|
|
182 |
|
183 |
}
|
184 |
|
|
|
|
|
|
|
|
|
185 |
function acfe_the_archive_post_id($null, $post_id){
|
186 |
|
187 |
if($post_id !== false)
|
@@ -198,13 +209,15 @@ function acfe_the_archive_post_id($null, $post_id){
|
|
198 |
|
199 |
}
|
200 |
|
201 |
-
|
202 |
-
* ACFE Flexible
|
|
|
203 |
*/
|
204 |
function acfe_flexible_render_layout_template($layout, $field){
|
205 |
|
206 |
// Global
|
207 |
-
global $is_preview;
|
|
|
208 |
|
209 |
// Vars
|
210 |
$name = $field['_name'];
|
@@ -296,11 +309,9 @@ function acfe_flexible_render_layout_template($layout, $field){
|
|
296 |
|
297 |
}
|
298 |
|
299 |
-
|
300 |
-
* ACFE Flexible
|
301 |
-
*
|
302 |
-
* @param $layout
|
303 |
-
* @param $field
|
304 |
*/
|
305 |
function acfe_flexible_render_layout_enqueue($layout, $field){
|
306 |
|
@@ -450,8 +461,9 @@ function acfe_flexible_render_layout_enqueue($layout, $field){
|
|
450 |
|
451 |
}
|
452 |
|
453 |
-
|
454 |
-
* Get Field Group from Field
|
|
|
455 |
*/
|
456 |
function acfe_get_field_group_from_field($field){
|
457 |
|
@@ -473,8 +485,8 @@ function acfe_get_field_group_from_field($field){
|
|
473 |
|
474 |
}
|
475 |
|
476 |
-
|
477 |
-
* Is Json
|
478 |
* Source: https://stackoverflow.com/a/6041773
|
479 |
*/
|
480 |
function acfe_is_json($string){
|
@@ -490,7 +502,7 @@ function acfe_is_json($string){
|
|
490 |
}
|
491 |
|
492 |
/*
|
493 |
-
* Array Keys Recursive
|
494 |
*/
|
495 |
function acfe_array_keys_r($array){
|
496 |
|
@@ -510,7 +522,8 @@ function acfe_array_keys_r($array){
|
|
510 |
}
|
511 |
|
512 |
/*
|
513 |
-
* Locate File URL
|
|
|
514 |
* Check if file exists locally and return URL (supports parent/child theme)
|
515 |
*/
|
516 |
function acfe_locate_file_url($filenames){
|
@@ -582,7 +595,8 @@ function acfe_locate_file_url($filenames){
|
|
582 |
}
|
583 |
|
584 |
/*
|
585 |
-
* Locate File Path
|
|
|
586 |
* Based on wp-includes\template.php:653
|
587 |
*/
|
588 |
function acfe_locate_file_path($filenames){
|
@@ -643,7 +657,8 @@ function acfe_locate_file_path($filenames){
|
|
643 |
|
644 |
}
|
645 |
|
646 |
-
|
|
|
647 |
* Convert ABSPATH . '/url' to https://www.domain.com/url
|
648 |
*/
|
649 |
function acfe_get_abs_path_to_url($path = ''){
|
@@ -657,8 +672,9 @@ function acfe_get_abs_path_to_url($path = ''){
|
|
657 |
|
658 |
}
|
659 |
|
660 |
-
|
661 |
-
* Get Roles
|
|
|
662 |
*/
|
663 |
function acfe_get_roles($filtered_user_roles = array()){
|
664 |
|
@@ -696,8 +712,9 @@ function acfe_get_roles($filtered_user_roles = array()){
|
|
696 |
|
697 |
}
|
698 |
|
699 |
-
|
700 |
-
* Get Current Roles
|
|
|
701 |
*/
|
702 |
function acfe_get_current_user_roles(){
|
703 |
|
@@ -715,8 +732,9 @@ function acfe_get_current_user_roles(){
|
|
715 |
|
716 |
}
|
717 |
|
718 |
-
|
719 |
-
* Get
|
|
|
720 |
*/
|
721 |
function acfe_get_post_type_objects($args = array()){
|
722 |
|
@@ -743,8 +761,9 @@ function acfe_get_post_type_objects($args = array()){
|
|
743 |
|
744 |
}
|
745 |
|
746 |
-
|
747 |
-
* Get
|
|
|
748 |
*/
|
749 |
function acfe_get_taxonomy_objects($args = array()){
|
750 |
|
@@ -771,8 +790,9 @@ function acfe_get_taxonomy_objects($args = array()){
|
|
771 |
|
772 |
}
|
773 |
|
774 |
-
|
775 |
-
* Get
|
|
|
776 |
*/
|
777 |
function acfe_get_pretty_post_statuses($posts_statuses = array()){
|
778 |
|
@@ -801,8 +821,9 @@ function acfe_get_pretty_post_statuses($posts_statuses = array()){
|
|
801 |
|
802 |
}
|
803 |
|
804 |
-
|
805 |
-
* Get
|
|
|
806 |
*/
|
807 |
function acfe_get_pretty_forms($forms = array()){
|
808 |
|
@@ -837,8 +858,9 @@ function acfe_get_pretty_forms($forms = array()){
|
|
837 |
|
838 |
}
|
839 |
|
840 |
-
|
841 |
-
*
|
|
|
842 |
*/
|
843 |
function acfe_starts_with($haystack, $needle){
|
844 |
|
@@ -847,8 +869,9 @@ function acfe_starts_with($haystack, $needle){
|
|
847 |
|
848 |
}
|
849 |
|
850 |
-
|
851 |
-
* Ends with
|
|
|
852 |
*/
|
853 |
function acfe_ends_with($haystack, $needle){
|
854 |
|
@@ -861,17 +884,46 @@ function acfe_ends_with($haystack, $needle){
|
|
861 |
|
862 |
}
|
863 |
|
|
|
|
|
|
|
|
|
864 |
function acfe_form_is_admin(){
|
865 |
|
866 |
-
|
867 |
-
return true;
|
868 |
|
869 |
-
return
|
870 |
|
871 |
}
|
872 |
|
|
|
|
|
|
|
|
|
873 |
function acfe_form_is_front(){
|
874 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
875 |
if(!is_admin() || (is_admin() && wp_doing_ajax() && (acf_maybe_get_POST('_acf_screen') === 'acfe_form' || acf_maybe_get_POST('_acf_screen') === 'acf_form')))
|
876 |
return true;
|
877 |
|
@@ -879,6 +931,10 @@ function acfe_form_is_front(){
|
|
879 |
|
880 |
}
|
881 |
|
|
|
|
|
|
|
|
|
882 |
function acfe_form_decrypt_args(){
|
883 |
|
884 |
if(!acf_maybe_get_POST('_acf_form'))
|
@@ -893,6 +949,10 @@ function acfe_form_decrypt_args(){
|
|
893 |
|
894 |
}
|
895 |
|
|
|
|
|
|
|
|
|
896 |
function acfe_is_form_success($form_name = false){
|
897 |
|
898 |
if(!acf_maybe_get_POST('_acf_form'))
|
@@ -910,6 +970,10 @@ function acfe_is_form_success($form_name = false){
|
|
910 |
|
911 |
}
|
912 |
|
|
|
|
|
|
|
|
|
913 |
function acfe_form_is_submitted($form_name = false){
|
914 |
|
915 |
_deprecated_function('ACF Extended - Dynamic Forms: "acfe_form_is_submitted()" function', '0.8.7.5', "acfe_is_form_success()");
|
@@ -918,6 +982,10 @@ function acfe_form_is_submitted($form_name = false){
|
|
918 |
|
919 |
}
|
920 |
|
|
|
|
|
|
|
|
|
921 |
function acfe_form_unique_action_id($form, $type){
|
922 |
|
923 |
$name = $form['name'] . '-' . $type;
|
@@ -941,31 +1009,46 @@ function acfe_form_unique_action_id($form, $type){
|
|
941 |
|
942 |
}
|
943 |
|
|
|
|
|
|
|
|
|
944 |
function acfe_form_get_actions(){
|
945 |
|
946 |
return get_query_var('acfe_form_actions', array());
|
947 |
|
948 |
}
|
949 |
|
950 |
-
|
|
|
|
|
|
|
|
|
951 |
|
952 |
$actions = acfe_form_get_actions();
|
953 |
|
954 |
-
// No
|
955 |
if(empty($actions))
|
956 |
return false;
|
957 |
|
958 |
-
//
|
959 |
-
if(empty($name))
|
960 |
-
return
|
|
|
|
|
|
|
961 |
|
962 |
-
if(
|
963 |
-
return $
|
964 |
|
965 |
-
return
|
966 |
|
967 |
}
|
968 |
|
|
|
|
|
|
|
|
|
969 |
function acfe_array_insert_before($key, array &$array, $new_key, $new_value){
|
970 |
|
971 |
if(!array_key_exists($key, $array))
|
@@ -986,6 +1069,10 @@ function acfe_array_insert_before($key, array &$array, $new_key, $new_value){
|
|
986 |
|
987 |
}
|
988 |
|
|
|
|
|
|
|
|
|
989 |
function acfe_array_insert_after($key, array &$array, $new_key, $new_value){
|
990 |
|
991 |
if(!array_key_exists($key, $array))
|
@@ -1006,6 +1093,10 @@ function acfe_array_insert_after($key, array &$array, $new_key, $new_value){
|
|
1006 |
|
1007 |
}
|
1008 |
|
|
|
|
|
|
|
|
|
1009 |
function acfe_array_move(&$array, $a, $b){
|
1010 |
|
1011 |
$out = array_splice($array, $a, 1);
|
@@ -1013,6 +1104,10 @@ function acfe_array_move(&$array, $a, $b){
|
|
1013 |
|
1014 |
}
|
1015 |
|
|
|
|
|
|
|
|
|
1016 |
function acfe_add_validation_error($selector = '', $message = ''){
|
1017 |
|
1018 |
// General error
|
@@ -1047,7 +1142,9 @@ function acfe_add_validation_error($selector = '', $message = ''){
|
|
1047 |
}
|
1048 |
|
1049 |
/*
|
1050 |
-
*
|
|
|
|
|
1051 |
*/
|
1052 |
function acfe_get_taxonomy_terms_ids($taxonomies = array()){
|
1053 |
|
@@ -1055,17 +1152,17 @@ function acfe_get_taxonomy_terms_ids($taxonomies = array()){
|
|
1055 |
$taxonomies = acf_get_array($taxonomies);
|
1056 |
|
1057 |
// get pretty taxonomy names
|
1058 |
-
$taxonomies =
|
1059 |
|
1060 |
// vars
|
1061 |
$r = array();
|
1062 |
|
1063 |
// populate $r
|
1064 |
-
foreach(
|
1065 |
|
1066 |
// vars
|
1067 |
$label = $taxonomies[$taxonomy];
|
1068 |
-
$is_hierarchical = is_taxonomy_hierarchical(
|
1069 |
|
1070 |
$terms = acf_get_terms(array(
|
1071 |
'taxonomy' => $taxonomy,
|
@@ -1079,7 +1176,7 @@ function acfe_get_taxonomy_terms_ids($taxonomies = array()){
|
|
1079 |
// sort into hierachial order!
|
1080 |
if($is_hierarchical){
|
1081 |
|
1082 |
-
$terms = _get_term_children(
|
1083 |
|
1084 |
}
|
1085 |
|
@@ -1101,6 +1198,10 @@ function acfe_get_taxonomy_terms_ids($taxonomies = array()){
|
|
1101 |
|
1102 |
}
|
1103 |
|
|
|
|
|
|
|
|
|
1104 |
function acfe_get_term_level($term, $taxonomy){
|
1105 |
|
1106 |
$ancestors = get_ancestors($term, $taxonomy);
|
@@ -1109,6 +1210,10 @@ function acfe_get_term_level($term, $taxonomy){
|
|
1109 |
|
1110 |
}
|
1111 |
|
|
|
|
|
|
|
|
|
1112 |
function acfe_number_suffix($num){
|
1113 |
|
1114 |
if(!in_array(($num % 100), array(11,12,13))){
|
@@ -1125,6 +1230,10 @@ function acfe_number_suffix($num){
|
|
1125 |
|
1126 |
}
|
1127 |
|
|
|
|
|
|
|
|
|
1128 |
function acfe_array_to_string($array = array()){
|
1129 |
|
1130 |
if(!is_array($array))
|
@@ -1161,6 +1270,10 @@ function acfe_array_to_string($array = array()){
|
|
1161 |
|
1162 |
}
|
1163 |
|
|
|
|
|
|
|
|
|
1164 |
function acfe_get_acf_screen_id($page = ''){
|
1165 |
|
1166 |
$prefix = sanitize_title( __("Custom Fields", 'acf') );
|
@@ -1172,6 +1285,10 @@ function acfe_get_acf_screen_id($page = ''){
|
|
1172 |
|
1173 |
}
|
1174 |
|
|
|
|
|
|
|
|
|
1175 |
function acfe_is_admin_screen($modules = false){
|
1176 |
|
1177 |
// bail early if not defined
|
@@ -1194,11 +1311,8 @@ function acfe_is_admin_screen($modules = false){
|
|
1194 |
// include ACF Extended Modules?
|
1195 |
if($modules){
|
1196 |
|
1197 |
-
|
1198 |
-
$post_types
|
1199 |
-
$post_types[] = 'acfe-dpt'; // Dynamic Post Type
|
1200 |
-
$post_types[] = 'acfe-dt'; // Dynamic Taxonomy
|
1201 |
-
$post_types[] = 'acfe-form'; // Dynamic Form
|
1202 |
|
1203 |
// Field Group Category
|
1204 |
$field_group_category = $screen->post_type === 'post' && $screen->taxonomy === 'acf-field-group-category';
|
@@ -1212,36 +1326,60 @@ function acfe_is_admin_screen($modules = false){
|
|
1212 |
|
1213 |
}
|
1214 |
|
|
|
|
|
|
|
|
|
1215 |
function acfe_is_dev(){
|
1216 |
|
1217 |
return acf_get_setting('acfe/dev', false) || (defined('ACFE_dev') && ACFE_dev);
|
1218 |
|
1219 |
}
|
1220 |
|
|
|
|
|
|
|
|
|
1221 |
function acfe_is_super_dev(){
|
1222 |
|
1223 |
return acf_get_setting('acfe/super_dev', false) || (defined('ACFE_super_dev') && ACFE_super_dev);
|
1224 |
|
1225 |
}
|
1226 |
|
|
|
|
|
|
|
|
|
1227 |
function acfe_update_setting($name, $value){
|
1228 |
|
1229 |
return acf_update_setting("acfe/{$name}", $value);
|
1230 |
|
1231 |
}
|
1232 |
|
|
|
|
|
|
|
|
|
1233 |
function acfe_append_setting($name, $value){
|
1234 |
|
1235 |
return acf_append_setting("acfe/{$name}", $value);
|
1236 |
|
1237 |
}
|
1238 |
|
|
|
|
|
|
|
|
|
1239 |
function acfe_get_setting($name, $value = null){
|
1240 |
|
1241 |
return acf_get_setting("acfe/{$name}", $value);
|
1242 |
|
1243 |
}
|
1244 |
|
|
|
|
|
|
|
|
|
1245 |
function acfe_get_locations_array($locations){
|
1246 |
|
1247 |
$return = array();
|
@@ -1406,6 +1544,10 @@ function acfe_get_locations_array($locations){
|
|
1406 |
|
1407 |
}
|
1408 |
|
|
|
|
|
|
|
|
|
1409 |
function acfe_render_field_group_locations_html($field_group){
|
1410 |
|
1411 |
foreach($field_group['location'] as $groups){
|
@@ -1430,6 +1572,10 @@ function acfe_render_field_group_locations_html($field_group){
|
|
1430 |
|
1431 |
}
|
1432 |
|
|
|
|
|
|
|
|
|
1433 |
function acfe_unset(&$array, $key){
|
1434 |
|
1435 |
if(isset($array[$key]))
|
@@ -1437,6 +1583,10 @@ function acfe_unset(&$array, $key){
|
|
1437 |
|
1438 |
}
|
1439 |
|
|
|
|
|
|
|
|
|
1440 |
function acfe_unarray($val){
|
1441 |
|
1442 |
if(is_array($val)){
|
@@ -1446,26 +1596,124 @@ function acfe_unarray($val){
|
|
1446 |
return $val;
|
1447 |
}
|
1448 |
|
|
|
|
|
|
|
|
|
|
|
1449 |
function acfe_get_post_id(){
|
1450 |
|
1451 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1452 |
|
1453 |
}
|
1454 |
|
|
|
|
|
|
|
1455 |
function acfe_highlight(){
|
1456 |
|
1457 |
ini_set("highlight.comment", "#555");
|
1458 |
-
/*
|
1459 |
-
ini_set("highlight.keyword", "#0000BB"); // #4B2AFF
|
1460 |
-
ini_set("highlight.default", "#222222");
|
1461 |
-
ini_set("highlight.string", "#777777");
|
1462 |
-
*/
|
1463 |
|
1464 |
static $on = false;
|
1465 |
|
1466 |
-
if
|
|
|
1467 |
ob_start();
|
1468 |
-
|
|
|
|
|
1469 |
$buffer = "<?php\n" . ob_get_contents();
|
1470 |
ob_end_clean();
|
1471 |
$code = highlight_string($buffer, true);
|
@@ -1475,6 +1723,7 @@ function acfe_highlight(){
|
|
1475 |
$code = str_replace("</code>", '', $code);
|
1476 |
|
1477 |
echo '<div class="acfe-pre-highlight">' . $code . '</div>';
|
|
|
1478 |
}
|
1479 |
|
1480 |
$on = !$on;
|
@@ -1482,6 +1731,8 @@ function acfe_highlight(){
|
|
1482 |
}
|
1483 |
|
1484 |
/*
|
|
|
|
|
1485 |
* https://gist.github.com/tripflex/c6518efc1753cf2392559866b4bd1a53
|
1486 |
*/
|
1487 |
function acfe_remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) {
|
@@ -1567,9 +1818,10 @@ function acfe_remove_class_action( $tag, $class_name = '', $method_name = '', $p
|
|
1567 |
}
|
1568 |
|
1569 |
/*
|
1570 |
-
*
|
|
|
1571 |
*/
|
1572 |
-
function acfe_get_fields($post_id = false, $format_value =
|
1573 |
|
1574 |
// vars
|
1575 |
$fields = get_field_objects($post_id, $format_value);
|
@@ -1589,4 +1841,94 @@ function acfe_get_fields($post_id = false, $format_value = true){
|
|
1589 |
// return
|
1590 |
return $meta;
|
1591 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1592 |
}
|
3 |
if(!defined('ABSPATH'))
|
4 |
exit;
|
5 |
|
6 |
+
/*
|
7 |
+
* ACFE: Get Flexible
|
8 |
+
* Helper for the Flexible Content: Dynamic Render
|
9 |
*/
|
10 |
if(!function_exists('get_flexible')){
|
11 |
|
69 |
|
70 |
}
|
71 |
|
72 |
+
/*
|
73 |
+
* ACFE: The Flexible
|
74 |
+
* Helper for the Flexible Content: Dynamic Render
|
75 |
*/
|
76 |
if(!function_exists('the_flexible')){
|
77 |
|
83 |
|
84 |
}
|
85 |
|
86 |
+
/*
|
87 |
+
* ACFE: Has Flexible
|
88 |
+
* Helper for the Flexible Content: Dynamic Render
|
89 |
*/
|
90 |
if(!function_exists('has_flexible')){
|
91 |
|
97 |
|
98 |
}
|
99 |
|
100 |
+
/*
|
101 |
+
* ACFE: Have Settings
|
102 |
+
* While() loop function for the Flexible Content: Settings Modal feature
|
103 |
*/
|
104 |
if(!function_exists('have_settings')){
|
105 |
|
111 |
|
112 |
}
|
113 |
|
114 |
+
/*
|
115 |
+
* ACFE: The Setting
|
116 |
+
* Setup data for the Flexible Content: Settings Modal loop
|
117 |
*/
|
118 |
if(!function_exists('the_setting')){
|
119 |
|
125 |
|
126 |
}
|
127 |
|
128 |
+
/*
|
129 |
+
* ACFE: Have Archive
|
130 |
+
* While() loop function for the Dynamic Post Type: Archive Page feature
|
131 |
*/
|
132 |
if(!function_exists('have_archive')){
|
133 |
|
171 |
|
172 |
}
|
173 |
|
174 |
+
/*
|
175 |
+
* ACFE: The Archive
|
176 |
+
* Setup data for the Dynamic Post Type: Archive Page feature
|
177 |
*/
|
178 |
if(!function_exists('the_archive')){
|
179 |
|
189 |
|
190 |
}
|
191 |
|
192 |
+
/*
|
193 |
+
* ACFE: The Archive Post ID
|
194 |
+
* Dynamic Post Type: Archive Page helper
|
195 |
+
*/
|
196 |
function acfe_the_archive_post_id($null, $post_id){
|
197 |
|
198 |
if($post_id !== false)
|
209 |
|
210 |
}
|
211 |
|
212 |
+
/*
|
213 |
+
* ACFE: Flexible Render Layout Template
|
214 |
+
* Find & include the Flexible Content Layouts PHP files
|
215 |
*/
|
216 |
function acfe_flexible_render_layout_template($layout, $field){
|
217 |
|
218 |
// Global
|
219 |
+
global $is_preview, $col;
|
220 |
+
$col = false;
|
221 |
|
222 |
// Vars
|
223 |
$name = $field['_name'];
|
309 |
|
310 |
}
|
311 |
|
312 |
+
/*
|
313 |
+
* ACFE: Flexible Render Layout Enqueue
|
314 |
+
* Find & Enqueue Scripts & Styles files for the Flexible Content
|
|
|
|
|
315 |
*/
|
316 |
function acfe_flexible_render_layout_enqueue($layout, $field){
|
317 |
|
461 |
|
462 |
}
|
463 |
|
464 |
+
/*
|
465 |
+
* ACFE: Get Field Group from Field
|
466 |
+
* Retrieve the Field Group, starting from any field or sub field
|
467 |
*/
|
468 |
function acfe_get_field_group_from_field($field){
|
469 |
|
485 |
|
486 |
}
|
487 |
|
488 |
+
/*
|
489 |
+
* ACFE: Is Json
|
490 |
* Source: https://stackoverflow.com/a/6041773
|
491 |
*/
|
492 |
function acfe_is_json($string){
|
502 |
}
|
503 |
|
504 |
/*
|
505 |
+
* ACFE: Array Keys Recursive
|
506 |
*/
|
507 |
function acfe_array_keys_r($array){
|
508 |
|
522 |
}
|
523 |
|
524 |
/*
|
525 |
+
* ACFE: Locate File URL
|
526 |
+
* Similar to locate_template(), but locate File URL instead
|
527 |
* Check if file exists locally and return URL (supports parent/child theme)
|
528 |
*/
|
529 |
function acfe_locate_file_url($filenames){
|
595 |
}
|
596 |
|
597 |
/*
|
598 |
+
* ACFE: Locate File Path
|
599 |
+
* Similar to locate_template(), but locate File Path instead
|
600 |
* Based on wp-includes\template.php:653
|
601 |
*/
|
602 |
function acfe_locate_file_path($filenames){
|
657 |
|
658 |
}
|
659 |
|
660 |
+
/*
|
661 |
+
* ACFE: Get Absolute Path to URL
|
662 |
* Convert ABSPATH . '/url' to https://www.domain.com/url
|
663 |
*/
|
664 |
function acfe_get_abs_path_to_url($path = ''){
|
672 |
|
673 |
}
|
674 |
|
675 |
+
/*
|
676 |
+
* ACFE: Get Roles
|
677 |
+
* Retrieve all available roles (working with WPMU)
|
678 |
*/
|
679 |
function acfe_get_roles($filtered_user_roles = array()){
|
680 |
|
712 |
|
713 |
}
|
714 |
|
715 |
+
/*
|
716 |
+
* ACFE: Get Current User Roles
|
717 |
+
* Retrieve currently logged user roles
|
718 |
*/
|
719 |
function acfe_get_current_user_roles(){
|
720 |
|
732 |
|
733 |
}
|
734 |
|
735 |
+
/*
|
736 |
+
* ACFE: Get Post Types Objects
|
737 |
+
* Query & retrieve post types objects
|
738 |
*/
|
739 |
function acfe_get_post_type_objects($args = array()){
|
740 |
|
761 |
|
762 |
}
|
763 |
|
764 |
+
/*
|
765 |
+
* ACFE: Get Taxonomy Objects
|
766 |
+
* Query & retrieve taxonomies objects
|
767 |
*/
|
768 |
function acfe_get_taxonomy_objects($args = array()){
|
769 |
|
790 |
|
791 |
}
|
792 |
|
793 |
+
/*
|
794 |
+
* ACFE: Get Pretty Post Statuses
|
795 |
+
* Similar to acf_get_pretty_post_types() but for Post Statuses
|
796 |
*/
|
797 |
function acfe_get_pretty_post_statuses($posts_statuses = array()){
|
798 |
|
821 |
|
822 |
}
|
823 |
|
824 |
+
/*
|
825 |
+
* ACFE: Get Pretty Forms
|
826 |
+
* Similar to acf_get_pretty_post_types() but for ACFE Forms
|
827 |
*/
|
828 |
function acfe_get_pretty_forms($forms = array()){
|
829 |
|
858 |
|
859 |
}
|
860 |
|
861 |
+
/*
|
862 |
+
* ACFE: Ends with
|
863 |
+
* Check if a strings starts with something
|
864 |
*/
|
865 |
function acfe_starts_with($haystack, $needle){
|
866 |
|
869 |
|
870 |
}
|
871 |
|
872 |
+
/*
|
873 |
+
* ACFE: Ends with
|
874 |
+
* Check if a strings ends with something
|
875 |
*/
|
876 |
function acfe_ends_with($haystack, $needle){
|
877 |
|
884 |
|
885 |
}
|
886 |
|
887 |
+
/*
|
888 |
+
* ACFE: Form Is Admin
|
889 |
+
* Legacy way to check if current screen is back-end
|
890 |
+
*/
|
891 |
function acfe_form_is_admin(){
|
892 |
|
893 |
+
_deprecated_function('ACF Extended: acfe_form_is_admin()', '0.8.8', "acfe_is_admin()");
|
|
|
894 |
|
895 |
+
return acfe_is_admin();
|
896 |
|
897 |
}
|
898 |
|
899 |
+
/*
|
900 |
+
* ACFE: Form Is Front
|
901 |
+
* Legacy way to check if current screen is front-end
|
902 |
+
*/
|
903 |
function acfe_form_is_front(){
|
904 |
|
905 |
+
_deprecated_function('ACF Extended: acfe_form_is_front()', '0.8.8', "acfe_is_front()");
|
906 |
+
|
907 |
+
return acfe_is_front();
|
908 |
+
|
909 |
+
}
|
910 |
+
|
911 |
+
/*
|
912 |
+
* ACFE: Is Front
|
913 |
+
* Check if current screen is back-end
|
914 |
+
*/
|
915 |
+
function acfe_is_admin(){
|
916 |
+
|
917 |
+
return !acfe_is_front();
|
918 |
+
|
919 |
+
}
|
920 |
+
|
921 |
+
/*
|
922 |
+
* ACFE: Is Front
|
923 |
+
* Check if current screen is front-end
|
924 |
+
*/
|
925 |
+
function acfe_is_front(){
|
926 |
+
|
927 |
if(!is_admin() || (is_admin() && wp_doing_ajax() && (acf_maybe_get_POST('_acf_screen') === 'acfe_form' || acf_maybe_get_POST('_acf_screen') === 'acf_form')))
|
928 |
return true;
|
929 |
|
931 |
|
932 |
}
|
933 |
|
934 |
+
/*
|
935 |
+
* ACFE: Form Decrypt Args
|
936 |
+
* Wrapper to decrypt ACF & ACFE Forms arguments
|
937 |
+
*/
|
938 |
function acfe_form_decrypt_args(){
|
939 |
|
940 |
if(!acf_maybe_get_POST('_acf_form'))
|
949 |
|
950 |
}
|
951 |
|
952 |
+
/*
|
953 |
+
* ACFE: is Form Success
|
954 |
+
* Check if the current page is a success form page
|
955 |
+
*/
|
956 |
function acfe_is_form_success($form_name = false){
|
957 |
|
958 |
if(!acf_maybe_get_POST('_acf_form'))
|
970 |
|
971 |
}
|
972 |
|
973 |
+
/*
|
974 |
+
* ACFE: Form is submitted
|
975 |
+
* Legacy way to check if the current page is a success form page
|
976 |
+
*/
|
977 |
function acfe_form_is_submitted($form_name = false){
|
978 |
|
979 |
_deprecated_function('ACF Extended - Dynamic Forms: "acfe_form_is_submitted()" function', '0.8.7.5', "acfe_is_form_success()");
|
982 |
|
983 |
}
|
984 |
|
985 |
+
/*
|
986 |
+
* ACFE: Form Unique Action ID
|
987 |
+
* Legacy way to make actions names unique
|
988 |
+
*/
|
989 |
function acfe_form_unique_action_id($form, $type){
|
990 |
|
991 |
$name = $form['name'] . '-' . $type;
|
1009 |
|
1010 |
}
|
1011 |
|
1012 |
+
/*
|
1013 |
+
* ACFE: Form Get Actions
|
1014 |
+
* Retrieve all actions output
|
1015 |
+
*/
|
1016 |
function acfe_form_get_actions(){
|
1017 |
|
1018 |
return get_query_var('acfe_form_actions', array());
|
1019 |
|
1020 |
}
|
1021 |
|
1022 |
+
/*
|
1023 |
+
* ACFE: Form Get Action
|
1024 |
+
* Retrieve the latest action output
|
1025 |
+
*/
|
1026 |
+
function acfe_form_get_action($name = false, $key = false){
|
1027 |
|
1028 |
$actions = acfe_form_get_actions();
|
1029 |
|
1030 |
+
// No action
|
1031 |
if(empty($actions))
|
1032 |
return false;
|
1033 |
|
1034 |
+
// Action name
|
1035 |
+
if(!empty($name)){
|
1036 |
+
$return = acf_maybe_get($actions, $name, false);
|
1037 |
+
}else{
|
1038 |
+
$return = end($actions);
|
1039 |
+
}
|
1040 |
|
1041 |
+
if($key !== false || is_numeric($key))
|
1042 |
+
$return = acf_maybe_get($return, $key, false);
|
1043 |
|
1044 |
+
return $return;
|
1045 |
|
1046 |
}
|
1047 |
|
1048 |
+
/*
|
1049 |
+
* ACFE: Array Insert Before
|
1050 |
+
* Insert data before a specific array key
|
1051 |
+
*/
|
1052 |
function acfe_array_insert_before($key, array &$array, $new_key, $new_value){
|
1053 |
|
1054 |
if(!array_key_exists($key, $array))
|
1069 |
|
1070 |
}
|
1071 |
|
1072 |
+
/*
|
1073 |
+
* ACFE: Array Insert After
|
1074 |
+
* Insert data after a specific array key
|
1075 |
+
*/
|
1076 |
function acfe_array_insert_after($key, array &$array, $new_key, $new_value){
|
1077 |
|
1078 |
if(!array_key_exists($key, $array))
|
1093 |
|
1094 |
}
|
1095 |
|
1096 |
+
/*
|
1097 |
+
* ACFE: Array move
|
1098 |
+
* Move the array key from position $a to $b
|
1099 |
+
*/
|
1100 |
function acfe_array_move(&$array, $a, $b){
|
1101 |
|
1102 |
$out = array_splice($array, $a, 1);
|
1104 |
|
1105 |
}
|
1106 |
|
1107 |
+
/*
|
1108 |
+
* ACFE: Add Validation Error
|
1109 |
+
* Similar to acf_add_validation_error() but allows to use field name or field key
|
1110 |
+
*/
|
1111 |
function acfe_add_validation_error($selector = '', $message = ''){
|
1112 |
|
1113 |
// General error
|
1142 |
}
|
1143 |
|
1144 |
/*
|
1145 |
+
* ACFE: Get Taxonomy Terms IDs
|
1146 |
+
* Similar to acf_get_taxonomy_terms()
|
1147 |
+
* Returns "array('256' => 'Category name')" instead of "array('category:category_name' => 'Category name')"
|
1148 |
*/
|
1149 |
function acfe_get_taxonomy_terms_ids($taxonomies = array()){
|
1150 |
|
1152 |
$taxonomies = acf_get_array($taxonomies);
|
1153 |
|
1154 |
// get pretty taxonomy names
|
1155 |
+
$taxonomies = acf_get_taxonomy_labels($taxonomies);
|
1156 |
|
1157 |
// vars
|
1158 |
$r = array();
|
1159 |
|
1160 |
// populate $r
|
1161 |
+
foreach(array_keys($taxonomies) as $taxonomy){
|
1162 |
|
1163 |
// vars
|
1164 |
$label = $taxonomies[$taxonomy];
|
1165 |
+
$is_hierarchical = is_taxonomy_hierarchical($taxonomy);
|
1166 |
|
1167 |
$terms = acf_get_terms(array(
|
1168 |
'taxonomy' => $taxonomy,
|
1176 |
// sort into hierachial order!
|
1177 |
if($is_hierarchical){
|
1178 |
|
1179 |
+
$terms = _get_term_children(0, $terms, $taxonomy);
|
1180 |
|
1181 |
}
|
1182 |
|
1198 |
|
1199 |
}
|
1200 |
|
1201 |
+
/*
|
1202 |
+
* ACFE: Get Term Level
|
1203 |
+
* Retrive the Term Level number
|
1204 |
+
*/
|
1205 |
function acfe_get_term_level($term, $taxonomy){
|
1206 |
|
1207 |
$ancestors = get_ancestors($term, $taxonomy);
|
1210 |
|
1211 |
}
|
1212 |
|
1213 |
+
/*
|
1214 |
+
* ACFE: Numer Suffix
|
1215 |
+
* Adds 1"st", 2"nd", 3"rd" to number
|
1216 |
+
*/
|
1217 |
function acfe_number_suffix($num){
|
1218 |
|
1219 |
if(!in_array(($num % 100), array(11,12,13))){
|
1230 |
|
1231 |
}
|
1232 |
|
1233 |
+
/*
|
1234 |
+
* ACFE: Array to String
|
1235 |
+
* Convert an array to string
|
1236 |
+
*/
|
1237 |
function acfe_array_to_string($array = array()){
|
1238 |
|
1239 |
if(!is_array($array))
|
1270 |
|
1271 |
}
|
1272 |
|
1273 |
+
/*
|
1274 |
+
* ACFE: Get ACF Screen ID
|
1275 |
+
* Legacy way to check if the current admin screen is ACF Field Group UI, ACF Tools, ACF Updates screens etc...
|
1276 |
+
*/
|
1277 |
function acfe_get_acf_screen_id($page = ''){
|
1278 |
|
1279 |
$prefix = sanitize_title( __("Custom Fields", 'acf') );
|
1285 |
|
1286 |
}
|
1287 |
|
1288 |
+
/*
|
1289 |
+
* ACFE: Is Admin Screen
|
1290 |
+
* Check if the current admin screen is ACF Field Group UI, ACF tools, ACF Updates screens etc...
|
1291 |
+
*/
|
1292 |
function acfe_is_admin_screen($modules = false){
|
1293 |
|
1294 |
// bail early if not defined
|
1311 |
// include ACF Extended Modules?
|
1312 |
if($modules){
|
1313 |
|
1314 |
+
// Reserved
|
1315 |
+
$post_types = array_merge($post_types, acfe_get_setting('reserved_post_types', array()));
|
|
|
|
|
|
|
1316 |
|
1317 |
// Field Group Category
|
1318 |
$field_group_category = $screen->post_type === 'post' && $screen->taxonomy === 'acf-field-group-category';
|
1326 |
|
1327 |
}
|
1328 |
|
1329 |
+
/*
|
1330 |
+
* ACFE: Is Dev
|
1331 |
+
* Check if the developer mode is enabled
|
1332 |
+
*/
|
1333 |
function acfe_is_dev(){
|
1334 |
|
1335 |
return acf_get_setting('acfe/dev', false) || (defined('ACFE_dev') && ACFE_dev);
|
1336 |
|
1337 |
}
|
1338 |
|
1339 |
+
/*
|
1340 |
+
* ACFE: Is Super Dev
|
1341 |
+
* Only for awesome developers!
|
1342 |
+
*/
|
1343 |
function acfe_is_super_dev(){
|
1344 |
|
1345 |
return acf_get_setting('acfe/super_dev', false) || (defined('ACFE_super_dev') && ACFE_super_dev);
|
1346 |
|
1347 |
}
|
1348 |
|
1349 |
+
/*
|
1350 |
+
* ACFE: Update Setting
|
1351 |
+
* Similar to acf_update_setting() but with the 'acfe' prefix
|
1352 |
+
*/
|
1353 |
function acfe_update_setting($name, $value){
|
1354 |
|
1355 |
return acf_update_setting("acfe/{$name}", $value);
|
1356 |
|
1357 |
}
|
1358 |
|
1359 |
+
/*
|
1360 |
+
* ACFE: Append Setting
|
1361 |
+
* Similar to acf_append_setting() but with the 'acfe' prefix
|
1362 |
+
*/
|
1363 |
function acfe_append_setting($name, $value){
|
1364 |
|
1365 |
return acf_append_setting("acfe/{$name}", $value);
|
1366 |
|
1367 |
}
|
1368 |
|
1369 |
+
/*
|
1370 |
+
* ACFE: Get Setting
|
1371 |
+
* Similar to acf_get_setting() but with the 'acfe' prefix
|
1372 |
+
*/
|
1373 |
function acfe_get_setting($name, $value = null){
|
1374 |
|
1375 |
return acf_get_setting("acfe/{$name}", $value);
|
1376 |
|
1377 |
}
|
1378 |
|
1379 |
+
/*
|
1380 |
+
* ACFE: Get Locations Array
|
1381 |
+
* Legacy way to retrieve Field Groups Locations data in ACF 5.8 versions
|
1382 |
+
*/
|
1383 |
function acfe_get_locations_array($locations){
|
1384 |
|
1385 |
$return = array();
|
1544 |
|
1545 |
}
|
1546 |
|
1547 |
+
/*
|
1548 |
+
* ACFE: Render Field Group Locations HTML
|
1549 |
+
* Legacy way to display Field Groups Locations in ACF 5.8 versions
|
1550 |
+
*/
|
1551 |
function acfe_render_field_group_locations_html($field_group){
|
1552 |
|
1553 |
foreach($field_group['location'] as $groups){
|
1572 |
|
1573 |
}
|
1574 |
|
1575 |
+
/*
|
1576 |
+
* ACFE: Unset
|
1577 |
+
* Safely remove an array key
|
1578 |
+
*/
|
1579 |
function acfe_unset(&$array, $key){
|
1580 |
|
1581 |
if(isset($array[$key]))
|
1583 |
|
1584 |
}
|
1585 |
|
1586 |
+
/*
|
1587 |
+
* ACFE: Unarray
|
1588 |
+
* Retrieve and return only the first value of an array
|
1589 |
+
*/
|
1590 |
function acfe_unarray($val){
|
1591 |
|
1592 |
if(is_array($val)){
|
1596 |
return $val;
|
1597 |
}
|
1598 |
|
1599 |
+
/*
|
1600 |
+
* ACFE: Get Post ID
|
1601 |
+
* Universal way to always retrieve the correct ACF Post ID on front-end and back-end
|
1602 |
+
* Return ACF formatted Post ID. ie: 12|term_24|user_56|my-options
|
1603 |
+
*/
|
1604 |
function acfe_get_post_id(){
|
1605 |
|
1606 |
+
// Admin
|
1607 |
+
if(acfe_is_admin()){
|
1608 |
+
|
1609 |
+
// Legacy ACF method
|
1610 |
+
$post_id = acf_get_valid_post_id();
|
1611 |
+
|
1612 |
+
// Check Local Meta
|
1613 |
+
$local_meta = acf_get_instance('ACF_Local_Meta')->meta;
|
1614 |
+
$local_post_id = array();
|
1615 |
+
|
1616 |
+
if(!empty($local_meta)){
|
1617 |
+
$local_post_id = array_keys($local_meta);
|
1618 |
+
}
|
1619 |
+
|
1620 |
+
$exclude = apply_filters('acfe/get_post_id', $local_post_id);
|
1621 |
+
|
1622 |
+
if(in_array($post_id, $exclude))
|
1623 |
+
$post_id = false;
|
1624 |
+
|
1625 |
+
if($post_id)
|
1626 |
+
return $post_id;
|
1627 |
+
|
1628 |
+
// ACF Form Data
|
1629 |
+
$post_id = acf_get_form_data('post_id');
|
1630 |
+
|
1631 |
+
// $_POST['_acf_post_id']
|
1632 |
+
if(!$post_id){
|
1633 |
+
$post_id = acf_maybe_get_POST('_acf_post_id');
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
// $_REQUEST['post']
|
1637 |
+
if(!$post_id){
|
1638 |
+
$post_id = isset($_REQUEST['post']) ? absint($_REQUEST['post']) : 0;
|
1639 |
+
}
|
1640 |
+
|
1641 |
+
// $_REQUEST['user_id']
|
1642 |
+
if(!$post_id){
|
1643 |
+
$post_id = isset($_REQUEST['user_id']) ? 'user_' . absint($_REQUEST['user_id']) : 0;
|
1644 |
+
}
|
1645 |
+
|
1646 |
+
// $_REQUEST['tag_ID']
|
1647 |
+
if(!$post_id){
|
1648 |
+
$post_id = isset($_REQUEST['tag_ID']) ? 'term_' . absint($_REQUEST['tag_ID']) : 0;
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
// Default
|
1652 |
+
if(!$post_id){
|
1653 |
+
$post_id = 0;
|
1654 |
+
}
|
1655 |
+
|
1656 |
+
|
1657 |
+
// Front
|
1658 |
+
}else{
|
1659 |
+
|
1660 |
+
// vars
|
1661 |
+
$object = get_queried_object();
|
1662 |
+
$post_id = 0;
|
1663 |
+
|
1664 |
+
if(is_object($object)){
|
1665 |
+
|
1666 |
+
// Post
|
1667 |
+
if(isset($object->post_type, $object->ID)){
|
1668 |
+
|
1669 |
+
$post_id = $object->ID;
|
1670 |
+
|
1671 |
+
// Post Type Archive
|
1672 |
+
}elseif(isset($object->hierarchical, $object->name, $object->acfe_admin_archive)){
|
1673 |
+
|
1674 |
+
// Validate with ACF filter (for multilang)
|
1675 |
+
$post_id = acf_get_valid_post_id($object->name . '_archive');
|
1676 |
+
|
1677 |
+
// User
|
1678 |
+
}elseif(isset($object->roles, $object->ID)){
|
1679 |
+
|
1680 |
+
$post_id = 'user_' . $object->ID;
|
1681 |
+
|
1682 |
+
// Term
|
1683 |
+
}elseif(isset($object->taxonomy, $object->term_id)){
|
1684 |
+
|
1685 |
+
$post_id = 'term_' . $object->term_id;
|
1686 |
+
|
1687 |
+
// Comment
|
1688 |
+
}elseif(isset($object->comment_ID)){
|
1689 |
+
|
1690 |
+
$post_id = 'comment_' . $object->comment_ID;
|
1691 |
+
|
1692 |
+
}
|
1693 |
+
|
1694 |
+
}
|
1695 |
+
|
1696 |
+
}
|
1697 |
+
|
1698 |
+
return $post_id;
|
1699 |
|
1700 |
}
|
1701 |
|
1702 |
+
/*
|
1703 |
+
* ACFE: Highlight Code
|
1704 |
+
*/
|
1705 |
function acfe_highlight(){
|
1706 |
|
1707 |
ini_set("highlight.comment", "#555");
|
|
|
|
|
|
|
|
|
|
|
1708 |
|
1709 |
static $on = false;
|
1710 |
|
1711 |
+
if(!$on){
|
1712 |
+
|
1713 |
ob_start();
|
1714 |
+
|
1715 |
+
}else{
|
1716 |
+
|
1717 |
$buffer = "<?php\n" . ob_get_contents();
|
1718 |
ob_end_clean();
|
1719 |
$code = highlight_string($buffer, true);
|
1723 |
$code = str_replace("</code>", '', $code);
|
1724 |
|
1725 |
echo '<div class="acfe-pre-highlight">' . $code . '</div>';
|
1726 |
+
|
1727 |
}
|
1728 |
|
1729 |
$on = !$on;
|
1731 |
}
|
1732 |
|
1733 |
/*
|
1734 |
+
* ACFE: Remove Class Filter
|
1735 |
+
* Remove hook from inaccessible PHP class
|
1736 |
* https://gist.github.com/tripflex/c6518efc1753cf2392559866b4bd1a53
|
1737 |
*/
|
1738 |
function acfe_remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) {
|
1818 |
}
|
1819 |
|
1820 |
/*
|
1821 |
+
* ACFE: Get Fields
|
1822 |
+
* Similar to get_fields() but with field keys only. Useful to inject & preload values
|
1823 |
*/
|
1824 |
+
function acfe_get_fields($post_id = false, $format_value = false){
|
1825 |
|
1826 |
// vars
|
1827 |
$fields = get_field_objects($post_id, $format_value);
|
1841 |
// return
|
1842 |
return $meta;
|
1843 |
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
/*
|
1847 |
+
* ACFE: Is Dynamic Preview
|
1848 |
+
* Check if currently in ACFE FlexibleContent Preview or ACF Block Type Preview
|
1849 |
+
*/
|
1850 |
+
function acfe_is_dynamic_preview(){
|
1851 |
+
|
1852 |
+
global $is_preview;
|
1853 |
+
|
1854 |
+
// Flexible Content
|
1855 |
+
if(isset($is_preview) && $is_preview){
|
1856 |
+
|
1857 |
+
return true;
|
1858 |
+
|
1859 |
+
// Block Type
|
1860 |
+
}elseif(wp_doing_ajax() && acf_maybe_get_POST('query')){
|
1861 |
+
|
1862 |
+
$query = acf_maybe_get_POST('query');
|
1863 |
+
|
1864 |
+
if(acf_maybe_get($query, 'preview'))
|
1865 |
+
return true;
|
1866 |
+
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
return false;
|
1870 |
+
|
1871 |
+
}
|
1872 |
+
|
1873 |
+
/*
|
1874 |
+
* ACFE: Maybe Get
|
1875 |
+
* Similar to acf_maybe_get() but also works with OBJECTS
|
1876 |
+
*/
|
1877 |
+
function acfe_maybe_get($array = array(), $key = 0, $default = null){
|
1878 |
+
|
1879 |
+
if(is_object($array)){
|
1880 |
+
return isset($array->{$key}) ? $array->{$key} : $default;
|
1881 |
+
}
|
1882 |
+
|
1883 |
+
return acf_maybe_get($array, $key, $default);
|
1884 |
+
|
1885 |
+
}
|
1886 |
+
|
1887 |
+
/*
|
1888 |
+
* ACF: Maybe Get REQUEST
|
1889 |
+
* Similar to acf_maybe_get_POST() but works with $_REQUEST
|
1890 |
+
*/
|
1891 |
+
function acfe_maybe_get_REQUEST($key = '', $default = null){
|
1892 |
+
|
1893 |
+
return isset($_REQUEST[$key]) ? $_REQUEST[$key] : $default;
|
1894 |
+
|
1895 |
+
}
|
1896 |
+
|
1897 |
+
/*
|
1898 |
+
* ACFE: Extract Sub Field form Layout & Set Value
|
1899 |
+
*/
|
1900 |
+
function acfe_extract_sub_field(&$layout, $name, $value){
|
1901 |
+
|
1902 |
+
$sub_field = false;
|
1903 |
+
|
1904 |
+
// loop
|
1905 |
+
foreach($layout['sub_fields'] as $k => $row){
|
1906 |
+
|
1907 |
+
if($row['name'] !== $name)
|
1908 |
+
continue;
|
1909 |
+
|
1910 |
+
$sub_field = acf_extract_var($layout['sub_fields'], $k);
|
1911 |
+
break;
|
1912 |
+
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
if(!$sub_field)
|
1916 |
+
return false;
|
1917 |
+
|
1918 |
+
// Reset keys
|
1919 |
+
$layout['sub_fields'] = array_values($layout['sub_fields']);
|
1920 |
+
|
1921 |
+
// Add value
|
1922 |
+
if(isset($value[$sub_field['key']])){
|
1923 |
+
|
1924 |
+
$sub_field['value'] = $value[$sub_field['key']];
|
1925 |
+
|
1926 |
+
}elseif(isset($sub_field['default_value'])){
|
1927 |
+
|
1928 |
+
$sub_field['value'] = $sub_field['default_value'];
|
1929 |
+
|
1930 |
+
}
|
1931 |
+
|
1932 |
+
return $sub_field;
|
1933 |
+
|
1934 |
}
|
@@ -11,25 +11,263 @@ class acfe_hooks{
|
|
11 |
|
12 |
function __construct(){
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
// Field Groups
|
15 |
add_filter('acf/load_field_groups', array($this, 'load_field_groups'), 100);
|
16 |
add_filter('acf/pre_render_fields', array($this, 'pre_render_fields'), 10, 2);
|
17 |
add_action('acf/render_fields', array($this, 'render_fields'), 10, 2);
|
18 |
|
19 |
-
acf_add_filter_variations('acfe/prepare_field_group', array('ID', 'key'), 0);
|
20 |
-
acf_add_action_variations('acfe/pre_render_field_group', array('ID', 'key'), 0);
|
21 |
-
acf_add_action_variations('acfe/render_field_group', array('ID', 'key'), 0);
|
22 |
-
|
23 |
// Fields
|
24 |
add_filter('acf/field_wrapper_attributes', array($this, 'field_wrapper_attributes'), 10, 2);
|
25 |
add_filter('acf/load_fields', array($this, 'load_fields'), 10, 2);
|
26 |
add_filter('acf/load_field', array($this, 'load_field'));
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
}
|
35 |
|
@@ -37,13 +275,16 @@ class acfe_hooks{
|
|
37 |
* Load Field Groups
|
38 |
*/
|
39 |
function load_field_groups($field_groups){
|
40 |
-
|
|
|
41 |
if(acfe_is_admin_screen())
|
42 |
return $field_groups;
|
43 |
|
44 |
foreach($field_groups as $i => &$field_group){
|
45 |
|
46 |
-
$field_group = apply_filters(
|
|
|
|
|
47 |
|
48 |
// Do not render if false
|
49 |
if($field_group === false){
|
@@ -78,7 +319,9 @@ class acfe_hooks{
|
|
78 |
|
79 |
$this->field_group = $field_group;
|
80 |
|
81 |
-
do_action(
|
|
|
|
|
82 |
|
83 |
return $fields;
|
84 |
|
@@ -92,7 +335,11 @@ class acfe_hooks{
|
|
92 |
if(empty($this->field_group))
|
93 |
return;
|
94 |
|
95 |
-
|
|
|
|
|
|
|
|
|
96 |
|
97 |
}
|
98 |
|
@@ -101,7 +348,10 @@ class acfe_hooks{
|
|
101 |
*/
|
102 |
function field_wrapper_attributes($wrapper, $field){
|
103 |
|
104 |
-
$wrapper = apply_filters(
|
|
|
|
|
|
|
105 |
|
106 |
return $wrapper;
|
107 |
|
@@ -116,7 +366,10 @@ class acfe_hooks{
|
|
116 |
if(!acf_maybe_get($parent, 'type'))
|
117 |
return $fields;
|
118 |
|
119 |
-
$fields = apply_filters(
|
|
|
|
|
|
|
120 |
|
121 |
return $fields;
|
122 |
|
@@ -126,24 +379,35 @@ class acfe_hooks{
|
|
126 |
* Load Field
|
127 |
*/
|
128 |
function load_field($field){
|
129 |
-
|
|
|
130 |
if(acfe_is_admin_screen())
|
131 |
return $field;
|
132 |
|
133 |
-
//
|
134 |
-
$field = apply_filters(
|
|
|
|
|
|
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
|
|
140 |
|
141 |
}
|
142 |
|
143 |
-
// Front
|
144 |
-
|
145 |
-
|
146 |
-
$field =
|
|
|
|
|
|
|
147 |
|
148 |
}
|
149 |
|
@@ -151,6 +415,27 @@ class acfe_hooks{
|
|
151 |
|
152 |
}
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
}
|
155 |
|
156 |
new acfe_hooks();
|
11 |
|
12 |
function __construct(){
|
13 |
|
14 |
+
// General
|
15 |
+
add_action('acf/save_post', array($this, 'pre_save_post'), 9);
|
16 |
+
add_action('acf/save_post', array($this, 'save_post'), 15);
|
17 |
+
add_action('acf/validate_save_post', array($this, 'validate_save_post'));
|
18 |
+
|
19 |
// Field Groups
|
20 |
add_filter('acf/load_field_groups', array($this, 'load_field_groups'), 100);
|
21 |
add_filter('acf/pre_render_fields', array($this, 'pre_render_fields'), 10, 2);
|
22 |
add_action('acf/render_fields', array($this, 'render_fields'), 10, 2);
|
23 |
|
|
|
|
|
|
|
|
|
24 |
// Fields
|
25 |
add_filter('acf/field_wrapper_attributes', array($this, 'field_wrapper_attributes'), 10, 2);
|
26 |
add_filter('acf/load_fields', array($this, 'load_fields'), 10, 2);
|
27 |
add_filter('acf/load_field', array($this, 'load_field'));
|
28 |
|
29 |
+
// Options Page
|
30 |
+
add_action('acf/input/form_data', array($this, 'form_data'));
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
function pre_save_post($post_id = 0){
|
35 |
+
|
36 |
+
$this->do_save_post($post_id, true);
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
function save_post($post_id = 0){
|
41 |
+
|
42 |
+
$this->do_save_post($post_id);
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
function do_save_post($post_id = 0, $pre = false){
|
47 |
+
|
48 |
+
// Validate acf
|
49 |
+
if(!acf_maybe_get_POST('acf'))
|
50 |
+
return false;
|
51 |
+
|
52 |
+
//vars
|
53 |
+
$data = $this->decode_object($post_id);
|
54 |
+
|
55 |
+
if(!$data)
|
56 |
+
return false;
|
57 |
+
|
58 |
+
$id = $data['id'];
|
59 |
+
$type = $data['type'];
|
60 |
+
$object = $data['object'];
|
61 |
+
$hooks = $data['hooks'];
|
62 |
+
$suffix = $pre ? 'pre_' : false;
|
63 |
+
|
64 |
+
// Setup Meta
|
65 |
+
acf_setup_meta($_POST['acf'], 'acfe/save', true);
|
66 |
+
|
67 |
+
do_action("acfe/{$suffix}save", $post_id, $object);
|
68 |
+
do_action("acfe/{$suffix}save/id={$post_id}", $post_id, $object);
|
69 |
+
|
70 |
+
do_action("acfe/{$suffix}save_{$type}", $post_id, $object);
|
71 |
+
|
72 |
+
foreach($hooks as $hook){
|
73 |
+
do_action("acfe/{$suffix}save_{$type}/{$hook}", $post_id, $object);
|
74 |
+
}
|
75 |
+
|
76 |
+
do_action("acfe/{$suffix}save_{$type}/id={$post_id}", $post_id, $object);
|
77 |
+
|
78 |
+
acf_reset_meta('acfe/save');
|
79 |
+
|
80 |
+
}
|
81 |
+
|
82 |
+
function validate_save_post(){
|
83 |
+
|
84 |
+
// vars
|
85 |
+
$rows = array();
|
86 |
+
|
87 |
+
// General
|
88 |
+
$acf = acf_maybe_get_POST('acf');
|
89 |
+
|
90 |
+
if(!empty($acf)){
|
91 |
+
|
92 |
+
$post_id = acf_maybe_get_POST('_acf_post_id');
|
93 |
+
|
94 |
+
if($post_id){
|
95 |
+
$rows[$post_id] = $acf;
|
96 |
+
}
|
97 |
+
|
98 |
+
}
|
99 |
+
|
100 |
+
// Menu Items
|
101 |
+
$menu_items = acf_maybe_get_POST('menu-item-acf');
|
102 |
+
|
103 |
+
if(!empty($menu_items)){
|
104 |
+
|
105 |
+
foreach($menu_items as $post_id => $fields){
|
106 |
+
$rows[$post_id] = $fields;
|
107 |
+
}
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
foreach($rows as $post_id => $acf){
|
112 |
+
|
113 |
+
//vars
|
114 |
+
$data = $this->decode_object($post_id);
|
115 |
+
|
116 |
+
if(!$data)
|
117 |
+
continue;
|
118 |
+
|
119 |
+
$id = $data['id'];
|
120 |
+
$type = $data['type'];
|
121 |
+
$object = $data['object'];
|
122 |
+
$hooks = $data['hooks'];
|
123 |
+
|
124 |
+
acf_setup_meta($acf, 'acfe/validate_save', true);
|
125 |
+
|
126 |
+
do_action("acfe/validate_save", $post_id, $object);
|
127 |
+
do_action("acfe/validate_save/id={$post_id}", $post_id, $object);
|
128 |
+
|
129 |
+
do_action("acfe/validate_save_{$type}", $post_id, $object);
|
130 |
+
|
131 |
+
foreach($hooks as $hook){
|
132 |
+
do_action("acfe/validate_save_{$type}/{$hook}", $post_id, $object);
|
133 |
+
}
|
134 |
+
|
135 |
+
do_action("acfe/validate_save_{$type}/id={$post_id}", $post_id, $object);
|
136 |
+
|
137 |
+
acf_reset_meta('acfe/validate_save');
|
138 |
+
|
139 |
+
}
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
function decode_object($post_id){
|
144 |
+
|
145 |
+
//vars
|
146 |
+
$id = false;
|
147 |
+
$type = false;
|
148 |
+
$data = array(
|
149 |
+
'id' => false,
|
150 |
+
'type' => false,
|
151 |
+
'object' => false,
|
152 |
+
'hooks' => array(),
|
153 |
+
);
|
154 |
+
|
155 |
+
/*
|
156 |
+
* @string $post_id 12 | term_46 | user_22 | my-option | comment_89 | widget_56 | menu_74 | menu_item_96 | block_my-block | blog_55 | site_36 | attachment_24
|
157 |
+
* @string $id 12 | 46 | 22 | my-option | 89 | widget_56 | 74 | 96 | block_my-block | 55 | 36 | 24
|
158 |
+
* @string $type post | term | user | option | comment | option | term | post | block | blog | blog | post
|
159 |
+
*/
|
160 |
+
extract(acf_decode_post_id($post_id));
|
161 |
+
|
162 |
+
// Validate ID
|
163 |
+
if(!$id)
|
164 |
+
return false;
|
165 |
+
|
166 |
+
$data['id'] = $id;
|
167 |
+
$data['type'] = $type;
|
168 |
+
|
169 |
+
// Post
|
170 |
+
if($type === 'post'){
|
171 |
+
|
172 |
+
$post = get_post($id);
|
173 |
+
|
174 |
+
if($post && !is_wp_error($post)){
|
175 |
+
|
176 |
+
$data['object'] = $post;
|
177 |
+
|
178 |
+
if(isset($post->post_type) && post_type_exists($post->post_type)){
|
179 |
+
$data['hooks'][] = "post_type={$post->post_type}";
|
180 |
+
}
|
181 |
+
|
182 |
+
}
|
183 |
+
|
184 |
+
// Term
|
185 |
+
}elseif($type === 'term'){
|
186 |
+
|
187 |
+
$term = get_term($id);
|
188 |
+
|
189 |
+
if($term && !is_wp_error($term)){
|
190 |
+
|
191 |
+
$data['object'] = $term;
|
192 |
+
|
193 |
+
if(isset($term->taxonomy) && taxonomy_exists($term->taxonomy)){
|
194 |
+
$data['hooks'][] = "taxonomy={$term->taxonomy}";
|
195 |
+
}
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
// User
|
200 |
+
}elseif($type === 'user'){
|
201 |
+
|
202 |
+
$user = get_user_by('id', $id);
|
203 |
+
|
204 |
+
if($user && !is_wp_error($user)){
|
205 |
+
|
206 |
+
$data['object'] = $user;
|
207 |
+
|
208 |
+
if(isset($user->roles) && !empty($user->roles)){
|
209 |
+
|
210 |
+
foreach($user->roles as $role){
|
211 |
+
$data['hooks'][] = "role={$role}";
|
212 |
+
}
|
213 |
+
|
214 |
+
}
|
215 |
+
|
216 |
+
}
|
217 |
+
|
218 |
+
// Option
|
219 |
+
}elseif($type === 'option'){
|
220 |
+
|
221 |
+
$options_page = acf_maybe_get_POST('_acf_options_page');
|
222 |
+
|
223 |
+
if($options_page){
|
224 |
+
|
225 |
+
$data['object'] = acf_get_options_page($options_page);
|
226 |
+
|
227 |
+
$data['hooks'][] = "slug={$options_page}";
|
228 |
+
|
229 |
+
}
|
230 |
+
|
231 |
+
// Comment
|
232 |
+
}elseif($type === 'comment'){
|
233 |
+
|
234 |
+
$comment = get_comment($id);
|
235 |
+
|
236 |
+
if($comment && !is_wp_error($comment)){
|
237 |
+
|
238 |
+
$data['object'] = $comment;
|
239 |
+
|
240 |
+
}
|
241 |
+
|
242 |
+
// Block
|
243 |
+
}elseif($type === 'block'){
|
244 |
+
|
245 |
+
$block = acf_get_block_type("acf/$id");
|
246 |
+
|
247 |
+
if($block){
|
248 |
+
|
249 |
+
$data['object'] = $block;
|
250 |
+
|
251 |
+
}
|
252 |
+
|
253 |
+
// Blog
|
254 |
+
}elseif($type === 'blog'){
|
255 |
+
|
256 |
+
if(function_exists('get_blog_details')){
|
257 |
+
|
258 |
+
$blog = get_blog_details($id);
|
259 |
+
|
260 |
+
if($blog){
|
261 |
+
|
262 |
+
$data['object'] = $blog;
|
263 |
+
|
264 |
+
}
|
265 |
+
|
266 |
+
}
|
267 |
+
|
268 |
+
}
|
269 |
+
|
270 |
+
return $data;
|
271 |
|
272 |
}
|
273 |
|
275 |
* Load Field Groups
|
276 |
*/
|
277 |
function load_field_groups($field_groups){
|
278 |
+
|
279 |
+
// Do not execute in ACF Field Group UI
|
280 |
if(acfe_is_admin_screen())
|
281 |
return $field_groups;
|
282 |
|
283 |
foreach($field_groups as $i => &$field_group){
|
284 |
|
285 |
+
$field_group = apply_filters("acfe/prepare_field_group", $field_group);
|
286 |
+
$field_group = apply_filters("acfe/prepare_field_group/ID={$field_group['ID']}", $field_group);
|
287 |
+
$field_group = apply_filters("acfe/prepare_field_group/key={$field_group['key']}", $field_group);
|
288 |
|
289 |
// Do not render if false
|
290 |
if($field_group === false){
|
319 |
|
320 |
$this->field_group = $field_group;
|
321 |
|
322 |
+
do_action("acfe/pre_render_field_group", $field_group, $fields, $post_id);
|
323 |
+
do_action("acfe/pre_render_field_group/ID={$field_group['ID']}", $field_group, $fields, $post_id);
|
324 |
+
do_action("acfe/pre_render_field_group/key={$field_group['key']}", $field_group, $fields, $post_id);
|
325 |
|
326 |
return $fields;
|
327 |
|
335 |
if(empty($this->field_group))
|
336 |
return;
|
337 |
|
338 |
+
$field_group = $this->field_group;
|
339 |
+
|
340 |
+
do_action("acfe/render_field_group", $field_group, $fields, $post_id);
|
341 |
+
do_action("acfe/render_field_group/ID={$field_group['ID']}", $field_group, $fields, $post_id);
|
342 |
+
do_action("acfe/render_field_group/key={$field_group['key']}", $field_group, $fields, $post_id);
|
343 |
|
344 |
}
|
345 |
|
348 |
*/
|
349 |
function field_wrapper_attributes($wrapper, $field){
|
350 |
|
351 |
+
$wrapper = apply_filters("acfe/field_wrapper_attributes", $wrapper, $field);
|
352 |
+
$wrapper = apply_filters("acfe/field_wrapper_attributes/type={$field['type']}", $wrapper, $field);
|
353 |
+
$wrapper = apply_filters("acfe/field_wrapper_attributes/name={$field['name']}", $wrapper, $field);
|
354 |
+
$wrapper = apply_filters("acfe/field_wrapper_attributes/key={$field['key']}", $wrapper, $field);
|
355 |
|
356 |
return $wrapper;
|
357 |
|
366 |
if(!acf_maybe_get($parent, 'type'))
|
367 |
return $fields;
|
368 |
|
369 |
+
$fields = apply_filters("acfe/load_fields", $fields, $parent);
|
370 |
+
$fields = apply_filters("acfe/load_fields/type={$parent['type']}", $fields, $parent);
|
371 |
+
$fields = apply_filters("acfe/load_fields/name={$parent['name']}", $fields, $parent);
|
372 |
+
$fields = apply_filters("acfe/load_fields/key={$parent['key']}", $fields, $parent);
|
373 |
|
374 |
return $fields;
|
375 |
|
379 |
* Load Field
|
380 |
*/
|
381 |
function load_field($field){
|
382 |
+
|
383 |
+
// Do not execute in ACF Field Group UI
|
384 |
if(acfe_is_admin_screen())
|
385 |
return $field;
|
386 |
|
387 |
+
// Hooks
|
388 |
+
$field = apply_filters("acfe/load_field", $field);
|
389 |
+
$field = apply_filters("acfe/load_field/type={$field['type']}", $field);
|
390 |
+
$field = apply_filters("acfe/load_field/name={$field['name']}", $field);
|
391 |
+
$field = apply_filters("acfe/load_field/key={$field['key']}", $field);
|
392 |
|
393 |
+
|
394 |
+
// Deprecated: Admin
|
395 |
+
if(acfe_is_admin()){
|
396 |
+
|
397 |
+
$field = apply_filters_deprecated("acfe/load_field_admin", array($field), '0.8.8', "acfe/load_field");
|
398 |
+
$field = apply_filters_deprecated("acfe/load_field_admin/type={$field['type']}", array($field), '0.8.8', "acfe/load_field/type={$field['type']}");
|
399 |
+
$field = apply_filters_deprecated("acfe/load_field_admin/name={$field['name']}", array($field), '0.8.8', "acfe/load_field/name={$field['name']}");
|
400 |
+
$field = apply_filters_deprecated("acfe/load_field_admin/key={$field['key']}", array($field), '0.8.8', "acfe/load_field/key={$field['key']}");
|
401 |
|
402 |
}
|
403 |
|
404 |
+
// Deprecated: Front
|
405 |
+
else{
|
406 |
+
|
407 |
+
$field = apply_filters_deprecated("acfe/load_field_front", array($field), '0.8.8', "acfe/load_field");
|
408 |
+
$field = apply_filters_deprecated("acfe/load_field_front/type={$field['type']}", array($field), '0.8.8', "acfe/load_field/type={$field['type']}");
|
409 |
+
$field = apply_filters_deprecated("acfe/load_field_front/name={$field['name']}", array($field), '0.8.8', "acfe/load_field/name={$field['name']}");
|
410 |
+
$field = apply_filters_deprecated("acfe/load_field_front/key={$field['key']}", array($field), '0.8.8', "acfe/load_field/key={$field['key']}");
|
411 |
|
412 |
}
|
413 |
|
415 |
|
416 |
}
|
417 |
|
418 |
+
/*
|
419 |
+
* Form Data for Options Page
|
420 |
+
*/
|
421 |
+
function form_data($data){
|
422 |
+
|
423 |
+
if(acf_maybe_get($data, 'screen') !== 'options')
|
424 |
+
return;
|
425 |
+
|
426 |
+
global $plugin_page;
|
427 |
+
|
428 |
+
if(!$plugin_page)
|
429 |
+
return;
|
430 |
+
|
431 |
+
acf_hidden_input(array(
|
432 |
+
'id' => '_acf_options_page',
|
433 |
+
'name' => '_acf_options_page',
|
434 |
+
'value' => $plugin_page
|
435 |
+
));
|
436 |
+
|
437 |
+
}
|
438 |
+
|
439 |
}
|
440 |
|
441 |
new acfe_hooks();
|
@@ -13,9 +13,7 @@ function acfe_screen_header($screen){
|
|
13 |
return;
|
14 |
|
15 |
add_action('in_admin_header', function(){
|
16 |
-
|
17 |
acf_get_view('html-admin-navigation');
|
18 |
-
|
19 |
});
|
20 |
|
21 |
}
|
13 |
return;
|
14 |
|
15 |
add_action('in_admin_header', function(){
|
|
|
16 |
acf_get_view('html-admin-navigation');
|
|
|
17 |
});
|
18 |
|
19 |
}
|
@@ -214,6 +214,7 @@ class acfe_multilang{
|
|
214 |
* PolyLang
|
215 |
* https://polylang.pro/doc/filter-reference/
|
216 |
* https://polylang.pro/doc/developpers-how-to/
|
|
|
217 |
* https://polylang.wordpress.com/documentation/documentation-for-developers/general/
|
218 |
* https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
|
219 |
*/
|
214 |
* PolyLang
|
215 |
* https://polylang.pro/doc/filter-reference/
|
216 |
* https://polylang.pro/doc/developpers-how-to/
|
217 |
+
* https://polylang.pro/doc-category/developers/
|
218 |
* https://polylang.wordpress.com/documentation/documentation-for-developers/general/
|
219 |
* https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
|
220 |
*/
|
@@ -1,196 +1,94 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
acf_register_store('acfe/settings');
|
4 |
-
|
5 |
if(!class_exists('acfe_settings')):
|
6 |
|
7 |
class acfe_settings{
|
8 |
|
9 |
public $settings = array();
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
);
|
15 |
-
|
16 |
-
public $model = array(
|
17 |
-
|
18 |
-
// Version
|
19 |
-
'version' => ACFE_VERSION,
|
20 |
-
|
21 |
-
// Modules
|
22 |
-
'modules' => array(
|
23 |
-
|
24 |
-
'author' => array(
|
25 |
-
'active' => true,
|
26 |
-
),
|
27 |
-
|
28 |
-
'dev' => array(
|
29 |
-
'active' => false,
|
30 |
-
),
|
31 |
-
|
32 |
-
'meta' => array(
|
33 |
-
'active' => false,
|
34 |
-
),
|
35 |
-
|
36 |
-
'option' => array(
|
37 |
-
'active' => true,
|
38 |
-
),
|
39 |
-
|
40 |
-
'ui' => array(
|
41 |
-
'active' => true,
|
42 |
-
),
|
43 |
-
|
44 |
-
'dynamic_block_type' => array(
|
45 |
-
'active' => true,
|
46 |
-
'settings' => array(),
|
47 |
-
'data' => array()
|
48 |
-
),
|
49 |
-
|
50 |
-
'dynamic_form' => array(
|
51 |
-
'active' => true,
|
52 |
-
'settings' => array(),
|
53 |
-
'data' => array()
|
54 |
-
),
|
55 |
-
|
56 |
-
'dynamic_option' => array(
|
57 |
-
'active' => true,
|
58 |
-
'settings' => array(),
|
59 |
-
'data' => array()
|
60 |
-
),
|
61 |
-
|
62 |
-
'dynamic_post_type' => array(
|
63 |
-
'active' => true,
|
64 |
-
'settings' => array(),
|
65 |
-
'data' => array()
|
66 |
-
),
|
67 |
-
|
68 |
-
'dynamic_taxonomy' => array(
|
69 |
-
'active' => true,
|
70 |
-
'settings' => array(),
|
71 |
-
'data' => array()
|
72 |
-
),
|
73 |
-
|
74 |
-
),
|
75 |
-
|
76 |
-
// Upgrades
|
77 |
-
'upgrades' => array(),
|
78 |
-
);
|
79 |
-
|
80 |
function __construct(){
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
if(empty($this->settings->get_data())){
|
85 |
-
|
86 |
-
$option = get_option('acfe', array());
|
87 |
-
|
88 |
-
if(!empty($option)){
|
89 |
-
|
90 |
-
$this->settings->set($option);
|
91 |
-
|
92 |
-
$this->version();
|
93 |
-
|
94 |
-
}else{
|
95 |
-
|
96 |
-
$this->reset();
|
97 |
-
|
98 |
-
}
|
99 |
-
|
100 |
-
}
|
101 |
|
102 |
}
|
103 |
|
104 |
-
function get($selector =
|
105 |
-
|
106 |
-
return $this->array_get($this->settings
|
107 |
|
108 |
}
|
109 |
|
110 |
-
function set($selector =
|
111 |
|
112 |
if($value === null)
|
113 |
return false;
|
114 |
|
115 |
-
$rows = $this->settings->get();
|
116 |
-
|
117 |
if($append){
|
118 |
|
119 |
-
$this->array_append($
|
120 |
|
121 |
}else{
|
122 |
|
123 |
-
$this->array_set($
|
124 |
|
125 |
}
|
126 |
|
127 |
-
$this->
|
128 |
-
|
129 |
-
if($update)
|
130 |
-
$this->update();
|
131 |
|
132 |
return $this;
|
133 |
|
134 |
}
|
135 |
|
136 |
-
function clear($selector =
|
137 |
|
138 |
-
$
|
139 |
-
|
140 |
-
$this->array_clear($rows, $selector);
|
141 |
-
|
142 |
-
$this->settings->set($rows);
|
143 |
-
|
144 |
-
if($update)
|
145 |
-
$this->update();
|
146 |
|
147 |
return $this;
|
148 |
|
149 |
}
|
150 |
|
151 |
-
function delete($selector =
|
152 |
|
153 |
// Single
|
154 |
if(strpos($selector, '.') === false){
|
155 |
-
|
156 |
-
|
157 |
|
158 |
// Array
|
159 |
}else{
|
160 |
|
161 |
-
$
|
162 |
-
|
163 |
-
$this->array_remove($rows, $selector);
|
164 |
-
|
165 |
-
$this->settings->set($rows);
|
166 |
|
167 |
}
|
168 |
|
169 |
-
|
170 |
-
$this->update();
|
171 |
|
172 |
return $this;
|
173 |
|
174 |
}
|
175 |
|
176 |
-
function append($selector =
|
177 |
|
178 |
-
if($selector ===
|
179 |
return false;
|
180 |
|
181 |
// Allow simple append without selector
|
182 |
if($value === null){
|
183 |
|
184 |
$value = $selector;
|
185 |
-
$selector =
|
186 |
|
187 |
}
|
188 |
|
189 |
-
return $this->set($selector, $value,
|
190 |
|
191 |
}
|
192 |
|
193 |
-
function array_get($array, $key, $default = null)
|
194 |
|
195 |
if(empty($key))
|
196 |
return $array;
|
@@ -218,7 +116,6 @@ class acfe_settings{
|
|
218 |
|
219 |
return $this->array_get($array[$segment], $key, $default);
|
220 |
|
221 |
-
|
222 |
}
|
223 |
|
224 |
return $default;
|
@@ -314,165 +211,9 @@ class acfe_settings{
|
|
314 |
|
315 |
}
|
316 |
|
317 |
-
function reset(){
|
318 |
-
|
319 |
-
$this->model['upgrades'] = $this->upgrades;
|
320 |
-
|
321 |
-
$this->set('', $this->model, true);
|
322 |
-
|
323 |
-
new acfe_upgrades();
|
324 |
-
|
325 |
-
add_action('init', array($this, 'reset_modules'));
|
326 |
-
|
327 |
-
}
|
328 |
-
|
329 |
-
function reset_modules(){
|
330 |
-
|
331 |
-
// Reset Post Types
|
332 |
-
$post_types = get_posts(array(
|
333 |
-
'post_type' => 'acfe-dpt',
|
334 |
-
'posts_per_page' => -1,
|
335 |
-
'fields' => 'ids'
|
336 |
-
));
|
337 |
-
|
338 |
-
if(!empty($post_types)){
|
339 |
-
|
340 |
-
foreach($post_types as $post_id){
|
341 |
-
|
342 |
-
acfe_dpt_filter_save($post_id);
|
343 |
-
|
344 |
-
acf_log('[ACF Extended] Reset: Dynamic Post Type "' . get_post_field('post_title', $post_id) . '"');
|
345 |
-
|
346 |
-
}
|
347 |
-
|
348 |
-
}
|
349 |
-
|
350 |
-
// Reset Taxonomies
|
351 |
-
$taxonomies = get_posts(array(
|
352 |
-
'post_type' => 'acfe-dt',
|
353 |
-
'posts_per_page' => -1,
|
354 |
-
'fields' => 'ids'
|
355 |
-
));
|
356 |
-
|
357 |
-
if(!empty($taxonomies)){
|
358 |
-
|
359 |
-
foreach($taxonomies as $post_id){
|
360 |
-
|
361 |
-
acfe_dt_filter_save($post_id);
|
362 |
-
|
363 |
-
acf_log('[ACF Extended] Reset: Dynamic Taxonomy "' . get_post_field('post_title', $post_id) . '"');
|
364 |
-
|
365 |
-
}
|
366 |
-
|
367 |
-
}
|
368 |
-
|
369 |
-
// Reset Block Types
|
370 |
-
$block_types = get_posts(array(
|
371 |
-
'post_type' => 'acfe-dbt',
|
372 |
-
'posts_per_page' => -1,
|
373 |
-
'fields' => 'ids'
|
374 |
-
));
|
375 |
-
|
376 |
-
if(!empty($block_types)){
|
377 |
-
|
378 |
-
foreach($block_types as $post_id){
|
379 |
-
|
380 |
-
acfe_dbt_filter_save($post_id);
|
381 |
-
|
382 |
-
acf_log('[ACF Extended] Reset: Dynamic Block Type "' . get_post_field('post_title', $post_id) . '"');
|
383 |
-
|
384 |
-
}
|
385 |
-
|
386 |
-
}
|
387 |
-
|
388 |
-
// Reset Options Pages
|
389 |
-
$options_pages = get_posts(array(
|
390 |
-
'post_type' => 'acfe-dop',
|
391 |
-
'posts_per_page' => -1,
|
392 |
-
'fields' => 'ids'
|
393 |
-
));
|
394 |
-
|
395 |
-
if(!empty($options_pages)){
|
396 |
-
|
397 |
-
foreach($options_pages as $post_id){
|
398 |
-
|
399 |
-
acfe_dop_filter_save($post_id);
|
400 |
-
|
401 |
-
acf_log('[ACF Extended] Reset: Dynamic Options Page "' . get_post_field('post_title', $post_id) . '"');
|
402 |
-
|
403 |
-
}
|
404 |
-
|
405 |
-
}
|
406 |
-
|
407 |
-
}
|
408 |
-
|
409 |
-
function version(){
|
410 |
-
|
411 |
-
$version = $this->get('version');
|
412 |
-
|
413 |
-
if(acf_version_compare($version, '<', ACFE_VERSION)){
|
414 |
-
|
415 |
-
if(!empty($this->upgrades)){
|
416 |
-
|
417 |
-
$do_upgrades = false;
|
418 |
-
|
419 |
-
foreach($this->upgrades as $function => $v){
|
420 |
-
|
421 |
-
if(acf_version_compare($v, '<=', $version))
|
422 |
-
continue;
|
423 |
-
|
424 |
-
$do_upgrades = true;
|
425 |
-
|
426 |
-
$this->model['upgrades'][$function] = true;
|
427 |
-
|
428 |
-
}
|
429 |
-
|
430 |
-
}
|
431 |
-
|
432 |
-
$data = $this->get();
|
433 |
-
$model = $this->model;
|
434 |
-
|
435 |
-
$new_model = $this->parse_args_r($data, $model);
|
436 |
-
|
437 |
-
$new_model['version'] = ACFE_VERSION;
|
438 |
-
|
439 |
-
$this->set('', $new_model, true);
|
440 |
-
|
441 |
-
if($do_upgrades){
|
442 |
-
|
443 |
-
new acfe_upgrades();
|
444 |
-
|
445 |
-
}
|
446 |
-
|
447 |
-
}
|
448 |
-
|
449 |
-
}
|
450 |
-
|
451 |
function update(){
|
452 |
|
453 |
-
|
454 |
-
|
455 |
-
update_option('acfe', $settings, 'true');
|
456 |
-
|
457 |
-
}
|
458 |
-
|
459 |
-
function parse_args_r(&$a, $b){
|
460 |
-
|
461 |
-
$a = (array) $a;
|
462 |
-
$b = (array) $b;
|
463 |
-
$r = $b;
|
464 |
-
|
465 |
-
foreach($a as $k => &$v){
|
466 |
-
|
467 |
-
if(is_array($v) && isset($r[ $k ])){
|
468 |
-
$r[$k] = $this->parse_args_r($v, $r[ $k ]);
|
469 |
-
}else{
|
470 |
-
$r[$k] = $v;
|
471 |
-
}
|
472 |
-
|
473 |
-
}
|
474 |
-
|
475 |
-
return $r;
|
476 |
|
477 |
}
|
478 |
|
@@ -480,24 +221,25 @@ class acfe_settings{
|
|
480 |
|
481 |
endif;
|
482 |
|
483 |
-
function
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
|
|
503 |
}
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
if(!class_exists('acfe_settings')):
|
4 |
|
5 |
class acfe_settings{
|
6 |
|
7 |
public $settings = array();
|
8 |
|
9 |
+
/*
|
10 |
+
* Construct
|
11 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
function __construct(){
|
13 |
+
|
14 |
+
$this->settings = get_option('acfe', array());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
}
|
17 |
|
18 |
+
function get($selector = null, $default = null){
|
19 |
+
|
20 |
+
return $this->array_get($this->settings, $selector, $default);
|
21 |
|
22 |
}
|
23 |
|
24 |
+
function set($selector = null, $value = null, $append = false){
|
25 |
|
26 |
if($value === null)
|
27 |
return false;
|
28 |
|
|
|
|
|
29 |
if($append){
|
30 |
|
31 |
+
$this->array_append($this->settings, $selector, $value);
|
32 |
|
33 |
}else{
|
34 |
|
35 |
+
$this->array_set($this->settings, $selector, $value);
|
36 |
|
37 |
}
|
38 |
|
39 |
+
$this->update();
|
|
|
|
|
|
|
40 |
|
41 |
return $this;
|
42 |
|
43 |
}
|
44 |
|
45 |
+
function clear($selector = null){
|
46 |
|
47 |
+
$this->array_clear($this->settings, $selector);
|
48 |
+
$this->update();
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
return $this;
|
51 |
|
52 |
}
|
53 |
|
54 |
+
function delete($selector = null){
|
55 |
|
56 |
// Single
|
57 |
if(strpos($selector, '.') === false){
|
58 |
+
|
59 |
+
unset($this->settings[$selector]);
|
60 |
|
61 |
// Array
|
62 |
}else{
|
63 |
|
64 |
+
$this->array_remove($this->settings, $selector);
|
|
|
|
|
|
|
|
|
65 |
|
66 |
}
|
67 |
|
68 |
+
$this->update();
|
|
|
69 |
|
70 |
return $this;
|
71 |
|
72 |
}
|
73 |
|
74 |
+
function append($selector = null, $value = null){
|
75 |
|
76 |
+
if($selector === null && $value === null)
|
77 |
return false;
|
78 |
|
79 |
// Allow simple append without selector
|
80 |
if($value === null){
|
81 |
|
82 |
$value = $selector;
|
83 |
+
$selector = null;
|
84 |
|
85 |
}
|
86 |
|
87 |
+
return $this->set($selector, $value, true);
|
88 |
|
89 |
}
|
90 |
|
91 |
+
function array_get($array, $key, $default = null){
|
92 |
|
93 |
if(empty($key))
|
94 |
return $array;
|
116 |
|
117 |
return $this->array_get($array[$segment], $key, $default);
|
118 |
|
|
|
119 |
}
|
120 |
|
121 |
return $default;
|
211 |
|
212 |
}
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
function update(){
|
215 |
|
216 |
+
update_option('acfe', $this->settings, 'true');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
}
|
219 |
|
221 |
|
222 |
endif;
|
223 |
|
224 |
+
function acfe_get_settings($selector = null, $default = null){
|
225 |
+
|
226 |
+
return acf_get_instance('acfe_settings')->get($selector, $default);
|
227 |
+
|
228 |
+
}
|
229 |
+
|
230 |
+
function acfe_update_settings($selector = null, $value = null){
|
231 |
+
|
232 |
+
if($value === null){
|
233 |
+
$value = $selector;
|
234 |
+
$selector = null;
|
235 |
+
}
|
236 |
+
|
237 |
+
return acf_get_instance('acfe_settings')->set($selector, $value);
|
238 |
+
|
239 |
+
}
|
240 |
+
|
241 |
+
function acfe_delete_settings($selector = null){
|
242 |
+
|
243 |
+
return acf_get_instance('acfe_settings')->delete($selector);
|
244 |
+
|
245 |
}
|
@@ -3,30 +3,186 @@
|
|
3 |
if(!class_exists('acfe_upgrades')):
|
4 |
|
5 |
class acfe_upgrades{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
function __construct(){
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
$get_options = get_posts(array(
|
32 |
'post_type' => 'acfe-dop',
|
@@ -35,6 +191,8 @@ class acfe_upgrades{
|
|
35 |
));
|
36 |
|
37 |
if(!empty($get_options)){
|
|
|
|
|
38 |
|
39 |
foreach($get_options as $post_id){
|
40 |
|
@@ -63,13 +221,15 @@ class acfe_upgrades{
|
|
63 |
// Update field
|
64 |
update_field('menu_slug', $menu_slug, $post_id);
|
65 |
|
|
|
|
|
66 |
}
|
67 |
|
68 |
// Upgrade old name to menu_slug
|
69 |
if($acfe_dop_name === $post_name){
|
70 |
|
71 |
// Get ACFE option
|
72 |
-
$option =
|
73 |
|
74 |
// Check ACFE option
|
75 |
if(isset($option[$acfe_dop_name])){
|
@@ -86,7 +246,7 @@ class acfe_upgrades{
|
|
86 |
ksort($option);
|
87 |
|
88 |
// Update ACFE option
|
89 |
-
|
90 |
|
91 |
// Update post: force menu slug as name
|
92 |
wp_update_post(array(
|
@@ -94,34 +254,32 @@ class acfe_upgrades{
|
|
94 |
'post_name' => $menu_slug,
|
95 |
));
|
96 |
|
|
|
|
|
97 |
}
|
98 |
|
99 |
}
|
100 |
|
101 |
}
|
102 |
|
|
|
|
|
|
|
103 |
}
|
104 |
|
105 |
-
// Done
|
106 |
-
acfe_settings()->delete('upgrades.0_8_6');
|
107 |
-
|
108 |
-
acf_log('[ACF Extended] 0.8.6 Upgrade: Done');
|
109 |
-
|
110 |
}
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
if(!$todo)
|
117 |
-
return;
|
118 |
|
119 |
$tasks = array(
|
120 |
-
'
|
121 |
-
'
|
122 |
-
'
|
123 |
-
'
|
124 |
-
'
|
125 |
);
|
126 |
|
127 |
foreach($tasks as $task){
|
@@ -129,9 +287,7 @@ class acfe_upgrades{
|
|
129 |
/*
|
130 |
* Forms
|
131 |
*/
|
132 |
-
if($task === '
|
133 |
-
|
134 |
-
acf_log('[ACF Extended] 0.8.5 Upgrade: Dynamic Forms');
|
135 |
|
136 |
// Retrieve all forms posts
|
137 |
$get_forms = get_posts(array(
|
@@ -142,12 +298,8 @@ class acfe_upgrades{
|
|
142 |
));
|
143 |
|
144 |
// Bail early if no form found
|
145 |
-
if(empty($get_forms))
|
146 |
-
|
147 |
-
// Upgrade done
|
148 |
continue;
|
149 |
-
|
150 |
-
}
|
151 |
|
152 |
$flexible = acf_get_field_type('flexible_content');
|
153 |
$field = acf_get_field('acfe_form_actions');
|
@@ -340,6 +492,8 @@ class acfe_upgrades{
|
|
340 |
}
|
341 |
|
342 |
if(!empty($updates)){
|
|
|
|
|
343 |
|
344 |
// Update meta
|
345 |
foreach($updates as $new_field => $data){
|
@@ -552,104 +706,109 @@ class acfe_upgrades{
|
|
552 |
/*
|
553 |
* Post Types
|
554 |
*/
|
555 |
-
elseif($task === '
|
556 |
-
|
557 |
-
acf_log('[ACF Extended] 0.8.5 Upgrade: Dynamic Post Types');
|
558 |
|
559 |
-
|
560 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
|
562 |
-
//
|
563 |
-
|
564 |
-
|
565 |
-
$merged_post_types = array_merge($old_post_types, $new_post_types);
|
566 |
-
|
567 |
-
// Update Post Types
|
568 |
-
acfe_settings('modules.dynamic_post_type.data', $merged_post_types, true);
|
569 |
-
|
570 |
-
// Delete Old Post Types
|
571 |
-
delete_option('acfe_dynamic_post_types');
|
572 |
|
573 |
}
|
574 |
|
575 |
/*
|
576 |
* Taxonomies
|
577 |
*/
|
578 |
-
elseif($task === '
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
// Update
|
591 |
-
|
592 |
-
|
593 |
-
// Delete Old Taxonomies
|
594 |
-
delete_option('acfe_dynamic_taxonomies');
|
595 |
-
|
596 |
}
|
597 |
|
598 |
/*
|
599 |
* Block Types
|
600 |
*/
|
601 |
-
elseif($task === '
|
602 |
-
|
603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
|
605 |
-
|
606 |
-
$old_block_types = get_option('acfe_dynamic_block_types', array());
|
607 |
|
608 |
-
//
|
609 |
-
|
610 |
-
|
611 |
-
$merged_block_types = array_merge($old_block_types, $new_block_types);
|
612 |
-
|
613 |
-
// Update Block Types
|
614 |
-
acfe_settings('modules.dynamic_block_type.data', $merged_block_types, true);
|
615 |
-
|
616 |
-
// Delete Old Block Types
|
617 |
-
delete_option('acfe_dynamic_block_types');
|
618 |
|
619 |
}
|
620 |
|
621 |
/*
|
622 |
* Option Pages
|
623 |
*/
|
624 |
-
elseif($task === '
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
|
|
|
|
|
|
630 |
|
631 |
-
|
632 |
-
$new_options = acfe_settings('modules.dynamic_option.data');
|
633 |
|
634 |
-
|
635 |
-
|
636 |
-
// Update Options
|
637 |
-
acfe_settings('modules.dynamic_option.data', $merged_options, true);
|
638 |
-
|
639 |
-
// Delete Old Options
|
640 |
-
delete_option('acfe_dynamic_options_pages');
|
641 |
|
642 |
}
|
643 |
|
644 |
}
|
645 |
|
646 |
-
// Done
|
647 |
-
acfe_settings()->delete('upgrades.0_8_5');
|
648 |
-
|
649 |
-
acf_log('[ACF Extended] 0.8.5 Upgrade: Done');
|
650 |
-
|
651 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
|
653 |
}
|
654 |
|
|
|
|
|
655 |
endif;
|
3 |
if(!class_exists('acfe_upgrades')):
|
4 |
|
5 |
class acfe_upgrades{
|
6 |
+
|
7 |
+
public $upgrades = array(
|
8 |
+
'do_0_8_5' => '0.8.5',
|
9 |
+
'do_0_8_6' => '0.8.6',
|
10 |
+
'do_0_8_8' => '0.8.8',
|
11 |
+
'do_reset' => '0.0',
|
12 |
+
);
|
13 |
+
|
14 |
+
public $model = array(
|
15 |
+
'version' => ACFE_VERSION,
|
16 |
+
'modules' => array(
|
17 |
+
'block_types' => array(),
|
18 |
+
'options_pages' => array(),
|
19 |
+
'post_types' => array(),
|
20 |
+
'taxonomies' => array(),
|
21 |
+
)
|
22 |
+
);
|
23 |
|
24 |
function __construct(){
|
25 |
+
|
26 |
+
$db_version = acfe_get_settings('version');
|
27 |
+
|
28 |
+
// Bail early
|
29 |
+
if(acf_version_compare($db_version, '>=', ACFE_VERSION))
|
30 |
+
return;
|
31 |
+
|
32 |
+
// Loop upgrades
|
33 |
+
foreach($this->upgrades as $upgrade_function => $upgrade_version){
|
34 |
+
|
35 |
+
if(acf_version_compare($upgrade_version, '<=', $db_version))
|
36 |
+
continue;
|
37 |
+
|
38 |
+
add_action('acf/init', array($this, $upgrade_function), 999);
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
$settings = acfe_get_settings();
|
43 |
+
|
44 |
+
$model = $this->parse_args_r($settings, $this->model);
|
45 |
+
$model['version'] = ACFE_VERSION;
|
46 |
+
|
47 |
+
acfe_update_settings($model);
|
48 |
+
|
49 |
}
|
50 |
+
|
51 |
+
/*
|
52 |
+
* Reset Modules
|
53 |
+
*/
|
54 |
+
function do_reset(){
|
55 |
+
|
56 |
+
// Modules
|
57 |
+
acf_get_instance('acfe_dynamic_block_types')->reset();
|
58 |
+
acf_get_instance('acfe_dynamic_options_pages')->reset();
|
59 |
+
acf_get_instance('acfe_dynamic_post_types')->reset();
|
60 |
+
acf_get_instance('acfe_dynamic_taxonomies')->reset();
|
61 |
+
|
62 |
+
}
|
63 |
|
64 |
+
/*
|
65 |
+
* ACF Extended: 0.8.8
|
66 |
+
*/
|
67 |
+
function do_0_8_8(){
|
68 |
+
|
69 |
+
$tasks = array(
|
70 |
+
'block_types',
|
71 |
+
'options_pages',
|
72 |
+
'post_types',
|
73 |
+
'taxonomies',
|
74 |
+
'clean',
|
75 |
+
);
|
76 |
+
|
77 |
+
foreach($tasks as $task){
|
78 |
+
|
79 |
+
/*
|
80 |
+
* Block Types
|
81 |
+
*/
|
82 |
+
if($task === 'block_types'){
|
83 |
+
|
84 |
+
$old = acfe_get_settings('modules.dynamic_block_type.data', array());
|
85 |
+
$new = acfe_get_settings('modules.block_types', array());
|
86 |
+
|
87 |
+
// Check
|
88 |
+
if(empty($old))
|
89 |
+
continue;
|
90 |
+
|
91 |
+
// Log
|
92 |
+
acf_log('[ACF Extended] 0.8.8 Upgrade: Block Types');
|
93 |
+
|
94 |
+
// Update
|
95 |
+
acfe_update_settings('modules.block_types', array_merge($old, $new));
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
/*
|
100 |
+
* Options Pages
|
101 |
+
*/
|
102 |
+
elseif($task === 'options_pages'){
|
103 |
+
|
104 |
+
$old = acfe_get_settings('modules.dynamic_option.data', array());
|
105 |
+
$new = acfe_get_settings('modules.options_pages', array());
|
106 |
+
|
107 |
+
// Check
|
108 |
+
if(empty($old))
|
109 |
+
continue;
|
110 |
+
|
111 |
+
// Log
|
112 |
+
acf_log('[ACF Extended] 0.8.8 Upgrade: Options Pages');
|
113 |
+
|
114 |
+
// Update
|
115 |
+
acfe_update_settings('modules.options_pages', array_merge($old, $new));
|
116 |
+
|
117 |
+
}
|
118 |
+
|
119 |
+
/*
|
120 |
+
* Post Types
|
121 |
+
*/
|
122 |
+
elseif($task === 'post_types'){
|
123 |
+
|
124 |
+
$old = acfe_get_settings('modules.dynamic_post_type.data', array());
|
125 |
+
$new = acfe_get_settings('modules.post_types', array());
|
126 |
+
|
127 |
+
// Check
|
128 |
+
if(empty($old))
|
129 |
+
continue;
|
130 |
+
|
131 |
+
// Log
|
132 |
+
acf_log('[ACF Extended] 0.8.8 Upgrade: Post Types');
|
133 |
+
|
134 |
+
// Update
|
135 |
+
acfe_update_settings('modules.post_types', array_merge($old, $new));
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
/*
|
140 |
+
* Taxonomies
|
141 |
+
*/
|
142 |
+
elseif($task === 'taxonomies'){
|
143 |
+
|
144 |
+
$old = acfe_get_settings('modules.dynamic_taxonomy.data', array());
|
145 |
+
$new = acfe_get_settings('modules.taxonomies', array());
|
146 |
+
|
147 |
+
// Check
|
148 |
+
if(empty($old))
|
149 |
+
continue;
|
150 |
+
|
151 |
+
// Log
|
152 |
+
acf_log('[ACF Extended] 0.8.8 Upgrade: Taxonomies');
|
153 |
+
|
154 |
+
// Update
|
155 |
+
acfe_update_settings('modules.taxonomies', array_merge($old, $new));
|
156 |
+
|
157 |
+
}
|
158 |
+
|
159 |
+
/*
|
160 |
+
* Clean
|
161 |
+
*/
|
162 |
+
elseif($task === 'clean'){
|
163 |
+
|
164 |
+
acfe_delete_settings('modules.author');
|
165 |
+
acfe_delete_settings('modules.dev');
|
166 |
+
acfe_delete_settings('modules.meta');
|
167 |
+
acfe_delete_settings('modules.option');
|
168 |
+
acfe_delete_settings('modules.ui');
|
169 |
+
acfe_delete_settings('modules.dynamic_block_type');
|
170 |
+
acfe_delete_settings('modules.dynamic_form');
|
171 |
+
acfe_delete_settings('modules.dynamic_option');
|
172 |
+
acfe_delete_settings('modules.dynamic_post_type');
|
173 |
+
acfe_delete_settings('modules.dynamic_taxonomy');
|
174 |
+
acfe_delete_settings('upgrades');
|
175 |
+
|
176 |
+
}
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
181 |
+
|
182 |
+
/*
|
183 |
+
* ACF Extended: 0.8.6
|
184 |
+
*/
|
185 |
+
function do_0_8_6(){
|
186 |
|
187 |
$get_options = get_posts(array(
|
188 |
'post_type' => 'acfe-dop',
|
191 |
));
|
192 |
|
193 |
if(!empty($get_options)){
|
194 |
+
|
195 |
+
$updated = false;
|
196 |
|
197 |
foreach($get_options as $post_id){
|
198 |
|
221 |
// Update field
|
222 |
update_field('menu_slug', $menu_slug, $post_id);
|
223 |
|
224 |
+
$updated = true;
|
225 |
+
|
226 |
}
|
227 |
|
228 |
// Upgrade old name to menu_slug
|
229 |
if($acfe_dop_name === $post_name){
|
230 |
|
231 |
// Get ACFE option
|
232 |
+
$option = acfe_get_settings('modules.options_pages', array());
|
233 |
|
234 |
// Check ACFE option
|
235 |
if(isset($option[$acfe_dop_name])){
|
246 |
ksort($option);
|
247 |
|
248 |
// Update ACFE option
|
249 |
+
acfe_update_settings('modules.options_pages', $option);
|
250 |
|
251 |
// Update post: force menu slug as name
|
252 |
wp_update_post(array(
|
254 |
'post_name' => $menu_slug,
|
255 |
));
|
256 |
|
257 |
+
$updated = true;
|
258 |
+
|
259 |
}
|
260 |
|
261 |
}
|
262 |
|
263 |
}
|
264 |
|
265 |
+
if($updated)
|
266 |
+
acf_log('[ACF Extended] 0.8.6 Upgrade: Options Pages');
|
267 |
+
|
268 |
}
|
269 |
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
271 |
|
272 |
+
/*
|
273 |
+
* ACF Extended: 0.8.5
|
274 |
+
*/
|
275 |
+
function do_0_8_5(){
|
|
|
|
|
276 |
|
277 |
$tasks = array(
|
278 |
+
'forms',
|
279 |
+
'post_types',
|
280 |
+
'taxonomies',
|
281 |
+
'block_types',
|
282 |
+
'options_pages',
|
283 |
);
|
284 |
|
285 |
foreach($tasks as $task){
|
287 |
/*
|
288 |
* Forms
|
289 |
*/
|
290 |
+
if($task === 'forms'){
|
|
|
|
|
291 |
|
292 |
// Retrieve all forms posts
|
293 |
$get_forms = get_posts(array(
|
298 |
));
|
299 |
|
300 |
// Bail early if no form found
|
301 |
+
if(empty($get_forms))
|
|
|
|
|
302 |
continue;
|
|
|
|
|
303 |
|
304 |
$flexible = acf_get_field_type('flexible_content');
|
305 |
$field = acf_get_field('acfe_form_actions');
|
492 |
}
|
493 |
|
494 |
if(!empty($updates)){
|
495 |
+
|
496 |
+
acf_log('[ACF Extended] 0.8.5 Upgrade: Forms');
|
497 |
|
498 |
// Update meta
|
499 |
foreach($updates as $new_field => $data){
|
706 |
/*
|
707 |
* Post Types
|
708 |
*/
|
709 |
+
elseif($task === 'post_types'){
|
|
|
|
|
710 |
|
711 |
+
$old = get_option('acfe_dynamic_post_types', array());
|
712 |
+
$new = acfe_get_settings('modules.post_types', array());
|
713 |
+
|
714 |
+
delete_option('acfe_dynamic_post_types');
|
715 |
+
|
716 |
+
if(empty($old))
|
717 |
+
continue;
|
718 |
+
|
719 |
+
acf_log('[ACF Extended] 0.8.5 Upgrade: Post Types');
|
720 |
|
721 |
+
// Update
|
722 |
+
acfe_update_settings('modules.post_types', array_merge($old, $new));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
723 |
|
724 |
}
|
725 |
|
726 |
/*
|
727 |
* Taxonomies
|
728 |
*/
|
729 |
+
elseif($task === 'taxonomies'){
|
730 |
+
|
731 |
+
$old = get_option('acfe_dynamic_taxonomies', array());
|
732 |
+
$new = acfe_get_settings('modules.taxonomies', array());
|
733 |
+
|
734 |
+
delete_option('acfe_dynamic_taxonomies');
|
735 |
+
|
736 |
+
if(empty($old))
|
737 |
+
continue;
|
738 |
+
|
739 |
+
acf_log('[ACF Extended] 0.8.5 Upgrade: Taxonomies');
|
740 |
+
|
741 |
+
// Update
|
742 |
+
acfe_update_settings('modules.taxonomies', array_merge($old, $new));
|
743 |
+
|
|
|
|
|
|
|
744 |
}
|
745 |
|
746 |
/*
|
747 |
* Block Types
|
748 |
*/
|
749 |
+
elseif($task === 'block_types'){
|
750 |
+
|
751 |
+
$old = get_option('acfe_dynamic_block_types', array());
|
752 |
+
$new = acfe_get_settings('modules.block_types', array());
|
753 |
+
|
754 |
+
delete_option('acfe_dynamic_block_types');
|
755 |
+
|
756 |
+
if(empty($old))
|
757 |
+
continue;
|
758 |
|
759 |
+
acf_log('[ACF Extended] 0.8.5 Upgrade: Block Types');
|
|
|
760 |
|
761 |
+
// Update
|
762 |
+
acfe_update_settings('modules.block_types', array_merge($old, $new));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
|
764 |
}
|
765 |
|
766 |
/*
|
767 |
* Option Pages
|
768 |
*/
|
769 |
+
elseif($task === 'options_pages'){
|
770 |
+
|
771 |
+
$old = get_option('acfe_dynamic_options_pages', array());
|
772 |
+
$new = acfe_get_settings('modules.options_pages', array());
|
773 |
+
|
774 |
+
delete_option('acfe_dynamic_options_pages');
|
775 |
+
|
776 |
+
if(empty($old))
|
777 |
+
continue;
|
778 |
|
779 |
+
acf_log('[ACF Extended] 0.8.5 Upgrade: Options Pages');
|
|
|
780 |
|
781 |
+
// Update
|
782 |
+
acfe_update_settings('modules.options_pages', array_merge($old, $new));
|
|
|
|
|
|
|
|
|
|
|
783 |
|
784 |
}
|
785 |
|
786 |
}
|
787 |
|
|
|
|
|
|
|
|
|
|
|
788 |
}
|
789 |
+
|
790 |
+
function parse_args_r(&$a, $b){
|
791 |
+
|
792 |
+
$a = (array) $a;
|
793 |
+
$b = (array) $b;
|
794 |
+
$r = $b;
|
795 |
+
|
796 |
+
foreach($a as $k => &$v){
|
797 |
+
|
798 |
+
if(is_array($v) && isset($r[ $k ])){
|
799 |
+
$r[$k] = $this->parse_args_r($v, $r[ $k ]);
|
800 |
+
}else{
|
801 |
+
$r[$k] = $v;
|
802 |
+
}
|
803 |
+
|
804 |
+
}
|
805 |
+
|
806 |
+
return $r;
|
807 |
+
|
808 |
+
}
|
809 |
|
810 |
}
|
811 |
|
812 |
+
acf_new_instance('acfe_upgrades');
|
813 |
+
|
814 |
endif;
|
@@ -290,7 +290,7 @@ class ACFE_Field_Groups_Local{
|
|
290 |
continue;
|
291 |
|
292 |
// Exclude ACFE Field Groups
|
293 |
-
if(!acfe_is_super_dev() &&
|
294 |
continue;
|
295 |
|
296 |
$locals[] = $field_group;
|
290 |
continue;
|
291 |
|
292 |
// Exclude ACFE Field Groups
|
293 |
+
if(!acfe_is_super_dev() && in_array($field_group['key'], acfe_get_setting('reserved_field_groups', array())))
|
294 |
continue;
|
295 |
|
296 |
$locals[] = $field_group;
|
@@ -250,7 +250,7 @@ class ACFE_Field_Groups{
|
|
250 |
$source = __('Theme/Plugin', 'acf');
|
251 |
|
252 |
// ACF Extended
|
253 |
-
if(
|
254 |
|
255 |
$source = 'ACF Extended';
|
256 |
|
@@ -807,15 +807,21 @@ class ACFE_Field_Groups{
|
|
807 |
* Seamless Metabox
|
808 |
*/
|
809 |
function seamless_metabox($post_type, $post, $field_groups){
|
|
|
|
|
|
|
|
|
|
|
|
|
810 |
|
811 |
foreach($field_groups as $field_group){
|
812 |
|
813 |
-
add_filter("postbox_classes_{$post_type}_acf-{$field_group['key']}", function($classes) use($field_group){
|
814 |
|
815 |
$classes[] = 'acf-postbox';
|
816 |
|
817 |
// Seamless
|
818 |
-
if($field_group['style'] === 'seamless')
|
819 |
$classes[] = 'seamless';
|
820 |
|
821 |
// Left
|
250 |
$source = __('Theme/Plugin', 'acf');
|
251 |
|
252 |
// ACF Extended
|
253 |
+
if(in_array($field_group['key'], acfe_get_setting('reserved_field_groups', array()))){
|
254 |
|
255 |
$source = 'ACF Extended';
|
256 |
|
807 |
* Seamless Metabox
|
808 |
*/
|
809 |
function seamless_metabox($post_type, $post, $field_groups){
|
810 |
+
|
811 |
+
$current_screen = get_current_screen();
|
812 |
+
$is_gutenberg = false;
|
813 |
+
|
814 |
+
if(method_exists($current_screen, 'is_block_editor') && $current_screen->is_block_editor())
|
815 |
+
$is_gutenberg = true;
|
816 |
|
817 |
foreach($field_groups as $field_group){
|
818 |
|
819 |
+
add_filter("postbox_classes_{$post_type}_acf-{$field_group['key']}", function($classes) use($field_group, $is_gutenberg){
|
820 |
|
821 |
$classes[] = 'acf-postbox';
|
822 |
|
823 |
// Seamless
|
824 |
+
if(!$is_gutenberg && $field_group['style'] === 'seamless')
|
825 |
$classes[] = 'seamless';
|
826 |
|
827 |
// Left
|
@@ -519,7 +519,7 @@ class acfe_bidirectional{
|
|
519 |
* $p_field: the parent field
|
520 |
* $p_id: the relationship to add
|
521 |
*/
|
522 |
-
function relationship($type
|
523 |
|
524 |
// Get Related Field Configuration
|
525 |
$r_fields = acf_get_array($p_field['acfe_bidirectional']['acfe_bidirectional_related']);
|
519 |
* $p_field: the parent field
|
520 |
* $p_id: the relationship to add
|
521 |
*/
|
522 |
+
function relationship($type, $r_id, $p_field, $p_value){
|
523 |
|
524 |
// Get Related Field Configuration
|
525 |
$r_fields = acf_get_array($p_field['acfe_bidirectional']['acfe_bidirectional_related']);
|
@@ -272,14 +272,14 @@ class acfe_field_settings{
|
|
272 |
}
|
273 |
|
274 |
// Screen: Admin
|
275 |
-
elseif($screen === 'admin' &&
|
276 |
|
277 |
$screen_allow = true;
|
278 |
|
279 |
}
|
280 |
|
281 |
// Screen: Front
|
282 |
-
elseif($screen === 'front' &&
|
283 |
|
284 |
$screen_allow = true;
|
285 |
|
@@ -351,7 +351,7 @@ class acfe_field_settings{
|
|
351 |
|
352 |
if($hide_required){
|
353 |
|
354 |
-
if(is_bool($hide_required) || $hide_required === 'all' || ($hide_required === 'front' &&
|
355 |
|
356 |
$field['required'] = false;
|
357 |
|
@@ -372,7 +372,7 @@ class acfe_field_settings{
|
|
372 |
|
373 |
if($hide_field){
|
374 |
|
375 |
-
if(is_bool($hide_field) || $hide_field === 'all' || ($hide_field === 'front' &&
|
376 |
|
377 |
return false;
|
378 |
|
@@ -384,7 +384,7 @@ class acfe_field_settings{
|
|
384 |
|
385 |
if($hide_label){
|
386 |
|
387 |
-
if(is_bool($hide_label) || $hide_label === 'all' || ($hide_label === 'front' &&
|
388 |
|
389 |
$field['label'] = '';
|
390 |
|
@@ -394,7 +394,7 @@ class acfe_field_settings{
|
|
394 |
|
395 |
$hide_instructions = acf_maybe_get($field, 'hide_instructions');
|
396 |
|
397 |
-
if(is_bool($hide_instructions) || $hide_instructions === 'all' || ($hide_instructions === 'front' &&
|
398 |
|
399 |
$field['instructions'] = '';
|
400 |
|
272 |
}
|
273 |
|
274 |
// Screen: Admin
|
275 |
+
elseif($screen === 'admin' && acfe_is_admin()){
|
276 |
|
277 |
$screen_allow = true;
|
278 |
|
279 |
}
|
280 |
|
281 |
// Screen: Front
|
282 |
+
elseif($screen === 'front' && acfe_is_front()){
|
283 |
|
284 |
$screen_allow = true;
|
285 |
|
351 |
|
352 |
if($hide_required){
|
353 |
|
354 |
+
if(is_bool($hide_required) || $hide_required === 'all' || ($hide_required === 'front' && acfe_is_front()) || $hide_required === 'admin' && acfe_is_admin()){
|
355 |
|
356 |
$field['required'] = false;
|
357 |
|
372 |
|
373 |
if($hide_field){
|
374 |
|
375 |
+
if(is_bool($hide_field) || $hide_field === 'all' || ($hide_field === 'front' && acfe_is_front()) || $hide_field === 'admin' && acfe_is_admin()){
|
376 |
|
377 |
return false;
|
378 |
|
384 |
|
385 |
if($hide_label){
|
386 |
|
387 |
+
if(is_bool($hide_label) || $hide_label === 'all' || ($hide_label === 'front' && acfe_is_front()) || $hide_label === 'admin' && acfe_is_admin()){
|
388 |
|
389 |
$field['label'] = '';
|
390 |
|
394 |
|
395 |
$hide_instructions = acf_maybe_get($field, 'hide_instructions');
|
396 |
|
397 |
+
if(is_bool($hide_instructions) || $hide_instructions === 'all' || ($hide_instructions === 'front' && acfe_is_front()) || $hide_instructions === 'admin' && acfe_is_admin()){
|
398 |
|
399 |
$field['instructions'] = '';
|
400 |
|
@@ -417,14 +417,14 @@ class acfe_field_validation{
|
|
417 |
}
|
418 |
|
419 |
// Screen: Admin
|
420 |
-
elseif($screen === 'admin' &&
|
421 |
|
422 |
$screen_allow = true;
|
423 |
|
424 |
}
|
425 |
|
426 |
// Screen: Front
|
427 |
-
elseif($screen === 'front' &&
|
428 |
|
429 |
$screen_allow = true;
|
430 |
|
417 |
}
|
418 |
|
419 |
// Screen: Admin
|
420 |
+
elseif($screen === 'admin' && acfe_is_admin()){
|
421 |
|
422 |
$screen_allow = true;
|
423 |
|
424 |
}
|
425 |
|
426 |
// Screen: Front
|
427 |
+
elseif($screen === 'front' && acfe_is_front()){
|
428 |
|
429 |
$screen_allow = true;
|
430 |
|
@@ -23,8 +23,8 @@ class acfe_field_advanced_link extends acf_field{
|
|
23 |
add_action('wp_ajax_nopriv_acfe/fields/advanced_link/post_query', array($this, 'ajax_query'));
|
24 |
|
25 |
$this->post_object = acf_get_field_type('post_object');
|
26 |
-
remove_action('acf/render_field/type=post_object', array($this->post_object, 'render_field'), 9);
|
27 |
|
|
|
28 |
add_action('acf/render_field/type=post_object', array($this, 'post_object_render_field'), 9);
|
29 |
|
30 |
parent::__construct();
|
@@ -40,18 +40,17 @@ class acfe_field_advanced_link extends acf_field{
|
|
40 |
$field['choices'] = array();
|
41 |
|
42 |
// load posts
|
43 |
-
$posts = $this->post_object->get_posts(
|
44 |
|
45 |
if($posts){
|
46 |
|
47 |
-
foreach(
|
48 |
|
49 |
// vars
|
50 |
-
$post = acf_extract_var(
|
51 |
-
|
52 |
|
53 |
// append to choices
|
54 |
-
$field['choices'][ $post->ID ] = $this->post_object->get_post_title(
|
55 |
|
56 |
}
|
57 |
|
@@ -273,8 +272,12 @@ function my_acf_advanced_link_sub_fields($sub_fields, $field, $value){
|
|
273 |
|
274 |
$term = get_term(intval($value['term']));
|
275 |
|
276 |
-
$
|
277 |
-
|
|
|
|
|
|
|
|
|
278 |
|
279 |
}
|
280 |
|
23 |
add_action('wp_ajax_nopriv_acfe/fields/advanced_link/post_query', array($this, 'ajax_query'));
|
24 |
|
25 |
$this->post_object = acf_get_field_type('post_object');
|
|
|
26 |
|
27 |
+
remove_action('acf/render_field/type=post_object', array($this->post_object, 'render_field'), 9);
|
28 |
add_action('acf/render_field/type=post_object', array($this, 'post_object_render_field'), 9);
|
29 |
|
30 |
parent::__construct();
|
40 |
$field['choices'] = array();
|
41 |
|
42 |
// load posts
|
43 |
+
$posts = $this->post_object->get_posts($field['value'], $field);
|
44 |
|
45 |
if($posts){
|
46 |
|
47 |
+
foreach(array_keys($posts) as $i){
|
48 |
|
49 |
// vars
|
50 |
+
$post = acf_extract_var($posts, $i);
|
|
|
51 |
|
52 |
// append to choices
|
53 |
+
$field['choices'][ $post->ID ] = $this->post_object->get_post_title($post, $field);
|
54 |
|
55 |
}
|
56 |
|
272 |
|
273 |
$term = get_term(intval($value['term']));
|
274 |
|
275 |
+
if(!empty($term) && !is_wp_error($term)){
|
276 |
+
|
277 |
+
$value['url'] = get_term_link($term);
|
278 |
+
$value['url_title'] = $term->name;
|
279 |
+
|
280 |
+
}
|
281 |
|
282 |
}
|
283 |
|
@@ -70,7 +70,7 @@ class acfe_field_button extends acf_field{
|
|
70 |
'layout' => 'horizontal',
|
71 |
'choices' => array(
|
72 |
'button' => __('Button', 'acfe'),
|
73 |
-
'submit' => __('
|
74 |
),
|
75 |
));
|
76 |
|
@@ -114,76 +114,12 @@ class acfe_field_button extends acf_field{
|
|
114 |
// Ajax
|
115 |
acf_render_field_setting($field, array(
|
116 |
'label' => __('Ajax call', 'acfe'),
|
117 |
-
'instructions' => __('Trigger ajax event on click', 'acfe'),
|
118 |
'name' => 'button_ajax',
|
119 |
'type' => 'true_false',
|
120 |
'ui' => 1,
|
121 |
));
|
122 |
|
123 |
-
ob_start();
|
124 |
-
?>
|
125 |
-
Write your own Ajax return data using the following hook:<br /><br />
|
126 |
-
<pre>
|
127 |
-
add_action('acfe/fields/button/name=my_button', 'my_acf_button_ajax', 10, 2);
|
128 |
-
function my_acf_button_ajax($field, $post_id){
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @array $field Field array
|
132 |
-
* @bool/string $post_id Current post ID
|
133 |
-
*/
|
134 |
-
|
135 |
-
wp_send_json('Success!');
|
136 |
-
|
137 |
-
}
|
138 |
-
</pre>
|
139 |
-
<br />
|
140 |
-
You can get access to Javascript ajax call using the following JS hooks:<br /><br />
|
141 |
-
<pre>
|
142 |
-
acf.addAction('acfe/fields/button/before/name=my_button', function($el, data){
|
143 |
-
|
144 |
-
// $el
|
145 |
-
|
146 |
-
});
|
147 |
-
|
148 |
-
acf.addAction('acfe/fields/button/success/name=my_button', function(response, $el, data){
|
149 |
-
|
150 |
-
// response
|
151 |
-
// $el
|
152 |
-
// data
|
153 |
-
|
154 |
-
});
|
155 |
-
|
156 |
-
acf.addAction('acfe/fields/button/complete/name=my_button', function(response, $el, data){
|
157 |
-
|
158 |
-
// response
|
159 |
-
// $el
|
160 |
-
// data
|
161 |
-
|
162 |
-
});
|
163 |
-
</pre>
|
164 |
-
<?php
|
165 |
-
|
166 |
-
$message = ob_get_clean();
|
167 |
-
|
168 |
-
// ajax instructions
|
169 |
-
acf_render_field_setting($field, array(
|
170 |
-
'label' => __('Ajax instructions','acf'),
|
171 |
-
'instructions' => '',
|
172 |
-
'type' => 'message',
|
173 |
-
'name' => 'instructions',
|
174 |
-
'message' => $message,
|
175 |
-
'new_lines' => false,
|
176 |
-
'conditional_logic' => array(
|
177 |
-
array(
|
178 |
-
array(
|
179 |
-
'field' => 'button_ajax',
|
180 |
-
'operator' => '==',
|
181 |
-
'value' => '1',
|
182 |
-
)
|
183 |
-
)
|
184 |
-
)
|
185 |
-
));
|
186 |
-
|
187 |
}
|
188 |
|
189 |
function render_field($field){
|
@@ -204,9 +140,12 @@ acf.addAction('acfe/fields/button/complete/name=my_button', function(response, $
|
|
204 |
// Button
|
205 |
if($field['button_type'] === 'button'){
|
206 |
|
207 |
-
echo '<button
|
|
|
208 |
id="' . esc_attr($field['button_id']) . '"
|
209 |
class="' . esc_attr($field['button_class']) . '"
|
|
|
|
|
210 |
' . $ajax . '
|
211 |
>' . esc_attr($field['button_value']) . '</button>';
|
212 |
|
@@ -214,10 +153,11 @@ acf.addAction('acfe/fields/button/complete/name=my_button', function(response, $
|
|
214 |
}elseif($field['button_type'] === 'submit'){
|
215 |
|
216 |
echo '<input
|
217 |
-
type="submit"
|
218 |
id="' . esc_attr($field['button_id']) . '"
|
219 |
-
class="' . esc_attr($field['button_class']) . '"
|
220 |
-
|
|
|
221 |
' . $ajax . '
|
222 |
/>';
|
223 |
|
70 |
'layout' => 'horizontal',
|
71 |
'choices' => array(
|
72 |
'button' => __('Button', 'acfe'),
|
73 |
+
'submit' => __('Input', 'acfe'),
|
74 |
),
|
75 |
));
|
76 |
|
114 |
// Ajax
|
115 |
acf_render_field_setting($field, array(
|
116 |
'label' => __('Ajax call', 'acfe'),
|
117 |
+
'instructions' => __('Trigger ajax event on click. <a href="https://www.acf-extended.com/features/fields/button" target="_blank">See documentation</a>', 'acfe'),
|
118 |
'name' => 'button_ajax',
|
119 |
'type' => 'true_false',
|
120 |
'ui' => 1,
|
121 |
));
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
|
125 |
function render_field($field){
|
140 |
// Button
|
141 |
if($field['button_type'] === 'button'){
|
142 |
|
143 |
+
echo '<button
|
144 |
+
type="submit"
|
145 |
id="' . esc_attr($field['button_id']) . '"
|
146 |
class="' . esc_attr($field['button_class']) . '"
|
147 |
+
name="' . esc_attr($field['name']) . '"
|
148 |
+
value="' . esc_attr($field['button_value']) . '"
|
149 |
' . $ajax . '
|
150 |
>' . esc_attr($field['button_value']) . '</button>';
|
151 |
|
153 |
}elseif($field['button_type'] === 'submit'){
|
154 |
|
155 |
echo '<input
|
156 |
+
type="submit"
|
157 |
id="' . esc_attr($field['button_id']) . '"
|
158 |
+
class="' . esc_attr($field['button_class']) . '"
|
159 |
+
name="' . esc_attr($field['name']) . '"
|
160 |
+
value="' . esc_attr($field['button_value']) . '"
|
161 |
' . $ajax . '
|
162 |
/>';
|
163 |
|
@@ -9,39 +9,28 @@ class acfe_field_checkbox{
|
|
9 |
|
10 |
function __construct(){
|
11 |
|
12 |
-
add_action('current_screen', array($this, 'current_screen'));
|
13 |
-
|
14 |
-
}
|
15 |
-
|
16 |
-
function current_screen(){
|
17 |
-
|
18 |
// Field Group UI
|
19 |
-
|
20 |
-
|
21 |
-
add_filter('acf/prepare_field/name=choices', array($this, 'prepare_field_choices'), 5);
|
22 |
-
|
23 |
-
}else{
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
}
|
37 |
-
|
38 |
-
|
39 |
|
40 |
}
|
41 |
|
42 |
-
function
|
|
|
|
|
43 |
|
44 |
-
|
|
|
45 |
|
46 |
if(acf_maybe_get($wrapper, 'data-setting') !== 'radio' && acf_maybe_get($wrapper, 'data-setting') !== 'checkbox')
|
47 |
return $field;
|
9 |
|
10 |
function __construct(){
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
// Field Group UI
|
13 |
+
add_filter('acf/prepare_field/name=choices', array($this, 'prepare_field_group_choices'), 5);
|
|
|
|
|
|
|
|
|
14 |
|
15 |
+
// Filters
|
16 |
+
add_filter('acf/prepare_field/type=acfe_taxonomy_terms', array($this, 'prepare_checkbox'), 20);
|
17 |
+
add_filter('acf/prepare_field/type=radio', array($this, 'prepare_checkbox'), 20);
|
18 |
+
add_filter('acf/prepare_field/type=checkbox', array($this, 'prepare_checkbox'), 20);
|
19 |
|
20 |
+
add_filter('acf/prepare_field/type=radio', array($this, 'prepare_radio'), 20);
|
21 |
+
add_filter('acf/prepare_field/type=acfe_taxonomy_terms', array($this, 'prepare_radio'), 20);
|
22 |
|
23 |
+
add_filter('acfe/field_wrapper_attributes/type=radio', array($this, 'field_wrapper'), 10, 2);
|
24 |
+
add_filter('acfe/field_wrapper_attributes/type=checkbox', array($this, 'field_wrapper'), 10, 2);
|
|
|
|
|
|
|
|
|
25 |
|
26 |
}
|
27 |
|
28 |
+
function prepare_field_group_choices($field){
|
29 |
+
|
30 |
+
$wrapper = acf_maybe_get($field, 'wrapper');
|
31 |
|
32 |
+
if(!$wrapper)
|
33 |
+
return $field;
|
34 |
|
35 |
if(acf_maybe_get($wrapper, 'data-setting') !== 'radio' && acf_maybe_get($wrapper, 'data-setting') !== 'checkbox')
|
36 |
return $field;
|
@@ -151,8 +151,12 @@ class acfe_field_column extends acf_field{
|
|
151 |
|
152 |
global $pagenow;
|
153 |
|
154 |
-
// Do not render on User/Term views (because of Table render)
|
155 |
-
if(acf_is_screen(array('profile', 'user
|
|
|
|
|
|
|
|
|
156 |
return false;
|
157 |
|
158 |
$field['label'] = false;
|
151 |
|
152 |
global $pagenow;
|
153 |
|
154 |
+
// Do not render on User/Term views without Enhanced UI module (because of Table render)
|
155 |
+
if((acf_is_screen(array('profile', 'user-edit')) || (acf_is_screen('user') && !is_multisite()) || $pagenow === 'term.php') && !acf_get_setting('acfe/modules/ui'))
|
156 |
+
return false;
|
157 |
+
|
158 |
+
// Do not render on New Term page (forced to left)
|
159 |
+
if($pagenow === 'edit-tags.php')
|
160 |
return false;
|
161 |
|
162 |
$field['label'] = false;
|
@@ -50,6 +50,15 @@ function my_acf_dynamic_message(){
|
|
50 |
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
// initialize
|
50 |
|
51 |
}
|
52 |
|
53 |
+
function render_field($field){
|
54 |
+
|
55 |
+
if(!isset($field['render']) || !is_callable($field['render']))
|
56 |
+
return;
|
57 |
+
|
58 |
+
call_user_func_array($field['render'], array($field));
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
}
|
63 |
|
64 |
// initialize
|
@@ -101,10 +101,11 @@ class acfe_field_file{
|
|
101 |
'instructions' => __('Choose the uploader type'),
|
102 |
'type' => 'radio',
|
103 |
'choices' => array(
|
|
|
104 |
'wp' => 'WordPress',
|
105 |
'basic' => 'Browser',
|
106 |
),
|
107 |
-
'default_value' => '
|
108 |
'layout' => 'horizontal',
|
109 |
'return_format' => 'value',
|
110 |
));
|
@@ -117,6 +118,14 @@ class acfe_field_file{
|
|
117 |
if(acf_is_filter_enabled('acfe/form/uploader'))
|
118 |
acfe_unset($field, 'uploader');
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
return $field;
|
121 |
|
122 |
}
|
101 |
'instructions' => __('Choose the uploader type'),
|
102 |
'type' => 'radio',
|
103 |
'choices' => array(
|
104 |
+
'' => 'Default',
|
105 |
'wp' => 'WordPress',
|
106 |
'basic' => 'Browser',
|
107 |
),
|
108 |
+
'default_value' => '',
|
109 |
'layout' => 'horizontal',
|
110 |
'return_format' => 'value',
|
111 |
));
|
118 |
if(acf_is_filter_enabled('acfe/form/uploader'))
|
119 |
acfe_unset($field, 'uploader');
|
120 |
|
121 |
+
if(!acf_maybe_get($field, 'uploader'))
|
122 |
+
$field['uploader'] = acf_get_setting('uploader');
|
123 |
+
|
124 |
+
if(!current_user_can('upload_files'))
|
125 |
+
$field['uploader'] = 'basic';
|
126 |
+
|
127 |
+
acf_update_setting('uploader', $field['uploader']);
|
128 |
+
|
129 |
return $field;
|
130 |
|
131 |
}
|
@@ -0,0 +1,424 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_actions')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_actions{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 6);
|
14 |
+
add_filter('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 6);
|
15 |
+
|
16 |
+
add_filter('acfe/flexible/validate_field', array($this, 'validate_actions'));
|
17 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
18 |
+
add_filter('acfe/flexible/load_fields', array($this, 'load_fields'), 10, 2);
|
19 |
+
add_filter('acfe/flexible/prepare_layout', array($this, 'prepare_layout'), 10, 5);
|
20 |
+
add_filter('acfe/flexible/layouts/icons', array($this, 'layout_icons'), 11, 3);
|
21 |
+
add_filter("acfe/flexible/secondary_actions", array($this, 'secondary_actions'), 10, 2);
|
22 |
+
|
23 |
+
add_filter('acf/fields/flexible_content/layout_title', array($this, 'layout_title'), 5, 4);
|
24 |
+
add_filter('acf/load_value/type=flexible_content', array($this, 'load_value'), 10, 3);
|
25 |
+
|
26 |
+
}
|
27 |
+
|
28 |
+
function defaults_field($field){
|
29 |
+
|
30 |
+
$field['acfe_flexible_add_actions'] = array();
|
31 |
+
|
32 |
+
return $field;
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
function render_field_settings($field){
|
37 |
+
|
38 |
+
/*
|
39 |
+
* Old settings:
|
40 |
+
*
|
41 |
+
* acfe_flexible_title_edition
|
42 |
+
* acfe_flexible_toggle
|
43 |
+
* acfe_flexible_copy_paste
|
44 |
+
* acfe_flexible_lock
|
45 |
+
* acfe_flexible_close_button
|
46 |
+
*
|
47 |
+
* acfe_flexible_clone
|
48 |
+
*/
|
49 |
+
|
50 |
+
$choices = array(
|
51 |
+
'title' => 'Inline Title Edit',
|
52 |
+
'toggle' => 'Toggle Layout',
|
53 |
+
'copy' => 'Copy/paste Layout',
|
54 |
+
'lock' => 'Lock Layouts',
|
55 |
+
'close' => 'Close Button',
|
56 |
+
);
|
57 |
+
|
58 |
+
if(acf_version_compare(acf_get_setting('version'), '<', '5.9')){
|
59 |
+
$choices['clone'] = 'Clone';
|
60 |
+
}
|
61 |
+
|
62 |
+
acf_render_field_setting($field, array(
|
63 |
+
'label' => __('Additional Actions'),
|
64 |
+
'name' => 'acfe_flexible_add_actions',
|
65 |
+
'key' => 'acfe_flexible_add_actions',
|
66 |
+
'instructions' => __('Additional actions'),
|
67 |
+
'type' => 'checkbox',
|
68 |
+
'default_value' => '',
|
69 |
+
'layout' => 'horizontal',
|
70 |
+
'choices' => $choices,
|
71 |
+
'conditional_logic' => array(
|
72 |
+
array(
|
73 |
+
array(
|
74 |
+
'field' => 'acfe_flexible_advanced',
|
75 |
+
'operator' => '==',
|
76 |
+
'value' => '1',
|
77 |
+
),
|
78 |
+
)
|
79 |
+
)
|
80 |
+
));
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
function validate_actions($field){
|
85 |
+
|
86 |
+
$actions = acf_get_array($field['acfe_flexible_add_actions']);
|
87 |
+
|
88 |
+
// acfe_flexible_title_edition
|
89 |
+
if(acf_maybe_get($field, 'acfe_flexible_title_edition')){
|
90 |
+
|
91 |
+
if(!in_array('title', $actions)) $actions[] = 'title';
|
92 |
+
acfe_unset($field, 'acfe_flexible_title_edition');
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
// acfe_flexible_toggle
|
97 |
+
if(acf_maybe_get($field, 'acfe_flexible_toggle')){
|
98 |
+
|
99 |
+
if(!in_array('toggle', $actions)) $actions[] = 'toggle';
|
100 |
+
acfe_unset($field, 'acfe_flexible_toggle');
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
// acfe_flexible_copy_paste
|
105 |
+
if(acf_maybe_get($field, 'acfe_flexible_copy_paste')){
|
106 |
+
|
107 |
+
if(!in_array('copy', $actions)) $actions[] = 'copy';
|
108 |
+
acfe_unset($field, 'acfe_flexible_copy_paste');
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
// acfe_flexible_lock
|
113 |
+
if(acf_maybe_get($field, 'acfe_flexible_lock')){
|
114 |
+
|
115 |
+
if(!in_array('lock', $actions)) $actions[] = 'lock';
|
116 |
+
acfe_unset($field, 'acfe_flexible_lock');
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
// acfe_flexible_close_button
|
121 |
+
if(acf_maybe_get($field, 'acfe_flexible_close_button')){
|
122 |
+
|
123 |
+
if(!in_array('close', $actions)) $actions[] = 'close';
|
124 |
+
acfe_unset($field, 'acfe_flexible_close_button');
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
// acfe_flexible_clone
|
129 |
+
if(acf_maybe_get($field, 'acfe_flexible_clone')){
|
130 |
+
|
131 |
+
if(!in_array('clone', $actions)) $actions[] = 'clone';
|
132 |
+
acfe_unset($field, 'acfe_flexible_clone');
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
$field['acfe_flexible_add_actions'] = $actions;
|
137 |
+
|
138 |
+
return $field;
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
function wrapper_attributes($wrapper, $field){
|
143 |
+
|
144 |
+
$actions = $field['acfe_flexible_add_actions'];
|
145 |
+
|
146 |
+
// Title
|
147 |
+
if(in_array('title', $actions))
|
148 |
+
$wrapper['data-acfe-flexible-title-edition'] = 1;
|
149 |
+
|
150 |
+
// Toggle
|
151 |
+
if(in_array('toggle', $actions))
|
152 |
+
$wrapper['data-acfe-flexible-toggle'] = 1;
|
153 |
+
|
154 |
+
// Copy
|
155 |
+
if(in_array('copy', $actions))
|
156 |
+
$wrapper['data-acfe-flexible-copy-paste'] = 1;
|
157 |
+
|
158 |
+
// Lock
|
159 |
+
$lock = in_array('lock', $actions);
|
160 |
+
$lock = apply_filters("acfe/flexible/lock", $lock, $field);
|
161 |
+
$lock = apply_filters("acfe/flexible/lock/name={$field['_name']}", $lock, $field);
|
162 |
+
$lock = apply_filters("acfe/flexible/lock/key={$field['key']}", $lock, $field);
|
163 |
+
|
164 |
+
if($lock)
|
165 |
+
$wrapper['data-acfe-flexible-lock'] = 1;
|
166 |
+
|
167 |
+
// Clone
|
168 |
+
if(in_array('close', $actions))
|
169 |
+
$wrapper['data-acfe-flexible-close-button'] = 1;
|
170 |
+
|
171 |
+
return $wrapper;
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
function load_fields($fields, $field){
|
176 |
+
|
177 |
+
// Actions
|
178 |
+
$actions = $field['acfe_flexible_add_actions'];
|
179 |
+
|
180 |
+
foreach($field['layouts'] as $i => $layout){
|
181 |
+
|
182 |
+
// Title
|
183 |
+
if(in_array('title', $actions)){
|
184 |
+
|
185 |
+
// Vars
|
186 |
+
$key = "field_{$layout['key']}_title";
|
187 |
+
$name = 'acfe_flexible_layout_title';
|
188 |
+
$label = $layout['label'];
|
189 |
+
|
190 |
+
// Add local
|
191 |
+
acf_add_local_field(array(
|
192 |
+
'label' => false,
|
193 |
+
'key' => $key,
|
194 |
+
'name' => $name,
|
195 |
+
'type' => 'text',
|
196 |
+
'required' => false,
|
197 |
+
'maxlength' => false,
|
198 |
+
'default_value' => $label,
|
199 |
+
'placeholder' => $label,
|
200 |
+
'parent_layout' => $layout['key'],
|
201 |
+
'parent' => $field['key']
|
202 |
+
));
|
203 |
+
|
204 |
+
// Add sub field
|
205 |
+
array_unshift($fields, acf_get_field($key));
|
206 |
+
|
207 |
+
}
|
208 |
+
|
209 |
+
// Toggle
|
210 |
+
if(in_array('toggle', $actions)){
|
211 |
+
|
212 |
+
// Vars
|
213 |
+
$key = "field_{$layout['key']}_toggle";
|
214 |
+
$name = 'acfe_flexible_toggle';
|
215 |
+
|
216 |
+
// Add local
|
217 |
+
acf_add_local_field(array(
|
218 |
+
'label' => false,
|
219 |
+
'key' => $key,
|
220 |
+
'name' => $name,
|
221 |
+
'type' => 'acfe_hidden',
|
222 |
+
'required' => false,
|
223 |
+
'default_value' => false,
|
224 |
+
'parent_layout' => $layout['key'],
|
225 |
+
'parent' => $field['key']
|
226 |
+
));
|
227 |
+
|
228 |
+
// Add sub field
|
229 |
+
array_unshift($fields, acf_get_field($key));
|
230 |
+
|
231 |
+
}
|
232 |
+
|
233 |
+
}
|
234 |
+
|
235 |
+
return $fields;
|
236 |
+
|
237 |
+
}
|
238 |
+
|
239 |
+
function prepare_layout($layout, $field, $i, $value, $prefix){
|
240 |
+
|
241 |
+
if(empty($layout['sub_fields']))
|
242 |
+
return $layout;
|
243 |
+
|
244 |
+
// Actions
|
245 |
+
$actions = $field['acfe_flexible_add_actions'];
|
246 |
+
|
247 |
+
// Title
|
248 |
+
if(in_array('title', $actions)){
|
249 |
+
|
250 |
+
$sub_field = acfe_extract_sub_field($layout, 'acfe_flexible_layout_title', $value);
|
251 |
+
|
252 |
+
if($sub_field){
|
253 |
+
|
254 |
+
// update prefix to allow for nested values
|
255 |
+
$sub_field['prefix'] = $prefix;
|
256 |
+
$sub_field['class'] = 'acfe-flexible-control-title';
|
257 |
+
$sub_field['data-acfe-flexible-control-title-input'] = 1;
|
258 |
+
|
259 |
+
$sub_field = acf_validate_field($sub_field);
|
260 |
+
$sub_field = acf_prepare_field($sub_field);
|
261 |
+
|
262 |
+
$input_attrs = array();
|
263 |
+
foreach(array('type', 'id', 'class', 'name', 'value', 'placeholder', 'maxlength', 'pattern', 'readonly', 'disabled', 'required', 'data-acfe-flexible-control-title-input') as $k){
|
264 |
+
|
265 |
+
if(isset($sub_field[$k])){
|
266 |
+
$input_attrs[$k] = $sub_field[$k];
|
267 |
+
}
|
268 |
+
|
269 |
+
}
|
270 |
+
|
271 |
+
// render input
|
272 |
+
echo acf_get_text_input(acf_filter_attrs($input_attrs));
|
273 |
+
|
274 |
+
}
|
275 |
+
|
276 |
+
}
|
277 |
+
|
278 |
+
// Toggle
|
279 |
+
if(in_array('toggle', $actions)){
|
280 |
+
|
281 |
+
$sub_field = acfe_extract_sub_field($layout, 'acfe_flexible_toggle', $value);
|
282 |
+
|
283 |
+
if($sub_field){
|
284 |
+
|
285 |
+
// update prefix to allow for nested values
|
286 |
+
$sub_field['prefix'] = $prefix;
|
287 |
+
$sub_field['class'] = 'acfe-flexible-layout-toggle';
|
288 |
+
|
289 |
+
$sub_field = acf_validate_field($sub_field);
|
290 |
+
$sub_field = acf_prepare_field($sub_field);
|
291 |
+
|
292 |
+
$input_attrs = array();
|
293 |
+
foreach(array('type', 'id', 'class', 'name', 'value') as $k){
|
294 |
+
|
295 |
+
if(isset($sub_field[$k])){
|
296 |
+
$input_attrs[$k] = $sub_field[$k];
|
297 |
+
}
|
298 |
+
|
299 |
+
}
|
300 |
+
|
301 |
+
// render input
|
302 |
+
echo acf_get_hidden_input(acf_filter_attrs($input_attrs));
|
303 |
+
|
304 |
+
}
|
305 |
+
|
306 |
+
}
|
307 |
+
|
308 |
+
return $layout;
|
309 |
+
|
310 |
+
}
|
311 |
+
|
312 |
+
function layout_icons($icons, $layout, $field){
|
313 |
+
|
314 |
+
$actions = $field['acfe_flexible_add_actions'];
|
315 |
+
|
316 |
+
// Toggle
|
317 |
+
if(in_array('toggle', $actions)){
|
318 |
+
|
319 |
+
$icons = array_merge(array(
|
320 |
+
'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>'
|
321 |
+
), $icons);
|
322 |
+
|
323 |
+
}
|
324 |
+
|
325 |
+
// Copy
|
326 |
+
if(in_array('copy', $actions)){
|
327 |
+
|
328 |
+
$icons = array_merge(array(
|
329 |
+
'copy' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-category" href="#" title="Copy layout" data-acfe-flexible-control-copy="' . $layout['name'] . '"></a>'
|
330 |
+
), $icons);
|
331 |
+
|
332 |
+
}
|
333 |
+
|
334 |
+
// Clone
|
335 |
+
if(in_array('clone', $actions) && acf_version_compare(acf_get_setting('version'), '<', '5.9')){
|
336 |
+
|
337 |
+
$icons = array_merge($icons, array(
|
338 |
+
'clone' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-admin-page" href="#" title="Clone layout" data-acfe-flexible-control-clone="' . $layout['name'] . '"></a>'
|
339 |
+
));
|
340 |
+
|
341 |
+
}
|
342 |
+
|
343 |
+
return $icons;
|
344 |
+
|
345 |
+
}
|
346 |
+
|
347 |
+
function secondary_actions($actions, $field){
|
348 |
+
|
349 |
+
if(!in_array('copy', $field['acfe_flexible_add_actions']))
|
350 |
+
return $actions;
|
351 |
+
|
352 |
+
$actions['copy'] = '<a href="#" data-acfe-flexible-control-action="copy">' . __('Copy layouts', 'acfe') . '</a>';
|
353 |
+
$actions['paste'] = '<a href="#" data-acfe-flexible-control-action="paste">' . __('Paste layouts', 'acfe') . '</a>';
|
354 |
+
|
355 |
+
return $actions;
|
356 |
+
|
357 |
+
}
|
358 |
+
|
359 |
+
function layout_title($title, $field, $layout, $i){
|
360 |
+
|
361 |
+
if(!in_array('title', $field['acfe_flexible_add_actions']))
|
362 |
+
return $title;
|
363 |
+
|
364 |
+
// Get Layout Title
|
365 |
+
$value = get_sub_field('acfe_flexible_layout_title');
|
366 |
+
|
367 |
+
if(!empty($value))
|
368 |
+
$title = wp_unslash($value);
|
369 |
+
|
370 |
+
return '<span class="acfe-layout-title acf-js-tooltip" title="' . __('Layout', 'acfe') . ': ' . esc_attr(strip_tags($layout['label'])) . '"><span class="acfe-layout-title-text">' . $title . '</span></span>';
|
371 |
+
|
372 |
+
}
|
373 |
+
|
374 |
+
function load_value($value, $post_id, $field){
|
375 |
+
|
376 |
+
// Bail early if admin
|
377 |
+
if(is_admin() && !wp_doing_ajax())
|
378 |
+
return $value;
|
379 |
+
|
380 |
+
// Bail early if preview
|
381 |
+
if(acf_maybe_get_POST('action') === 'acfe/flexible/layout_preview')
|
382 |
+
return $value;
|
383 |
+
|
384 |
+
if(empty($field['layouts']))
|
385 |
+
return $value;
|
386 |
+
|
387 |
+
if(!in_array('toggle', $field['acfe_flexible_add_actions']))
|
388 |
+
return $value;
|
389 |
+
|
390 |
+
$models = array();
|
391 |
+
|
392 |
+
foreach($field['layouts'] as $layout_key => $layout){
|
393 |
+
|
394 |
+
$models[$layout['name']] = array(
|
395 |
+
'key' => $layout['key'],
|
396 |
+
'name' => $layout['name'],
|
397 |
+
'toggle' => "field_{$layout['key']}_toggle"
|
398 |
+
);
|
399 |
+
|
400 |
+
}
|
401 |
+
|
402 |
+
$value = acf_get_array($value);
|
403 |
+
|
404 |
+
foreach($value as $k => $layout){
|
405 |
+
|
406 |
+
if(!isset($models[$layout['acf_fc_layout']]))
|
407 |
+
continue;
|
408 |
+
|
409 |
+
if(!acf_maybe_get($layout, $models[$layout['acf_fc_layout']]['toggle']))
|
410 |
+
continue;
|
411 |
+
|
412 |
+
unset($value[$k]);
|
413 |
+
|
414 |
+
}
|
415 |
+
|
416 |
+
return $value;
|
417 |
+
|
418 |
+
}
|
419 |
+
|
420 |
+
}
|
421 |
+
|
422 |
+
acf_new_instance('acfe_field_flexible_content_actions');
|
423 |
+
|
424 |
+
endif;
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_async')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_async{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 5);
|
14 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 5);
|
15 |
+
|
16 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
17 |
+
add_filter('acfe/flexible/layouts/model', array($this, 'layout_model'), 10, 3);
|
18 |
+
|
19 |
+
// Ajax
|
20 |
+
add_action('wp_ajax_acfe/flexible/models', array($this, 'ajax_layout_model'));
|
21 |
+
add_action('wp_ajax_nopriv_acfe/flexible/models', array($this, 'ajax_layout_model'));
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
function defaults_field($field){
|
26 |
+
|
27 |
+
$field['acfe_flexible_disable_ajax_title'] = false;
|
28 |
+
$field['acfe_flexible_layouts_ajax'] = false;
|
29 |
+
|
30 |
+
return $field;
|
31 |
+
|
32 |
+
}
|
33 |
+
|
34 |
+
function render_field_settings($field){
|
35 |
+
|
36 |
+
acf_render_field_setting($field, array(
|
37 |
+
'label' => __('Disable Legacy Title Ajax'),
|
38 |
+
'name' => 'acfe_flexible_disable_ajax_title',
|
39 |
+
'key' => 'acfe_flexible_disable_ajax_title',
|
40 |
+
'instructions' => __('Disable the native ACF Layout Title Ajax call. More informations: <a href="https://www.advancedcustomfields.com/resources/acf-fields-flexible_content-layout_title/" target="_blank">ACF documentation</a>.'),
|
41 |
+
'type' => 'true_false',
|
42 |
+
'message' => '',
|
43 |
+
'default_value' => false,
|
44 |
+
'ui' => true,
|
45 |
+
'ui_on_text' => '',
|
46 |
+
'ui_off_text' => '',
|
47 |
+
'conditional_logic' => array(
|
48 |
+
array(
|
49 |
+
array(
|
50 |
+
'field' => 'acfe_flexible_advanced',
|
51 |
+
'operator' => '==',
|
52 |
+
'value' => '1',
|
53 |
+
),
|
54 |
+
)
|
55 |
+
)
|
56 |
+
));
|
57 |
+
|
58 |
+
// Layouts ajax
|
59 |
+
acf_render_field_setting($field, array(
|
60 |
+
'label' => __('Asynchronous Layouts'),
|
61 |
+
'name' => 'acfe_flexible_layouts_ajax',
|
62 |
+
'key' => 'acfe_flexible_layouts_ajax',
|
63 |
+
'instructions' => __('Add layouts using Ajax method. This setting increase performance on complex Flexible Content'),
|
64 |
+
'type' => 'true_false',
|
65 |
+
'message' => '',
|
66 |
+
'default_value' => false,
|
67 |
+
'ui' => true,
|
68 |
+
'ui_on_text' => '',
|
69 |
+
'ui_off_text' => '',
|
70 |
+
'conditional_logic' => array(
|
71 |
+
array(
|
72 |
+
array(
|
73 |
+
'field' => 'acfe_flexible_advanced',
|
74 |
+
'operator' => '==',
|
75 |
+
'value' => '1',
|
76 |
+
),
|
77 |
+
)
|
78 |
+
)
|
79 |
+
));
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
function wrapper_attributes($wrapper, $field){
|
84 |
+
|
85 |
+
if($field['acfe_flexible_layouts_ajax'])
|
86 |
+
$wrapper['data-acfe-flexible-ajax'] = 1;
|
87 |
+
|
88 |
+
// Remove ajax 'layout_title' call
|
89 |
+
$disable = $field['acfe_flexible_disable_ajax_title'];
|
90 |
+
$disable = apply_filters("acfe/flexible/remove_ajax_title", $disable, $field);
|
91 |
+
$disable = apply_filters("acfe/flexible/remove_ajax_title/name={$field['_name']}", $disable, $field);
|
92 |
+
$disable = apply_filters("acfe/flexible/remove_ajax_title/key={$field['key']}", $disable, $field);
|
93 |
+
|
94 |
+
if($disable)
|
95 |
+
$wrapper['data-acfe-flexible-remove-ajax-title'] = 1;
|
96 |
+
|
97 |
+
return $wrapper;
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
function layout_model($return, $field, $layout){
|
102 |
+
|
103 |
+
if(!$field['acfe_flexible_layouts_ajax'])
|
104 |
+
return $return;
|
105 |
+
|
106 |
+
$i = 'acfcloneindex';
|
107 |
+
$id = 'acfcloneindex';
|
108 |
+
$value = array();
|
109 |
+
$prefix = $field['name'] . '[' . $id . ']';
|
110 |
+
$name = $field['_name'];
|
111 |
+
$key = $field['key'];
|
112 |
+
$l_name = $layout['name'];
|
113 |
+
|
114 |
+
$div = array(
|
115 |
+
'class' => 'layout acf-clone',
|
116 |
+
'data-id' => 'acfcloneindex',
|
117 |
+
'data-layout' => $layout['name']
|
118 |
+
);
|
119 |
+
|
120 |
+
$div = apply_filters("acfe/flexible/layouts/div", $div, $layout, $field, $i, $value, $prefix);
|
121 |
+
$div = apply_filters("acfe/flexible/layouts/div/name={$name}", $div, $layout, $field, $i, $value, $prefix);
|
122 |
+
$div = apply_filters("acfe/flexible/layouts/div/key={$key}", $div, $layout, $field, $i, $value, $prefix);
|
123 |
+
$div = apply_filters("acfe/flexible/layouts/div/layout={$l_name}", $div, $layout, $field, $i, $value, $prefix);
|
124 |
+
$div = apply_filters("acfe/flexible/layouts/div/name={$name}&layout={$l_name}", $div, $layout, $field, $i, $value, $prefix);
|
125 |
+
$div = apply_filters("acfe/flexible/layouts/div/key={$key}&layout={$l_name}", $div, $layout, $field, $i, $value, $prefix);
|
126 |
+
|
127 |
+
echo '<div ' . acf_esc_attrs($div) . '></div>';
|
128 |
+
|
129 |
+
return true;
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
function ajax_layout_model(){
|
134 |
+
|
135 |
+
// options
|
136 |
+
$options = acf_parse_args($_POST, array(
|
137 |
+
'field_key' => '',
|
138 |
+
'layout' => '',
|
139 |
+
));
|
140 |
+
|
141 |
+
$field = acf_get_field($options['field_key']);
|
142 |
+
if(!$field)
|
143 |
+
die;
|
144 |
+
|
145 |
+
$acfe_instance = acf_get_instance('acfe_field_flexible_content');
|
146 |
+
$field = acf_prepare_field($field);
|
147 |
+
|
148 |
+
foreach($field['layouts'] as $k => $layout){
|
149 |
+
|
150 |
+
if($layout['name'] !== $options['layout'])
|
151 |
+
continue;
|
152 |
+
|
153 |
+
$acfe_instance->render_layout($field, $layout, 'acfcloneindex', array());
|
154 |
+
die;
|
155 |
+
|
156 |
+
}
|
157 |
+
|
158 |
+
die;
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
}
|
163 |
+
|
164 |
+
acf_new_instance('acfe_field_flexible_content_async');
|
165 |
+
|
166 |
+
endif;
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_controls')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_controls{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 1);
|
14 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 1);
|
15 |
+
|
16 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
17 |
+
add_filter('acfe/flexible/prepare_layout', array($this, 'prepare_layout'), 20, 5);
|
18 |
+
add_filter('acfe/flexible/action_wrapper', array($this, 'action_wrapper'), 10, 2);
|
19 |
+
add_filter('acfe/flexible/action_button', array($this, 'action_button'), 10, 2);
|
20 |
+
add_filter('acfe/flexible/action_button_secondary', array($this, 'action_button_secondary'), 10, 2);
|
21 |
+
|
22 |
+
add_filter('acf/fields/flexible_content/no_value_message', array($this, 'no_value_message'), 1, 2);
|
23 |
+
|
24 |
+
}
|
25 |
+
|
26 |
+
function action_wrapper($wrapper, $field){
|
27 |
+
|
28 |
+
if($field['acfe_flexible_stylised_button']){
|
29 |
+
$wrapper['class'] = ' acfe-flexible-stylised-button';
|
30 |
+
}
|
31 |
+
|
32 |
+
return $wrapper;
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
function action_button($button, $field){
|
37 |
+
|
38 |
+
if(!$field['acfe_flexible_stylised_button']){
|
39 |
+
$button['class'] .= ' button-primary';
|
40 |
+
}
|
41 |
+
|
42 |
+
return $button;
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
function action_button_secondary($button, $field){
|
47 |
+
|
48 |
+
if(!$field['acfe_flexible_stylised_button']){
|
49 |
+
$button['class'] .= ' button-primary';
|
50 |
+
}
|
51 |
+
|
52 |
+
return $button;
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
function defaults_field($field){
|
57 |
+
|
58 |
+
$field['acfe_flexible_advanced'] = false;
|
59 |
+
$field['acfe_flexible_stylised_button'] = false;
|
60 |
+
$field['acfe_flexible_hide_empty_message'] = false;
|
61 |
+
$field['acfe_flexible_empty_message'] = '';
|
62 |
+
|
63 |
+
return $field;
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
function render_field_settings($field){
|
68 |
+
|
69 |
+
// Advanced settings
|
70 |
+
acf_render_field_setting($field, array(
|
71 |
+
'label' => __('Advanced Flexible Content'),
|
72 |
+
'name' => 'acfe_flexible_advanced',
|
73 |
+
'key' => 'acfe_flexible_advanced',
|
74 |
+
'instructions' => __('Show advanced Flexible Content settings'),
|
75 |
+
'type' => 'true_false',
|
76 |
+
'message' => '',
|
77 |
+
'default_value' => false,
|
78 |
+
'ui' => true,
|
79 |
+
'ui_on_text' => '',
|
80 |
+
'ui_off_text' => '',
|
81 |
+
));
|
82 |
+
|
83 |
+
// Stylised button
|
84 |
+
acf_render_field_setting($field, array(
|
85 |
+
'label' => __('Stylised Button'),
|
86 |
+
'name' => 'acfe_flexible_stylised_button',
|
87 |
+
'key' => 'acfe_flexible_stylised_button',
|
88 |
+
'instructions' => __('Better actions buttons integration'),
|
89 |
+
'type' => 'true_false',
|
90 |
+
'message' => '',
|
91 |
+
'default_value' => false,
|
92 |
+
'ui' => true,
|
93 |
+
'ui_on_text' => '',
|
94 |
+
'ui_off_text' => '',
|
95 |
+
'conditional_logic' => array(
|
96 |
+
array(
|
97 |
+
array(
|
98 |
+
'field' => 'acfe_flexible_advanced',
|
99 |
+
'operator' => '==',
|
100 |
+
'value' => '1',
|
101 |
+
),
|
102 |
+
array(
|
103 |
+
'field' => 'acfe_flexible_remove_add_button',
|
104 |
+
'operator' => '!=',
|
105 |
+
'value' => '1',
|
106 |
+
),
|
107 |
+
)
|
108 |
+
)
|
109 |
+
));
|
110 |
+
|
111 |
+
// Hide Empty Message
|
112 |
+
acf_render_field_setting($field, array(
|
113 |
+
'label' => __('Hide Empty Message'),
|
114 |
+
'name' => 'acfe_flexible_hide_empty_message',
|
115 |
+
'key' => 'acfe_flexible_hide_empty_message',
|
116 |
+
'instructions' => __('Hide the empty message box'),
|
117 |
+
'type' => 'true_false',
|
118 |
+
'message' => '',
|
119 |
+
'default_value' => false,
|
120 |
+
'ui' => true,
|
121 |
+
'ui_on_text' => '',
|
122 |
+
'ui_off_text' => '',
|
123 |
+
'conditional_logic' => array(
|
124 |
+
array(
|
125 |
+
array(
|
126 |
+
'field' => 'acfe_flexible_advanced',
|
127 |
+
'operator' => '==',
|
128 |
+
'value' => '1',
|
129 |
+
),
|
130 |
+
array(
|
131 |
+
'field' => 'acfe_flexible_stylised_button',
|
132 |
+
'operator' => '!=',
|
133 |
+
'value' => '1',
|
134 |
+
),
|
135 |
+
)
|
136 |
+
)
|
137 |
+
));
|
138 |
+
|
139 |
+
// Empty Message
|
140 |
+
acf_render_field_setting($field, array(
|
141 |
+
'label' => __('Empty Message'),
|
142 |
+
'name' => 'acfe_flexible_empty_message',
|
143 |
+
'key' => 'acfe_flexible_empty_message',
|
144 |
+
'instructions' => __('Text displayed when the flexible field is empty'),
|
145 |
+
'type' => 'text',
|
146 |
+
'placeholder' => __('Click the "Add Row" button below to start creating your layout'),
|
147 |
+
'conditional_logic' => array(
|
148 |
+
array(
|
149 |
+
array(
|
150 |
+
'field' => 'acfe_flexible_advanced',
|
151 |
+
'operator' => '==',
|
152 |
+
'value' => '1',
|
153 |
+
),
|
154 |
+
array(
|
155 |
+
'field' => 'acfe_flexible_stylised_button',
|
156 |
+
'operator' => '!=',
|
157 |
+
'value' => '1',
|
158 |
+
),
|
159 |
+
array(
|
160 |
+
'field' => 'acfe_flexible_hide_empty_message',
|
161 |
+
'operator' => '!=',
|
162 |
+
'value' => '1',
|
163 |
+
)
|
164 |
+
)
|
165 |
+
)
|
166 |
+
));
|
167 |
+
|
168 |
+
}
|
169 |
+
|
170 |
+
function wrapper_attributes($wrapper, $field){
|
171 |
+
|
172 |
+
// Stylised button
|
173 |
+
if($field['acfe_flexible_stylised_button']){
|
174 |
+
$wrapper['data-acfe-flexible-stylised-button'] = 1;
|
175 |
+
}
|
176 |
+
|
177 |
+
// Hide Empty Message
|
178 |
+
if($field['acfe_flexible_hide_empty_message'] || $field['acfe_flexible_stylised_button']){
|
179 |
+
$wrapper['data-acfe-flexible-hide-empty-message'] = 1;
|
180 |
+
}
|
181 |
+
|
182 |
+
return $wrapper;
|
183 |
+
|
184 |
+
}
|
185 |
+
|
186 |
+
function prepare_layout($layout, $field, $i, $value, $prefix){
|
187 |
+
|
188 |
+
// Vars
|
189 |
+
$name = $field['_name'];
|
190 |
+
$key = $field['key'];
|
191 |
+
$l_name = $layout['name'];
|
192 |
+
|
193 |
+
// Default
|
194 |
+
$icons = array(
|
195 |
+
'add' => '<a class="acf-icon -plus small light acf-js-tooltip" href="#" data-name="add-layout" title="' . __('Add layout','acf') . '"></a>',
|
196 |
+
'duplicate' => '<a class="acf-icon -duplicate small light acf-js-tooltip" href="#" data-name="duplicate-layout" title="' . __('Duplicate layout','acf') . '"></a>',
|
197 |
+
'delete' => '<a class="acf-icon -minus small light acf-js-tooltip" href="#" data-name="remove-layout" title="' . __('Remove layout','acf') . '"></a>',
|
198 |
+
'collapse' => '<a class="acf-icon -collapse small acf-js-tooltip" href="#" data-name="collapse-layout" title="' . __('Click to toggle','acf') . '"></a>'
|
199 |
+
);
|
200 |
+
|
201 |
+
// Previous ACF Version
|
202 |
+
if(acf_version_compare(acf_get_setting('version'), '<', '5.9')){
|
203 |
+
acfe_unset($icons, 'duplicate');
|
204 |
+
}
|
205 |
+
|
206 |
+
// Filters
|
207 |
+
$icons = apply_filters("acfe/flexible/layouts/icons", $icons, $layout, $field);
|
208 |
+
$icons = apply_filters("acfe/flexible/layouts/icons/name={$name}", $icons, $layout, $field);
|
209 |
+
$icons = apply_filters("acfe/flexible/layouts/icons/key={$key}", $icons, $layout, $field);
|
210 |
+
$icons = apply_filters("acfe/flexible/layouts/icons/name={$name}&layout={$l_name}", $icons, $layout, $field);
|
211 |
+
$icons = apply_filters("acfe/flexible/layouts/icons/key={$key}&layout={$l_name}", $icons, $layout, $field);
|
212 |
+
|
213 |
+
if(!empty($icons)){ ?>
|
214 |
+
<div class="acf-fc-layout-controls">
|
215 |
+
<?php foreach($icons as $icon){ ?>
|
216 |
+
<?php echo $icon; ?>
|
217 |
+
<?php } ?>
|
218 |
+
</div>
|
219 |
+
<?php }
|
220 |
+
|
221 |
+
return $layout;
|
222 |
+
|
223 |
+
}
|
224 |
+
|
225 |
+
function no_value_message($message, $field){
|
226 |
+
|
227 |
+
if(!empty($field['acfe_flexible_empty_message']))
|
228 |
+
$message = $field['acfe_flexible_empty_message'];
|
229 |
+
|
230 |
+
return $message;
|
231 |
+
|
232 |
+
}
|
233 |
+
|
234 |
+
}
|
235 |
+
|
236 |
+
acf_new_instance('acfe_field_flexible_content_controls');
|
237 |
+
|
238 |
+
endif;
|
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_edit')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_edit{
|
9 |
+
|
10 |
+
//
|
11 |
+
|
12 |
+
function __construct(){
|
13 |
+
|
14 |
+
// Hooks
|
15 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 9);
|
16 |
+
add_filter('acfe/flexible/defaults_layout', array($this, 'defaults_layout'), 9);
|
17 |
+
|
18 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 9);
|
19 |
+
add_action('acfe/flexible/render_layout_settings', array($this, 'render_layout_settings'), 19, 3);
|
20 |
+
|
21 |
+
add_filter('acfe/flexible/validate_field', array($this, 'validate_edit'));
|
22 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
23 |
+
add_action('acfe/flexible/pre_render_layout', array($this, 'pre_render_layout'), 5, 5);
|
24 |
+
add_action('acfe/flexible/render_layout', array($this, 'render_layout'), 20, 5);
|
25 |
+
add_filter('acfe/flexible/layouts/div', array($this, 'layout_div'), 10, 3);
|
26 |
+
add_filter('acfe/flexible/layouts/icons', array($this, 'layout_icons'), 50, 3);
|
27 |
+
add_filter('acfe/flexible/layouts/handle', array($this, 'layout_handle'), 10, 3);
|
28 |
+
add_filter('acfe/flexible/layouts/placeholder', array($this, 'layout_handle'), 10, 3);
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
function defaults_field($field){
|
33 |
+
|
34 |
+
$field['acfe_flexible_modal_edit'] = array(
|
35 |
+
'acfe_flexible_modal_edit_enabled' => false,
|
36 |
+
'acfe_flexible_modal_edit_size' => 'large',
|
37 |
+
);
|
38 |
+
|
39 |
+
return $field;
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
function defaults_layout($layout){
|
44 |
+
|
45 |
+
$layout['acfe_flexible_modal_edit_size'] = false;
|
46 |
+
|
47 |
+
return $layout;
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
function render_field_settings($field){
|
52 |
+
|
53 |
+
acf_render_field_setting($field, array(
|
54 |
+
'label' => __('Edit Modal'),
|
55 |
+
'name' => 'acfe_flexible_modal_edit',
|
56 |
+
'key' => 'acfe_flexible_modal_edit',
|
57 |
+
'instructions' => __('Edit layout content in a modal'),
|
58 |
+
'type' => 'group',
|
59 |
+
'layout' => 'block',
|
60 |
+
'sub_fields' => array(
|
61 |
+
array(
|
62 |
+
'label' => '',
|
63 |
+
'name' => 'acfe_flexible_modal_edit_enabled',
|
64 |
+
'key' => 'acfe_flexible_modal_edit_enabled',
|
65 |
+
'type' => 'true_false',
|
66 |
+
'instructions' => '',
|
67 |
+
'required' => false,
|
68 |
+
'wrapper' => array(
|
69 |
+
'class' => 'acfe_width_auto',
|
70 |
+
'id' => '',
|
71 |
+
),
|
72 |
+
'message' => '',
|
73 |
+
'default_value' => false,
|
74 |
+
'ui' => true,
|
75 |
+
'ui_on_text' => '',
|
76 |
+
'ui_off_text' => '',
|
77 |
+
'conditional_logic' => false,
|
78 |
+
),
|
79 |
+
array(
|
80 |
+
'label' => '',
|
81 |
+
'name' => 'acfe_flexible_modal_edit_size',
|
82 |
+
'key' => 'acfe_flexible_modal_edit_size',
|
83 |
+
'type' => 'select',
|
84 |
+
'prepend' => '',
|
85 |
+
'instructions' => false,
|
86 |
+
'required' => false,
|
87 |
+
'choices' => array(
|
88 |
+
'small' => 'Small',
|
89 |
+
'medium' => 'Medium',
|
90 |
+
'large' => 'Large',
|
91 |
+
'xlarge' => 'Extra Large',
|
92 |
+
'full' => 'Full',
|
93 |
+
),
|
94 |
+
'default_value' => 'large',
|
95 |
+
'wrapper' => array(
|
96 |
+
'width' => '25',
|
97 |
+
'class' => '',
|
98 |
+
'id' => '',
|
99 |
+
'data-acfe-prepend' => 'Size',
|
100 |
+
),
|
101 |
+
'conditional_logic' => array(
|
102 |
+
array(
|
103 |
+
array(
|
104 |
+
'field' => 'acfe_flexible_modal_edit_enabled',
|
105 |
+
'operator' => '==',
|
106 |
+
'value' => '1',
|
107 |
+
)
|
108 |
+
)
|
109 |
+
)
|
110 |
+
),
|
111 |
+
),
|
112 |
+
'conditional_logic' => array(
|
113 |
+
array(
|
114 |
+
array(
|
115 |
+
'field' => 'acfe_flexible_advanced',
|
116 |
+
'operator' => '==',
|
117 |
+
'value' => '1',
|
118 |
+
),
|
119 |
+
)
|
120 |
+
),
|
121 |
+
'wrapper' => array(
|
122 |
+
'class' => 'acfe-field-setting-flex'
|
123 |
+
)
|
124 |
+
));
|
125 |
+
|
126 |
+
}
|
127 |
+
|
128 |
+
function render_layout_settings($field, $layout, $prefix){
|
129 |
+
|
130 |
+
if(!$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
131 |
+
return;
|
132 |
+
|
133 |
+
// Title
|
134 |
+
echo '</li>';
|
135 |
+
acf_render_field_wrap(array(
|
136 |
+
'label' => __('Modal settings'),
|
137 |
+
'type' => 'hidden',
|
138 |
+
'name' => 'acfe_flexible_modal_edit_label',
|
139 |
+
'wrapper' => array(
|
140 |
+
'class' => 'acfe-flexible-field-setting',
|
141 |
+
)
|
142 |
+
), 'ul');
|
143 |
+
echo '<li>';
|
144 |
+
|
145 |
+
acf_render_field_wrap(array(
|
146 |
+
'label' => '',
|
147 |
+
'name' => 'acfe_flexible_modal_edit_size',
|
148 |
+
'type' => 'select',
|
149 |
+
'class' => '',
|
150 |
+
'prefix' => $prefix,
|
151 |
+
'value' => $layout['acfe_flexible_modal_edit_size'],
|
152 |
+
'placeholder' => 'Default',
|
153 |
+
'choices' => array(
|
154 |
+
'small' => 'Small',
|
155 |
+
'medium' => 'Medium',
|
156 |
+
'large' => 'Large',
|
157 |
+
'xlarge' => 'Extra Large',
|
158 |
+
'full' => 'Full',
|
159 |
+
),
|
160 |
+
'wrapper' => array(
|
161 |
+
'width' => '100',
|
162 |
+
'data-acfe-prepend' => 'Modal size',
|
163 |
+
),
|
164 |
+
'default_value' => '',
|
165 |
+
'allow_null' => 1,
|
166 |
+
'multiple' => 0,
|
167 |
+
'ui' => 0,
|
168 |
+
'ajax' => 0,
|
169 |
+
'return_format' => 0,
|
170 |
+
), 'ul');
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
function validate_edit($field){
|
175 |
+
|
176 |
+
if(!isset($field['acfe_flexible_modal_edition']))
|
177 |
+
return $field;
|
178 |
+
|
179 |
+
$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'] = $field['acfe_flexible_modal_edition'];
|
180 |
+
|
181 |
+
unset($field['acfe_flexible_modal_edition']);
|
182 |
+
|
183 |
+
return $field;
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
function wrapper_attributes($wrapper, $field){
|
188 |
+
|
189 |
+
// Check setting
|
190 |
+
if(!$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
191 |
+
return $wrapper;
|
192 |
+
|
193 |
+
$wrapper['data-acfe-flexible-modal-edition'] = 1;
|
194 |
+
|
195 |
+
return $wrapper;
|
196 |
+
|
197 |
+
}
|
198 |
+
|
199 |
+
function pre_render_layout($layout, $field, $i, $value, $prefix){
|
200 |
+
|
201 |
+
if(empty($layout['sub_fields']) || !$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
202 |
+
return;
|
203 |
+
|
204 |
+
// Field
|
205 |
+
$size = $field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_size'];
|
206 |
+
|
207 |
+
// Layout
|
208 |
+
if(!empty($layout['acfe_flexible_modal_edit_size']))
|
209 |
+
$size = $layout['acfe_flexible_modal_edit_size'];
|
210 |
+
|
211 |
+
?>
|
212 |
+
<div class="acfe-modal -fields -<?php echo $size; ?>">
|
213 |
+
<div class="acfe-modal-wrapper">
|
214 |
+
<div class="acfe-modal-content">
|
215 |
+
<?php
|
216 |
+
|
217 |
+
}
|
218 |
+
|
219 |
+
function render_layout($layout, $field, $i, $value, $prefix){
|
220 |
+
|
221 |
+
if(empty($layout['sub_fields']) || !$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
222 |
+
return;
|
223 |
+
|
224 |
+
?>
|
225 |
+
</div>
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
<?php
|
229 |
+
|
230 |
+
}
|
231 |
+
|
232 |
+
function layout_div($div, $layout, $field){
|
233 |
+
|
234 |
+
if(!$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
235 |
+
return $div;
|
236 |
+
|
237 |
+
// Already in class
|
238 |
+
if(in_array('-collapsed', explode(' ', $div['class'])))
|
239 |
+
return $div;
|
240 |
+
|
241 |
+
$div['class'] .= ' -collapsed';
|
242 |
+
|
243 |
+
return $div;
|
244 |
+
|
245 |
+
}
|
246 |
+
|
247 |
+
function layout_icons($icons, $layout, $field){
|
248 |
+
|
249 |
+
if(!$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
250 |
+
return $icons;
|
251 |
+
|
252 |
+
acfe_unset($icons, 'collapse');
|
253 |
+
|
254 |
+
return $icons;
|
255 |
+
|
256 |
+
}
|
257 |
+
|
258 |
+
function layout_handle($handle, $layout, $field){
|
259 |
+
|
260 |
+
if(!$field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
261 |
+
return $handle;
|
262 |
+
|
263 |
+
$handle['data-action'] = 'acfe-flexible-modal-edit';
|
264 |
+
|
265 |
+
return $handle;
|
266 |
+
|
267 |
+
}
|
268 |
+
|
269 |
+
}
|
270 |
+
|
271 |
+
acf_new_instance('acfe_field_flexible_content_edit');
|
272 |
+
|
273 |
+
endif;
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_hide')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_hide{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 7);
|
14 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 7);
|
15 |
+
|
16 |
+
add_filter('acfe/flexible/validate_field', array($this, 'validate_hide'));
|
17 |
+
add_filter('acfe/flexible/remove_actions', array($this, 'remove_actions'), 10, 2);
|
18 |
+
add_filter('acfe/flexible/layouts/icons', array($this, 'layout_icons'), 50, 3);
|
19 |
+
|
20 |
+
}
|
21 |
+
|
22 |
+
function defaults_field($field){
|
23 |
+
|
24 |
+
$field['acfe_flexible_remove_button'] = array();
|
25 |
+
|
26 |
+
return $field;
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
function render_field_settings($field){
|
31 |
+
|
32 |
+
$hide_choices = array(
|
33 |
+
'collapse' => 'Hide "Collapse"',
|
34 |
+
'add' => 'Hide "Add"',
|
35 |
+
'delete' => 'Hide "Delete"',
|
36 |
+
'duplicate' => 'Hide "Duplicate"',
|
37 |
+
);
|
38 |
+
|
39 |
+
if(acf_version_compare(acf_get_setting('version'), '<', '5.9')){
|
40 |
+
acfe_unset($hide_choices, 'duplicate');
|
41 |
+
}
|
42 |
+
|
43 |
+
// Hide Buttons
|
44 |
+
acf_render_field_setting($field, array(
|
45 |
+
'label' => __('Hide Buttons'),
|
46 |
+
'name' => 'acfe_flexible_remove_button',
|
47 |
+
'key' => 'acfe_flexible_remove_button',
|
48 |
+
'instructions' => __('Hide buttons'),
|
49 |
+
'type' => 'checkbox',
|
50 |
+
'default_value' => '',
|
51 |
+
'layout' => 'horizontal',
|
52 |
+
'choices' => $hide_choices,
|
53 |
+
'conditional_logic' => array(
|
54 |
+
array(
|
55 |
+
array(
|
56 |
+
'field' => 'acfe_flexible_advanced',
|
57 |
+
'operator' => '==',
|
58 |
+
'value' => '1',
|
59 |
+
),
|
60 |
+
)
|
61 |
+
)
|
62 |
+
));
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
function validate_hide($field){
|
67 |
+
|
68 |
+
/*
|
69 |
+
* Old settings:
|
70 |
+
*
|
71 |
+
* acfe_flexible_remove_add_button
|
72 |
+
* acfe_flexible_remove_duplicate_button
|
73 |
+
* acfe_flexible_remove_delete_button
|
74 |
+
*/
|
75 |
+
|
76 |
+
$hide = acf_get_array($field['acfe_flexible_remove_button']);
|
77 |
+
|
78 |
+
// acfe_flexible_remove_add_button
|
79 |
+
if(acf_maybe_get($field, 'acfe_flexible_remove_add_button')){
|
80 |
+
|
81 |
+
if(!in_array('add', $hide)) $hide[] = 'add';
|
82 |
+
acfe_unset($field, 'acfe_flexible_remove_add_button');
|
83 |
+
|
84 |
+
}
|
85 |
+
|
86 |
+
// acfe_flexible_remove_duplicate_button
|
87 |
+
if(acf_maybe_get($field, 'acfe_flexible_remove_duplicate_button')){
|
88 |
+
|
89 |
+
if(!in_array('duplicate', $hide)) $hide[] = 'duplicate';
|
90 |
+
acfe_unset($field, 'acfe_flexible_remove_duplicate_button');
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
// acfe_flexible_remove_delete_button
|
95 |
+
if(acf_maybe_get($field, 'acfe_flexible_remove_delete_button')){
|
96 |
+
|
97 |
+
if(!in_array('delete', $hide)) $hide[] = 'delete';
|
98 |
+
acfe_unset($field, 'acfe_flexible_remove_delete_button');
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
$field['acfe_flexible_remove_button'] = $hide;
|
103 |
+
|
104 |
+
return $field;
|
105 |
+
|
106 |
+
}
|
107 |
+
|
108 |
+
function remove_actions($return, $field){
|
109 |
+
|
110 |
+
if(!in_array('add', $field['acfe_flexible_remove_button']))
|
111 |
+
return $return;
|
112 |
+
|
113 |
+
return true;
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
function layout_icons($icons, $layout, $field){
|
118 |
+
|
119 |
+
if(in_array('add', $field['acfe_flexible_remove_button']))
|
120 |
+
acfe_unset($icons, 'add');
|
121 |
+
|
122 |
+
if(in_array('duplicate', $field['acfe_flexible_remove_button']))
|
123 |
+
acfe_unset($icons, 'duplicate');
|
124 |
+
|
125 |
+
if(in_array('delete', $field['acfe_flexible_remove_button']))
|
126 |
+
acfe_unset($icons, 'delete');
|
127 |
+
|
128 |
+
return $icons;
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
}
|
133 |
+
|
134 |
+
acf_new_instance('acfe_field_flexible_content_hide');
|
135 |
+
|
136 |
+
endif;
|
@@ -0,0 +1,402 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_preview')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_preview{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 2);
|
14 |
+
add_filter('acfe/flexible/defaults_layout', array($this, 'defaults_layout'), 2);
|
15 |
+
|
16 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 2);
|
17 |
+
add_action('acfe/flexible/render_layout_settings', array($this, 'render_layout_settings'), 15, 3);
|
18 |
+
|
19 |
+
add_action('acf/render_field/type=flexible_content', array($this, 'render_field'), 8);
|
20 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
21 |
+
add_filter('acfe/flexible/prepare_layout', array($this, 'prepare_layout'), 25, 5);
|
22 |
+
|
23 |
+
// Ajax
|
24 |
+
add_action('wp_ajax_acfe/flexible/layout_preview', array($this, 'layout_preview'));
|
25 |
+
|
26 |
+
}
|
27 |
+
|
28 |
+
function defaults_field($field){
|
29 |
+
|
30 |
+
$field['acfe_flexible_layouts_templates'] = false;
|
31 |
+
$field['acfe_flexible_layouts_previews'] = false;
|
32 |
+
$field['acfe_flexible_layouts_placeholder'] = false;
|
33 |
+
|
34 |
+
return $field;
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
function defaults_layout($layout){
|
39 |
+
|
40 |
+
$layout['acfe_flexible_render_template'] = false;
|
41 |
+
$layout['acfe_flexible_render_style'] = false;
|
42 |
+
$layout['acfe_flexible_render_script'] = false;
|
43 |
+
|
44 |
+
return $layout;
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
function render_field_settings($field){
|
49 |
+
|
50 |
+
// Render
|
51 |
+
acf_render_field_setting($field, array(
|
52 |
+
'label' => __('Dynamic Render'),
|
53 |
+
'name' => 'acfe_flexible_layouts_templates',
|
54 |
+
'key' => 'acfe_flexible_layouts_templates',
|
55 |
+
'instructions' => __('Set template, style & javascript files for each layouts. This setting is mandatory in order to use <code style="font-size:11px;">get_flexible()</code> function. You must save the field group to apply this setting'),
|
56 |
+
'type' => 'true_false',
|
57 |
+
'message' => '',
|
58 |
+
'default_value' => false,
|
59 |
+
'ui' => true,
|
60 |
+
'ui_on_text' => '',
|
61 |
+
'ui_off_text' => '',
|
62 |
+
'conditional_logic' => array(
|
63 |
+
array(
|
64 |
+
array(
|
65 |
+
'field' => 'acfe_flexible_advanced',
|
66 |
+
'operator' => '==',
|
67 |
+
'value' => '1',
|
68 |
+
),
|
69 |
+
)
|
70 |
+
)
|
71 |
+
));
|
72 |
+
|
73 |
+
// Preview
|
74 |
+
acf_render_field_setting($field, array(
|
75 |
+
'label' => __('Dynamic Preview'),
|
76 |
+
'name' => 'acfe_flexible_layouts_previews',
|
77 |
+
'key' => 'acfe_flexible_layouts_previews',
|
78 |
+
'instructions' => __('Use layouts render settings to display a dynamic preview in the post administration'),
|
79 |
+
'type' => 'true_false',
|
80 |
+
'message' => '',
|
81 |
+
'default_value' => false,
|
82 |
+
'ui' => true,
|
83 |
+
'ui_on_text' => '',
|
84 |
+
'ui_off_text' => '',
|
85 |
+
'conditional_logic' => array(
|
86 |
+
array(
|
87 |
+
array(
|
88 |
+
'field' => 'acfe_flexible_advanced',
|
89 |
+
'operator' => '==',
|
90 |
+
'value' => '1',
|
91 |
+
),
|
92 |
+
array(
|
93 |
+
'field' => 'acfe_flexible_layouts_templates',
|
94 |
+
'operator' => '==',
|
95 |
+
'value' => '1',
|
96 |
+
),
|
97 |
+
)
|
98 |
+
)
|
99 |
+
));
|
100 |
+
|
101 |
+
// Placholder
|
102 |
+
acf_render_field_setting($field, array(
|
103 |
+
'label' => __('Layouts Placeholder'),
|
104 |
+
'name' => 'acfe_flexible_layouts_placeholder',
|
105 |
+
'key' => 'acfe_flexible_layouts_placeholder',
|
106 |
+
'instructions' => __('Display a placeholder with a pencil icon, making edition easier'),
|
107 |
+
'type' => 'true_false',
|
108 |
+
'message' => '',
|
109 |
+
'default_value' => false,
|
110 |
+
'ui' => true,
|
111 |
+
'ui_on_text' => '',
|
112 |
+
'ui_off_text' => '',
|
113 |
+
'conditional_logic' => array(
|
114 |
+
array(
|
115 |
+
array(
|
116 |
+
'field' => 'acfe_flexible_advanced',
|
117 |
+
'operator' => '==',
|
118 |
+
'value' => '1',
|
119 |
+
),
|
120 |
+
array(
|
121 |
+
'field' => 'acfe_flexible_layouts_previews',
|
122 |
+
'operator' => '!=',
|
123 |
+
'value' => '1',
|
124 |
+
),
|
125 |
+
)
|
126 |
+
)
|
127 |
+
));
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
function render_layout_settings($flexible, $layout, $prefix){
|
132 |
+
|
133 |
+
if(!acf_maybe_get($flexible, 'acfe_flexible_layouts_templates'))
|
134 |
+
return;
|
135 |
+
|
136 |
+
// vars
|
137 |
+
$name = $flexible['name'];
|
138 |
+
$key = $flexible['key'];
|
139 |
+
$l_name = $layout['name'];
|
140 |
+
$prepend = acfe_get_setting('theme_folder') ? trailingslashit(acfe_get_setting('theme_folder')) : '';
|
141 |
+
|
142 |
+
// Title
|
143 |
+
echo '</li>';
|
144 |
+
acf_render_field_wrap(array(
|
145 |
+
'label' => __('Render'),
|
146 |
+
'type' => 'hidden',
|
147 |
+
'name' => 'acfe_flexible_render_label',
|
148 |
+
'wrapper' => array(
|
149 |
+
'class' => 'acfe-flexible-field-setting acfe-flexible-field-setting-row',
|
150 |
+
)
|
151 |
+
), 'ul');
|
152 |
+
echo '<li>';
|
153 |
+
|
154 |
+
// Template
|
155 |
+
$prepend = apply_filters("acfe/flexible/prepend/template", $prepend, $flexible, $layout);
|
156 |
+
$prepend = apply_filters("acfe/flexible/prepend/template/name={$name}", $prepend, $flexible, $layout);
|
157 |
+
$prepend = apply_filters("acfe/flexible/prepend/template/key={$key}", $prepend, $flexible, $layout);
|
158 |
+
$prepend = apply_filters("acfe/flexible/prepend/template/layout={$l_name}", $prepend, $flexible, $layout);
|
159 |
+
$prepend = apply_filters("acfe/flexible/prepend/template/name={$name}&layout={$l_name}", $prepend, $flexible, $layout);
|
160 |
+
$prepend = apply_filters("acfe/flexible/prepend/template/key={$key}&layout={$l_name}", $prepend, $flexible, $layout);
|
161 |
+
|
162 |
+
acf_render_field_wrap(array(
|
163 |
+
'prepend' => $prepend,
|
164 |
+
'name' => 'acfe_flexible_render_template',
|
165 |
+
'type' => 'text',
|
166 |
+
'class' => 'acf-fc-meta-name',
|
167 |
+
'prefix' => $prefix,
|
168 |
+
'value' => $layout['acfe_flexible_render_template'],
|
169 |
+
'placeholder' => 'template.php',
|
170 |
+
), 'ul');
|
171 |
+
|
172 |
+
|
173 |
+
// Style
|
174 |
+
$prepend = apply_filters("acfe/flexible/prepend/style", $prepend, $flexible, $layout);
|
175 |
+
$prepend = apply_filters("acfe/flexible/prepend/style/name={$name}", $prepend, $flexible, $layout);
|
176 |
+
$prepend = apply_filters("acfe/flexible/prepend/style/key={$key}", $prepend, $flexible, $layout);
|
177 |
+
$prepend = apply_filters("acfe/flexible/prepend/style/layout={$l_name}", $prepend, $flexible, $layout);
|
178 |
+
$prepend = apply_filters("acfe/flexible/prepend/style/name={$name}&layout={$l_name}", $prepend, $flexible, $layout);
|
179 |
+
$prepend = apply_filters("acfe/flexible/prepend/style/key={$key}&layout={$l_name}", $prepend, $flexible, $layout);
|
180 |
+
|
181 |
+
acf_render_field_wrap(array(
|
182 |
+
'prepend' => $prepend,
|
183 |
+
'name' => 'acfe_flexible_render_style',
|
184 |
+
'type' => 'text',
|
185 |
+
'class' => 'acf-fc-meta-name',
|
186 |
+
'prefix' => $prefix,
|
187 |
+
'value' => $layout['acfe_flexible_render_style'],
|
188 |
+
'placeholder' => 'style.css',
|
189 |
+
), 'ul');
|
190 |
+
|
191 |
+
|
192 |
+
// Script
|
193 |
+
$prepend = apply_filters("acfe/flexible/prepend/script", $prepend, $flexible, $layout);
|
194 |
+
$prepend = apply_filters("acfe/flexible/prepend/script/name={$name}", $prepend, $flexible, $layout);
|
195 |
+
$prepend = apply_filters("acfe/flexible/prepend/script/key={$key}", $prepend, $flexible, $layout);
|
196 |
+
$prepend = apply_filters("acfe/flexible/prepend/script/layout={$l_name}", $prepend, $flexible, $layout);
|
197 |
+
$prepend = apply_filters("acfe/flexible/prepend/script/name={$name}&layout={$l_name}", $prepend, $flexible, $layout);
|
198 |
+
$prepend = apply_filters("acfe/flexible/prepend/script/key={$key}&layout={$l_name}", $prepend, $flexible, $layout);
|
199 |
+
|
200 |
+
acf_render_field_wrap(array(
|
201 |
+
'prepend' => $prepend,
|
202 |
+
'name' => 'acfe_flexible_render_script',
|
203 |
+
'type' => 'text',
|
204 |
+
'class' => 'acf-fc-meta-name',
|
205 |
+
'prefix' => $prefix,
|
206 |
+
'value' => $layout['acfe_flexible_render_script'],
|
207 |
+
'placeholder' => 'script.js',
|
208 |
+
), 'ul');
|
209 |
+
|
210 |
+
}
|
211 |
+
|
212 |
+
function render_field($field){
|
213 |
+
|
214 |
+
// Check setting
|
215 |
+
if(!acf_maybe_get($field, 'acfe_flexible_layouts_templates') || !acf_maybe_get($field, 'acfe_flexible_layouts_previews'))
|
216 |
+
return;
|
217 |
+
|
218 |
+
// Vars
|
219 |
+
$name = $field['_name'];
|
220 |
+
$key = $field['key'];
|
221 |
+
|
222 |
+
// Vars
|
223 |
+
global $is_preview;
|
224 |
+
$is_preview = true;
|
225 |
+
|
226 |
+
// Actions
|
227 |
+
do_action("acfe/flexible/enqueue", $field, $is_preview);
|
228 |
+
do_action("acfe/flexible/enqueue/name={$name}", $field, $is_preview);
|
229 |
+
do_action("acfe/flexible/enqueue/key={$key}", $field, $is_preview);
|
230 |
+
|
231 |
+
// Loop
|
232 |
+
foreach($field['layouts'] as $layout){
|
233 |
+
|
234 |
+
// Enqueue
|
235 |
+
acfe_flexible_render_layout_enqueue($layout, $field);
|
236 |
+
|
237 |
+
}
|
238 |
+
|
239 |
+
}
|
240 |
+
|
241 |
+
function wrapper_attributes($wrapper, $field){
|
242 |
+
|
243 |
+
if(acf_maybe_get($field, 'acfe_flexible_layouts_placeholder')){
|
244 |
+
$wrapper['data-acfe-flexible-placeholder'] = 1;
|
245 |
+
}
|
246 |
+
|
247 |
+
if(acf_maybe_get($field, 'acfe_flexible_layouts_templates') && acf_maybe_get($field, 'acfe_flexible_layouts_previews')){
|
248 |
+
$wrapper['data-acfe-flexible-preview'] = 1;
|
249 |
+
}
|
250 |
+
|
251 |
+
return $wrapper;
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
+
function prepare_layout($layout, $field, $i, $value, $prefix){
|
256 |
+
|
257 |
+
if(!acf_maybe_get($field, 'acfe_flexible_layouts_placeholder') && !acf_maybe_get($field, 'acfe_flexible_layouts_previews'))
|
258 |
+
return $layout;
|
259 |
+
|
260 |
+
// Vars
|
261 |
+
$name = $field['_name'];
|
262 |
+
$key = $field['key'];
|
263 |
+
$l_name = $layout['name'];
|
264 |
+
|
265 |
+
$placeholder = array(
|
266 |
+
'class' => 'acfe-fc-placeholder',
|
267 |
+
'title' => __('Edit layout', 'acfe'),
|
268 |
+
);
|
269 |
+
|
270 |
+
$placeholder = apply_filters("acfe/flexible/layouts/placeholder", $placeholder, $layout, $field, $i, $value, $prefix);
|
271 |
+
$placeholder = apply_filters("acfe/flexible/layouts/placeholder/name={$name}", $placeholder, $layout, $field, $i, $value, $prefix);
|
272 |
+
$placeholder = apply_filters("acfe/flexible/layouts/placeholder/key={$key}", $placeholder, $layout, $field, $i, $value, $prefix);
|
273 |
+
$placeholder = apply_filters("acfe/flexible/layouts/placeholder/layout={$l_name}", $placeholder, $layout, $field, $i, $value, $prefix);
|
274 |
+
$placeholder = apply_filters("acfe/flexible/layouts/placeholder/name={$name}&layout={$l_name}", $placeholder, $layout, $field, $i, $value, $prefix);
|
275 |
+
$placeholder = apply_filters("acfe/flexible/layouts/placeholder/key={$key}&layout={$l_name}", $placeholder, $layout, $field, $i, $value, $prefix);
|
276 |
+
|
277 |
+
$html = false;
|
278 |
+
|
279 |
+
if(!empty($value) && acf_maybe_get($field, 'acfe_flexible_layouts_previews')){
|
280 |
+
|
281 |
+
ob_start();
|
282 |
+
|
283 |
+
$this->layout_preview(array(
|
284 |
+
'post_id' => acf_get_valid_post_id(),
|
285 |
+
'i' => $i,
|
286 |
+
'field_key' => $key,
|
287 |
+
'layout' => $l_name,
|
288 |
+
'value' => $value,
|
289 |
+
));
|
290 |
+
|
291 |
+
$html = ob_get_clean();
|
292 |
+
|
293 |
+
if(strlen($html) > 0){
|
294 |
+
$placeholder['class'] .= ' acfe-fc-preview';
|
295 |
+
}
|
296 |
+
|
297 |
+
}
|
298 |
+
|
299 |
+
?>
|
300 |
+
|
301 |
+
<div <?php echo acf_esc_attrs($placeholder); ?>>
|
302 |
+
<a href="#" class="button">
|
303 |
+
<span class="dashicons dashicons-edit"></span>
|
304 |
+
</a>
|
305 |
+
|
306 |
+
<div class="acfe-fc-overlay"></div>
|
307 |
+
<div class="acfe-flexible-placeholder -preview"><?php echo $html; ?></div>
|
308 |
+
</div>
|
309 |
+
|
310 |
+
<?php
|
311 |
+
|
312 |
+
return $layout;
|
313 |
+
|
314 |
+
}
|
315 |
+
|
316 |
+
function layout_preview($options = array()){
|
317 |
+
|
318 |
+
if(empty($options)){
|
319 |
+
|
320 |
+
// Options
|
321 |
+
$options = acf_parse_args($_POST, array(
|
322 |
+
'post_id' => 0,
|
323 |
+
'i' => 0,
|
324 |
+
'field_key' => '',
|
325 |
+
'nonce' => '',
|
326 |
+
'layout' => '',
|
327 |
+
'value' => array()
|
328 |
+
));
|
329 |
+
|
330 |
+
}
|
331 |
+
|
332 |
+
// Load field
|
333 |
+
$field = acf_get_field($options['field_key']);
|
334 |
+
if(!$field)
|
335 |
+
return $this->return_or_die();
|
336 |
+
|
337 |
+
// Layout
|
338 |
+
$instance = acf_get_field_type('flexible_content');
|
339 |
+
$layout = $instance->get_layout($options['layout'], $field);
|
340 |
+
|
341 |
+
if(!$layout)
|
342 |
+
return $this->return_or_die();
|
343 |
+
|
344 |
+
// Global
|
345 |
+
global $is_preview;
|
346 |
+
|
347 |
+
// Vars
|
348 |
+
$is_preview = true;
|
349 |
+
$name = $field['_name'];
|
350 |
+
$key = $field['key'];
|
351 |
+
$l_name = $layout['name'];
|
352 |
+
$post_id = "{$options['field_key']}_{$options['i']}";
|
353 |
+
|
354 |
+
// Prepare values
|
355 |
+
$meta = array($options['field_key'] => array(
|
356 |
+
wp_unslash($options['value'])
|
357 |
+
));
|
358 |
+
|
359 |
+
acf_setup_meta($meta, $post_id, true);
|
360 |
+
|
361 |
+
if(have_rows($options['field_key'])):
|
362 |
+
while(have_rows($options['field_key'])): the_row();
|
363 |
+
|
364 |
+
global $post;
|
365 |
+
$_post = $post;
|
366 |
+
|
367 |
+
// Deprecated
|
368 |
+
do_action_deprecated("acfe/flexible/preview/name={$name}", array($field, $layout), '0.8.6.7');
|
369 |
+
do_action_deprecated("acfe/flexible/preview/key={$key}", array($field, $layout), '0.8.6.7');
|
370 |
+
do_action_deprecated("acfe/flexible/layout/preview/layout={$l_name}", array($field, $layout), '0.8.6.7');
|
371 |
+
do_action_deprecated("acfe/flexible/layout/preview/name={$name}&layout={$l_name}", array($field, $layout), '0.8.6.7');
|
372 |
+
do_action_deprecated("acfe/flexible/layout/preview/key={$key}&layout={$l_name}", array($field, $layout), '0.8.6.7');
|
373 |
+
do_action_deprecated("acfe/flexible/preview", array($field, $layout), '0.8.6.7');
|
374 |
+
|
375 |
+
// Template
|
376 |
+
acfe_flexible_render_layout_template($layout, $field);
|
377 |
+
|
378 |
+
$post = $_post;
|
379 |
+
|
380 |
+
endwhile;
|
381 |
+
endif;
|
382 |
+
|
383 |
+
acf_reset_meta($post_id);
|
384 |
+
|
385 |
+
return $this->return_or_die();
|
386 |
+
|
387 |
+
}
|
388 |
+
|
389 |
+
function return_or_die(){
|
390 |
+
|
391 |
+
if(wp_doing_ajax())
|
392 |
+
die;
|
393 |
+
|
394 |
+
return true;
|
395 |
+
|
396 |
+
}
|
397 |
+
|
398 |
+
}
|
399 |
+
|
400 |
+
acf_new_instance('acfe_field_flexible_content_preview');
|
401 |
+
|
402 |
+
endif;
|
@@ -0,0 +1,267 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_select')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_select{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 10);
|
14 |
+
add_filter('acfe/flexible/defaults_layout', array($this, 'defaults_layout'), 10);
|
15 |
+
|
16 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 10);
|
17 |
+
add_action('acfe/flexible/render_layout_settings', array($this, 'render_layout_settings'), 10, 3);
|
18 |
+
|
19 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
20 |
+
add_filter("acfe/flexible/layouts/label_atts", array($this, 'label_atts'), 10, 3);
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
function defaults_field($field){
|
25 |
+
|
26 |
+
$field['acfe_flexible_modal'] = array(
|
27 |
+
'acfe_flexible_modal_enabled' => false,
|
28 |
+
'acfe_flexible_modal_title' => false,
|
29 |
+
'acfe_flexible_modal_size' => 'full',
|
30 |
+
'acfe_flexible_modal_col' => '4',
|
31 |
+
'acfe_flexible_modal_categories' => false,
|
32 |
+
);
|
33 |
+
|
34 |
+
return $field;
|
35 |
+
|
36 |
+
}
|
37 |
+
|
38 |
+
function defaults_layout($layout){
|
39 |
+
|
40 |
+
$layout['acfe_flexible_category'] = false;
|
41 |
+
|
42 |
+
return $layout;
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
function render_field_settings($field){
|
47 |
+
|
48 |
+
acf_render_field_setting($field, array(
|
49 |
+
'label' => __('Selection Modal'),
|
50 |
+
'name' => 'acfe_flexible_modal',
|
51 |
+
'key' => 'acfe_flexible_modal',
|
52 |
+
'instructions' => __('Select layouts in a modal'),
|
53 |
+
'type' => 'group',
|
54 |
+
'layout' => 'block',
|
55 |
+
'sub_fields' => array(
|
56 |
+
array(
|
57 |
+
'label' => '',
|
58 |
+
'name' => 'acfe_flexible_modal_enabled',
|
59 |
+
'key' => 'acfe_flexible_modal_enabled',
|
60 |
+
'type' => 'true_false',
|
61 |
+
'instructions' => '',
|
62 |
+
'required' => false,
|
63 |
+
'wrapper' => array(
|
64 |
+
'class' => 'acfe_width_auto',
|
65 |
+
'id' => '',
|
66 |
+
),
|
67 |
+
'message' => '',
|
68 |
+
'default_value' => false,
|
69 |
+
'ui' => true,
|
70 |
+
'ui_on_text' => '',
|
71 |
+
'ui_off_text' => '',
|
72 |
+
'conditional_logic' => false,
|
73 |
+
),
|
74 |
+
array(
|
75 |
+
'label' => '',
|
76 |
+
'name' => 'acfe_flexible_modal_title',
|
77 |
+
'key' => 'acfe_flexible_modal_title',
|
78 |
+
'type' => 'text',
|
79 |
+
'prepend' => __('Title'),
|
80 |
+
'placeholder' => 'Add Row',
|
81 |
+
'instructions' => false,
|
82 |
+
'required' => false,
|
83 |
+
'wrapper' => array(
|
84 |
+
'width' => '25',
|
85 |
+
'class' => '',
|
86 |
+
'id' => '',
|
87 |
+
),
|
88 |
+
'conditional_logic' => array(
|
89 |
+
array(
|
90 |
+
array(
|
91 |
+
'field' => 'acfe_flexible_modal_enabled',
|
92 |
+
'operator' => '==',
|
93 |
+
'value' => '1',
|
94 |
+
)
|
95 |
+
)
|
96 |
+
)
|
97 |
+
),
|
98 |
+
array(
|
99 |
+
'label' => '',
|
100 |
+
'name' => 'acfe_flexible_modal_size',
|
101 |
+
'key' => 'acfe_flexible_modal_size',
|
102 |
+
'type' => 'select',
|
103 |
+
'prepend' => '',
|
104 |
+
'instructions' => false,
|
105 |
+
'required' => false,
|
106 |
+
'choices' => array(
|
107 |
+
'small' => 'Small',
|
108 |
+
'medium' => 'Medium',
|
109 |
+
'large' => 'Large',
|
110 |
+
'xlarge' => 'Extra Large',
|
111 |
+
'full' => 'Full',
|
112 |
+
),
|
113 |
+
'default_value' => 'full',
|
114 |
+
'wrapper' => array(
|
115 |
+
'width' => '25',
|
116 |
+
'class' => '',
|
117 |
+
'id' => '',
|
118 |
+
'data-acfe-prepend' => 'Size',
|
119 |
+
),
|
120 |
+
'conditional_logic' => array(
|
121 |
+
array(
|
122 |
+
array(
|
123 |
+
'field' => 'acfe_flexible_modal_enabled',
|
124 |
+
'operator' => '==',
|
125 |
+
'value' => '1',
|
126 |
+
)
|
127 |
+
)
|
128 |
+
)
|
129 |
+
),
|
130 |
+
array(
|
131 |
+
'label' => '',
|
132 |
+
'name' => 'acfe_flexible_modal_col',
|
133 |
+
'key' => 'acfe_flexible_modal_col',
|
134 |
+
'type' => 'select',
|
135 |
+
'prepend' => '',
|
136 |
+
'instructions' => false,
|
137 |
+
'required' => false,
|
138 |
+
'choices' => array(
|
139 |
+
'1' => '1',
|
140 |
+
'2' => '2',
|
141 |
+
'3' => '3',
|
142 |
+
'4' => '4',
|
143 |
+
'5' => '5',
|
144 |
+
'6' => '6',
|
145 |
+
),
|
146 |
+
'default_value' => '4',
|
147 |
+
'wrapper' => array(
|
148 |
+
'width' => '15',
|
149 |
+
'class' => '',
|
150 |
+
'id' => '',
|
151 |
+
'data-acfe-prepend' => 'Cols',
|
152 |
+
),
|
153 |
+
'conditional_logic' => array(
|
154 |
+
array(
|
155 |
+
array(
|
156 |
+
'field' => 'acfe_flexible_modal_enabled',
|
157 |
+
'operator' => '==',
|
158 |
+
'value' => '1',
|
159 |
+
)
|
160 |
+
)
|
161 |
+
)
|
162 |
+
),
|
163 |
+
array(
|
164 |
+
'label' => '',
|
165 |
+
'name' => 'acfe_flexible_modal_categories',
|
166 |
+
'key' => 'acfe_flexible_modal_categories',
|
167 |
+
'type' => 'true_false',
|
168 |
+
'message' => __('Categories'),
|
169 |
+
'instructions' => false,
|
170 |
+
'required' => false,
|
171 |
+
'wrapper' => array(
|
172 |
+
'width' => '15',
|
173 |
+
'class' => '',
|
174 |
+
'id' => '',
|
175 |
+
),
|
176 |
+
'conditional_logic' => array(
|
177 |
+
array(
|
178 |
+
array(
|
179 |
+
'field' => 'acfe_flexible_modal_enabled',
|
180 |
+
'operator' => '==',
|
181 |
+
'value' => '1',
|
182 |
+
)
|
183 |
+
)
|
184 |
+
)
|
185 |
+
),
|
186 |
+
),
|
187 |
+
'conditional_logic' => array(
|
188 |
+
array(
|
189 |
+
array(
|
190 |
+
'field' => 'acfe_flexible_advanced',
|
191 |
+
'operator' => '==',
|
192 |
+
'value' => '1',
|
193 |
+
),
|
194 |
+
)
|
195 |
+
),
|
196 |
+
'wrapper' => array(
|
197 |
+
'class' => 'acfe-field-setting-flex'
|
198 |
+
)
|
199 |
+
));
|
200 |
+
|
201 |
+
}
|
202 |
+
|
203 |
+
function render_layout_settings($field, $layout, $prefix){
|
204 |
+
|
205 |
+
if(!$field['acfe_flexible_modal']['acfe_flexible_modal_categories'])
|
206 |
+
return;
|
207 |
+
|
208 |
+
acf_render_field_wrap(array(
|
209 |
+
'prepend' => __('Category'),
|
210 |
+
'name' => 'acfe_flexible_category',
|
211 |
+
'type' => 'select',
|
212 |
+
'ui' => 1,
|
213 |
+
'multiple' => 1,
|
214 |
+
'allow_custom' => 1,
|
215 |
+
'class' => 'acf-fc-meta-name',
|
216 |
+
'prefix' => $prefix,
|
217 |
+
'value' => $layout['acfe_flexible_category'],
|
218 |
+
'placeholder' => __('Enter value'),
|
219 |
+
'wrapper' => array(
|
220 |
+
'data-acfe-prepend' => 'Categories',
|
221 |
+
),
|
222 |
+
), 'ul');
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
function wrapper_attributes($wrapper, $field){
|
227 |
+
|
228 |
+
if(!$field['acfe_flexible_modal']['acfe_flexible_modal_enabled'])
|
229 |
+
return $wrapper;
|
230 |
+
|
231 |
+
$wrapper['data-acfe-flexible-modal'] = 1;
|
232 |
+
$wrapper['data-acfe-flexible-modal-col'] = $field['acfe_flexible_modal']['acfe_flexible_modal_col'];
|
233 |
+
$wrapper['data-acfe-flexible-modal-size'] = $field['acfe_flexible_modal']['acfe_flexible_modal_size'];
|
234 |
+
|
235 |
+
// Title
|
236 |
+
if(!empty($field['acfe_flexible_modal']['acfe_flexible_modal_title']))
|
237 |
+
$wrapper['data-acfe-flexible-modal-title'] = $field['acfe_flexible_modal']['acfe_flexible_modal_title'];
|
238 |
+
|
239 |
+
return $wrapper;
|
240 |
+
|
241 |
+
}
|
242 |
+
|
243 |
+
function label_atts($atts, $layout, $field){
|
244 |
+
|
245 |
+
// Category
|
246 |
+
if(!$field['acfe_flexible_modal']['acfe_flexible_modal_categories'] || !$layout['acfe_flexible_category'])
|
247 |
+
return $atts;
|
248 |
+
|
249 |
+
$categories = $layout['acfe_flexible_category'];
|
250 |
+
|
251 |
+
// Compatibility
|
252 |
+
if(is_string($categories)){
|
253 |
+
$categories = explode('|', $categories);
|
254 |
+
$categories = array_map('trim', $categories);
|
255 |
+
}
|
256 |
+
|
257 |
+
$atts['data-acfe-flexible-category'] = $categories;
|
258 |
+
|
259 |
+
return $atts;
|
260 |
+
|
261 |
+
}
|
262 |
+
|
263 |
+
}
|
264 |
+
|
265 |
+
acf_new_instance('acfe_field_flexible_content_select');
|
266 |
+
|
267 |
+
endif;
|
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_settings')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_settings{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 4);
|
14 |
+
add_filter('acfe/flexible/defaults_layout', array($this, 'defaults_layout'), 4);
|
15 |
+
|
16 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 4);
|
17 |
+
add_action('acfe/flexible/render_layout_settings', array($this, 'render_layout_settings'), 20, 3);
|
18 |
+
|
19 |
+
add_filter('acfe/flexible/load_fields', array($this, 'load_fields'), 10, 2);
|
20 |
+
add_filter('acfe/flexible/prepare_layout', array($this, 'prepare_layout'), 30, 5);
|
21 |
+
add_filter('acfe/flexible/layouts/icons', array($this, 'layout_icons'), 30, 3);
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
function defaults_field($field){
|
26 |
+
|
27 |
+
$field['acfe_flexible_layouts_settings'] = false;
|
28 |
+
|
29 |
+
return $field;
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
function defaults_layout($layout){
|
34 |
+
|
35 |
+
$layout['acfe_flexible_settings'] = false;
|
36 |
+
$layout['acfe_flexible_settings_size'] = 'medium';
|
37 |
+
|
38 |
+
return $layout;
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
function render_field_settings($field){
|
43 |
+
|
44 |
+
acf_render_field_setting($field, array(
|
45 |
+
'label' => __('Layouts Settings Modal'),
|
46 |
+
'name' => 'acfe_flexible_layouts_settings',
|
47 |
+
'key' => 'acfe_flexible_layouts_settings',
|
48 |
+
'instructions' => __('Choose a field group to clone and to be used as a configuration modal'),
|
49 |
+
'type' => 'true_false',
|
50 |
+
'message' => '',
|
51 |
+
'default_value' => false,
|
52 |
+
'ui' => true,
|
53 |
+
'ui_on_text' => '',
|
54 |
+
'ui_off_text' => '',
|
55 |
+
'conditional_logic' => array(
|
56 |
+
array(
|
57 |
+
array(
|
58 |
+
'field' => 'acfe_flexible_advanced',
|
59 |
+
'operator' => '==',
|
60 |
+
'value' => '1',
|
61 |
+
),
|
62 |
+
)
|
63 |
+
)
|
64 |
+
));
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
function render_layout_settings($flexible, $layout, $prefix){
|
69 |
+
|
70 |
+
if(!acf_maybe_get($flexible, 'acfe_flexible_layouts_settings'))
|
71 |
+
return;
|
72 |
+
|
73 |
+
acf_disable_filters();
|
74 |
+
|
75 |
+
$choices = array();
|
76 |
+
|
77 |
+
$field_groups = acf_get_field_groups();
|
78 |
+
if(!empty($field_groups)){
|
79 |
+
|
80 |
+
foreach($field_groups as $field_group){
|
81 |
+
$choices[$field_group['key']] = $field_group['title'];
|
82 |
+
}
|
83 |
+
|
84 |
+
}
|
85 |
+
|
86 |
+
acf_enable_filters();
|
87 |
+
|
88 |
+
// Title
|
89 |
+
echo '</li>';
|
90 |
+
acf_render_field_wrap(array(
|
91 |
+
'label' => __('Clone settings'),
|
92 |
+
'type' => 'hidden',
|
93 |
+
'name' => 'acfe_flexible_settings_label',
|
94 |
+
'wrapper' => array(
|
95 |
+
'class' => 'acfe-flexible-field-setting',
|
96 |
+
)
|
97 |
+
), 'ul');
|
98 |
+
echo '<li>';
|
99 |
+
|
100 |
+
// Fields
|
101 |
+
acf_render_field_wrap(array(
|
102 |
+
'label' => '',
|
103 |
+
'name' => 'acfe_flexible_settings',
|
104 |
+
'type' => 'select',
|
105 |
+
'class' => '',
|
106 |
+
'prefix' => $prefix,
|
107 |
+
'value' => $layout['acfe_flexible_settings'],
|
108 |
+
'choices' => $choices,
|
109 |
+
'wrapper' => array(
|
110 |
+
'data-acfe-prepend' => 'Clone',
|
111 |
+
),
|
112 |
+
'allow_null' => 1,
|
113 |
+
'multiple' => 1,
|
114 |
+
'ui' => 1,
|
115 |
+
'ajax' => 0,
|
116 |
+
'return_format' => 0,
|
117 |
+
), 'ul');
|
118 |
+
|
119 |
+
acf_render_field_wrap(array(
|
120 |
+
'label' => '',
|
121 |
+
'name' => 'acfe_flexible_settings_size',
|
122 |
+
'type' => 'select',
|
123 |
+
'class' => '',
|
124 |
+
'prefix' => $prefix,
|
125 |
+
'value' => $layout['acfe_flexible_settings_size'],
|
126 |
+
'choices' => array(
|
127 |
+
'small' => 'Small',
|
128 |
+
'medium' => 'Medium',
|
129 |
+
'large' => 'Large',
|
130 |
+
'xlarge' => 'Extra Large',
|
131 |
+
'full' => 'Full',
|
132 |
+
),
|
133 |
+
'wrapper' => array(
|
134 |
+
'data-acfe-prepend' => 'Modal size',
|
135 |
+
),
|
136 |
+
'default_value' => 'medium',
|
137 |
+
'allow_null' => 0,
|
138 |
+
'multiple' => 0,
|
139 |
+
'ui' => 0,
|
140 |
+
'ajax' => 0,
|
141 |
+
'return_format' => 0,
|
142 |
+
), 'ul');
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
function load_fields($fields, $field){
|
147 |
+
|
148 |
+
// Check setting
|
149 |
+
if(!acf_maybe_get($field, 'acfe_flexible_layouts_settings'))
|
150 |
+
return $fields;
|
151 |
+
|
152 |
+
// Loop
|
153 |
+
foreach($field['layouts'] as $i => $layout){
|
154 |
+
|
155 |
+
$field_groups = acf_maybe_get($layout, 'acfe_flexible_settings', array());
|
156 |
+
$field_groups = acf_get_array($field_groups);
|
157 |
+
|
158 |
+
// Check
|
159 |
+
if(empty($field_groups))
|
160 |
+
continue;
|
161 |
+
|
162 |
+
// Vars
|
163 |
+
$key = "field_{$layout['key']}_settings";
|
164 |
+
$name = 'layout_settings';
|
165 |
+
$style = 'row';
|
166 |
+
$field_group = acf_get_field_group($field_groups[0]);
|
167 |
+
|
168 |
+
if($field_group){
|
169 |
+
$style = $field_group['label_placement'] === 'left' ? 'row' : 'block';
|
170 |
+
}
|
171 |
+
|
172 |
+
// Add local
|
173 |
+
acf_add_local_field(array(
|
174 |
+
'label' => false,
|
175 |
+
'key' => $key,
|
176 |
+
'name' => $name,
|
177 |
+
'type' => 'clone',
|
178 |
+
'clone' => $field_groups,
|
179 |
+
'display' => 'group',
|
180 |
+
'acfe_seamless_style' => true,
|
181 |
+
'layout' => $style,
|
182 |
+
'prefix_label' => 0,
|
183 |
+
'prefix_name' => 1,
|
184 |
+
'parent_layout' => $layout['key'],
|
185 |
+
'parent' => $field['key']
|
186 |
+
));
|
187 |
+
|
188 |
+
// Add sub field
|
189 |
+
array_unshift($fields, acf_get_field($key));
|
190 |
+
|
191 |
+
}
|
192 |
+
|
193 |
+
return $fields;
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
function prepare_layout($layout, $field, $i, $value, $prefix){
|
198 |
+
|
199 |
+
if(empty($layout['sub_fields']) || !$field['acfe_flexible_layouts_settings'])
|
200 |
+
return $layout;
|
201 |
+
|
202 |
+
// Sub field
|
203 |
+
$sub_field = acfe_extract_sub_field($layout, 'layout_settings', $value);
|
204 |
+
|
205 |
+
if(!$sub_field)
|
206 |
+
return $layout;
|
207 |
+
|
208 |
+
// update prefix to allow for nested values
|
209 |
+
$size = acf_maybe_get($layout, 'acfe_flexible_settings_size', 'medium');
|
210 |
+
$sub_field['prefix'] = $prefix;
|
211 |
+
|
212 |
+
?>
|
213 |
+
<div class="acfe-modal -settings -<?php echo $size; ?>">
|
214 |
+
<div class="acfe-modal-wrapper">
|
215 |
+
<div class="acfe-modal-content">
|
216 |
+
<div class="acf-fields -top">
|
217 |
+
<?php
|
218 |
+
|
219 |
+
acf_render_field_wrap($sub_field);
|
220 |
+
|
221 |
+
?>
|
222 |
+
</div>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
<?php
|
227 |
+
|
228 |
+
return $layout;
|
229 |
+
|
230 |
+
}
|
231 |
+
|
232 |
+
function layout_icons($icons, $layout, $field){
|
233 |
+
|
234 |
+
if(!acf_maybe_get($field, 'acfe_flexible_layouts_settings') || !acf_maybe_get($layout, 'acfe_flexible_settings'))
|
235 |
+
return $icons;
|
236 |
+
|
237 |
+
$icons = array_merge($icons, array(
|
238 |
+
'settings' => '<a class="acf-icon small light acf-js-tooltip acfe-flexible-icon dashicons dashicons-admin-generic" href="#" title="Settings" data-acfe-flexible-settings="' . $layout['name'] . '"></a>'
|
239 |
+
));
|
240 |
+
|
241 |
+
return $icons;
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
+
}
|
246 |
+
|
247 |
+
acf_new_instance('acfe_field_flexible_content_settings');
|
248 |
+
|
249 |
+
endif;
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_state')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_state{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 8);
|
14 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 8);
|
15 |
+
|
16 |
+
add_filter('acfe/flexible/validate_field', array($this, 'validate_state'));
|
17 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
18 |
+
add_filter('acfe/flexible/layouts/div', array($this, 'layout_div'), 10, 3);
|
19 |
+
add_filter('acfe/flexible/layouts/placeholder', array($this, 'layout_placeholder'), 10, 3);
|
20 |
+
add_filter('acfe/flexible/layouts/handle', array($this, 'layout_handle'), 10, 3);
|
21 |
+
add_filter('acfe/flexible/layouts/icons', array($this, 'layout_icons'), 50, 3);
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
function defaults_field($field){
|
26 |
+
|
27 |
+
$field['acfe_flexible_layouts_state'] = false;
|
28 |
+
|
29 |
+
return $field;
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
function render_field_settings($field){
|
34 |
+
|
35 |
+
// Layouts: Force State
|
36 |
+
acf_render_field_setting($field, array(
|
37 |
+
'label' => __('Default Layouts State'),
|
38 |
+
'name' => 'acfe_flexible_layouts_state',
|
39 |
+
'key' => 'acfe_flexible_layouts_state',
|
40 |
+
'instructions' => __('Force layouts to be collapsed or opened'),
|
41 |
+
'type' => 'radio',
|
42 |
+
'layout' => 'horizontal',
|
43 |
+
'default_value' => 'user',
|
44 |
+
'placeholder' => __('Default (User preference)', 'acfe'),
|
45 |
+
'choices' => array(
|
46 |
+
'user' => 'User preference',
|
47 |
+
'collapse' => 'Collapsed',
|
48 |
+
'open' => 'Opened',
|
49 |
+
'force_open' => 'Always opened',
|
50 |
+
),
|
51 |
+
'conditional_logic' => array(
|
52 |
+
array(
|
53 |
+
array(
|
54 |
+
'field' => 'acfe_flexible_advanced',
|
55 |
+
'operator' => '==',
|
56 |
+
'value' => '1',
|
57 |
+
),
|
58 |
+
array(
|
59 |
+
'field' => 'acfe_flexible_modal_edit_enabled',
|
60 |
+
'operator' => '!=',
|
61 |
+
'value' => '1',
|
62 |
+
)
|
63 |
+
)
|
64 |
+
)
|
65 |
+
));
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
function validate_state($field){
|
70 |
+
|
71 |
+
if(!acf_maybe_get($field, 'acfe_flexible_layouts_remove_collapse'))
|
72 |
+
return $field;
|
73 |
+
|
74 |
+
$field['acfe_flexible_layouts_state'] = 'force_open';
|
75 |
+
|
76 |
+
return $field;
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
function wrapper_attributes($wrapper, $field){
|
81 |
+
|
82 |
+
// Check setting
|
83 |
+
if($field['acfe_flexible_layouts_state'] !== 'open' || $field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
84 |
+
return $wrapper;
|
85 |
+
|
86 |
+
$wrapper['data-acfe-flexible-open'] = 1;
|
87 |
+
|
88 |
+
return $wrapper;
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
function layout_div($div, $layout, $field){
|
93 |
+
|
94 |
+
if($field['acfe_flexible_layouts_state'] !== 'collapse')
|
95 |
+
return $div;
|
96 |
+
|
97 |
+
// Already in class
|
98 |
+
if(in_array('-collapsed', explode(' ', $div['class'])))
|
99 |
+
return $div;
|
100 |
+
|
101 |
+
$div['class'] .= ' -collapsed';
|
102 |
+
|
103 |
+
return $div;
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
function layout_placeholder($placeholder, $layout, $field){
|
108 |
+
|
109 |
+
if($field['acfe_flexible_layouts_state'] === 'collapse' || $field['acfe_flexible_modal_edit']['acfe_flexible_modal_edit_enabled'])
|
110 |
+
return $placeholder;
|
111 |
+
|
112 |
+
// Already in class
|
113 |
+
if(in_array('acf-hidden', explode(' ', $placeholder['class'])))
|
114 |
+
return $placeholder;
|
115 |
+
|
116 |
+
$placeholder['class'] .= ' acf-hidden';
|
117 |
+
|
118 |
+
return $placeholder;
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
function layout_handle($handle, $layout, $field){
|
123 |
+
|
124 |
+
if($field['acfe_flexible_layouts_state'] !== 'force_open')
|
125 |
+
return $handle;
|
126 |
+
|
127 |
+
acfe_unset($handle, 'data-name');
|
128 |
+
|
129 |
+
return $handle;
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
function layout_icons($icons, $layout, $field){
|
134 |
+
|
135 |
+
if($field['acfe_flexible_layouts_state'] !== 'force_open')
|
136 |
+
return $icons;
|
137 |
+
|
138 |
+
acfe_unset($icons, 'collapse');
|
139 |
+
|
140 |
+
return $icons;
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
}
|
145 |
+
|
146 |
+
acf_new_instance('acfe_field_flexible_content_state');
|
147 |
+
|
148 |
+
endif;
|
@@ -0,0 +1,220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if(!defined('ABSPATH'))
|
4 |
+
exit;
|
5 |
+
|
6 |
+
if(!class_exists('acfe_field_flexible_content_thumbnail')):
|
7 |
+
|
8 |
+
class acfe_field_flexible_content_thumbnail{
|
9 |
+
|
10 |
+
function __construct(){
|
11 |
+
|
12 |
+
// Hooks
|
13 |
+
add_filter('acfe/flexible/defaults_field', array($this, 'defaults_field'), 3);
|
14 |
+
add_filter('acfe/flexible/defaults_layout', array($this, 'defaults_layout'), 3);
|
15 |
+
|
16 |
+
add_action('acfe/flexible/render_field_settings', array($this, 'render_field_settings'), 3);
|
17 |
+
add_action('acfe/flexible/render_layout_settings', array($this, 'render_layout_settings'), 25, 3);
|
18 |
+
add_filter('acfe/flexible/validate_field', array($this, 'validate_thumbnail'));
|
19 |
+
add_filter('acfe/flexible/wrapper_attributes', array($this, 'wrapper_attributes'), 10, 2);
|
20 |
+
add_filter('acfe/flexible/layouts/label_prepend', array($this, 'label_prepend'), 10, 3);
|
21 |
+
add_filter('acfe/flexible/layouts/label_atts', array($this, 'label_atts'), 20, 3);
|
22 |
+
|
23 |
+
add_filter('acf/fields/flexible_content/layout_title'
|