Advanced Custom Fields: Extended - Version 0.8.7.1

Version Description

  • General: WordPress 5.5 Compatibility - Fixed the new "Postbox Order Icons" size & only display them on postbox hover
  • General: ACF 5.9 Compatibility - Added missing legacy ACF 2 columns CSS
  • General: ACF 5.9 Compatibility - Fixed Fields Groups UI colspan when empty
  • General: Added pre > code CSS compatibility
  • General: Added JS hooks for ACFE Modal: acf.doAction('acfe/modal/open', $modal, args) & acf.doAction('acfe/modal/close', $modal, args)
  • Field Groups: Fixed "All Images Formats" location which triggered a PHP warning
  • Field Groups: Added acfe-postbox-top CSS preload to avoid UI blink during admin page load
  • Field Groups: Categories - Changed the register_taxonomy() to priority 9
  • Module: Multilang - Added filter('acfe/modules/multilang/options', $options_pages_id) allowing to allow/exclude specific Options Pages Post ID
  • Module: Dynamic Forms - Email Action - Fixed 'Reply-to' headers which weren't correctly set
  • Module: Dynamic Forms - Fixed {field:my_field:false} Template Tag to disable value format
  • Module: Options - Fixed "Serialized" typo on edit screen
  • Module: Dynamic Post Types - Added additional check before register_post_type()
  • Module: Dynamic Post Types - Added "Show in menu (text)" to allow string value
  • Module: Dynamic Post Types - Fixed "Archive Slug" incorrectly set when empty while using the Import Tool
  • Module: Dynamic Block Types - Added additional check for Template, Script & Styles arguments before register_block_type()
  • Module: Dynamic Taxonomies - Added additional check before register_taxonomy()
  • Field: Button - Fixed typo in "Button Type" setting instructions
  • Field: Button - Added default class value button button-secondary
  • Field: Clone - Fixed "Edit in modal" setting to be available only when the "Display" setting is set to "Group"
  • Field: Code Editor - Fixed "Editor Mode" setting instructions
  • Field: Forms - Changed default order to Title ASC
  • Field: reCaptcha - Fixed form submission when the field isn't required
  • Field Settings: Bidirectional - Fixed potential PHP notice Undefined index
Download this release

Release Info

Developer hwk-fr
Plugin Icon 128x128 Advanced Custom Fields: Extended
Version 0.8.7.1
Comparing to
See all releases

Code changes from version 0.8.7 to 0.8.7.1

Files changed (39) hide show
  1. acf-extended.php +2 -2
  2. assets/acf-extended-admin.css +112 -0
  3. assets/acf-extended-fc-modal-edit.css +5 -5
  4. assets/acf-extended-fields.js +8 -5
  5. assets/acf-extended-repeater.js +58 -58
  6. assets/acf-extended-ui.css +456 -456
  7. assets/acf-extended.js +4 -0
  8. includes/admin/options.class.php +276 -276
  9. includes/admin/options.php +578 -578
  10. includes/admin/plugins.php +41 -41
  11. includes/admin/tools/dpt-import.php +1 -1
  12. includes/admin/tools/fg-local.php +323 -323
  13. includes/admin/views/html-options-edit.php +60 -60
  14. includes/admin/views/html-options-list.php +37 -37
  15. includes/core/helpers.php +7 -5
  16. includes/core/multilang.php +2 -0
  17. includes/field-groups/field-group-category.php +1 -1
  18. includes/field-groups/field-groups.php +19 -25
  19. includes/fields-settings/bidirectional.php +5 -2
  20. includes/fields-settings/permissions.php +54 -54
  21. includes/fields/field-button.php +239 -239
  22. includes/fields/field-clone.php +9 -0
  23. includes/fields/field-code-editor.php +1 -1
  24. includes/fields/field-column.php +127 -127
  25. includes/fields/field-dynamic-message.php +57 -57
  26. includes/fields/field-hidden.php +47 -47
  27. includes/fields/field-recaptcha.php +47 -52
  28. includes/fields/field-repeater.php +61 -61
  29. includes/fields/field-slug.php +104 -104
  30. includes/fields/field-textarea.php +49 -49
  31. includes/locations/post-type-all.php +38 -38
  32. includes/locations/post-type-list.php +427 -427
  33. includes/locations/taxonomy-list.php +404 -404
  34. includes/modules/dynamic-block-type.php +7 -13
  35. includes/modules/dynamic-post-type.php +1006 -1002
  36. includes/modules/dynamic-taxonomy.php +683 -680
  37. includes/modules/form/actions/email.php +1 -1
  38. includes/modules/form/admin.php +8 -8
  39. readme.txt +172 -342
acf-extended.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Advanced Custom Fields: Extended
4
  * Description: Enhancement Suite which improves Advanced Custom Fields administration
5
- * Version: 0.8.7
6
  * Author: ACF Extended
7
  * Author URI: https://www.acf-extended.com
8
  * Text Domain: acfe
@@ -16,7 +16,7 @@ if(!class_exists('ACFE')):
16
  class ACFE{
17
 
18
  // Version
19
- var $version = '0.8.7';
20
 
21
  // Settings
22
  var $settings = array();
2
  /**
3
  * Plugin Name: Advanced Custom Fields: Extended
4
  * Description: Enhancement Suite which improves Advanced Custom Fields administration
5
+ * Version: 0.8.7.1
6
  * Author: ACF Extended
7
  * Author URI: https://www.acf-extended.com
8
  * Text Domain: acfe
16
  class ACFE{
17
 
18
  // Version
19
+ var $version = '0.8.7.1';
20
 
21
  // Settings
22
  var $settings = array();
assets/acf-extended-admin.css CHANGED
@@ -28,6 +28,18 @@ code{
28
  user-select: all;
29
  }
30
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  .pre-codemirror > .CodeMirror,
32
  .code-codemirror > .CodeMirror{
33
  border:1px solid #ccc;
@@ -79,6 +91,30 @@ code{
79
  display:none;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  /*
83
  * ACFE: Postbox-left
84
  */
@@ -574,4 +610,80 @@ body:not(.acf-admin-5-3) .acf-field .select2-container .select2-search--inline .
574
  */
575
  .menu-item-settings{
576
  position:initial;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  }
28
  user-select: all;
29
  }
30
 
31
+ pre > code{
32
+ -webkit-user-select: inherit;
33
+ -moz-user-select: inherit;
34
+ -ms-user-select: inherit;
35
+ user-select: inherit;
36
+ padding:0;
37
+ margin:0;
38
+ background:none;
39
+ font-size: 1em;
40
+ display:block;
41
+ }
42
+
43
  .pre-codemirror > .CodeMirror,
44
  .code-codemirror > .CodeMirror{
45
  border:1px solid #ccc;
91
  display:none;
92
  }
93
 
94
+ /*
95
+ * ACFE: Postbox-top
96
+ */
97
+ .acfe-postbox-top>.inside {
98
+ position: relative
99
+ }
100
+
101
+ .acfe-postbox-top>.inside.-border {
102
+ border: #ccd0d4 solid 1px;
103
+ background: #fff
104
+ }
105
+
106
+ .acfe-postbox-top>.inside>.acf-field {
107
+ position: relative;
108
+ margin: 0;
109
+ padding: 15px 12px;
110
+ border-top: #EEEEEE solid 1px
111
+ }
112
+
113
+ .acfe-postbox-top>.inside>.acf-field:first-child {
114
+ border-top: none;
115
+ margin-top: 0
116
+ }
117
+
118
  /*
119
  * ACFE: Postbox-left
120
  */
610
  */
611
  .menu-item-settings{
612
  position:initial;
613
+ }
614
+
615
+ /*
616
+ * WP 5.5: Fix postbox order icons size
617
+ */
618
+ @media screen and (min-width: 783px){
619
+
620
+ .postbox .handle-order-higher,
621
+ .postbox .handle-order-lower{
622
+ visibility: hidden;
623
+ }
624
+
625
+ .postbox:hover .handle-order-higher,
626
+ .postbox:hover .handle-order-lower{
627
+ visibility: visible;
628
+ }
629
+
630
+ }
631
+
632
+ .postbox .handle-order-higher,
633
+ .postbox .handle-order-lower{
634
+ vertical-align: bottom;
635
+ }
636
+
637
+ .postbox .handle-order-higher .order-higher-indicator::before,
638
+ .postbox .handle-order-lower .order-lower-indicator::before{
639
+ font-size:15px;
640
+ top:.18rem;
641
+ }
642
+
643
+ .postbox .handlediv{
644
+ width: 1.62rem;
645
+ }
646
+
647
+ .postbox .handlediv .toggle-indicator::before{
648
+ text-indent: -7px;
649
+ }
650
+
651
+ /*
652
+ * ACF 5.9: Fix missing columns
653
+ */
654
+ .acf-columns-2 {
655
+ margin-right: 300px;
656
+ clear: both
657
+ }
658
+
659
+ .acf-columns-2:after {
660
+ display: block;
661
+ clear: both;
662
+ content: ""
663
+ }
664
+
665
+ html[dir="rtl"] .acf-columns-2 {
666
+ margin-right: 0;
667
+ margin-left: 300px
668
+ }
669
+
670
+ .acf-columns-2 .acf-column-1 {
671
+ float: left;
672
+ width: 100%
673
+ }
674
+
675
+ html[dir="rtl"] .acf-columns-2 .acf-column-1 {
676
+ float: right
677
+ }
678
+
679
+ .acf-columns-2 .acf-column-2 {
680
+ float: right;
681
+ margin-right: -300px;
682
+ width: 280px
683
+ }
684
+
685
+ html[dir="rtl"] .acf-columns-2 .acf-column-2 {
686
+ float: left;
687
+ margin-right: 0;
688
+ margin-left: -300px
689
  }
assets/acf-extended-fc-modal-edit.css CHANGED
@@ -1,6 +1,6 @@
1
- /*
2
- * Flexible Edit: Hide Collapse
3
- */
4
- .acf-field-flexible-content[data-acfe-flexible-modal-edition="1"] > .acf-input > .acf-flexible-content > .values > .layout > .acf-fc-layout-controls > a.-collapse{
5
- display:none;
6
  }
1
+ /*
2
+ * Flexible Edit: Hide Collapse
3
+ */
4
+ .acf-field-flexible-content[data-acfe-flexible-modal-edition="1"] > .acf-input > .acf-flexible-content > .values > .layout > .acf-fc-layout-controls > a.-collapse{
5
+ display:none;
6
  }
assets/acf-extended-fields.js CHANGED
@@ -1327,13 +1327,16 @@ function acfe_recaptcha(){
1327
  };
1328
 
1329
  acf.addAction('prepare_field/key=field_acfe_form_custom_action_tab_action', acfe_tab_forget_tab_preference);
1330
- acf.addAction('prepare_field/key=field_acfe_form_email_tab_action', acfe_tab_forget_tab_preference);
1331
- acf.addAction('prepare_field/key=field_acfe_form_post_tab_action', acfe_tab_forget_tab_preference);
1332
- acf.addAction('prepare_field/key=field_acfe_form_term_tab_action', acfe_tab_forget_tab_preference);
1333
- acf.addAction('prepare_field/key=field_acfe_form_user_tab_action', acfe_tab_forget_tab_preference);
 
 
 
1334
 
1335
  acf.addAction('show_postbox', function(postbox){
1336
- postbox.$el.removeClass('acfe-postbox-left');
1337
  });
1338
 
1339
  // Allow conditions to work within wrapped div
1327
  };
1328
 
1329
  acf.addAction('prepare_field/key=field_acfe_form_custom_action_tab_action', acfe_tab_forget_tab_preference);
1330
+ acf.addAction('prepare_field/key=field_acfe_form_email_tab_action', acfe_tab_forget_tab_preference);
1331
+ acf.addAction('prepare_field/key=field_acfe_form_post_tab_action', acfe_tab_forget_tab_preference);
1332
+ acf.addAction('prepare_field/key=field_acfe_form_term_tab_action', acfe_tab_forget_tab_preference);
1333
+ acf.addAction('prepare_field/key=field_acfe_form_user_tab_action', acfe_tab_forget_tab_preference);
1334
+
1335
+ acf.addAction('prepare_field/key=field_acfe_dpt_tab_general', acfe_tab_forget_tab_preference);
1336
+ acf.addAction('prepare_field/key=field_acfe_dt_tab_general', acfe_tab_forget_tab_preference);
1337
 
1338
  acf.addAction('show_postbox', function(postbox){
1339
+ postbox.$el.removeClass('acfe-postbox-left acfe-postbox-top');
1340
  });
1341
 
1342
  // Allow conditions to work within wrapped div
assets/acf-extended-repeater.js CHANGED
@@ -1,59 +1,59 @@
1
- (function($){
2
-
3
- if(typeof acf === 'undefined')
4
- return;
5
-
6
- /*
7
- * Init
8
- */
9
- var repeater = acf.getFieldType('repeater');
10
- var model = repeater.prototype;
11
-
12
- // Repeater: Lock Layouts
13
- model.acfeOnHover = function(){
14
-
15
- var repeater = this;
16
-
17
- // remove event
18
- repeater.off('mouseover');
19
-
20
- }
21
-
22
- /*
23
- * Spawn
24
- */
25
- acf.addAction('new_field/type=repeater', function(repeater){
26
-
27
- // ACFE: Lock
28
- if(repeater.has('acfeRepeaterLock')){
29
-
30
- repeater.removeEvents({'mouseover': 'onHover'});
31
-
32
- repeater.addEvents({'mouseover': 'acfeOnHover'});
33
-
34
- }
35
-
36
- // ACFE: Remove Actions
37
- if(repeater.has('acfeRepeaterRemoveActions')){
38
-
39
- repeater.$actions().remove();
40
-
41
- repeater.$el.find('thead:first > tr > th.acf-row-handle:last').remove();
42
- repeater.$rows().find('> .acf-row-handle:last').remove();
43
-
44
- repeater.$control().find('> .acfe-repeater-stylised-button').remove();
45
-
46
-
47
- }
48
-
49
- // ACFE: Stylised button
50
- if(repeater.has('acfeRepeaterStylisedButton')){
51
-
52
- repeater.$button().removeClass('button-primary');
53
- repeater.$actions().wrap('<div class="acfe-repeater-stylised-button" />');
54
-
55
- }
56
-
57
- });
58
-
59
  })(jQuery);
1
+ (function($){
2
+
3
+ if(typeof acf === 'undefined')
4
+ return;
5
+
6
+ /*
7
+ * Init
8
+ */
9
+ var repeater = acf.getFieldType('repeater');
10
+ var model = repeater.prototype;
11
+
12
+ // Repeater: Lock Layouts
13
+ model.acfeOnHover = function(){
14
+
15
+ var repeater = this;
16
+
17
+ // remove event
18
+ repeater.off('mouseover');
19
+
20
+ }
21
+
22
+ /*
23
+ * Spawn
24
+ */
25
+ acf.addAction('new_field/type=repeater', function(repeater){
26
+
27
+ // ACFE: Lock
28
+ if(repeater.has('acfeRepeaterLock')){
29
+
30
+ repeater.removeEvents({'mouseover': 'onHover'});
31
+
32
+ repeater.addEvents({'mouseover': 'acfeOnHover'});
33
+
34
+ }
35
+
36
+ // ACFE: Remove Actions
37
+ if(repeater.has('acfeRepeaterRemoveActions')){
38
+
39
+ repeater.$actions().remove();
40
+
41
+ repeater.$el.find('thead:first > tr > th.acf-row-handle:last').remove();
42
+ repeater.$rows().find('> .acf-row-handle:last').remove();
43
+
44
+ repeater.$control().find('> .acfe-repeater-stylised-button').remove();
45
+
46
+
47
+ }
48
+
49
+ // ACFE: Stylised button
50
+ if(repeater.has('acfeRepeaterStylisedButton')){
51
+
52
+ repeater.$button().removeClass('button-primary');
53
+ repeater.$actions().wrap('<div class="acfe-repeater-stylised-button" />');
54
+
55
+ }
56
+
57
+ });
58
+
59
  })(jQuery);
assets/acf-extended-ui.css CHANGED
@@ -1,457 +1,457 @@
1
- /*
2
- * ACFE: UI Enhanced
3
- */
4
- .term-php .wrap > form,
5
- .profile-php .wrap > form,
6
- .user-edit-php .wrap > form,
7
- .user-new-php .wrap > form,
8
- .options-general-php .wrap > form,
9
- .options-writing-php .wrap > form,
10
- .options-reading-php .wrap > form,
11
- .options-discussion-php .wrap > form,
12
- .options-media-php .wrap > form,
13
- .options-permalink-php .wrap > form
14
- {
15
- max-width:100% !important;
16
- width: 100%;
17
- float:left;
18
- }
19
-
20
- .term-php .wrap > form > div > div > h2,
21
- .profile-php .wrap > form > div > div > h2,
22
- .user-edit-php .wrap > form > div > div > h2,
23
- .user-new-php .wrap > form > div > div > h2,
24
- .options-general-php .wrap > form > div > div > h2,
25
- .options-writing-php .wrap > form > div > div > h2,
26
- .options-reading-php .wrap > form > div > div > h2,
27
- .options-discussion-php .wrap > form > div > div > h2,
28
- .options-media-php .wrap > form > div > div > h2,
29
- .options-permalink-php .wrap > form > div > div > h2
30
- {
31
- background:#fff;
32
- border: 1px solid #ccd0d4;
33
- border-bottom: 0;
34
- margin:0;
35
- color: #23282d;
36
- font-size: 14px;
37
- padding: 8px 12px;
38
- line-height: 1.4;
39
- }
40
-
41
- .term-php .wrap > form > div > div > h2 + p,
42
- .profile-php .wrap > form > div > div > h2 + p,
43
- .user-edit-php .wrap > form > div > div > h2 + p,
44
- .user-new-php .wrap > form > div > div > h2 + p,
45
- .options-general-php .wrap > form > div > div > h2 + p,
46
- .options-writing-php .wrap > form > div > div > h2 + p,
47
- .options-reading-php .wrap > form > div > div > h2 + p,
48
- .options-discussion-php .wrap > form > div > div > h2 + p,
49
- .options-media-php .wrap > form > div > div > h2 + p,
50
- .options-permalink-php .wrap > form > div > div > h2 + p
51
- {
52
- margin:0;
53
- border: 1px solid #ccd0d4;
54
- border-bottom:0;
55
- padding:15px 12px;
56
- }
57
-
58
- .term-php .wrap > form > div > div > h2 + .form-table,
59
- .term-php .wrap > form > div > div > h2 + p + .form-table,
60
-
61
- .profile-php .wrap > form > div > div > h2 + .form-table,
62
- .profile-php .wrap > form > div > div > h2 + p + .form-table,
63
-
64
- .user-edit-php .wrap > form > div > div > h2 + .form-table,
65
- .user-edit-php .wrap > form > div > div > h2 + p + .form-table,
66
-
67
- .user-new-php .wrap > form > div > div > h2 + .form-table,
68
- .user-new-php .wrap > form > div > div > h2 + p + .form-table,
69
-
70
- .options-general-php .wrap > form > div > div > h2 + .form-table,
71
- .options-general-php .wrap > form > div > div > h2 + p + .form-table,
72
-
73
- .options-writing-php .wrap > form > div > div > h2 + .form-table,
74
- .options-writing-php .wrap > form > div > div > h2 + p + .form-table,
75
-
76
- .options-reading-php .wrap > form > div > div > h2 + .form-table,
77
- .options-reading-php .wrap > form > div > div > h2 + p + .form-table,
78
-
79
- .options-discussion-php .wrap > form > div > div > h2 + .form-table,
80
- .options-discussion-php .wrap > form > div > div > h2 + p + .form-table,
81
-
82
- .options-media-php .wrap > form > div > div > h2 + .form-table,
83
- .options-media-php .wrap > form > div > div > h2 + p + .form-table,
84
-
85
- .options-permalink-php .wrap > form > div > div > h2 + .form-table,
86
- .options-permalink-php .wrap > form > div > div > h2 + p + .form-table
87
- {
88
- margin-top:0;
89
- }
90
-
91
- .term-php .wrap > form .form-table,
92
- .profile-php .wrap > form .form-table,
93
- .user-edit-php .wrap > form .form-table,
94
- .user-new-php .wrap > form .form-table,
95
- .options-general-php .wrap > form .form-table,
96
- .options-writing-php .wrap > form .form-table,
97
- .options-reading-php .wrap > form .form-table,
98
- .options-discussion-php .wrap > form .form-table,
99
- .options-media-php .wrap > form .form-table,
100
- .options-permalink-php .wrap > form .form-table
101
- {
102
- background:#fff;
103
- width:100%;
104
- border: 1px solid #ccd0d4;
105
- box-shadow: 0 1px 1px rgba(0,0,0,.04);
106
- margin-bottom: 20px; /* Fix for Yoast & Rank Math Metaboxes below the term */
107
- }
108
-
109
- .term-php .wrap > form .form-table > tbody > tr > td,
110
- .profile-php .wrap > form .form-table > tbody > tr > td,
111
- .user-edit-php .wrap > form .form-table > tbody > tr > td,
112
- .user-new-php .wrap > form .form-table > tbody > tr > td,
113
- .options-general-php .wrap > form .form-table > tbody > tr > td,
114
- .options-writing-php .wrap > form .form-table > tbody > tr > td,
115
- .options-reading-php .wrap > form .form-table > tbody > tr > td,
116
- .options-discussion-php .wrap > form .form-table > tbody > tr > td,
117
- .options-media-php .wrap > form .form-table > tbody > tr > td,
118
- .options-permalink-php .wrap > form .form-table > tbody > tr > td
119
- {
120
- background: #fff;
121
- border-top: 1px solid #E1E1E1;
122
- position:initial;
123
- }
124
-
125
- .term-php .wrap > form .form-table > tbody > tr:first-of-type > td,
126
- .term-php .wrap > form .form-table > tbody > tr:first-of-type > th,
127
-
128
- .profile-php .wrap > form .form-table > tbody > tr:first-of-type > td,
129
- .profile-php .wrap > form .form-table > tbody > tr:first-of-type > th,
130
-
131
- .user-edit-php .wrap > form .form-table > tbody > tr:first-of-type > td,
132
- .user-edit-php .wrap > form .form-table > tbody > tr:first-of-type > th,
133
-
134
- .user-new-php .wrap > form .form-table > tbody > tr:first-of-type > td,
135
- .user-new-php .wrap > form .form-table > tbody > tr:first-of-type > th,
136
-
137
- .options-general-php .wrap > form .form-table > tbody > tr:first-of-type > td,
138
- .options-general-php .wrap > form .form-table > tbody > tr:first-of-type > th,
139
-
140
- .options-writing-php .wrap > form .form-table > tbody > tr:first-of-type > td,
141
- .options-writing-php .wrap > form .form-table > tbody > tr:first-of-type > th,
142
-
143
- .options-reading-php .wrap > form .form-table > tbody > tr:first-of-type > td,
144
- .options-reading-php .wrap > form .form-table > tbody > tr:first-of-type > th,
145
-
146
- .options-discussion-php .wrap > form .form-table > tbody > tr:first-of-type > td,
147
- .options-discussion-php .wrap > form .form-table > tbody > tr:first-of-type > th,
148
-
149
- .options-media-php .wrap > form .form-table > tbody > tr:first-of-type > td,
150
- .options-media-php .wrap > form .form-table > tbody > tr:first-of-type > th,
151
-
152
- .options-permalink-php .wrap > form .form-table > tbody > tr:first-of-type > td,
153
- .options-permalink-php .wrap > form .form-table > tbody > tr:first-of-type > th
154
- {
155
- border-top: 1px solid #ccd0d4;
156
- }
157
-
158
- .term-php .wrap > form .form-table > tbody > tr > td p,
159
- .profile-php .wrap > form .form-table > tbody > tr > td p,
160
- .user-edit-php .wrap > form .form-table > tbody > tr > td p,
161
- .user-new-php .wrap > form .form-table > tbody > tr > td p,
162
- .options-general-php .wrap > form .form-table > tbody > tr > td p,
163
- .options-writing-php .wrap > form .form-table > tbody > tr > td p,
164
- .options-reading-php .wrap > form .form-table > tbody > tr > td p,
165
- .options-discussion-php .wrap > form .form-table > tbody > tr > td p,
166
- .options-media-php .wrap > form .form-table > tbody > tr > td p,
167
- .options-permalink-php .wrap > form .form-table > tbody > tr > td p
168
- {
169
- font-size:13px;
170
- }
171
-
172
- .term-php .wrap > form .form-table > tbody > tr > th,
173
- .term-php .wrap > form .form-table > tbody > tr > td.acf-label,
174
-
175
- .profile-php .wrap > form .form-table > tbody > tr > th,
176
- .profile-php .wrap > form .form-table > tbody > tr > td.acf-label,
177
-
178
- .user-edit-php .wrap > form .form-table > tbody > tr > th,
179
- .user-edit-php .wrap > form .form-table > tbody > tr > td.acf-label,
180
-
181
- .user-new-php .wrap > form .form-table > tbody > tr > th,
182
- .user-new-php .wrap > form .form-table > tbody > tr > td.acf-label,
183
-
184
- .options-general-php .wrap > form .form-table > tbody > tr > th,
185
- .options-general-php .wrap > form .form-table > tbody > tr > td.acf-label,
186
-
187
- .options-writing-php .wrap > form .form-table > tbody > tr > th,
188
- .options-writing-php .wrap > form .form-table > tbody > tr > td.acf-label,
189
-
190
- .options-reading-php .wrap > form .form-table > tbody > tr > th,
191
- .options-reading-php .wrap > form .form-table > tbody > tr > td.acf-label,
192
-
193
- .options-discussion-php .wrap > form .form-table > tbody > tr > th,
194
- .options-discussion-php .wrap > form .form-table > tbody > tr > td.acf-label,
195
-
196
- .options-media-php .wrap > form .form-table > tbody > tr > th,
197
- .options-media-php .wrap > form .form-table > tbody > tr > td.acf-label,
198
-
199
- .options-permalink-php .wrap > form .form-table > tbody > tr > th,
200
- .options-permalink-php .wrap > form .form-table > tbody > tr > td.acf-label
201
- {
202
- border-top: 1px solid #E1E1E1;
203
- border-right: 1px solid #E1E1E1;
204
- background: #F9F9F9;
205
- padding:15px 12px;
206
- width:20%;
207
- font-size:13px;
208
- position:initial;
209
- color:#444;
210
- }
211
-
212
- .term-php .wrap > form .form-table > tbody > tr > td.td-full,
213
- .profile-php .wrap > form .form-table > tbody > tr > td.td-full,
214
- .user-edit-php .wrap > form .form-table > tbody > tr > td.td-full,
215
- .user-new-php .wrap > form .form-table > tbody > tr > td.td-full,
216
- .options-general-php .wrap > form .form-table > tbody > tr > td.td-full,
217
- .options-writing-php .wrap > form .form-table > tbody > tr > td.td-full,
218
- .options-reading-php .wrap > form .form-table > tbody > tr > td.td-full,
219
- .options-discussion-php .wrap > form .form-table > tbody > tr > td.td-full,
220
- .options-media-php .wrap > form .form-table > tbody > tr > td.td-full,
221
- .options-permalink-php .wrap > form .form-table > tbody > tr > td.td-full
222
- {
223
- padding:15px 12px;
224
- }
225
-
226
- .term-php .wrap > form .form-table > tbody > tr.acf-field,
227
- .profile-php .wrap > form .form-table > tbody > tr.acf-field,
228
- .user-edit-php .wrap > form .form-table > tbody > tr.acf-field,
229
- .user-new-php .wrap > form .form-table > tbody > tr.acf-field,
230
- .options-general-php .wrap > form .form-table > tbody > tr.acf-field,
231
- .options-writing-php .wrap > form .form-table > tbody > tr.acf-field,
232
- .options-reading-php .wrap > form .form-table > tbody > tr.acf-field,
233
- .options-discussion-php .wrap > form .form-table > tbody > tr.acf-field,
234
- .options-media-php .wrap > form .form-table > tbody > tr.acf-field,
235
- .options-permalink-php .wrap > form .form-table > tbody > tr.acf-field
236
- {
237
- position: initial;
238
- }
239
-
240
- .term-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
241
- .profile-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
242
- .user-edit-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
243
- .user-new-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
244
- .options-general-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
245
- .options-writing-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
246
- .options-reading-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
247
- .options-discussion-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
248
- .options-media-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
249
- .options-permalink-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td
250
- {
251
- background: #F9F9F9;
252
- padding:15px 0 0 0;
253
- }
254
-
255
- .term-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
256
- .profile-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
257
- .user-edit-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
258
- .user-new-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
259
- .options-general-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
260
- .options-writing-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
261
- .options-reading-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
262
- .options-discussion-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
263
- .options-media-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
264
- .options-permalink-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group
265
- {
266
- border-bottom:0;
267
- padding:0 0 0 20%;
268
- }
269
-
270
- .term-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
271
- .profile-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
272
- .user-edit-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
273
- .user-new-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
274
- .options-general-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
275
- .options-writing-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
276
- .options-reading-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
277
- .options-discussion-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
278
- .options-media-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
279
- .options-permalink-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a
280
- {
281
- background: #fff;
282
- }
283
-
284
- .term-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
285
- .profile-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
286
- .user-edit-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
287
- .user-new-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
288
- .options-general-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
289
- .options-writing-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
290
- .options-reading-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
291
- .options-discussion-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
292
- .options-media-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
293
- .options-permalink-php .wrap > form #poststuff.acfe-acfe-bt-admin-column
294
- {
295
- min-width:auto;
296
- padding:0;
297
- }
298
-
299
- .term-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
300
- .profile-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
301
- .user-edit-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
302
- .user-new-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
303
- .options-general-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
304
- .options-writing-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
305
- .options-reading-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
306
- .options-discussion-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
307
- .options-media-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
308
- .options-permalink-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside
309
- {
310
- margin: 0;
311
- padding: 0;
312
- }
313
-
314
- /*
315
- * ACFE: UI Enhanced (Fix ACF)
316
- */
317
- .term-php .wrap .form-table > tbody>.acf-field > .acf-label label,
318
- .profile-php .wrap .form-table > tbody>.acf-field > .acf-label label,
319
- .user-edit-php .wrap .form-table > tbody>.acf-field > .acf-label label,
320
- .user-new-php .wrap .form-table > tbody>.acf-field > .acf-label label,
321
- .options-general-php .wrap .form-table > tbody>.acf-field > .acf-label label,
322
- .options-writing-php .wrap .form-table > tbody>.acf-field > .acf-label label,
323
- .options-reading-php .wrap .form-table > tbody>.acf-field > .acf-label label,
324
- .options-discussion-php .wrap .form-table > tbody>.acf-field > .acf-label label,
325
- .options-media-php .wrap .form-table > tbody>.acf-field > .acf-label label,
326
- .options-permalink-php .wrap .form-table > tbody>.acf-field > .acf-label label
327
- {
328
- font-size: 13px;
329
- color: #444;
330
- }
331
-
332
- .term-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
333
- .profile-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
334
- .user-edit-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
335
- .user-new-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
336
- .options-general-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
337
- .options-writing-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
338
- .options-reading-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
339
- .options-discussion-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
340
- .options-media-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
341
- .options-permalink-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label
342
- {
343
- padding-left: 20%;
344
- }
345
-
346
- .term-php .wrap > form .acf-fields.-left > .acf-field,
347
- .profile-php .wrap > form .acf-fields.-left > .acf-field,
348
- .user-edit-php .wrap > form .acf-fields.-left > .acf-field,
349
- .user-new-php .wrap > form .acf-fields.-left > .acf-field,
350
- .options-general-php .wrap > form .acf-fields.-left > .acf-field,
351
- .options-writing-php .wrap > form .acf-fields.-left > .acf-field,
352
- .options-reading-php .wrap > form .acf-fields.-left > .acf-field,
353
- .options-discussion-php .wrap > form .acf-fields.-left > .acf-field,
354
- .options-media-php .wrap > form .acf-fields.-left > .acf-field,
355
- .options-permalink-php .wrap > form .acf-fields.-left > .acf-field
356
- {
357
- padding-left: 0;
358
- }
359
-
360
- .term-php .wrap > form .acf-fields.-left > .acf-field:before,
361
- .profile-php .wrap > form .acf-fields.-left > .acf-field:before,
362
- .user-edit-php .wrap > form .acf-fields.-left > .acf-field:before,
363
- .user-new-php .wrap > form .acf-fields.-left > .acf-field:before,
364
- .options-general-php .wrap > form .acf-fields.-left > .acf-field:before,
365
- .options-writing-php .wrap > form .acf-fields.-left > .acf-field:before,
366
- .options-reading-php .wrap > form .acf-fields.-left > .acf-field:before,
367
- .options-discussion-php .wrap > form .acf-fields.-left > .acf-field:before,
368
- .options-media-php .wrap > form .acf-fields.-left > .acf-field:before,
369
- .options-permalink-php .wrap > form .acf-fields.-left > .acf-field:before
370
- {
371
- width:20%;
372
- }
373
-
374
- .term-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
375
- .profile-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
376
- .user-edit-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
377
- .user-new-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
378
- .options-general-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
379
- .options-writing-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
380
- .options-reading-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
381
- .options-discussion-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
382
- .options-media-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
383
- .options-permalink-php .wrap > form .acf-fields.-left > .acf-field > .acf-label
384
- {
385
- width: 20%;
386
- margin-left: 0;
387
- padding: 0 12px;
388
- }
389
-
390
- .term-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
391
- .profile-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
392
- .user-edit-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
393
- .user-new-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
394
- .options-general-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
395
- .options-writing-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
396
- .options-reading-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
397
- .options-discussion-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
398
- .options-media-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
399
- .options-permalink-php .wrap > form .acf-fields.-left > .acf-field > .acf-input
400
- {
401
- padding: 0 12px;
402
- }
403
-
404
- .term-php .wrap > form p.submit,
405
- .profile-php .wrap > form p.submit,
406
- .user-edit-php .wrap > form p.submit,
407
- .user-new-php .wrap > form p.submit,
408
- .options-general-php .wrap > form p.submit,
409
- .options-writing-php .wrap > form p.submit,
410
- .options-reading-php .wrap > form p.submit,
411
- .options-discussion-php .wrap > form p.submit,
412
- .options-media-php .wrap > form p.submit,
413
- .options-permalink-php .wrap > form p.submit
414
- {
415
- display:none;
416
- }
417
-
418
- /*
419
- * ACFE: UI - Term Single
420
- */
421
- .term-php .wrap > form{
422
- margin-top:13px;
423
- }
424
-
425
- /*
426
- * ACFE: UI - Terms List
427
- */
428
- .edit-tags-php #col-left{
429
- display:none;
430
- }
431
-
432
- .edit-tags-php #col-container #col-right{
433
- float:none;
434
- width:auto;
435
- }
436
-
437
- .edit-tags-php #col-container #col-right .col-wrap{
438
- padding:0;
439
- }
440
-
441
- .edit-tags-php #col-left.acfe-bt{
442
- float:none;
443
- width:100%;
444
- }
445
-
446
- .edit-tags-php #col-left.acfe-bt .col-wrap{
447
- padding:0;
448
- }
449
-
450
- .edit-tags-php #col-left.acfe-bt #poststuff{
451
- min-width:100%;
452
- }
453
-
454
- .edit-tags-php #acfe-bt-form .submit.acf-field{
455
- display:block !important;
456
- margin: 0;
457
  }
1
+ /*
2
+ * ACFE: UI Enhanced
3
+ */
4
+ .term-php .wrap > form,
5
+ .profile-php .wrap > form,
6
+ .user-edit-php .wrap > form,
7
+ .user-new-php .wrap > form,
8
+ .options-general-php .wrap > form,
9
+ .options-writing-php .wrap > form,
10
+ .options-reading-php .wrap > form,
11
+ .options-discussion-php .wrap > form,
12
+ .options-media-php .wrap > form,
13
+ .options-permalink-php .wrap > form
14
+ {
15
+ max-width:100% !important;
16
+ width: 100%;
17
+ float:left;
18
+ }
19
+
20
+ .term-php .wrap > form > div > div > h2,
21
+ .profile-php .wrap > form > div > div > h2,
22
+ .user-edit-php .wrap > form > div > div > h2,
23
+ .user-new-php .wrap > form > div > div > h2,
24
+ .options-general-php .wrap > form > div > div > h2,
25
+ .options-writing-php .wrap > form > div > div > h2,
26
+ .options-reading-php .wrap > form > div > div > h2,
27
+ .options-discussion-php .wrap > form > div > div > h2,
28
+ .options-media-php .wrap > form > div > div > h2,
29
+ .options-permalink-php .wrap > form > div > div > h2
30
+ {
31
+ background:#fff;
32
+ border: 1px solid #ccd0d4;
33
+ border-bottom: 0;
34
+ margin:0;
35
+ color: #23282d;
36
+ font-size: 14px;
37
+ padding: 8px 12px;
38
+ line-height: 1.4;
39
+ }
40
+
41
+ .term-php .wrap > form > div > div > h2 + p,
42
+ .profile-php .wrap > form > div > div > h2 + p,
43
+ .user-edit-php .wrap > form > div > div > h2 + p,
44
+ .user-new-php .wrap > form > div > div > h2 + p,
45
+ .options-general-php .wrap > form > div > div > h2 + p,
46
+ .options-writing-php .wrap > form > div > div > h2 + p,
47
+ .options-reading-php .wrap > form > div > div > h2 + p,
48
+ .options-discussion-php .wrap > form > div > div > h2 + p,
49
+ .options-media-php .wrap > form > div > div > h2 + p,
50
+ .options-permalink-php .wrap > form > div > div > h2 + p
51
+ {
52
+ margin:0;
53
+ border: 1px solid #ccd0d4;
54
+ border-bottom:0;
55
+ padding:15px 12px;
56
+ }
57
+
58
+ .term-php .wrap > form > div > div > h2 + .form-table,
59
+ .term-php .wrap > form > div > div > h2 + p + .form-table,
60
+
61
+ .profile-php .wrap > form > div > div > h2 + .form-table,
62
+ .profile-php .wrap > form > div > div > h2 + p + .form-table,
63
+
64
+ .user-edit-php .wrap > form > div > div > h2 + .form-table,
65
+ .user-edit-php .wrap > form > div > div > h2 + p + .form-table,
66
+
67
+ .user-new-php .wrap > form > div > div > h2 + .form-table,
68
+ .user-new-php .wrap > form > div > div > h2 + p + .form-table,
69
+
70
+ .options-general-php .wrap > form > div > div > h2 + .form-table,
71
+ .options-general-php .wrap > form > div > div > h2 + p + .form-table,
72
+
73
+ .options-writing-php .wrap > form > div > div > h2 + .form-table,
74
+ .options-writing-php .wrap > form > div > div > h2 + p + .form-table,
75
+
76
+ .options-reading-php .wrap > form > div > div > h2 + .form-table,
77
+ .options-reading-php .wrap > form > div > div > h2 + p + .form-table,
78
+
79
+ .options-discussion-php .wrap > form > div > div > h2 + .form-table,
80
+ .options-discussion-php .wrap > form > div > div > h2 + p + .form-table,
81
+
82
+ .options-media-php .wrap > form > div > div > h2 + .form-table,
83
+ .options-media-php .wrap > form > div > div > h2 + p + .form-table,
84
+
85
+ .options-permalink-php .wrap > form > div > div > h2 + .form-table,
86
+ .options-permalink-php .wrap > form > div > div > h2 + p + .form-table
87
+ {
88
+ margin-top:0;
89
+ }
90
+
91
+ .term-php .wrap > form .form-table,
92
+ .profile-php .wrap > form .form-table,
93
+ .user-edit-php .wrap > form .form-table,
94
+ .user-new-php .wrap > form .form-table,
95
+ .options-general-php .wrap > form .form-table,
96
+ .options-writing-php .wrap > form .form-table,
97
+ .options-reading-php .wrap > form .form-table,
98
+ .options-discussion-php .wrap > form .form-table,
99
+ .options-media-php .wrap > form .form-table,
100
+ .options-permalink-php .wrap > form .form-table
101
+ {
102
+ background:#fff;
103
+ width:100%;
104
+ border: 1px solid #ccd0d4;
105
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
106
+ margin-bottom: 20px; /* Fix for Yoast & Rank Math Metaboxes below the term */
107
+ }
108
+
109
+ .term-php .wrap > form .form-table > tbody > tr > td,
110
+ .profile-php .wrap > form .form-table > tbody > tr > td,
111
+ .user-edit-php .wrap > form .form-table > tbody > tr > td,
112
+ .user-new-php .wrap > form .form-table > tbody > tr > td,
113
+ .options-general-php .wrap > form .form-table > tbody > tr > td,
114
+ .options-writing-php .wrap > form .form-table > tbody > tr > td,
115
+ .options-reading-php .wrap > form .form-table > tbody > tr > td,
116
+ .options-discussion-php .wrap > form .form-table > tbody > tr > td,
117
+ .options-media-php .wrap > form .form-table > tbody > tr > td,
118
+ .options-permalink-php .wrap > form .form-table > tbody > tr > td
119
+ {
120
+ background: #fff;
121
+ border-top: 1px solid #E1E1E1;
122
+ position:initial;
123
+ }
124
+
125
+ .term-php .wrap > form .form-table > tbody > tr:first-of-type > td,
126
+ .term-php .wrap > form .form-table > tbody > tr:first-of-type > th,
127
+
128
+ .profile-php .wrap > form .form-table > tbody > tr:first-of-type > td,
129
+ .profile-php .wrap > form .form-table > tbody > tr:first-of-type > th,
130
+
131
+ .user-edit-php .wrap > form .form-table > tbody > tr:first-of-type > td,
132
+ .user-edit-php .wrap > form .form-table > tbody > tr:first-of-type > th,
133
+
134
+ .user-new-php .wrap > form .form-table > tbody > tr:first-of-type > td,
135
+ .user-new-php .wrap > form .form-table > tbody > tr:first-of-type > th,
136
+
137
+ .options-general-php .wrap > form .form-table > tbody > tr:first-of-type > td,
138
+ .options-general-php .wrap > form .form-table > tbody > tr:first-of-type > th,
139
+
140
+ .options-writing-php .wrap > form .form-table > tbody > tr:first-of-type > td,
141
+ .options-writing-php .wrap > form .form-table > tbody > tr:first-of-type > th,
142
+
143
+ .options-reading-php .wrap > form .form-table > tbody > tr:first-of-type > td,
144
+ .options-reading-php .wrap > form .form-table > tbody > tr:first-of-type > th,
145
+
146
+ .options-discussion-php .wrap > form .form-table > tbody > tr:first-of-type > td,
147
+ .options-discussion-php .wrap > form .form-table > tbody > tr:first-of-type > th,
148
+
149
+ .options-media-php .wrap > form .form-table > tbody > tr:first-of-type > td,
150
+ .options-media-php .wrap > form .form-table > tbody > tr:first-of-type > th,
151
+
152
+ .options-permalink-php .wrap > form .form-table > tbody > tr:first-of-type > td,
153
+ .options-permalink-php .wrap > form .form-table > tbody > tr:first-of-type > th
154
+ {
155
+ border-top: 1px solid #ccd0d4;
156
+ }
157
+
158
+ .term-php .wrap > form .form-table > tbody > tr > td p,
159
+ .profile-php .wrap > form .form-table > tbody > tr > td p,
160
+ .user-edit-php .wrap > form .form-table > tbody > tr > td p,
161
+ .user-new-php .wrap > form .form-table > tbody > tr > td p,
162
+ .options-general-php .wrap > form .form-table > tbody > tr > td p,
163
+ .options-writing-php .wrap > form .form-table > tbody > tr > td p,
164
+ .options-reading-php .wrap > form .form-table > tbody > tr > td p,
165
+ .options-discussion-php .wrap > form .form-table > tbody > tr > td p,
166
+ .options-media-php .wrap > form .form-table > tbody > tr > td p,
167
+ .options-permalink-php .wrap > form .form-table > tbody > tr > td p
168
+ {
169
+ font-size:13px;
170
+ }
171
+
172
+ .term-php .wrap > form .form-table > tbody > tr > th,
173
+ .term-php .wrap > form .form-table > tbody > tr > td.acf-label,
174
+
175
+ .profile-php .wrap > form .form-table > tbody > tr > th,
176
+ .profile-php .wrap > form .form-table > tbody > tr > td.acf-label,
177
+
178
+ .user-edit-php .wrap > form .form-table > tbody > tr > th,
179
+ .user-edit-php .wrap > form .form-table > tbody > tr > td.acf-label,
180
+
181
+ .user-new-php .wrap > form .form-table > tbody > tr > th,
182
+ .user-new-php .wrap > form .form-table > tbody > tr > td.acf-label,
183
+
184
+ .options-general-php .wrap > form .form-table > tbody > tr > th,
185
+ .options-general-php .wrap > form .form-table > tbody > tr > td.acf-label,
186
+
187
+ .options-writing-php .wrap > form .form-table > tbody > tr > th,
188
+ .options-writing-php .wrap > form .form-table > tbody > tr > td.acf-label,
189
+
190
+ .options-reading-php .wrap > form .form-table > tbody > tr > th,
191
+ .options-reading-php .wrap > form .form-table > tbody > tr > td.acf-label,
192
+
193
+ .options-discussion-php .wrap > form .form-table > tbody > tr > th,
194
+ .options-discussion-php .wrap > form .form-table > tbody > tr > td.acf-label,
195
+
196
+ .options-media-php .wrap > form .form-table > tbody > tr > th,
197
+ .options-media-php .wrap > form .form-table > tbody > tr > td.acf-label,
198
+
199
+ .options-permalink-php .wrap > form .form-table > tbody > tr > th,
200
+ .options-permalink-php .wrap > form .form-table > tbody > tr > td.acf-label
201
+ {
202
+ border-top: 1px solid #E1E1E1;
203
+ border-right: 1px solid #E1E1E1;
204
+ background: #F9F9F9;
205
+ padding:15px 12px;
206
+ width:20%;
207
+ font-size:13px;
208
+ position:initial;
209
+ color:#444;
210
+ }
211
+
212
+ .term-php .wrap > form .form-table > tbody > tr > td.td-full,
213
+ .profile-php .wrap > form .form-table > tbody > tr > td.td-full,
214
+ .user-edit-php .wrap > form .form-table > tbody > tr > td.td-full,
215
+ .user-new-php .wrap > form .form-table > tbody > tr > td.td-full,
216
+ .options-general-php .wrap > form .form-table > tbody > tr > td.td-full,
217
+ .options-writing-php .wrap > form .form-table > tbody > tr > td.td-full,
218
+ .options-reading-php .wrap > form .form-table > tbody > tr > td.td-full,
219
+ .options-discussion-php .wrap > form .form-table > tbody > tr > td.td-full,
220
+ .options-media-php .wrap > form .form-table > tbody > tr > td.td-full,
221
+ .options-permalink-php .wrap > form .form-table > tbody > tr > td.td-full
222
+ {
223
+ padding:15px 12px;
224
+ }
225
+
226
+ .term-php .wrap > form .form-table > tbody > tr.acf-field,
227
+ .profile-php .wrap > form .form-table > tbody > tr.acf-field,
228
+ .user-edit-php .wrap > form .form-table > tbody > tr.acf-field,
229
+ .user-new-php .wrap > form .form-table > tbody > tr.acf-field,
230
+ .options-general-php .wrap > form .form-table > tbody > tr.acf-field,
231
+ .options-writing-php .wrap > form .form-table > tbody > tr.acf-field,
232
+ .options-reading-php .wrap > form .form-table > tbody > tr.acf-field,
233
+ .options-discussion-php .wrap > form .form-table > tbody > tr.acf-field,
234
+ .options-media-php .wrap > form .form-table > tbody > tr.acf-field,
235
+ .options-permalink-php .wrap > form .form-table > tbody > tr.acf-field
236
+ {
237
+ position: initial;
238
+ }
239
+
240
+ .term-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
241
+ .profile-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
242
+ .user-edit-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
243
+ .user-new-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
244
+ .options-general-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
245
+ .options-writing-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
246
+ .options-reading-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
247
+ .options-discussion-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
248
+ .options-media-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td,
249
+ .options-permalink-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td
250
+ {
251
+ background: #F9F9F9;
252
+ padding:15px 0 0 0;
253
+ }
254
+
255
+ .term-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
256
+ .profile-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
257
+ .user-edit-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
258
+ .user-new-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
259
+ .options-general-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
260
+ .options-writing-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
261
+ .options-reading-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
262
+ .options-discussion-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
263
+ .options-media-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group,
264
+ .options-permalink-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group
265
+ {
266
+ border-bottom:0;
267
+ padding:0 0 0 20%;
268
+ }
269
+
270
+ .term-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
271
+ .profile-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
272
+ .user-edit-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
273
+ .user-new-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
274
+ .options-general-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
275
+ .options-writing-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
276
+ .options-reading-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
277
+ .options-discussion-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
278
+ .options-media-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a,
279
+ .options-permalink-php .wrap > form .form-table > tbody > tr.acf-tab-wrap > td ul.acf-tab-group > li.active a
280
+ {
281
+ background: #fff;
282
+ }
283
+
284
+ .term-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
285
+ .profile-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
286
+ .user-edit-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
287
+ .user-new-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
288
+ .options-general-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
289
+ .options-writing-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
290
+ .options-reading-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
291
+ .options-discussion-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
292
+ .options-media-php .wrap > form #poststuff.acfe-acfe-bt-admin-column,
293
+ .options-permalink-php .wrap > form #poststuff.acfe-acfe-bt-admin-column
294
+ {
295
+ min-width:auto;
296
+ padding:0;
297
+ }
298
+
299
+ .term-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
300
+ .profile-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
301
+ .user-edit-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
302
+ .user-new-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
303
+ .options-general-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
304
+ .options-writing-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
305
+ .options-reading-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
306
+ .options-discussion-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
307
+ .options-media-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside,
308
+ .options-permalink-php .wrap > form #poststuff.acfe-acfe-bt-admin-column .inside
309
+ {
310
+ margin: 0;
311
+ padding: 0;
312
+ }
313
+
314
+ /*
315
+ * ACFE: UI Enhanced (Fix ACF)
316
+ */
317
+ .term-php .wrap .form-table > tbody>.acf-field > .acf-label label,
318
+ .profile-php .wrap .form-table > tbody>.acf-field > .acf-label label,
319
+ .user-edit-php .wrap .form-table > tbody>.acf-field > .acf-label label,
320
+ .user-new-php .wrap .form-table > tbody>.acf-field > .acf-label label,
321
+ .options-general-php .wrap .form-table > tbody>.acf-field > .acf-label label,
322
+ .options-writing-php .wrap .form-table > tbody>.acf-field > .acf-label label,
323
+ .options-reading-php .wrap .form-table > tbody>.acf-field > .acf-label label,
324
+ .options-discussion-php .wrap .form-table > tbody>.acf-field > .acf-label label,
325
+ .options-media-php .wrap .form-table > tbody>.acf-field > .acf-label label,
326
+ .options-permalink-php .wrap .form-table > tbody>.acf-field > .acf-label label
327
+ {
328
+ font-size: 13px;
329
+ color: #444;
330
+ }
331
+
332
+ .term-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
333
+ .profile-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
334
+ .user-edit-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
335
+ .user-new-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
336
+ .options-general-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
337
+ .options-writing-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
338
+ .options-reading-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
339
+ .options-discussion-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
340
+ .options-media-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label,
341
+ .options-permalink-php .wrap .acf-fields.-left > .acf-field.acfe-bt-no-label
342
+ {
343
+ padding-left: 20%;
344
+ }
345
+
346
+ .term-php .wrap > form .acf-fields.-left > .acf-field,
347
+ .profile-php .wrap > form .acf-fields.-left > .acf-field,
348
+ .user-edit-php .wrap > form .acf-fields.-left > .acf-field,
349
+ .user-new-php .wrap > form .acf-fields.-left > .acf-field,
350
+ .options-general-php .wrap > form .acf-fields.-left > .acf-field,
351
+ .options-writing-php .wrap > form .acf-fields.-left > .acf-field,
352
+ .options-reading-php .wrap > form .acf-fields.-left > .acf-field,
353
+ .options-discussion-php .wrap > form .acf-fields.-left > .acf-field,
354
+ .options-media-php .wrap > form .acf-fields.-left > .acf-field,
355
+ .options-permalink-php .wrap > form .acf-fields.-left > .acf-field
356
+ {
357
+ padding-left: 0;
358
+ }
359
+
360
+ .term-php .wrap > form .acf-fields.-left > .acf-field:before,
361
+ .profile-php .wrap > form .acf-fields.-left > .acf-field:before,
362
+ .user-edit-php .wrap > form .acf-fields.-left > .acf-field:before,
363
+ .user-new-php .wrap > form .acf-fields.-left > .acf-field:before,
364
+ .options-general-php .wrap > form .acf-fields.-left > .acf-field:before,
365
+ .options-writing-php .wrap > form .acf-fields.-left > .acf-field:before,
366
+ .options-reading-php .wrap > form .acf-fields.-left > .acf-field:before,
367
+ .options-discussion-php .wrap > form .acf-fields.-left > .acf-field:before,
368
+ .options-media-php .wrap > form .acf-fields.-left > .acf-field:before,
369
+ .options-permalink-php .wrap > form .acf-fields.-left > .acf-field:before
370
+ {
371
+ width:20%;
372
+ }
373
+
374
+ .term-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
375
+ .profile-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
376
+ .user-edit-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
377
+ .user-new-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
378
+ .options-general-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
379
+ .options-writing-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
380
+ .options-reading-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
381
+ .options-discussion-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
382
+ .options-media-php .wrap > form .acf-fields.-left > .acf-field > .acf-label,
383
+ .options-permalink-php .wrap > form .acf-fields.-left > .acf-field > .acf-label
384
+ {
385
+ width: 20%;
386
+ margin-left: 0;
387
+ padding: 0 12px;
388
+ }
389
+
390
+ .term-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
391
+ .profile-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
392
+ .user-edit-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
393
+ .user-new-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
394
+ .options-general-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
395
+ .options-writing-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
396
+ .options-reading-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
397
+ .options-discussion-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
398
+ .options-media-php .wrap > form .acf-fields.-left > .acf-field > .acf-input,
399
+ .options-permalink-php .wrap > form .acf-fields.-left > .acf-field > .acf-input
400
+ {
401
+ padding: 0 12px;
402
+ }
403
+
404
+ .term-php .wrap > form p.submit,
405
+ .profile-php .wrap > form p.submit,
406
+ .user-edit-php .wrap > form p.submit,
407
+ .user-new-php .wrap > form p.submit,
408
+ .options-general-php .wrap > form p.submit,
409
+ .options-writing-php .wrap > form p.submit,
410
+ .options-reading-php .wrap > form p.submit,
411
+ .options-discussion-php .wrap > form p.submit,
412
+ .options-media-php .wrap > form p.submit,
413
+ .options-permalink-php .wrap > form p.submit
414
+ {
415
+ display:none;
416
+ }
417
+
418
+ /*
419
+ * ACFE: UI - Term Single
420
+ */
421
+ .term-php .wrap > form{
422
+ margin-top:13px;
423
+ }
424
+
425
+ /*
426
+ * ACFE: UI - Terms List
427
+ */
428
+ .edit-tags-php #col-left{
429
+ display:none;
430
+ }
431
+
432
+ .edit-tags-php #col-container #col-right{
433
+ float:none;
434
+ width:auto;
435
+ }
436
+
437
+ .edit-tags-php #col-container #col-right .col-wrap{
438
+ padding:0;
439
+ }
440
+
441
+ .edit-tags-php #col-left.acfe-bt{
442
+ float:none;
443
+ width:100%;
444
+ }
445
+
446
+ .edit-tags-php #col-left.acfe-bt .col-wrap{
447
+ padding:0;
448
+ }
449
+
450
+ .edit-tags-php #col-left.acfe-bt #poststuff{
451
+ min-width:100%;
452
+ }
453
+
454
+ .edit-tags-php #acfe-bt-form .submit.acf-field{
455
+ display:block !important;
456
+ margin: 0;
457
  }
assets/acf-extended.js CHANGED
@@ -102,6 +102,8 @@
102
  acfe.modal.multiple();
103
 
104
  acfe.modal.onOpen($target, args);
 
 
105
 
106
  return $target;
107
 
@@ -140,6 +142,8 @@
140
  }
141
 
142
  acfe.modal.multiple();
 
 
143
 
144
  acfe.modal.onClose($target, args);
145
 
102
  acfe.modal.multiple();
103
 
104
  acfe.modal.onOpen($target, args);
105
+
106
+ acf.doAction('acfe/modal/open', $target, args);
107
 
108
  return $target;
109
 
142
  }
143
 
144
  acfe.modal.multiple();
145
+
146
+ acf.doAction('acfe/modal/close', $target, args);
147
 
148
  acfe.modal.onClose($target, args);
149
 
includes/admin/options.class.php CHANGED
@@ -1,277 +1,277 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('WP_List_Table'))
7
- require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
8
-
9
- class ACFE_Admin_Options_List extends WP_List_Table{
10
-
11
- /**
12
- * Constructor
13
- *
14
- */
15
- public function __construct(){
16
-
17
- parent::__construct(array(
18
- 'singular' => __('Option', 'acfe'),
19
- 'plural' => __('Options', 'acfe'),
20
- 'ajax' => false
21
- ));
22
-
23
- }
24
-
25
-
26
- /**
27
- * Retrieve data from the database
28
- *
29
- * @param int $per_page
30
- * @param int $page_number
31
- *
32
- * @return mixed
33
- */
34
- public static function get_options($per_page = 100, $page_number = 1, $search = ''){
35
-
36
- global $wpdb;
37
-
38
- $sql = "SELECT * FROM {$wpdb->options}";
39
-
40
- if(!empty($search)){
41
-
42
- $sql .= ' WHERE option_name LIKE \'%' . $search . '%\'';
43
-
44
- }
45
-
46
- if(empty($_REQUEST['orderby'])){
47
-
48
- $sql .= ' ORDER BY option_id ASC';
49
-
50
- }
51
-
52
- else{
53
-
54
- $sql .= ' ORDER BY ' . esc_sql($_REQUEST['orderby']);
55
- $sql .= !empty($_REQUEST['order']) ? ' ' . esc_sql($_REQUEST['order']) : ' ASC';
56
-
57
- }
58
-
59
- if(empty($search)){
60
-
61
- $sql .= " LIMIT $per_page";
62
- $sql .= ' OFFSET ' . ($page_number - 1) * $per_page;
63
-
64
- }
65
-
66
-
67
- $result = $wpdb->get_results($sql, 'ARRAY_A');
68
-
69
- return $result;
70
-
71
- }
72
-
73
-
74
- /**
75
- * Returns the count of records in the database.
76
- *
77
- * @return null|string
78
- */
79
- public static function record_count($search = ''){
80
-
81
- global $wpdb;
82
-
83
- $sql = "SELECT COUNT(*) FROM {$wpdb->options}";
84
-
85
- if(!empty($search)){
86
-
87
- $sql .= ' WHERE option_name LIKE \'%' . $search . '%\'';
88
-
89
- }
90
-
91
- return $wpdb->get_var($sql);
92
-
93
- }
94
-
95
-
96
- /** Text displayed when no data is available */
97
- public function no_items(){
98
-
99
- _e('No options avaliable.', 'acfe');
100
-
101
- }
102
-
103
-
104
- /**
105
- * Render a column when no column specific method exist.
106
- *
107
- * @param array $item
108
- * @param string $column_name
109
- *
110
- * @return mixed
111
- */
112
- public function column_default($item, $column_name){
113
-
114
- if($column_name === 'option_id'){
115
-
116
- return $item['option_id'];
117
-
118
- }
119
-
120
- elseif($column_name === 'option_value'){
121
-
122
- if(is_serialized($item['option_value']) || $item['option_value'] != strip_tags($item['option_value'])){
123
-
124
- return '<pre style="max-height:200px; overflow:auto; white-space: pre;">' . print_r(maybe_unserialize($item['option_value']), true) . '</pre>';
125
-
126
- }elseif(acfe_is_json($item['option_value'])){
127
-
128
- return '<pre style="max-height:200px; overflow:auto; white-space: pre;">' . print_r(json_decode($item['option_value']), true) . '</pre>';
129
-
130
- }
131
-
132
-
133
- return $item['option_value'];
134
-
135
- }
136
-
137
- elseif($column_name === 'autoload'){
138
-
139
- return $item['autoload'];
140
-
141
- }else{
142
-
143
- return print_r($item, true);
144
-
145
- }
146
-
147
- }
148
-
149
- /**
150
- * Render the bulk edit checkbox
151
- *
152
- * @param array $item
153
- *
154
- * @return string
155
- */
156
- public function column_cb($item){
157
-
158
- return sprintf(
159
- '<input type="checkbox" name="bulk-delete[]" value="%s" />', $item['option_id']
160
- );
161
-
162
- }
163
-
164
-
165
- /**
166
- * Method for name column
167
- *
168
- * @param array $item an array of DB data
169
- *
170
- * @return string
171
- */
172
- public function column_option_name($item){
173
-
174
- $delete_nonce = wp_create_nonce('acfe_options_delete_option');
175
-
176
- $title = '<strong>' . $item['option_name'] . '</strong>';
177
-
178
- $actions = array(
179
- 'edit' => sprintf('<a href="?page=%s&action=edit&option=%s">' . __('Edit') . '</a>', esc_attr($_REQUEST['page']), absint($item['option_id'])),
180
- 'delete' => sprintf('<a href="?page=%s&action=delete&option=%s&_wpnonce=%s">' . __('Delete') . '</a>', esc_attr($_REQUEST['page']), absint($item['option_id']), $delete_nonce),
181
- );
182
-
183
- return $title . $this->row_actions($actions);
184
-
185
- }
186
-
187
-
188
- /**
189
- * Associative array of columns
190
- *
191
- * @return array
192
- */
193
- public function get_columns(){
194
-
195
- $columns = array(
196
- 'cb' => '<input type="checkbox" />',
197
- 'option_id' => __('ID', 'acfe'),
198
- 'option_name' => __('Name', 'acfe'),
199
- 'option_value' => __('Value', 'acfe'),
200
- 'autoload' => __('Autoload', 'acfe'),
201
- );
202
-
203
- return $columns;
204
-
205
- }
206
-
207
-
208
- /**
209
- * Columns to make sortable.
210
- *
211
- * @return array
212
- */
213
- public function get_sortable_columns(){
214
-
215
- $sortable_columns = array(
216
- 'option_id' => array('option_id', true),
217
- 'option_name' => array('option_name', true),
218
- 'option_value' => array('option_value', true),
219
- 'autoload' => array('autoload', true),
220
- );
221
-
222
- return $sortable_columns;
223
-
224
- }
225
-
226
- /**
227
- * Returns an associative array containing the bulk action
228
- *
229
- * @return array
230
- */
231
- public function get_bulk_actions(){
232
-
233
- $actions = array(
234
- 'bulk-delete' => __('Delete')
235
- );
236
-
237
- return $actions;
238
-
239
- }
240
-
241
-
242
- /**
243
- * Handles data query and filter, sorting, and pagination.
244
- */
245
- public function prepare_items(){
246
-
247
- // Get columns
248
- $this->_column_headers = array($this->get_columns(), array(), $this->get_sortable_columns());
249
-
250
- // Vars
251
- $per_page = $this->get_items_per_page('options_per_page', 100);
252
- $current_page = $this->get_pagenum();
253
-
254
- // Search
255
- $search = (isset( $_REQUEST['s'])) ? $_REQUEST['s'] : false;
256
-
257
- // Get items
258
- $this->items = self::get_options($per_page, $current_page, $search);
259
- /*
260
- foreach($this->items as &$item){
261
- $item = json_encode($item);
262
- }*/
263
-
264
- // Get total
265
- $total_items = self::record_count($search);
266
-
267
- if(!empty($search))
268
- $per_page = $total_items;
269
-
270
- $this->set_pagination_args(array(
271
- 'total_items' => $total_items,
272
- 'per_page' => $per_page
273
- ));
274
-
275
- }
276
-
277
  }
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('WP_List_Table'))
7
+ require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
8
+
9
+ class ACFE_Admin_Options_List extends WP_List_Table{
10
+
11
+ /**
12
+ * Constructor
13
+ *
14
+ */
15
+ public function __construct(){
16
+
17
+ parent::__construct(array(
18
+ 'singular' => __('Option', 'acfe'),
19
+ 'plural' => __('Options', 'acfe'),
20
+ 'ajax' => false
21
+ ));
22
+
23
+ }
24
+
25
+
26
+ /**
27
+ * Retrieve data from the database
28
+ *
29
+ * @param int $per_page
30
+ * @param int $page_number
31
+ *
32
+ * @return mixed
33
+ */
34
+ public static function get_options($per_page = 100, $page_number = 1, $search = ''){
35
+
36
+ global $wpdb;
37
+
38
+ $sql = "SELECT * FROM {$wpdb->options}";
39
+
40
+ if(!empty($search)){
41
+
42
+ $sql .= ' WHERE option_name LIKE \'%' . $search . '%\'';
43
+
44
+ }
45
+
46
+ if(empty($_REQUEST['orderby'])){
47
+
48
+ $sql .= ' ORDER BY option_id ASC';
49
+
50
+ }
51
+
52
+ else{
53
+
54
+ $sql .= ' ORDER BY ' . esc_sql($_REQUEST['orderby']);
55
+ $sql .= !empty($_REQUEST['order']) ? ' ' . esc_sql($_REQUEST['order']) : ' ASC';
56
+
57
+ }
58
+
59
+ if(empty($search)){
60
+
61
+ $sql .= " LIMIT $per_page";
62
+ $sql .= ' OFFSET ' . ($page_number - 1) * $per_page;
63
+
64
+ }
65
+
66
+
67
+ $result = $wpdb->get_results($sql, 'ARRAY_A');
68
+
69
+ return $result;
70
+
71
+ }
72
+
73
+
74
+ /**
75
+ * Returns the count of records in the database.
76
+ *
77
+ * @return null|string
78
+ */
79
+ public static function record_count($search = ''){
80
+
81
+ global $wpdb;
82
+
83
+ $sql = "SELECT COUNT(*) FROM {$wpdb->options}";
84
+
85
+ if(!empty($search)){
86
+
87
+ $sql .= ' WHERE option_name LIKE \'%' . $search . '%\'';
88
+
89
+ }
90
+
91
+ return $wpdb->get_var($sql);
92
+
93
+ }
94
+
95
+
96
+ /** Text displayed when no data is available */
97
+ public function no_items(){
98
+
99
+ _e('No options avaliable.', 'acfe');
100
+
101
+ }
102
+
103
+
104
+ /**
105
+ * Render a column when no column specific method exist.
106
+ *
107
+ * @param array $item
108
+ * @param string $column_name
109
+ *
110
+ * @return mixed
111
+ */
112
+ public function column_default($item, $column_name){
113
+
114
+ if($column_name === 'option_id'){
115
+
116
+ return $item['option_id'];
117
+
118
+ }
119
+
120
+ elseif($column_name === 'option_value'){
121
+
122
+ if(is_serialized($item['option_value']) || $item['option_value'] != strip_tags($item['option_value'])){
123
+
124
+ return '<pre style="max-height:200px; overflow:auto; white-space: pre;">' . print_r(maybe_unserialize($item['option_value']), true) . '</pre>';
125
+
126
+ }elseif(acfe_is_json($item['option_value'])){
127
+
128
+ return '<pre style="max-height:200px; overflow:auto; white-space: pre;">' . print_r(json_decode($item['option_value']), true) . '</pre>';
129
+
130
+ }
131
+
132
+
133
+ return $item['option_value'];
134
+
135
+ }
136
+
137
+ elseif($column_name === 'autoload'){
138
+
139
+ return $item['autoload'];
140
+
141
+ }else{
142
+
143
+ return print_r($item, true);
144
+
145
+ }
146
+
147
+ }
148
+
149
+ /**
150
+ * Render the bulk edit checkbox
151
+ *
152
+ * @param array $item
153
+ *
154
+ * @return string
155
+ */
156
+ public function column_cb($item){
157
+
158
+ return sprintf(
159
+ '<input type="checkbox" name="bulk-delete[]" value="%s" />', $item['option_id']
160
+ );
161
+
162
+ }
163
+
164
+
165
+ /**
166
+ * Method for name column
167
+ *
168
+ * @param array $item an array of DB data
169
+ *
170
+ * @return string
171
+ */
172
+ public function column_option_name($item){
173
+
174
+ $delete_nonce = wp_create_nonce('acfe_options_delete_option');
175
+
176
+ $title = '<strong>' . $item['option_name'] . '</strong>';
177
+
178
+ $actions = array(
179
+ 'edit' => sprintf('<a href="?page=%s&action=edit&option=%s">' . __('Edit') . '</a>', esc_attr($_REQUEST['page']), absint($item['option_id'])),
180
+ 'delete' => sprintf('<a href="?page=%s&action=delete&option=%s&_wpnonce=%s">' . __('Delete') . '</a>', esc_attr($_REQUEST['page']), absint($item['option_id']), $delete_nonce),
181
+ );
182
+
183
+ return $title . $this->row_actions($actions);
184
+
185
+ }
186
+
187
+
188
+ /**
189
+ * Associative array of columns
190
+ *
191
+ * @return array
192
+ */
193
+ public function get_columns(){
194
+
195
+ $columns = array(
196
+ 'cb' => '<input type="checkbox" />',
197
+ 'option_id' => __('ID', 'acfe'),
198
+ 'option_name' => __('Name', 'acfe'),
199
+ 'option_value' => __('Value', 'acfe'),
200
+ 'autoload' => __('Autoload', 'acfe'),
201
+ );
202
+
203
+ return $columns;
204
+
205
+ }
206
+
207
+
208
+ /**
209
+ * Columns to make sortable.
210
+ *
211
+ * @return array
212
+ */
213
+ public function get_sortable_columns(){
214
+
215
+ $sortable_columns = array(
216
+ 'option_id' => array('option_id', true),
217
+ 'option_name' => array('option_name', true),
218
+ 'option_value' => array('option_value', true),
219
+ 'autoload' => array('autoload', true),
220
+ );
221
+
222
+ return $sortable_columns;
223
+
224
+ }
225
+
226
+ /**
227
+ * Returns an associative array containing the bulk action
228
+ *
229
+ * @return array
230
+ */
231
+ public function get_bulk_actions(){
232
+
233
+ $actions = array(
234
+ 'bulk-delete' => __('Delete')
235
+ );
236
+
237
+ return $actions;
238
+
239
+ }
240
+
241
+
242
+ /**
243
+ * Handles data query and filter, sorting, and pagination.
244
+ */
245
+ public function prepare_items(){
246
+
247
+ // Get columns
248
+ $this->_column_headers = array($this->get_columns(), array(), $this->get_sortable_columns());
249
+
250
+ // Vars
251
+ $per_page = $this->get_items_per_page('options_per_page', 100);
252
+ $current_page = $this->get_pagenum();
253
+
254
+ // Search
255
+ $search = (isset( $_REQUEST['s'])) ? $_REQUEST['s'] : false;
256
+
257
+ // Get items
258
+ $this->items = self::get_options($per_page, $current_page, $search);
259
+ /*
260
+ foreach($this->items as &$item){
261
+ $item = json_encode($item);
262
+ }*/
263
+
264
+ // Get total
265
+ $total_items = self::record_count($search);
266
+
267
+ if(!empty($search))
268
+ $per_page = $total_items;
269
+
270
+ $this->set_pagination_args(array(
271
+ 'total_items' => $total_items,
272
+ 'per_page' => $per_page
273
+ ));
274
+
275
+ }
276
+
277
  }
includes/admin/options.php CHANGED
@@ -1,579 +1,579 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- // Check setting
7
- if(!acf_get_setting('acfe/modules/options'))
8
- return;
9
-
10
- /**
11
- * Options WP List Table
12
- *
13
- */
14
- require_once(ACFE_PATH . 'includes/admin/options.class.php');
15
-
16
- /**
17
- * Options Menu
18
- *
19
- */
20
- add_action('admin_menu', 'acfe_options_menu');
21
- function acfe_options_menu(){
22
-
23
- $hook = add_submenu_page(
24
- 'options-general.php',
25
- __('Options'),
26
- __('Options'),
27
- acf_get_setting('capability'),
28
- 'acfe-options'
29
- );
30
-
31
- }
32
-
33
- /**
34
- * Options Screen
35
- *
36
- */
37
- add_filter('set-screen-option', 'acfe_options_screen', 10, 3);
38
- function acfe_options_screen($status, $option, $value){
39
-
40
- return $value;
41
-
42
- }
43
-
44
- /**
45
- * Options Enqueue
46
- *
47
- */
48
- add_action('admin_print_scripts-settings_page_acfe-options', 'acfe_options_enqueue');
49
- function acfe_options_enqueue(){
50
-
51
- wp_enqueue_style('acf-input');
52
- wp_enqueue_script('acf-input');
53
- wp_enqueue_style('acf-extended', plugins_url('assets/acf-extended.css', ACFE_FILE), false, null);
54
-
55
- }
56
-
57
- /**
58
- * Options Load
59
- *
60
- */
61
- add_action('load-settings_page_acfe-options', 'acfe_options_load');
62
- function acfe_options_load(){
63
-
64
- // Messages
65
- if(isset($_REQUEST['message']) && !empty($_REQUEST['message']))
66
- do_action('acfe/options/load/message=' . $_REQUEST['message']);
67
-
68
- // Default Action
69
- $action = 'list';
70
-
71
- // Request Action
72
- if(isset($_REQUEST['action']) && !empty($_REQUEST['action']) && $_REQUEST['action'] != '-1')
73
- $action = $_REQUEST['action'];
74
-
75
- // Request Action2
76
- elseif(isset($_REQUEST['action2']) && !empty($_REQUEST['action2']) && $_REQUEST['action2'] != '-1')
77
- $action = $_REQUEST['action2'];
78
-
79
- // Do Action: Specific
80
- do_action('acfe/options/load/action=' . $action, $action);
81
-
82
- // Do Action
83
- do_action('acfe/options/load', $action);
84
-
85
- }
86
-
87
- /**
88
- * Options HTML
89
- *
90
- */
91
- add_action('settings_page_acfe-options', 'acfe_options_html');
92
- function acfe_options_html(){
93
-
94
- // Default Action
95
- $action = 'list';
96
-
97
- // Request Action
98
- if(isset($_REQUEST['action']) && !empty($_REQUEST['action']) && $_REQUEST['action'] != '-1')
99
- $action = $_REQUEST['action'];
100
-
101
- // Do Action: Specific
102
- do_action('acfe/options/html/action=' . $action, $action);
103
-
104
- // Do Action
105
- do_action('acfe/options/html', $action);
106
-
107
- }
108
-
109
- /**
110
- * Options List: Load
111
- *
112
- */
113
- add_action('acfe/options/load/action=list', 'acfe_options_load_list');
114
- function acfe_options_load_list(){
115
-
116
- add_screen_option('per_page', array(
117
- 'label' => 'Options',
118
- 'default' => 100,
119
- 'option' => 'options_per_page'
120
- ));
121
-
122
- }
123
-
124
- /**
125
- * Options List: HTML
126
- *
127
- */
128
- add_filter('acfe/options/html/action=list', 'acfe_options_html_list');
129
- function acfe_options_html_list(){
130
-
131
- acf_get_view(ACFE_PATH . '/includes/admin/views/html-options-list.php');
132
-
133
- }
134
-
135
- /**
136
- * Options Delete: Load
137
- *
138
- */
139
- add_action('acfe/options/load/action=delete', 'acfe_options_load_delete');
140
- function acfe_options_load_delete(){
141
-
142
- $nonce = esc_attr($_REQUEST['_wpnonce']);
143
-
144
- if(!wp_verify_nonce($nonce, 'acfe_options_delete_option'))
145
- wp_die('Cheatin’, huh?');
146
-
147
- acfe_options_delete_option(absint($_GET['option']));
148
-
149
- wp_redirect(sprintf('?page=%s&message=deleted', esc_attr($_REQUEST['page'])));
150
- exit;
151
-
152
- }
153
-
154
- /**
155
- * Options Delete: Message
156
- *
157
- */
158
- add_action('acfe/options/load/message=deleted', 'acfe_options_load_delete_message');
159
- function acfe_options_load_delete_message(){
160
-
161
- acf_add_admin_notice(__('Option has been deleted'), 'success');
162
-
163
- }
164
-
165
- /**
166
- * Options Bulk Delete: Load
167
- *
168
- */
169
- add_action('acfe/options/load/action=bulk-delete', 'acfe_options_load_bulk_delete');
170
- function acfe_options_load_bulk_delete(){
171
-
172
- $nonce = esc_attr($_REQUEST['_wpnonce']);
173
-
174
- if(!wp_verify_nonce($nonce, 'bulk-options'))
175
- wp_die('Cheatin’, huh?');
176
-
177
- $delete_ids = esc_sql($_REQUEST['bulk-delete']);
178
-
179
- foreach($delete_ids as $id){
180
-
181
- acfe_options_delete_option($id);
182
-
183
- }
184
-
185
- wp_redirect(sprintf('?page=%s&message=bulk-deleted', esc_attr($_REQUEST['page'])));
186
- exit;
187
-
188
- }
189
-
190
- /**
191
- * Options Bulk Delete: Message
192
- *
193
- */
194
- add_action('acfe/options/load/message=bulk-deleted', 'acfe_options_load_bulk_delete_message');
195
- function acfe_options_load_bulk_delete_message(){
196
-
197
- acf_add_admin_notice(__('Options have been deleted'), 'success');
198
-
199
- }
200
-
201
- /**
202
- * Options Delete: Function
203
- *
204
- */
205
- function acfe_options_delete_option($id){
206
-
207
- global $wpdb;
208
-
209
- $wpdb->delete(
210
- "{$wpdb->options}",
211
- array('option_id' => $id),
212
- array('%d')
213
- );
214
-
215
- }
216
-
217
- /**
218
- * Options Edit: Load
219
- *
220
- */
221
- add_action('acfe/options/load/action=edit', 'acfe_options_load_edit');
222
- add_action('acfe/options/load/action=add', 'acfe_options_load_edit');
223
- function acfe_options_load_edit($action){
224
-
225
- // Nonce
226
- if(acf_verify_nonce('acfe-options-edit')){
227
-
228
- // Save data
229
- if(acf_validate_save_post(true)){
230
-
231
- acf_save_post('acfe_options_edit');
232
-
233
- $redirect = add_query_arg(array('message' => 'updated'));
234
-
235
- if($action === 'add')
236
- $redirect = sprintf('?page=%s&message=added', esc_attr($_REQUEST['page']));
237
-
238
- wp_redirect($redirect);
239
- exit;
240
-
241
- }
242
-
243
- }
244
-
245
- // Load acf scripts
246
- acf_enqueue_scripts();
247
-
248
- // Actions
249
- add_action('acf/input/admin_head', 'acfe_options_edit_metabox');
250
-
251
- // Add columns support
252
- add_screen_option('layout_columns', array(
253
- 'max' => 2,
254
- 'default' => 2
255
- ));
256
-
257
- }
258
-
259
- /**
260
- * Options Edit: HTML
261
- *
262
- */
263
- add_filter('acfe/options/html/action=edit', 'acfe_options_html_edit');
264
- add_filter('acfe/options/html/action=add', 'acfe_options_html_edit');
265
- function acfe_options_html_edit(){
266
-
267
- acf_get_view(ACFE_PATH . '/includes/admin/views/html-options-edit.php');
268
-
269
- }
270
-
271
- /**
272
- * Options Edit: Metabox
273
- *
274
- */
275
- function acfe_options_edit_metabox(){
276
-
277
- $option = array(
278
- 'option_id' => 0,
279
- 'option_name' => '',
280
- 'option_value' => '',
281
- 'autoload' => 'no',
282
- );
283
-
284
- if(isset($_REQUEST['option']) && !empty($_REQUEST['option'])){
285
-
286
- $option_id = absint($_REQUEST['option']);
287
-
288
- global $wpdb;
289
-
290
- $get_option = $wpdb->get_row("SELECT * FROM {$wpdb->options} WHERE option_id = '$option_id'", 'ARRAY_A');
291
- if(!empty($get_option))
292
- $option = $get_option;
293
-
294
- }
295
-
296
- $field_group = array(
297
- 'ID' => 0,
298
- 'key' => 'group_acfe_options_edit',
299
- 'style' => 'default',
300
- 'label_placement' => 'left',
301
- 'instruction_placement' => 'label',
302
- 'fields' => array()
303
- );
304
-
305
- $fields = array();
306
-
307
- $fields[] = array(
308
- 'label' => __('Name'),
309
- 'key' => 'field_acfe_options_edit_name',
310
- 'name' => 'field_acfe_options_edit_name',
311
- 'type' => 'text',
312
- 'prefix' => 'acf',
313
- 'instructions' => '',
314
- 'required' => true,
315
- 'conditional_logic' => false,
316
- 'default_value' => '',
317
- 'placeholder' => '',
318
- 'prepend' => '',
319
- 'append' => '',
320
- 'maxlength' => '',
321
- 'value' => $option['option_name'],
322
- 'wrapper' => array(
323
- 'width' => '',
324
- 'class' => '',
325
- 'id' => '',
326
- ),
327
- );
328
-
329
- // Serialized || HTML
330
- if(is_serialized($option['option_value']) || $option['option_value'] != strip_tags($option['option_value'])){
331
-
332
- $type = 'serilized';
333
- $instructions = 'Use this <a href="https://duzun.me/playground/serialize" target="_blank">online tool</a> to unserialize/seriliaze data.';
334
-
335
- if($option['option_value'] != strip_tags($option['option_value'])){
336
-
337
- $type = 'HTML';
338
- $instructions = '';
339
-
340
- }
341
-
342
- $fields[] = array(
343
- 'label' => __('Value <code style="font-size:11px;float:right; line-height:1.2; margin-top:1px;">' . $type . '</code>'),
344
- 'key' => 'field_acfe_options_edit_value',
345
- 'name' => 'field_acfe_options_edit_value',
346
- 'type' => 'textarea',
347
- 'prefix' => 'acf',
348
- 'instructions' => $instructions,
349
- 'required' => false,
350
- 'conditional_logic' => false,
351
- 'default_value' => '',
352
- 'placeholder' => '',
353
- 'prepend' => '',
354
- 'append' => '',
355
- 'maxlength' => '',
356
- 'value' => $option['option_value'],
357
- 'class' => 'code',
358
- 'wrapper' => array(
359
- 'width' => '',
360
- 'class' => '',
361
- 'id' => '',
362
- ),
363
- );
364
-
365
- }
366
-
367
- // Serialized || HTML
368
- elseif(acfe_is_json($option['option_value'])){
369
-
370
- $type = 'json';
371
- $instructions = 'Use this <a href="http://solutions.weblite.ca/php2json/" target="_blank">online tool</a> to decode/encode json.';
372
-
373
- $fields[] = array(
374
- 'label' => __('Value <code style="font-size:11px;float:right; line-height:1.2; margin-top:1px;">' . $type . '</code>'),
375
- 'key' => 'field_acfe_options_edit_value',
376
- 'name' => 'field_acfe_options_edit_value',
377
- 'type' => 'textarea',
378
- 'prefix' => 'acf',
379
- 'instructions' => $instructions,
380
- 'required' => false,
381
- 'conditional_logic' => false,
382
- 'default_value' => '',
383
- 'placeholder' => '',
384
- 'prepend' => '',
385
- 'append' => '',
386
- 'maxlength' => '',
387
- 'value' => $option['option_value'],
388
- 'class' => 'code',
389
- 'wrapper' => array(
390
- 'width' => '',
391
- 'class' => '',
392
- 'id' => '',
393
- ),
394
- );
395
-
396
- }
397
-
398
- // String
399
- else{
400
-
401
- $type = '';
402
- if(!empty($option['option_value']))
403
- $type = '<code style="font-size:11px;float:right; line-height:1.2; margin-top:1px;">string</code>';
404
-
405
- $fields[] = array(
406
- 'label' => __('Value ' . $type),
407
- 'key' => 'field_acfe_options_edit_value',
408
- 'name' => 'field_acfe_options_edit_value',
409
- 'type' => 'textarea',
410
- 'prefix' => 'acf',
411
- 'instructions' => '',
412
- 'required' => false,
413
- 'conditional_logic' => false,
414
- 'default_value' => '',
415
- 'placeholder' => '',
416
- 'prepend' => '',
417
- 'append' => '',
418
- 'maxlength' => '',
419
- 'value' => $option['option_value'],
420
- 'wrapper' => array(
421
- 'width' => '',
422
- 'class' => '',
423
- 'id' => '',
424
- ),
425
- );
426
-
427
- }
428
-
429
- $fields[] = array(
430
- 'label' => __('Autoload'),
431
- 'key' => 'field_acfe_options_edit_autoload',
432
- 'name' => 'field_acfe_options_edit_autoload',
433
- 'type' => 'select',
434
- 'prefix' => 'acf',
435
- 'instructions' => '',
436
- 'required' => true,
437
- 'conditional_logic' => false,
438
- 'default_value' => '',
439
- 'placeholder' => '',
440
- 'prepend' => '',
441
- 'append' => '',
442
- 'maxlength' => '',
443
- 'value' => $option['autoload'],
444
- 'choices' => array(
445
- 'no' => __('No'),
446
- 'yes' => __('Yes'),
447
- ),
448
- 'wrapper' => array(
449
- 'width' => '',
450
- 'class' => '',
451
- 'id' => '',
452
- ),
453
- );
454
-
455
- $field_group['fields'] = $fields;
456
-
457
- $metabox_submit_title = __('Submit','acf');
458
- $metabox_main_title = __('Add Option');
459
-
460
- if(!empty($option['option_id'])){
461
-
462
- $metabox_submit_title = __('Edit','acf');
463
- $metabox_main_title = __('Edit Option');
464
-
465
- }
466
-
467
- // Submit Metabox
468
- add_meta_box('submitdiv', $metabox_submit_title, function($post, $args) use($option){
469
-
470
- $delete_nonce = wp_create_nonce('acfe_options_delete_option');
471
-
472
- ?>
473
- <div id="major-publishing-actions">
474
-
475
- <?php if(!empty($option['option_id'])){ ?>
476
-
477
- <div id="delete-action">
478
- <a class="submitdelete deletion" style="color:#a00;" href="<?php echo sprintf('?page=%s&action=%s&option=%s&_wpnonce=%s', esc_attr($_REQUEST['page']), 'delete', $option['option_id'], $delete_nonce); ?>"><?php _e('Delete'); ?></a>
479
- </div>
480
-
481
- <?php } ?>
482
-
483
- <div id="publishing-action">
484
- <span class="spinner"></span>
485
- <input type="submit" accesskey="p" value="<?php _e('Update'); ?>" class="button button-primary button-large" id="publish" name="publish">
486
- </div>
487
-
488
- <div class="clear"></div>
489
-
490
- </div>
491
- <?php
492
- }, 'acf_options_page', 'side', 'high');
493
-
494
- // Main Metabox
495
- add_meta_box('acf-group_acfe_options_edit', $metabox_main_title, function($post, $args){
496
-
497
- // extract args
498
- extract($args); // all variables from the add_meta_box function
499
- extract($args); // all variables from the args argument
500
-
501
- // vars
502
- $o = array(
503
- 'id' => $id,
504
- 'key' => $field_group['key'],
505
- 'style' => $field_group['style'],
506
- 'label' => $field_group['label_placement'],
507
- 'editLink' => '',
508
- 'editTitle' => __('Edit field group', 'acf'),
509
- 'visibility' => true
510
- );
511
-
512
- // load fields
513
- $fields = $field_group['fields'];
514
-
515
- // render
516
- acf_render_fields($fields, 'acfe-options-edit', 'div', $field_group['instruction_placement']);
517
-
518
- ?>
519
- <script type="text/javascript">
520
- if(typeof acf !== 'undefined'){
521
-
522
- acf.newPostbox(<?php echo json_encode($o); ?>);
523
-
524
- }
525
- </script>
526
- <?php
527
-
528
- }, 'acf_options_page', 'normal', 'high', array('field_group' => $field_group));
529
-
530
- }
531
-
532
- /**
533
- * Options Edit: Save
534
- *
535
- */
536
- add_action('acf/save_post', 'acfe_options_edit_save_post', 5);
537
- function acfe_options_edit_save_post($post_id){
538
-
539
- // Validate
540
- if($post_id !== 'acfe_options_edit')
541
- return;
542
-
543
- // Vars
544
- $option_name = wp_unslash($_POST['acf']['field_acfe_options_edit_name']);
545
- $option_value = wp_unslash($_POST['acf']['field_acfe_options_edit_value']);
546
- $autoload = $_POST['acf']['field_acfe_options_edit_autoload'];
547
-
548
- // Value serialized?
549
- $option_value = maybe_unserialize($option_value);
550
-
551
- // Update
552
- update_option($option_name, $option_value, $autoload);
553
-
554
- // Flush ACF
555
- $_POST['acf'] = array();
556
-
557
- }
558
-
559
- /**
560
- * Options Edit: Message
561
- *
562
- */
563
- add_action('acfe/options/load/message=updated', 'acfe_options_load_edit_message');
564
- function acfe_options_load_edit_message(){
565
-
566
- acf_add_admin_notice(__('Option has been updated'), 'success');
567
-
568
- }
569
-
570
- /**
571
- * Options Add: Message
572
- *
573
- */
574
- add_action('acfe/options/load/message=added', 'acfe_options_load_add_message');
575
- function acfe_options_load_add_message(){
576
-
577
- acf_add_admin_notice(__('Option has been added'), 'success');
578
-
579
  }
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ // Check setting
7
+ if(!acf_get_setting('acfe/modules/options'))
8
+ return;
9
+
10
+ /**
11
+ * Options WP List Table
12
+ *
13
+ */
14
+ require_once(ACFE_PATH . 'includes/admin/options.class.php');
15
+
16
+ /**
17
+ * Options Menu
18
+ *
19
+ */
20
+ add_action('admin_menu', 'acfe_options_menu');
21
+ function acfe_options_menu(){
22
+
23
+ $hook = add_submenu_page(
24
+ 'options-general.php',
25
+ __('Options'),
26
+ __('Options'),
27
+ acf_get_setting('capability'),
28
+ 'acfe-options'
29
+ );
30
+
31
+ }
32
+
33
+ /**
34
+ * Options Screen
35
+ *
36
+ */
37
+ add_filter('set-screen-option', 'acfe_options_screen', 10, 3);
38
+ function acfe_options_screen($status, $option, $value){
39
+
40
+ return $value;
41
+
42
+ }
43
+
44
+ /**
45
+ * Options Enqueue
46
+ *
47
+ */
48
+ add_action('admin_print_scripts-settings_page_acfe-options', 'acfe_options_enqueue');
49
+ function acfe_options_enqueue(){
50
+
51
+ wp_enqueue_style('acf-input');
52
+ wp_enqueue_script('acf-input');
53
+ wp_enqueue_style('acf-extended', plugins_url('assets/acf-extended.css', ACFE_FILE), false, null);
54
+
55
+ }
56
+
57
+ /**
58
+ * Options Load
59
+ *
60
+ */
61
+ add_action('load-settings_page_acfe-options', 'acfe_options_load');
62
+ function acfe_options_load(){
63
+
64
+ // Messages
65
+ if(isset($_REQUEST['message']) && !empty($_REQUEST['message']))
66
+ do_action('acfe/options/load/message=' . $_REQUEST['message']);
67
+
68
+ // Default Action
69
+ $action = 'list';
70
+
71
+ // Request Action
72
+ if(isset($_REQUEST['action']) && !empty($_REQUEST['action']) && $_REQUEST['action'] != '-1')
73
+ $action = $_REQUEST['action'];
74
+
75
+ // Request Action2
76
+ elseif(isset($_REQUEST['action2']) && !empty($_REQUEST['action2']) && $_REQUEST['action2'] != '-1')
77
+ $action = $_REQUEST['action2'];
78
+
79
+ // Do Action: Specific
80
+ do_action('acfe/options/load/action=' . $action, $action);
81
+
82
+ // Do Action
83
+ do_action('acfe/options/load', $action);
84
+
85
+ }
86
+
87
+ /**
88
+ * Options HTML
89
+ *
90
+ */
91
+ add_action('settings_page_acfe-options', 'acfe_options_html');
92
+ function acfe_options_html(){
93
+
94
+ // Default Action
95
+ $action = 'list';
96
+
97
+ // Request Action
98
+ if(isset($_REQUEST['action']) && !empty($_REQUEST['action']) && $_REQUEST['action'] != '-1')
99
+ $action = $_REQUEST['action'];
100
+
101
+ // Do Action: Specific
102
+ do_action('acfe/options/html/action=' . $action, $action);
103
+
104
+ // Do Action
105
+ do_action('acfe/options/html', $action);
106
+
107
+ }
108
+
109
+ /**
110
+ * Options List: Load
111
+ *
112
+ */
113
+ add_action('acfe/options/load/action=list', 'acfe_options_load_list');
114
+ function acfe_options_load_list(){
115
+
116
+ add_screen_option('per_page', array(
117
+ 'label' => 'Options',
118
+ 'default' => 100,
119
+ 'option' => 'options_per_page'
120
+ ));
121
+
122
+ }
123
+
124
+ /**
125
+ * Options List: HTML
126
+ *
127
+ */
128
+ add_filter('acfe/options/html/action=list', 'acfe_options_html_list');
129
+ function acfe_options_html_list(){
130
+
131
+ acf_get_view(ACFE_PATH . '/includes/admin/views/html-options-list.php');
132
+
133
+ }
134
+
135
+ /**
136
+ * Options Delete: Load
137
+ *
138
+ */
139
+ add_action('acfe/options/load/action=delete', 'acfe_options_load_delete');
140
+ function acfe_options_load_delete(){
141
+
142
+ $nonce = esc_attr($_REQUEST['_wpnonce']);
143
+
144
+ if(!wp_verify_nonce($nonce, 'acfe_options_delete_option'))
145
+ wp_die('Cheatin’, huh?');
146
+
147
+ acfe_options_delete_option(absint($_GET['option']));
148
+
149
+ wp_redirect(sprintf('?page=%s&message=deleted', esc_attr($_REQUEST['page'])));
150
+ exit;
151
+
152
+ }
153
+
154
+ /**
155
+ * Options Delete: Message
156
+ *
157
+ */
158
+ add_action('acfe/options/load/message=deleted', 'acfe_options_load_delete_message');
159
+ function acfe_options_load_delete_message(){
160
+
161
+ acf_add_admin_notice(__('Option has been deleted'), 'success');
162
+
163
+ }
164
+
165
+ /**
166
+ * Options Bulk Delete: Load
167
+ *
168
+ */
169
+ add_action('acfe/options/load/action=bulk-delete', 'acfe_options_load_bulk_delete');
170
+ function acfe_options_load_bulk_delete(){
171
+
172
+ $nonce = esc_attr($_REQUEST['_wpnonce']);
173
+
174
+ if(!wp_verify_nonce($nonce, 'bulk-options'))
175
+ wp_die('Cheatin’, huh?');
176
+
177
+ $delete_ids = esc_sql($_REQUEST['bulk-delete']);
178
+
179
+ foreach($delete_ids as $id){
180
+
181
+ acfe_options_delete_option($id);
182
+
183
+ }
184
+
185
+ wp_redirect(sprintf('?page=%s&message=bulk-deleted', esc_attr($_REQUEST['page'])));
186
+ exit;
187
+
188
+ }
189
+
190
+ /**
191
+ * Options Bulk Delete: Message
192
+ *
193
+ */
194
+ add_action('acfe/options/load/message=bulk-deleted', 'acfe_options_load_bulk_delete_message');
195
+ function acfe_options_load_bulk_delete_message(){
196
+
197
+ acf_add_admin_notice(__('Options have been deleted'), 'success');
198
+
199
+ }
200
+
201
+ /**
202
+ * Options Delete: Function
203
+ *
204
+ */
205
+ function acfe_options_delete_option($id){
206
+
207
+ global $wpdb;
208
+
209
+ $wpdb->delete(
210
+ "{$wpdb->options}",
211
+ array('option_id' => $id),
212
+ array('%d')
213
+ );
214
+
215
+ }
216
+
217
+ /**
218
+ * Options Edit: Load
219
+ *
220
+ */
221
+ add_action('acfe/options/load/action=edit', 'acfe_options_load_edit');
222
+ add_action('acfe/options/load/action=add', 'acfe_options_load_edit');
223
+ function acfe_options_load_edit($action){
224
+
225
+ // Nonce
226
+ if(acf_verify_nonce('acfe-options-edit')){
227
+
228
+ // Save data
229
+ if(acf_validate_save_post(true)){
230
+
231
+ acf_save_post('acfe_options_edit');
232
+
233
+ $redirect = add_query_arg(array('message' => 'updated'));
234
+
235
+ if($action === 'add')
236
+ $redirect = sprintf('?page=%s&message=added', esc_attr($_REQUEST['page']));
237
+
238
+ wp_redirect($redirect);
239
+ exit;
240
+
241
+ }
242
+
243
+ }
244
+
245
+ // Load acf scripts
246
+ acf_enqueue_scripts();
247
+
248
+ // Actions
249
+ add_action('acf/input/admin_head', 'acfe_options_edit_metabox');
250
+
251
+ // Add columns support
252
+ add_screen_option('layout_columns', array(
253
+ 'max' => 2,
254
+ 'default' => 2
255
+ ));
256
+
257
+ }
258
+
259
+ /**
260
+ * Options Edit: HTML
261
+ *
262
+ */
263
+ add_filter('acfe/options/html/action=edit', 'acfe_options_html_edit');
264
+ add_filter('acfe/options/html/action=add', 'acfe_options_html_edit');
265
+ function acfe_options_html_edit(){
266
+
267
+ acf_get_view(ACFE_PATH . '/includes/admin/views/html-options-edit.php');
268
+
269
+ }
270
+
271
+ /**
272
+ * Options Edit: Metabox
273
+ *
274
+ */
275
+ function acfe_options_edit_metabox(){
276
+
277
+ $option = array(
278
+ 'option_id' => 0,
279
+ 'option_name' => '',
280
+ 'option_value' => '',
281
+ 'autoload' => 'no',
282
+ );
283
+
284
+ if(isset($_REQUEST['option']) && !empty($_REQUEST['option'])){
285
+
286
+ $option_id = absint($_REQUEST['option']);
287
+
288
+ global $wpdb;
289
+
290
+ $get_option = $wpdb->get_row("SELECT * FROM {$wpdb->options} WHERE option_id = '$option_id'", 'ARRAY_A');
291
+ if(!empty($get_option))
292
+ $option = $get_option;
293
+
294
+ }
295
+
296
+ $field_group = array(
297
+ 'ID' => 0,
298
+ 'key' => 'group_acfe_options_edit',
299
+ 'style' => 'default',
300
+ 'label_placement' => 'left',
301
+ 'instruction_placement' => 'label',
302
+ 'fields' => array()
303
+ );
304
+
305
+ $fields = array();
306
+
307
+ $fields[] = array(
308
+ 'label' => __('Name'),
309
+ 'key' => 'field_acfe_options_edit_name',
310
+ 'name' => 'field_acfe_options_edit_name',
311
+ 'type' => 'text',
312
+ 'prefix' => 'acf',
313
+ 'instructions' => '',
314
+ 'required' => true,
315
+ 'conditional_logic' => false,
316
+ 'default_value' => '',
317
+ 'placeholder' => '',
318
+ 'prepend' => '',
319
+ 'append' => '',
320
+ 'maxlength' => '',
321
+ 'value' => $option['option_name'],
322
+ 'wrapper' => array(
323
+ 'width' => '',
324
+ 'class' => '',
325
+ 'id' => '',
326
+ ),
327
+ );
328
+
329
+ // Serialized || HTML
330
+ if(is_serialized($option['option_value']) || $option['option_value'] != strip_tags($option['option_value'])){
331
+
332
+ $type = 'serialized';
333
+ $instructions = 'Use this <a href="https://duzun.me/playground/serialize" target="_blank">online tool</a> to unserialize/seriliaze data.';
334
+
335
+ if($option['option_value'] != strip_tags($option['option_value'])){
336
+
337
+ $type = 'HTML';
338
+ $instructions = '';
339
+
340
+ }
341
+
342
+ $fields[] = array(
343
+ 'label' => __('Value <code style="font-size:11px;float:right; line-height:1.2; margin-top:1px;">' . $type . '</code>'),
344
+ 'key' => 'field_acfe_options_edit_value',
345
+ 'name' => 'field_acfe_options_edit_value',
346
+ 'type' => 'textarea',
347
+ 'prefix' => 'acf',
348
+ 'instructions' => $instructions,
349
+ 'required' => false,
350
+ 'conditional_logic' => false,
351
+ 'default_value' => '',
352
+ 'placeholder' => '',
353
+ 'prepend' => '',
354
+ 'append' => '',
355
+ 'maxlength' => '',
356
+ 'value' => $option['option_value'],
357
+ 'class' => 'code',
358
+ 'wrapper' => array(
359
+ 'width' => '',
360
+ 'class' => '',
361
+ 'id' => '',
362
+ ),
363
+ );
364
+
365
+ }
366
+
367
+ // Serialized || HTML
368
+ elseif(acfe_is_json($option['option_value'])){
369
+
370
+ $type = 'json';
371
+ $instructions = 'Use this <a href="http://solutions.weblite.ca/php2json/" target="_blank">online tool</a> to decode/encode json.';
372
+
373
+ $fields[] = array(
374
+ 'label' => __('Value <code style="font-size:11px;float:right; line-height:1.2; margin-top:1px;">' . $type . '</code>'),
375
+ 'key' => 'field_acfe_options_edit_value',
376
+ 'name' => 'field_acfe_options_edit_value',
377
+ 'type' => 'textarea',
378
+ 'prefix' => 'acf',
379
+ 'instructions' => $instructions,
380
+ 'required' => false,
381
+ 'conditional_logic' => false,
382
+ 'default_value' => '',
383
+ 'placeholder' => '',
384
+ 'prepend' => '',
385
+ 'append' => '',
386
+ 'maxlength' => '',
387
+ 'value' => $option['option_value'],
388
+ 'class' => 'code',
389
+ 'wrapper' => array(
390
+ 'width' => '',
391
+ 'class' => '',
392
+ 'id' => '',
393
+ ),
394
+ );
395
+
396
+ }
397
+
398
+ // String
399
+ else{
400
+
401
+ $type = '';
402
+ if(!empty($option['option_value']))
403
+ $type = '<code style="font-size:11px;float:right; line-height:1.2; margin-top:1px;">string</code>';
404
+
405
+ $fields[] = array(
406
+ 'label' => __('Value ' . $type),
407
+ 'key' => 'field_acfe_options_edit_value',
408
+ 'name' => 'field_acfe_options_edit_value',
409
+ 'type' => 'textarea',
410
+ 'prefix' => 'acf',
411
+ 'instructions' => '',
412
+ 'required' => false,
413
+ 'conditional_logic' => false,
414
+ 'default_value' => '',
415
+ 'placeholder' => '',
416
+ 'prepend' => '',
417
+ 'append' => '',
418
+ 'maxlength' => '',
419
+ 'value' => $option['option_value'],
420
+ 'wrapper' => array(
421
+ 'width' => '',
422
+ 'class' => '',
423
+ 'id' => '',
424
+ ),
425
+ );
426
+
427
+ }
428
+
429
+ $fields[] = array(
430
+ 'label' => __('Autoload'),
431
+ 'key' => 'field_acfe_options_edit_autoload',
432
+ 'name' => 'field_acfe_options_edit_autoload',
433
+ 'type' => 'select',
434
+ 'prefix' => 'acf',
435
+ 'instructions' => '',
436
+ 'required' => true,
437
+ 'conditional_logic' => false,
438
+ 'default_value' => '',
439
+ 'placeholder' => '',
440
+ 'prepend' => '',
441
+ 'append' => '',
442
+ 'maxlength' => '',
443
+ 'value' => $option['autoload'],
444
+ 'choices' => array(
445
+ 'no' => __('No'),
446
+ 'yes' => __('Yes'),
447
+ ),
448
+ 'wrapper' => array(
449
+ 'width' => '',
450
+ 'class' => '',
451
+ 'id' => '',
452
+ ),
453
+ );
454
+
455
+ $field_group['fields'] = $fields;
456
+
457
+ $metabox_submit_title = __('Submit','acf');
458
+ $metabox_main_title = __('Add Option');
459
+
460
+ if(!empty($option['option_id'])){
461
+
462
+ $metabox_submit_title = __('Edit','acf');
463
+ $metabox_main_title = __('Edit Option');
464
+
465
+ }
466
+
467
+ // Submit Metabox
468
+ add_meta_box('submitdiv', $metabox_submit_title, function($post, $args) use($option){
469
+
470
+ $delete_nonce = wp_create_nonce('acfe_options_delete_option');
471
+
472
+ ?>
473
+ <div id="major-publishing-actions">
474
+
475
+ <?php if(!empty($option['option_id'])){ ?>
476
+
477
+ <div id="delete-action">
478
+ <a class="submitdelete deletion" style="color:#a00;" href="<?php echo sprintf('?page=%s&action=%s&option=%s&_wpnonce=%s', esc_attr($_REQUEST['page']), 'delete', $option['option_id'], $delete_nonce); ?>"><?php _e('Delete'); ?></a>
479
+ </div>
480
+
481
+ <?php } ?>
482
+
483
+ <div id="publishing-action">
484
+ <span class="spinner"></span>
485
+ <input type="submit" accesskey="p" value="<?php _e('Update'); ?>" class="button button-primary button-large" id="publish" name="publish">
486
+ </div>
487
+
488
+ <div class="clear"></div>
489
+
490
+ </div>
491
+ <?php
492
+ }, 'acf_options_page', 'side', 'high');
493
+
494
+ // Main Metabox
495
+ add_meta_box('acf-group_acfe_options_edit', $metabox_main_title, function($post, $args){
496
+
497
+ // extract args
498
+ extract($args); // all variables from the add_meta_box function
499
+ extract($args); // all variables from the args argument
500
+
501
+ // vars
502
+ $o = array(
503
+ 'id' => $id,
504
+ 'key' => $field_group['key'],
505
+ 'style' => $field_group['style'],
506
+ 'label' => $field_group['label_placement'],
507
+ 'editLink' => '',
508
+ 'editTitle' => __('Edit field group', 'acf'),
509
+ 'visibility' => true
510
+ );
511
+
512
+ // load fields
513
+ $fields = $field_group['fields'];
514
+
515
+ // render
516
+ acf_render_fields($fields, 'acfe-options-edit', 'div', $field_group['instruction_placement']);
517
+
518
+ ?>
519
+ <script type="text/javascript">
520
+ if(typeof acf !== 'undefined'){
521
+
522
+ acf.newPostbox(<?php echo json_encode($o); ?>);
523
+
524
+ }
525
+ </script>
526
+ <?php
527
+
528
+ }, 'acf_options_page', 'normal', 'high', array('field_group' => $field_group));
529
+
530
+ }
531
+
532
+ /**
533
+ * Options Edit: Save
534
+ *
535
+ */
536
+ add_action('acf/save_post', 'acfe_options_edit_save_post', 5);
537
+ function acfe_options_edit_save_post($post_id){
538
+
539
+ // Validate
540
+ if($post_id !== 'acfe_options_edit')
541
+ return;
542
+
543
+ // Vars
544
+ $option_name = wp_unslash($_POST['acf']['field_acfe_options_edit_name']);
545
+ $option_value = wp_unslash($_POST['acf']['field_acfe_options_edit_value']);
546
+ $autoload = $_POST['acf']['field_acfe_options_edit_autoload'];
547
+
548
+ // Value serialized?
549
+ $option_value = maybe_unserialize($option_value);
550
+
551
+ // Update
552
+ update_option($option_name, $option_value, $autoload);
553
+
554
+ // Flush ACF
555
+ $_POST['acf'] = array();
556
+
557
+ }
558
+
559
+ /**
560
+ * Options Edit: Message
561
+ *
562
+ */
563
+ add_action('acfe/options/load/message=updated', 'acfe_options_load_edit_message');
564
+ function acfe_options_load_edit_message(){
565
+
566
+ acf_add_admin_notice(__('Option has been updated'), 'success');
567
+
568
+ }
569
+
570
+ /**
571
+ * Options Add: Message
572
+ *
573
+ */
574
+ add_action('acfe/options/load/message=added', 'acfe_options_load_add_message');
575
+ function acfe_options_load_add_message(){
576
+
577
+ acf_add_admin_notice(__('Option has been added'), 'success');
578
+
579
  }
includes/admin/plugins.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- /**
7
- * Admin: Plugins Tab
8
- */
9
- add_filter('install_plugins_tabs', 'acfe_admin_plugins_tabs');
10
- function acfe_admin_plugins_tabs($tabs){
11
-
12
- $tabs['acf'] = __('Advanced Custom Fields');
13
-
14
- return $tabs;
15
-
16
- }
17
-
18
- /**
19
- * Admin: Plugins Args
20
- */
21
- add_filter('install_plugins_table_api_args_acf', 'acfe_admin_plugins_args');
22
- function acfe_admin_plugins_args($args){
23
-
24
- global $paged;
25
-
26
- $args['search'] = 'acf';
27
- $args['page'] = $paged;
28
- $args['per_page'] = 12;
29
-
30
- return $args;
31
-
32
- }
33
-
34
- /**
35
- * Admin: Plugins HTML
36
- */
37
- add_action('install_plugins_acf', 'acfe_admin_plugins_html');
38
- function acfe_admin_plugins_html(){
39
-
40
- display_plugins_table();
41
-
42
  }
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ /**
7
+ * Admin: Plugins Tab
8
+ */
9
+ add_filter('install_plugins_tabs', 'acfe_admin_plugins_tabs');
10
+ function acfe_admin_plugins_tabs($tabs){
11
+
12
+ $tabs['acf'] = __('Advanced Custom Fields');
13
+
14
+ return $tabs;
15
+
16
+ }
17
+
18
+ /**
19
+ * Admin: Plugins Args
20
+ */
21
+ add_filter('install_plugins_table_api_args_acf', 'acfe_admin_plugins_args');
22
+ function acfe_admin_plugins_args($args){
23
+
24
+ global $paged;
25
+
26
+ $args['search'] = 'acf';
27
+ $args['page'] = $paged;
28
+ $args['per_page'] = 12;
29
+
30
+ return $args;
31
+
32
+ }
33
+
34
+ /**
35
+ * Admin: Plugins HTML
36
+ */
37
+ add_action('install_plugins_acf', 'acfe_admin_plugins_html');
38
+ function acfe_admin_plugins_html(){
39
+
40
+ display_plugins_table();
41
+
42
  }
includes/admin/tools/dpt-import.php CHANGED
@@ -166,7 +166,7 @@ class ACFE_Admin_Tool_Import_DPT extends ACF_Admin_Tool{
166
  update_field('rest_controller_class', $args['rest_controller_class'], $post_id);
167
 
168
  // Has archive: override
169
- if($args['has_archive'])
170
  update_field('has_archive_slug', $args['has_archive'], $post_id);
171
 
172
  // Rewrite: override
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
includes/admin/tools/fg-local.php CHANGED
@@ -1,324 +1,324 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('ACFE_Admin_Tool_FG_Local_Export')):
7
-
8
- class ACFE_Admin_Tool_FG_Local 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
- $this->icon = 'dashicons-upload';
16
-
17
- }
18
-
19
- function load(){
20
-
21
- if($ids = acf_maybe_get_GET('acfe-fg-local-sync')){
22
-
23
- $ids = explode('+', $ids);
24
-
25
- // Count number of imported field groups.
26
- $total = count($ids);
27
-
28
- // Generate text.
29
- $text = sprintf( _n( 'Imported 1 field group', 'Imported %s field groups', $total, 'acf' ), $total );
30
-
31
- // Add links to text.
32
- $links = array();
33
- foreach( $ids as $id ) {
34
- $links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
35
- }
36
- $text .= ' ' . implode( ', ', $links );
37
-
38
- // Add notice
39
- acf_add_admin_notice($text, 'success');
40
-
41
- }
42
-
43
- if($this->is_active()){
44
-
45
- $array = $this->get_selected();
46
- $keys = $this->get_selected_keys();
47
- $action = $this->get_action();
48
-
49
- // validate
50
- if($array === false)
51
- return acf_add_admin_notice(__('No field group selected'), 'warning');
52
-
53
- // Json
54
- if($action === 'json'){
55
-
56
- // Slugs
57
- $slugs = implode('-', $keys);
58
-
59
- // Date
60
- $date = date('Y-m-d');
61
-
62
- // file
63
- $file_name = 'acfe-export-local-' . $slugs . '-' . $date . '.json';
64
-
65
- // headers
66
- header("Content-Description: File Transfer");
67
- header("Content-Disposition: attachment; filename={$file_name}");
68
- header("Content-Type: application/json; charset=utf-8");
69
-
70
- // return
71
- echo acf_json_encode($array);
72
- die;
73
-
74
- }
75
-
76
- // Sync
77
- elseif($action === 'sync'){
78
-
79
- if(isset($array['key']))
80
- $array = array($array);
81
-
82
- // Remeber imported field group ids.
83
- $ids = array();
84
-
85
- // Loop over json
86
- foreach( $array as $field_group ) {
87
-
88
- // Search database for existing field group.
89
- $post = acf_get_field_group_post( $field_group['key'] );
90
- if( $post ) {
91
- $field_group['ID'] = $post->ID;
92
- }
93
-
94
- // Import field group.
95
- $field_group = acf_import_field_group( $field_group );
96
-
97
- // append message
98
- $ids[] = $field_group['ID'];
99
-
100
- }
101
-
102
- // url
103
- $url = add_query_arg('acfe-fg-local-sync', implode('+', $ids), acf_get_admin_tools_url());
104
-
105
- // redirect
106
- wp_redirect($url);
107
- exit;
108
-
109
- }
110
-
111
- }
112
-
113
- }
114
-
115
- function html(){
116
-
117
- if($this->is_active()){
118
-
119
- $array = $this->get_selected();
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
- // vars
131
- $json = $array;
132
-
133
- $str_replace = array(
134
- " " => "\t",
135
- "'!!__(!!\'" => "__('",
136
- "!!\', !!\'" => "', '",
137
- "!!\')!!'" => "')",
138
- "array (" => "array("
139
- );
140
-
141
- $preg_replace = array(
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
-
150
- <div id="acf-admin-tool-export">
151
-
152
- <textarea id="acf-export-textarea" readonly="true"><?php
153
-
154
- echo "if( function_exists('acf_add_local_field_group') ):" . "\r\n" . "\r\n";
155
-
156
- foreach( $json as $field_group ) {
157
-
158
- // code
159
- $code = var_export($field_group, true);
160
-
161
-
162
- // change double spaces to tabs
163
- $code = str_replace( array_keys($str_replace), array_values($str_replace), $code );
164
-
165
-
166
- // correctly formats "=> array("
167
- $code = preg_replace( array_keys($preg_replace), array_values($preg_replace), $code );
168
-
169
-
170
- // esc_textarea
171
- $code = esc_textarea( $code );
172
-
173
-
174
- // echo
175
- echo "acf_add_local_field_group({$code});" . "\r\n" . "\r\n";
176
-
177
- }
178
-
179
- echo "endif;";
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
- }
245
-
246
- function get_selected(){
247
-
248
- // vars
249
- $selected = $this->get_selected_keys();
250
-
251
- if(!$selected)
252
- return false;
253
-
254
- // Return
255
- $array = array();
256
-
257
- // Enable filters
258
- acf_enable_filters();
259
-
260
- // Disable fitler: clone
261
- acf_disable_filter('clone');
262
-
263
- foreach($selected as $field_group_key){
264
-
265
- $field_group = acf_get_field_group($field_group_key);
266
-
267
- // validate field group
268
- if(empty($field_group))
269
- continue;
270
-
271
- // load fields
272
- $field_group['fields'] = acf_get_fields($field_group);
273
-
274
- // prepare for export
275
- $field_group = acf_prepare_field_group_for_export($field_group);
276
-
277
- $array[] = $field_group;
278
-
279
- }
280
-
281
- // return
282
- return $array;
283
-
284
- }
285
-
286
- function get_selected_keys(){
287
-
288
- // check $_POST
289
- if($keys = acf_maybe_get_POST('keys'))
290
- return (array) $keys;
291
-
292
- // check $_GET
293
- if($keys = acf_maybe_get_GET('keys')){
294
-
295
- $keys = str_replace(' ', '+', $keys);
296
- return explode('+', $keys);
297
-
298
- }
299
-
300
- // return
301
- return false;
302
-
303
- }
304
-
305
- function get_action(){
306
-
307
- // check $_POST
308
- if($action = acf_maybe_get_POST('action'))
309
- return $action;
310
-
311
- // check $_GET
312
- if($action = acf_maybe_get_GET('action'))
313
- return $action;
314
-
315
- // return
316
- return 'json';
317
-
318
- }
319
-
320
- }
321
-
322
- acf_register_admin_tool('ACFE_Admin_Tool_FG_Local');
323
-
324
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('ACFE_Admin_Tool_FG_Local_Export')):
7
+
8
+ class ACFE_Admin_Tool_FG_Local 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
+ $this->icon = 'dashicons-upload';
16
+
17
+ }
18
+
19
+ function load(){
20
+
21
+ if($ids = acf_maybe_get_GET('acfe-fg-local-sync')){
22
+
23
+ $ids = explode('+', $ids);
24
+
25
+ // Count number of imported field groups.
26
+ $total = count($ids);
27
+
28
+ // Generate text.
29
+ $text = sprintf( _n( 'Imported 1 field group', 'Imported %s field groups', $total, 'acf' ), $total );
30
+
31
+ // Add links to text.
32
+ $links = array();
33
+ foreach( $ids as $id ) {
34
+ $links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
35
+ }
36
+ $text .= ' ' . implode( ', ', $links );
37
+
38
+ // Add notice
39
+ acf_add_admin_notice($text, 'success');
40
+
41
+ }
42
+
43
+ if($this->is_active()){
44
+
45
+ $array = $this->get_selected();
46
+ $keys = $this->get_selected_keys();
47
+ $action = $this->get_action();
48
+
49
+ // validate
50
+ if($array === false)
51
+ return acf_add_admin_notice(__('No field group selected'), 'warning');
52
+
53
+ // Json
54
+ if($action === 'json'){
55
+
56
+ // Slugs
57
+ $slugs = implode('-', $keys);
58
+
59
+ // Date
60
+ $date = date('Y-m-d');
61
+
62
+ // file
63
+ $file_name = 'acfe-export-local-' . $slugs . '-' . $date . '.json';
64
+
65
+ // headers
66
+ header("Content-Description: File Transfer");
67
+ header("Content-Disposition: attachment; filename={$file_name}");
68
+ header("Content-Type: application/json; charset=utf-8");
69
+
70
+ // return
71
+ echo acf_json_encode($array);
72
+ die;
73
+
74
+ }
75
+
76
+ // Sync
77
+ elseif($action === 'sync'){
78
+
79
+ if(isset($array['key']))
80
+ $array = array($array);
81
+
82
+ // Remeber imported field group ids.
83
+ $ids = array();
84
+
85
+ // Loop over json
86
+ foreach( $array as $field_group ) {
87
+
88
+ // Search database for existing field group.
89
+ $post = acf_get_field_group_post( $field_group['key'] );
90
+ if( $post ) {
91
+ $field_group['ID'] = $post->ID;
92
+ }
93
+
94
+ // Import field group.
95
+ $field_group = acf_import_field_group( $field_group );
96
+
97
+ // append message
98
+ $ids[] = $field_group['ID'];
99
+
100
+ }
101
+
102
+ // url
103
+ $url = add_query_arg('acfe-fg-local-sync', implode('+', $ids), acf_get_admin_tools_url());
104
+
105
+ // redirect
106
+ wp_redirect($url);
107
+ exit;
108
+
109
+ }
110
+
111
+ }
112
+
113
+ }
114
+
115
+ function html(){
116
+
117
+ if($this->is_active()){
118
+
119
+ $array = $this->get_selected();
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
+ // vars
131
+ $json = $array;
132
+
133
+ $str_replace = array(
134
+ " " => "\t",
135
+ "'!!__(!!\'" => "__('",
136
+ "!!\', !!\'" => "', '",
137
+ "!!\')!!'" => "')",
138
+ "array (" => "array("
139
+ );
140
+
141
+ $preg_replace = array(
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
+
150
+ <div id="acf-admin-tool-export">
151
+
152
+ <textarea id="acf-export-textarea" readonly="true"><?php
153
+
154
+ echo "if( function_exists('acf_add_local_field_group') ):" . "\r\n" . "\r\n";
155
+
156
+ foreach( $json as $field_group ) {
157
+
158
+ // code
159
+ $code = var_export($field_group, true);
160
+
161
+
162
+ // change double spaces to tabs
163
+ $code = str_replace( array_keys($str_replace), array_values($str_replace), $code );
164
+
165
+
166
+ // correctly formats "=> array("
167
+ $code = preg_replace( array_keys($preg_replace), array_values($preg_replace), $code );
168
+
169
+
170
+ // esc_textarea
171
+ $code = esc_textarea( $code );
172
+
173
+
174
+ // echo
175
+ echo "acf_add_local_field_group({$code});" . "\r\n" . "\r\n";
176
+
177
+ }
178
+
179
+ echo "endif;";
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
+ }
245
+
246
+ function get_selected(){
247
+
248
+ // vars
249
+ $selected = $this->get_selected_keys();
250
+
251
+ if(!$selected)
252
+ return false;
253
+
254
+ // Return
255
+ $array = array();
256
+
257
+ // Enable filters
258
+ acf_enable_filters();
259
+
260
+ // Disable fitler: clone
261
+ acf_disable_filter('clone');
262
+
263
+ foreach($selected as $field_group_key){
264
+
265
+ $field_group = acf_get_field_group($field_group_key);
266
+
267
+ // validate field group
268
+ if(empty($field_group))
269
+ continue;
270
+
271
+ // load fields
272
+ $field_group['fields'] = acf_get_fields($field_group);
273
+
274
+ // prepare for export
275
+ $field_group = acf_prepare_field_group_for_export($field_group);
276
+
277
+ $array[] = $field_group;
278
+
279
+ }
280
+
281
+ // return
282
+ return $array;
283
+
284
+ }
285
+
286
+ function get_selected_keys(){
287
+
288
+ // check $_POST
289
+ if($keys = acf_maybe_get_POST('keys'))
290
+ return (array) $keys;
291
+
292
+ // check $_GET
293
+ if($keys = acf_maybe_get_GET('keys')){
294
+
295
+ $keys = str_replace(' ', '+', $keys);
296
+ return explode('+', $keys);
297
+
298
+ }
299
+
300
+ // return
301
+ return false;
302
+
303
+ }
304
+
305
+ function get_action(){
306
+
307
+ // check $_POST
308
+ if($action = acf_maybe_get_POST('action'))
309
+ return $action;
310
+
311
+ // check $_GET
312
+ if($action = acf_maybe_get_GET('action'))
313
+ return $action;
314
+
315
+ // return
316
+ return 'json';
317
+
318
+ }
319
+
320
+ }
321
+
322
+ acf_register_admin_tool('ACFE_Admin_Tool_FG_Local');
323
+
324
  endif;
includes/admin/views/html-options-edit.php CHANGED
@@ -1,61 +1,61 @@
1
- <div class="wrap acf-settings-wrap">
2
-
3
- <?php
4
- $title = __('Edit Option');
5
- if($_REQUEST['action'] === 'add')
6
- $title = __('Add Option');
7
- ?>
8
- <h1 class="wp-heading-inline"><?php echo $title; ?></h1>
9
-
10
- <hr class="wp-header-end" />
11
-
12
- <form id="post" method="post" name="post">
13
-
14
- <?php
15
-
16
- // render post data
17
- acf_form_data(array(
18
- 'screen' => 'acfe-options-edit',
19
- 'post_id' => 'acfe_options_edit',
20
- ));
21
-
22
- wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
23
- wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
24
-
25
- ?>
26
-
27
- <div id="poststuff">
28
-
29
- <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
30
-
31
- <!--
32
- <div id="post-body-content">
33
- <div id="titlediv">
34
- <div id="titlewrap">
35
- <input type="text" name="post_title" size="30" value="Post 4" id="title" spellcheck="true" autocomplete="off" />
36
- </div>
37
- </div>
38
- </div>
39
- -->
40
-
41
- <div id="postbox-container-1" class="postbox-container">
42
-
43
- <?php do_meta_boxes('acf_options_page', 'side', null); ?>
44
-
45
- </div>
46
-
47
- <div id="postbox-container-2" class="postbox-container">
48
-
49
- <?php do_meta_boxes('acf_options_page', 'normal', null); ?>
50
-
51
- </div>
52
-
53
- </div>
54
-
55
- <br class="clear" />
56
-
57
- </div>
58
-
59
- </form>
60
-
61
  </div>
1
+ <div class="wrap acf-settings-wrap">
2
+
3
+ <?php
4
+ $title = __('Edit Option');
5
+ if($_REQUEST['action'] === 'add')
6
+ $title = __('Add Option');
7
+ ?>
8
+ <h1 class="wp-heading-inline"><?php echo $title; ?></h1>
9
+
10
+ <hr class="wp-header-end" />
11
+
12
+ <form id="post" method="post" name="post">
13
+
14
+ <?php
15
+
16
+ // render post data
17
+ acf_form_data(array(
18
+ 'screen' => 'acfe-options-edit',
19
+ 'post_id' => 'acfe_options_edit',
20
+ ));
21
+
22
+ wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false);
23
+ wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
24
+
25
+ ?>
26
+
27
+ <div id="poststuff">
28
+
29
+ <div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
30
+
31
+ <!--
32
+ <div id="post-body-content">
33
+ <div id="titlediv">
34
+ <div id="titlewrap">
35
+ <input type="text" name="post_title" size="30" value="Post 4" id="title" spellcheck="true" autocomplete="off" />
36
+ </div>
37
+ </div>
38
+ </div>
39
+ -->
40
+
41
+ <div id="postbox-container-1" class="postbox-container">
42
+
43
+ <?php do_meta_boxes('acf_options_page', 'side', null); ?>
44
+
45
+ </div>
46
+
47
+ <div id="postbox-container-2" class="postbox-container">
48
+
49
+ <?php do_meta_boxes('acf_options_page', 'normal', null); ?>
50
+
51
+ </div>
52
+
53
+ </div>
54
+
55
+ <br class="clear" />
56
+
57
+ </div>
58
+
59
+ </form>
60
+
61
  </div>
includes/admin/views/html-options-list.php CHANGED
@@ -1,38 +1,38 @@
1
- <div class="wrap" id="acfe-admin-options">
2
-
3
- <h1 class="wp-heading-inline"><?php _e('Options'); ?></h1>
4
- <a href="<?php echo sprintf('?page=%s&action=add', esc_attr($_REQUEST['page'])); ?>" class="page-title-action"><?php _e('Add New'); ?></a>
5
-
6
- <hr class="wp-header-end" />
7
-
8
- <div id="poststuff">
9
-
10
- <div id="post-body" class="metabox-holder">
11
- <div id="post-body-content">
12
- <div class="meta-box-sortables ui-sortable">
13
- <form method="post">
14
-
15
- <?php
16
-
17
- // WP List
18
- $acfe_options_list = new ACFE_Admin_Options_List();
19
-
20
- // Prepare items
21
- $acfe_options_list->prepare_items();
22
-
23
- $acfe_options_list->search_box('Search', 'search');
24
-
25
- $acfe_options_list->display();
26
-
27
- ?>
28
-
29
- </form>
30
- </div>
31
- </div>
32
- </div>
33
-
34
- <br class="clear" />
35
-
36
- </div>
37
-
38
  </div>
1
+ <div class="wrap" id="acfe-admin-options">
2
+
3
+ <h1 class="wp-heading-inline"><?php _e('Options'); ?></h1>
4
+ <a href="<?php echo sprintf('?page=%s&action=add', esc_attr($_REQUEST['page'])); ?>" class="page-title-action"><?php _e('Add New'); ?></a>
5
+
6
+ <hr class="wp-header-end" />
7
+
8
+ <div id="poststuff">
9
+
10
+ <div id="post-body" class="metabox-holder">
11
+ <div id="post-body-content">
12
+ <div class="meta-box-sortables ui-sortable">
13
+ <form method="post">
14
+
15
+ <?php
16
+
17
+ // WP List
18
+ $acfe_options_list = new ACFE_Admin_Options_List();
19
+
20
+ // Prepare items
21
+ $acfe_options_list->prepare_items();
22
+
23
+ $acfe_options_list->search_box('Search', 'search');
24
+
25
+ $acfe_options_list->display();
26
+
27
+ ?>
28
+
29
+ </form>
30
+ </div>
31
+ </div>
32
+ </div>
33
+
34
+ <br class="clear" />
35
+
36
+ </div>
37
+
38
  </div>
includes/core/helpers.php CHANGED
@@ -874,6 +874,8 @@ function acfe_get_pretty_forms($forms = array()){
874
  'post_type' => 'acfe-form',
875
  'posts_per_page' => -1,
876
  'fields' => 'ids',
 
 
877
  ));
878
 
879
  }
@@ -1406,11 +1408,11 @@ function acfe_get_locations_array($locations){
1406
  continue;
1407
 
1408
  $value = $value_name;
1409
-
1410
- if(is_array($value_name) && isset($value_name[$value])){
1411
-
1412
- $value = $value_name[$value];
1413
-
1414
  }
1415
 
1416
  break;
874
  'post_type' => 'acfe-form',
875
  'posts_per_page' => -1,
876
  'fields' => 'ids',
877
+ 'orderby' => 'title',
878
+ 'order' => 'ASC',
879
  ));
880
 
881
  }
1408
  continue;
1409
 
1410
  $value = $value_name;
1411
+
1412
+ if(is_array($value_name) && isset($value_name[$value_slug])){
1413
+
1414
+ $value = $value_name[$value_slug];
1415
+
1416
  }
1417
 
1418
  break;
includes/core/multilang.php CHANGED
@@ -306,6 +306,8 @@ class acfe_multilang{
306
 
307
  }
308
 
 
 
309
  $this->options_pages = $list;
310
 
311
  }
306
 
307
  }
308
 
309
+ $list = apply_filters('acfe/modules/multilang/options', $list);
310
+
311
  $this->options_pages = $list;
312
 
313
  }
includes/field-groups/field-group-category.php CHANGED
@@ -3,7 +3,7 @@
3
  if(!defined('ABSPATH'))
4
  exit;
5
 
6
- add_action('init', 'acfe_field_group_category_register');
7
  function acfe_field_group_category_register(){
8
 
9
  register_taxonomy('acf-field-group-category', array('acf-field-group'), array(
3
  if(!defined('ABSPATH'))
4
  exit;
5
 
6
+ add_action('init', 'acfe_field_group_category_register', 9);
7
  function acfe_field_group_category_register(){
8
 
9
  register_taxonomy('acf-field-group-category', array('acf-field-group'), array(
includes/field-groups/field-groups.php CHANGED
@@ -362,7 +362,7 @@ add_action('current_screen', function(){
362
  //$('#posts-filter').append($('#tmpl-acfe-debug').html());
363
 
364
  // Fix no field groups found
365
- $('#the-list tr.no-items td').attr('colspan', $('.wp-list-table > thead > tr > td:not(.hidden), .wp-list-table > thead > tr > th:not(.hidden)').length -1);
366
 
367
  })(jQuery);
368
  </script>
@@ -385,32 +385,26 @@ add_action('acf/add_meta_boxes', 'acfe_field_groups_seamless', 10, 3);
385
  function acfe_field_groups_seamless($post_type, $post, $field_groups){
386
 
387
  foreach($field_groups as $field_group){
 
 
388
 
389
- if($field_group['style'] === 'seamless'){
390
-
391
- add_filter("postbox_classes_{$post_type}_acf-{$field_group['key']}", function($classes){
392
-
393
- $classes[] = 'acf-postbox';
394
- $classes[] = 'seamless';
395
-
396
- return $classes;
397
-
398
- });
399
-
400
- }
 
 
 
401
 
402
- if($field_group['label_placement'] === 'left'){
403
-
404
- add_filter("postbox_classes_{$post_type}_acf-{$field_group['key']}", function($classes){
405
-
406
- $classes[] = 'acf-postbox';
407
- $classes[] = 'acfe-postbox-left';
408
-
409
- return $classes;
410
-
411
- });
412
-
413
- }
414
 
415
  }
416
 
362
  //$('#posts-filter').append($('#tmpl-acfe-debug').html());
363
 
364
  // Fix no field groups found
365
+ $('#the-list tr.no-items td').attr('colspan', $('.wp-list-table > thead > tr > .manage-column:visible').length);
366
 
367
  })(jQuery);
368
  </script>
385
  function acfe_field_groups_seamless($post_type, $post, $field_groups){
386
 
387
  foreach($field_groups as $field_group){
388
+
389
+ add_filter("postbox_classes_{$post_type}_acf-{$field_group['key']}", function($classes) use($field_group){
390
 
391
+ $classes[] = 'acf-postbox';
392
+
393
+ // Seamless
394
+ if($field_group['style'] === 'seamless')
395
+ $classes[] = 'seamless';
396
+
397
+ // Left
398
+ if($field_group['label_placement'] === 'left')
399
+ $classes[] = 'acfe-postbox-left';
400
+
401
+ // Top
402
+ if($field_group['label_placement'] === 'top')
403
+ $classes[] = 'acfe-postbox-top';
404
+
405
+ return $classes;
406
 
407
+ });
 
 
 
 
 
 
 
 
 
 
 
408
 
409
  }
410
 
includes/fields-settings/bidirectional.php CHANGED
@@ -364,8 +364,11 @@ class acfe_bidirectional{
364
 
365
  // Reset related bidirectional related
366
  $r_field['acfe_bidirectional']['acfe_bidirectional_enabled'] = true;
367
-
368
- $r_field_related = acf_get_array($r_field['acfe_bidirectional']['acfe_bidirectional_related']);
 
 
 
369
 
370
  if(!in_array($field['key'], $r_field_related)){
371
 
364
 
365
  // Reset related bidirectional related
366
  $r_field['acfe_bidirectional']['acfe_bidirectional_enabled'] = true;
367
+
368
+ $r_field_related = array();
369
+
370
+ if(isset($r_field['acfe_bidirectional']['acfe_bidirectional_related']))
371
+ $r_field_related = acf_get_array($r_field['acfe_bidirectional']['acfe_bidirectional_related']);
372
 
373
  if(!in_array($field['key'], $r_field_related)){
374
 
includes/fields-settings/permissions.php CHANGED
@@ -1,55 +1,55 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- add_action('acf/render_field_settings', 'acfe_permissions_settings', 999);
7
- function acfe_permissions_settings($field){
8
-
9
- // Settings
10
- acf_render_field_setting($field, array(
11
- 'label' => __('Permissions'),
12
- 'name' => 'acfe_permissions',
13
- 'key' => 'acfe_permissions',
14
- 'instructions' => __('Select user roles that are allowed to view and edit this field. If nothing is selected, then this field will be available to everyone.'),
15
- 'type' => 'checkbox',
16
- 'required' => false,
17
- 'default_value' => false,
18
- 'choices' => acfe_get_roles(),
19
- 'layout' => 'horizontal'
20
- ), true);
21
-
22
- }
23
-
24
- add_filter('acf/prepare_field', 'acfe_roles_prepare_field');
25
- function acfe_roles_prepare_field($field){
26
-
27
- if(!isset($field['acfe_permissions']) || empty($field['acfe_permissions']))
28
- return $field;
29
-
30
- $current_user_roles = acfe_get_current_user_roles();
31
- $render_field = false;
32
-
33
- foreach($current_user_roles as $current_user_role){
34
-
35
- foreach($field['acfe_permissions'] as $field_role){
36
-
37
- if($current_user_role !== $field_role)
38
- continue;
39
-
40
- $render_field = true;
41
- break;
42
-
43
- }
44
-
45
- if($render_field)
46
- break;
47
-
48
- }
49
-
50
- if(!$render_field)
51
- return false;
52
-
53
- return $field;
54
-
55
  }
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ add_action('acf/render_field_settings', 'acfe_permissions_settings', 999);
7
+ function acfe_permissions_settings($field){
8
+
9
+ // Settings
10
+ acf_render_field_setting($field, array(
11
+ 'label' => __('Permissions'),
12
+ 'name' => 'acfe_permissions',
13
+ 'key' => 'acfe_permissions',
14
+ 'instructions' => __('Select user roles that are allowed to view and edit this field. If nothing is selected, then this field will be available to everyone.'),
15
+ 'type' => 'checkbox',
16
+ 'required' => false,
17
+ 'default_value' => false,
18
+ 'choices' => acfe_get_roles(),
19
+ 'layout' => 'horizontal'
20
+ ), true);
21
+
22
+ }
23
+
24
+ add_filter('acf/prepare_field', 'acfe_roles_prepare_field');
25
+ function acfe_roles_prepare_field($field){
26
+
27
+ if(!isset($field['acfe_permissions']) || empty($field['acfe_permissions']))
28
+ return $field;
29
+
30
+ $current_user_roles = acfe_get_current_user_roles();
31
+ $render_field = false;
32
+
33
+ foreach($current_user_roles as $current_user_role){
34
+
35
+ foreach($field['acfe_permissions'] as $field_role){
36
+
37
+ if($current_user_role !== $field_role)
38
+ continue;
39
+
40
+ $render_field = true;
41
+ break;
42
+
43
+ }
44
+
45
+ if($render_field)
46
+ break;
47
+
48
+ }
49
+
50
+ if(!$render_field)
51
+ return false;
52
+
53
+ return $field;
54
+
55
  }
includes/fields/field-button.php CHANGED
@@ -1,240 +1,240 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('acfe_field_button')):
7
-
8
- class acfe_field_button extends acf_field{
9
-
10
- function __construct(){
11
-
12
- $this->name = 'acfe_button';
13
- $this->label = __('Button', 'acfe');
14
- $this->category = 'basic';
15
- $this->defaults = array(
16
- 'button_value' => __('Submit', 'acfe'),
17
- 'button_type' => 'button',
18
- 'button_before' => '',
19
- 'button_after' => '',
20
- 'button_class' => '',
21
- 'button_id' => '',
22
- );
23
-
24
- add_action('wp_ajax_acfe/fields/button', array($this, 'ajax_request'), 99);
25
- add_action('wp_ajax_nopriv_acfe/fields/button', array($this, 'ajax_request'), 99);
26
-
27
- parent::__construct();
28
-
29
- }
30
-
31
- function ajax_request(){
32
-
33
- /**
34
- * @bool/string $_POST['post_id'] Current post ID
35
- * @string $_POST['field_key'] Button's field key
36
- * @string $_POST['field_name'] Button's field name
37
- */
38
-
39
- $field_name = acf_maybe_get_POST('field_name');
40
- $field_key = acf_maybe_get_POST('field_key');
41
- $post_id = acf_maybe_get_POST('post_id');
42
- $field = acf_get_field($field_key);
43
-
44
- do_action('acfe/fields/button', $field, $post_id);
45
- do_action('acfe/fields/button/name=' . $field_name, $field, $post_id);
46
- do_action('acfe/fields/button/key=' . $field_key, $field, $post_id);
47
-
48
- die;
49
-
50
- }
51
-
52
- function render_field_settings($field){
53
-
54
- // Value
55
- acf_render_field_setting($field, array(
56
- 'label' => __('Button value', 'acfe'),
57
- 'instructions' => __('Set a default button value', 'acfe'),
58
- 'type' => 'text',
59
- 'name' => 'button_value',
60
- 'default_value' => __('Submit', 'acfe')
61
- ));
62
-
63
- // Type
64
- acf_render_field_setting($field, array(
65
- 'label' => __('Button value', 'acfe'),
66
- 'instructions' => __('Choose the button type', 'acfe'),
67
- 'type' => 'radio',
68
- 'name' => 'button_type',
69
- 'default_value' => 'button',
70
- 'layout' => 'horizontal',
71
- 'choices' => array(
72
- 'button' => __('Button', 'acfe'),
73
- 'submit' => __('Submit', 'acfe'),
74
- ),
75
- ));
76
-
77
- // class
78
- acf_render_field_setting($field, array(
79
- 'label' => __('Button attributes','acf'),
80
- 'instructions' => '',
81
- 'type' => 'text',
82
- 'name' => 'button_class',
83
- 'prepend' => __('class', 'acf'),
84
- ));
85
-
86
- // id
87
- acf_render_field_setting($field, array(
88
- 'label' => '',
89
- 'instructions' => '',
90
- 'type' => 'text',
91
- 'name' => 'button_id',
92
- 'prepend' => __('id', 'acf'),
93
- '_append' => 'button_class'
94
- ));
95
-
96
- // Before HTML
97
- acf_render_field_setting($field, array(
98
- 'label' => __('Before HTML', 'acfe'),
99
- 'instructions' => __('Custom HTML before the button', 'acfe'),
100
- 'type' => 'acfe_code_editor',
101
- 'name' => 'button_before',
102
- 'rows' => 4,
103
- ));
104
-
105
- // After HTML
106
- acf_render_field_setting($field, array(
107
- 'label' => __('After HTML', 'acfe'),
108
- 'instructions' => __('Custom HTML after the button', 'acfe'),
109
- 'type' => 'acfe_code_editor',
110
- 'name' => 'button_after',
111
- 'rows' => 4,
112
- ));
113
-
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){
190
-
191
- // Before
192
- if(isset($field['button_before']) && !empty($field['button_before'])){
193
-
194
- echo $field['button_before'];
195
-
196
- }
197
-
198
- $ajax = false;
199
- $button_ajax = $field['button_ajax'];
200
-
201
- if($button_ajax)
202
- $ajax = 'data-ajax="1"';
203
-
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
-
213
- // Submit
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
- value="' . esc_attr($field['button_value']) . '"
221
- ' . $ajax . '
222
- />';
223
-
224
- }
225
-
226
- // After
227
- if(isset($field['button_after']) && !empty($field['button_after'])){
228
-
229
- echo $field['button_after'];
230
-
231
- }
232
-
233
- }
234
-
235
- }
236
-
237
- // initialize
238
- acf_register_field_type('acfe_field_button');
239
-
240
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('acfe_field_button')):
7
+
8
+ class acfe_field_button extends acf_field{
9
+
10
+ function __construct(){
11
+
12
+ $this->name = 'acfe_button';
13
+ $this->label = __('Button', 'acfe');
14
+ $this->category = 'basic';
15
+ $this->defaults = array(
16
+ 'button_value' => __('Submit', 'acfe'),
17
+ 'button_type' => 'button',
18
+ 'button_before' => '',
19
+ 'button_after' => '',
20
+ 'button_class' => 'button button-secondary',
21
+ 'button_id' => '',
22
+ );
23
+
24
+ add_action('wp_ajax_acfe/fields/button', array($this, 'ajax_request'), 99);
25
+ add_action('wp_ajax_nopriv_acfe/fields/button', array($this, 'ajax_request'), 99);
26
+
27
+ parent::__construct();
28
+
29
+ }
30
+
31
+ function ajax_request(){
32
+
33
+ /**
34
+ * @bool/string $_POST['post_id'] Current post ID
35
+ * @string $_POST['field_key'] Button's field key
36
+ * @string $_POST['field_name'] Button's field name
37
+ */
38
+
39
+ $field_name = acf_maybe_get_POST('field_name');
40
+ $field_key = acf_maybe_get_POST('field_key');
41
+ $post_id = acf_maybe_get_POST('post_id');
42
+ $field = acf_get_field($field_key);
43
+
44
+ do_action('acfe/fields/button', $field, $post_id);
45
+ do_action('acfe/fields/button/name=' . $field_name, $field, $post_id);
46
+ do_action('acfe/fields/button/key=' . $field_key, $field, $post_id);
47
+
48
+ die;
49
+
50
+ }
51
+
52
+ function render_field_settings($field){
53
+
54
+ // Value
55
+ acf_render_field_setting($field, array(
56
+ 'label' => __('Button value', 'acfe'),
57
+ 'instructions' => __('Set a default button value', 'acfe'),
58
+ 'type' => 'text',
59
+ 'name' => 'button_value',
60
+ 'default_value' => __('Submit', 'acfe')
61
+ ));
62
+
63
+ // Type
64
+ acf_render_field_setting($field, array(
65
+ 'label' => __('Button type', 'acfe'),
66
+ 'instructions' => __('Choose the button type', 'acfe'),
67
+ 'type' => 'radio',
68
+ 'name' => 'button_type',
69
+ 'default_value' => 'button',
70
+ 'layout' => 'horizontal',
71
+ 'choices' => array(
72
+ 'button' => __('Button', 'acfe'),
73
+ 'submit' => __('Submit', 'acfe'),
74
+ ),
75
+ ));
76
+
77
+ // class
78
+ acf_render_field_setting($field, array(
79
+ 'label' => __('Button attributes','acf'),
80
+ 'instructions' => '',
81
+ 'type' => 'text',
82
+ 'name' => 'button_class',
83
+ 'prepend' => __('class', 'acf'),
84
+ ));
85
+
86
+ // id
87
+ acf_render_field_setting($field, array(
88
+ 'label' => '',
89
+ 'instructions' => '',
90
+ 'type' => 'text',
91
+ 'name' => 'button_id',
92
+ 'prepend' => __('id', 'acf'),
93
+ '_append' => 'button_class'
94
+ ));
95
+
96
+ // Before HTML
97
+ acf_render_field_setting($field, array(
98
+ 'label' => __('Before HTML', 'acfe'),
99
+ 'instructions' => __('Custom HTML before the button', 'acfe'),
100
+ 'type' => 'acfe_code_editor',
101
+ 'name' => 'button_before',
102
+ 'rows' => 4,
103
+ ));
104
+
105
+ // After HTML
106
+ acf_render_field_setting($field, array(
107
+ 'label' => __('After HTML', 'acfe'),
108
+ 'instructions' => __('Custom HTML after the button', 'acfe'),
109
+ 'type' => 'acfe_code_editor',
110
+ 'name' => 'button_after',
111
+ 'rows' => 4,
112
+ ));
113
+
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){
190
+
191
+ // Before
192
+ if(isset($field['button_before']) && !empty($field['button_before'])){
193
+
194
+ echo $field['button_before'];
195
+
196
+ }
197
+
198
+ $ajax = false;
199
+ $button_ajax = $field['button_ajax'];
200
+
201
+ if($button_ajax)
202
+ $ajax = 'data-ajax="1"';
203
+
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
+
213
+ // Submit
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
+ value="' . esc_attr($field['button_value']) . '"
221
+ ' . $ajax . '
222
+ />';
223
+
224
+ }
225
+
226
+ // After
227
+ if(isset($field['button_after']) && !empty($field['button_after'])){
228
+
229
+ echo $field['button_after'];
230
+
231
+ }
232
+
233
+ }
234
+
235
+ }
236
+
237
+ // initialize
238
+ acf_register_field_type('acfe_field_button');
239
+
240
  endif;
includes/fields/field-clone.php CHANGED
@@ -40,6 +40,15 @@ function acfe_field_clone_settings($field){
40
  'message' => '',
41
  'default_value' => false,
42
  'ui' => true,
 
 
 
 
 
 
 
 
 
43
  ));
44
 
45
  acf_render_field_setting($field, array(
40
  'message' => '',
41
  'default_value' => false,
42
  'ui' => true,
43
+ 'conditional_logic' => array(
44
+ array(
45
+ array(
46
+ 'field' => 'display',
47
+ 'operator' => '==',
48
+ 'value' => 'group',
49
+ )
50
+ )
51
+ )
52
  ));
53
 
54
  acf_render_field_setting($field, array(
includes/fields/field-code-editor.php CHANGED
@@ -76,7 +76,7 @@ class acfe_field_code_editor extends acf_field{
76
  // Mode
77
  acf_render_field_setting($field, array(
78
  'label' => __('Editor mode','acf'),
79
- 'instructions' => __('Appears within the input','acf'),
80
  'type' => 'select',
81
  'name' => 'mode',
82
  'choices' => array(
76
  // Mode
77
  acf_render_field_setting($field, array(
78
  'label' => __('Editor mode','acf'),
79
+ 'instructions' => __('Choose the syntax highlight','acf'),
80
  'type' => 'select',
81
  'name' => 'mode',
82
  'choices' => array(
includes/fields/field-column.php CHANGED
@@ -1,128 +1,128 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('acfe_field_column')):
7
-
8
- class acfe_field_column extends acf_field{
9
-
10
- function __construct(){
11
-
12
- $this->name = 'acfe_column';
13
- $this->label = __('Column', 'acfe');
14
- $this->category = 'layout';
15
- $this->defaults = array(
16
- 'columns' => '3/6',
17
- 'endpoint' => false,
18
- );
19
-
20
- add_filter('acfe/field_wrapper_attributes/type=acfe_column', array($this, 'field_wrapper_attributes'), 10, 2);
21
-
22
- parent::__construct();
23
-
24
- }
25
-
26
- function render_field_settings($field){
27
-
28
- // columns
29
- acf_render_field_setting( $field, array(
30
- 'label' => __('Columns', 'acfe'),
31
- 'instructions' => '',
32
- 'type' => 'select',
33
- 'name' => 'columns',
34
- 'choices' => array(
35
- '1/6' => '1/6',
36
- '2/6' => '2/6',
37
- '3/6' => '3/6',
38
- '4/6' => '4/6',
39
- '5/6' => '5/6',
40
- '6/6' => '6/6'
41
- ),
42
- 'conditional_logic' => array(
43
- array(
44
- array(
45
- 'field' => 'endpoint',
46
- 'operator' => '!=',
47
- 'value' => '1',
48
- )
49
- )
50
- )
51
- ));
52
-
53
- // endpoint
54
- acf_render_field_setting( $field, array(
55
- 'label' => __('Endpoint','acf'),
56
- 'instructions' => __('Define an endpoint for the previous tabs to stop. This will start a new group of columns.', 'acf'),
57
- 'name' => 'endpoint',
58
- 'type' => 'true_false',
59
- 'ui' => 1,
60
- ));
61
-
62
- }
63
-
64
- function field_wrapper_attributes($wrapper, $field){
65
-
66
- if($field['endpoint']){
67
-
68
- $wrapper['data-endpoint'] = $field['endpoint'];
69
-
70
- }
71
-
72
- elseif($field['columns']){
73
-
74
- $wrapper['data-columns'] = $field['columns'];
75
-
76
- }
77
-
78
- return $wrapper;
79
-
80
- }
81
-
82
-
83
- function render_field($field){
84
-
85
- // vars
86
- $atts = array(
87
- 'class' => 'acf-fields',
88
- );
89
-
90
- ?>
91
- <div <?php acf_esc_attr_e($atts); ?>></div>
92
- <?php
93
-
94
- }
95
-
96
- function load_field($field){
97
-
98
- $columns = '';
99
- if($field['columns'])
100
- $columns = ' ' . $field['columns'];
101
-
102
- if($field['endpoint'])
103
- $columns = ' endpoint';
104
-
105
- $field['label'] = '(Column' . $columns .')';
106
- $field['name'] = '';
107
- $field['instructions'] = '';
108
- $field['required'] = 0;
109
- $field['value'] = false;
110
-
111
- return $field;
112
-
113
- }
114
-
115
- function prepare_field($field){
116
-
117
- $field['label'] = false;
118
-
119
- return $field;
120
-
121
- }
122
-
123
- }
124
-
125
- // initialize
126
- acf_register_field_type('acfe_field_column');
127
-
128
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('acfe_field_column')):
7
+
8
+ class acfe_field_column extends acf_field{
9
+
10
+ function __construct(){
11
+
12
+ $this->name = 'acfe_column';
13
+ $this->label = __('Column', 'acfe');
14
+ $this->category = 'layout';
15
+ $this->defaults = array(
16
+ 'columns' => '3/6',
17
+ 'endpoint' => false,
18
+ );
19
+
20
+ add_filter('acfe/field_wrapper_attributes/type=acfe_column', array($this, 'field_wrapper_attributes'), 10, 2);
21
+
22
+ parent::__construct();
23
+
24
+ }
25
+
26
+ function render_field_settings($field){
27
+
28
+ // columns
29
+ acf_render_field_setting( $field, array(
30
+ 'label' => __('Columns', 'acfe'),
31
+ 'instructions' => '',
32
+ 'type' => 'select',
33
+ 'name' => 'columns',
34
+ 'choices' => array(
35
+ '1/6' => '1/6',
36
+ '2/6' => '2/6',
37
+ '3/6' => '3/6',
38
+ '4/6' => '4/6',
39
+ '5/6' => '5/6',
40
+ '6/6' => '6/6'
41
+ ),
42
+ 'conditional_logic' => array(
43
+ array(
44
+ array(
45
+ 'field' => 'endpoint',
46
+ 'operator' => '!=',
47
+ 'value' => '1',
48
+ )
49
+ )
50
+ )
51
+ ));
52
+
53
+ // endpoint
54
+ acf_render_field_setting( $field, array(
55
+ 'label' => __('Endpoint','acf'),
56
+ 'instructions' => __('Define an endpoint for the previous tabs to stop. This will start a new group of columns.', 'acf'),
57
+ 'name' => 'endpoint',
58
+ 'type' => 'true_false',
59
+ 'ui' => 1,
60
+ ));
61
+
62
+ }
63
+
64
+ function field_wrapper_attributes($wrapper, $field){
65
+
66
+ if($field['endpoint']){
67
+
68
+ $wrapper['data-endpoint'] = $field['endpoint'];
69
+
70
+ }
71
+
72
+ elseif($field['columns']){
73
+
74
+ $wrapper['data-columns'] = $field['columns'];
75
+
76
+ }
77
+
78
+ return $wrapper;
79
+
80
+ }
81
+
82
+
83
+ function render_field($field){
84
+
85
+ // vars
86
+ $atts = array(
87
+ 'class' => 'acf-fields',
88
+ );
89
+
90
+ ?>
91
+ <div <?php acf_esc_attr_e($atts); ?>></div>
92
+ <?php
93
+
94
+ }
95
+
96
+ function load_field($field){
97
+
98
+ $columns = '';
99
+ if($field['columns'])
100
+ $columns = ' ' . $field['columns'];
101
+
102
+ if($field['endpoint'])
103
+ $columns = ' endpoint';
104
+
105
+ $field['label'] = '(Column' . $columns .')';
106
+ $field['name'] = '';
107
+ $field['instructions'] = '';
108
+ $field['required'] = 0;
109
+ $field['value'] = false;
110
+
111
+ return $field;
112
+
113
+ }
114
+
115
+ function prepare_field($field){
116
+
117
+ $field['label'] = false;
118
+
119
+ return $field;
120
+
121
+ }
122
+
123
+ }
124
+
125
+ // initialize
126
+ acf_register_field_type('acfe_field_column');
127
+
128
  endif;
includes/fields/field-dynamic-message.php CHANGED
@@ -1,58 +1,58 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('acfe_field_dynamic_message')):
7
-
8
- class acfe_field_dynamic_message extends acf_field{
9
-
10
- function __construct(){
11
-
12
- $this->name = 'acfe_dynamic_message';
13
- $this->label = __('Dynamic Message', 'acfe');
14
- $this->category = 'layout';
15
-
16
- parent::__construct();
17
-
18
- }
19
-
20
- function render_field_settings($field){
21
-
22
- $field_name = 'field_name';
23
- if(acf_maybe_get($field, 'name'))
24
- $field_name = $field['name'];
25
-
26
- ob_start();
27
- ?>
28
- Write your own PHP/HTML content using the following hook:<br /><br />
29
- <pre>
30
- add_action('acf/render_field/name=<?php echo $field_name; ?>', 'my_acf_dynamic_message');
31
- function my_acf_dynamic_message(){
32
-
33
- echo 'Hello World';
34
-
35
- }
36
- </pre>
37
- <?php
38
-
39
- $message = ob_get_clean();
40
-
41
- // field_type
42
- acf_render_field_setting($field, array(
43
- 'label' => __('Instructions','acf'),
44
- 'instructions' => '',
45
- 'type' => 'message',
46
- 'name' => 'instructions',
47
- 'message' => $message,
48
- 'new_lines' => false
49
- ));
50
-
51
- }
52
-
53
- }
54
-
55
- // initialize
56
- acf_register_field_type('acfe_field_dynamic_message');
57
-
58
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('acfe_field_dynamic_message')):
7
+
8
+ class acfe_field_dynamic_message extends acf_field{
9
+
10
+ function __construct(){
11
+
12
+ $this->name = 'acfe_dynamic_message';
13
+ $this->label = __('Dynamic Message', 'acfe');
14
+ $this->category = 'layout';
15
+
16
+ parent::__construct();
17
+
18
+ }
19
+
20
+ function render_field_settings($field){
21
+
22
+ $field_name = 'field_name';
23
+ if(acf_maybe_get($field, 'name'))
24
+ $field_name = $field['name'];
25
+
26
+ ob_start();
27
+ ?>
28
+ Write your own PHP/HTML content using the following hook:<br /><br />
29
+ <pre>
30
+ add_action('acf/render_field/name=<?php echo $field_name; ?>', 'my_acf_dynamic_message');
31
+ function my_acf_dynamic_message(){
32
+
33
+ echo 'Hello World';
34
+
35
+ }
36
+ </pre>
37
+ <?php
38
+
39
+ $message = ob_get_clean();
40
+
41
+ // field_type
42
+ acf_render_field_setting($field, array(
43
+ 'label' => __('Instructions','acf'),
44
+ 'instructions' => '',
45
+ 'type' => 'message',
46
+ 'name' => 'instructions',
47
+ 'message' => $message,
48
+ 'new_lines' => false
49
+ ));
50
+
51
+ }
52
+
53
+ }
54
+
55
+ // initialize
56
+ acf_register_field_type('acfe_field_dynamic_message');
57
+
58
  endif;
includes/fields/field-hidden.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('acfe_field_hidden')):
7
-
8
- class acfe_field_hidden extends acf_field{
9
-
10
- function __construct(){
11
-
12
- $this->name = 'acfe_hidden';
13
- $this->label = __('Hidden', 'acfe');
14
- $this->category = 'basic';
15
- $this->defaults = array(
16
- 'default_value' => ''
17
- );
18
-
19
- parent::__construct();
20
-
21
- }
22
-
23
- function render_field($field){
24
-
25
- ?>
26
- <input type="hidden" name="<?php echo esc_attr($field['name']) ?>" value="<?php echo esc_attr($field['value']) ?>" />
27
- <?php
28
-
29
- }
30
-
31
- function render_field_settings($field){
32
-
33
- // default_value
34
- acf_render_field_setting( $field, array(
35
- 'label' => __('Value','acf'),
36
- 'instructions' => __('Default value in the hidden input','acf'),
37
- 'type' => 'text',
38
- 'name' => 'default_value',
39
- ));
40
-
41
- }
42
-
43
- }
44
-
45
- // initialize
46
- acf_register_field_type('acfe_field_hidden');
47
-
48
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('acfe_field_hidden')):
7
+
8
+ class acfe_field_hidden extends acf_field{
9
+
10
+ function __construct(){
11
+
12
+ $this->name = 'acfe_hidden';
13
+ $this->label = __('Hidden', 'acfe');
14
+ $this->category = 'basic';
15
+ $this->defaults = array(
16
+ 'default_value' => ''
17
+ );
18
+
19
+ parent::__construct();
20
+
21
+ }
22
+
23
+ function render_field($field){
24
+
25
+ ?>
26
+ <input type="hidden" name="<?php echo esc_attr($field['name']) ?>" value="<?php echo esc_attr($field['value']) ?>" />
27
+ <?php
28
+
29
+ }
30
+
31
+ function render_field_settings($field){
32
+
33
+ // default_value
34
+ acf_render_field_setting( $field, array(
35
+ 'label' => __('Value','acf'),
36
+ 'instructions' => __('Default value in the hidden input','acf'),
37
+ 'type' => 'text',
38
+ 'name' => 'default_value',
39
+ ));
40
+
41
+ }
42
+
43
+ }
44
+
45
+ // initialize
46
+ acf_register_field_type('acfe_field_hidden');
47
+
48
  endif;
includes/fields/field-recaptcha.php CHANGED
@@ -218,69 +218,64 @@ class acfe_field_recaptcha extends acf_field{
218
  }
219
 
220
  function validate_value($valid, $value, $field, $input){
221
-
 
 
 
222
  // Expired
223
  if($value === 'expired'){
224
-
225
  return __('reCaptcha has expired.');
226
-
227
- }
228
 
 
 
229
  // Error
230
  elseif($value === 'error'){
231
-
232
  return __('An error has occured.');
233
-
234
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
 
236
- // Only true submission
237
- elseif(!wp_doing_ajax()){
238
-
239
- // Empty & Required
240
- if(empty($value) && $field['required']){
241
-
242
- return $valid;
243
-
244
- }
245
-
246
- // Success
247
- else{
248
-
249
- // Secret key
250
- $secret_key = acf_get_setting('acfe/field/recaptcha/secret_key', $field['secret_key']);
251
-
252
- // API Call
253
- $curl = curl_init();
254
-
255
- curl_setopt($curl, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify?secret={$secret_key}&response={$value}");
256
- curl_setopt($curl, CURLOPT_HEADER, 0);
257
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
258
- $api = curl_exec($curl);
259
-
260
- curl_close($curl);
261
-
262
- // No response
263
- if(empty($api))
264
- return false;
265
-
266
- $response = json_decode($api);
267
-
268
- if($response->success === false){
269
-
270
- $valid = false;
271
-
272
- }
273
-
274
- elseif($response->success === true){
275
-
276
- $valid = true;
277
-
278
- }
279
-
280
- }
281
-
282
  }
 
 
 
 
283
 
 
 
284
  return $valid;
285
 
286
  }
218
  }
219
 
220
  function validate_value($valid, $value, $field, $input){
221
+
222
+ if(!$field['required'])
223
+ return $valid;
224
+
225
  // Expired
226
  if($value === 'expired'){
227
+
228
  return __('reCaptcha has expired.');
 
 
229
 
230
+ }
231
+
232
  // Error
233
  elseif($value === 'error'){
234
+
235
  return __('An error has occured.');
236
+
237
  }
238
+
239
+ // Avoid duplicate token: Do not process during Ajax validation
240
+ if(wp_doing_ajax())
241
+ return $valid;
242
+
243
+ // Secret key
244
+ $secret_key = acf_get_setting('acfe/field/recaptcha/secret_key', $field['secret_key']);
245
+
246
+ // API Call
247
+ $curl = curl_init();
248
+
249
+ curl_setopt($curl, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify?secret={$secret_key}&response={$value}");
250
+ curl_setopt($curl, CURLOPT_HEADER, 0);
251
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
252
+ $api = curl_exec($curl);
253
+
254
+ curl_close($curl);
255
+
256
+ // No API response
257
+ if(empty($api))
258
+ return __('An error has occured.');
259
+
260
+ // Decode
261
+ $response = json_decode($api);
262
+
263
+ // No success
264
+ if(!isset($response->success))
265
+ return __('An error has occured.');
266
+
267
+ if($response->success === false){
268
+
269
+ $valid = false;
270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  }
272
+
273
+ elseif($response->success === true){
274
+
275
+ $valid = true;
276
 
277
+ }
278
+
279
  return $valid;
280
 
281
  }
includes/fields/field-repeater.php CHANGED
@@ -1,62 +1,62 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- /**
7
- * Add Settings
8
- */
9
- add_action('acf/render_field_settings/type=repeater', 'acfe_repeater_settings', 0);
10
- function acfe_repeater_settings($field){
11
-
12
- // Stylised button
13
- acf_render_field_setting($field, array(
14
- 'label' => __('Stylised Button'),
15
- 'name' => 'acfe_repeater_stylised_button',
16
- 'key' => 'acfe_repeater_stylised_button',
17
- 'instructions' => __('Better row button integration'),
18
- 'type' => 'true_false',
19
- 'message' => '',
20
- 'default_value' => false,
21
- 'ui' => true,
22
- ));
23
-
24
- }
25
-
26
- add_filter('acfe/field_wrapper_attributes/type=repeater', 'acfe_repeater_wrapper', 10, 2);
27
- function acfe_repeater_wrapper($wrapper, $field){
28
-
29
- // Stylised button
30
- if(isset($field['acfe_repeater_stylised_button']) && !empty($field['acfe_repeater_stylised_button'])){
31
-
32
- $wrapper['data-acfe-repeater-stylised-button'] = 1;
33
-
34
- }
35
-
36
- // Lock sortable
37
- $acfe_repeater_lock_sortable = false;
38
- $acfe_repeater_lock_sortable = apply_filters('acfe/repeater/lock', $acfe_repeater_lock_sortable, $field);
39
- $acfe_repeater_lock_sortable = apply_filters('acfe/repeater/lock/name=' . $field['_name'], $acfe_repeater_lock_sortable, $field);
40
- $acfe_repeater_lock_sortable = apply_filters('acfe/repeater/lock/key=' . $field['key'], $acfe_repeater_lock_sortable, $field);
41
-
42
- if($acfe_repeater_lock_sortable){
43
-
44
- $wrapper['data-acfe-repeater-lock'] = 1;
45
-
46
- }
47
-
48
- // Remove actions
49
- $acfe_repeater_remove_actions = false;
50
- $acfe_repeater_remove_actions = apply_filters('acfe/repeater/remove_actions', $acfe_repeater_remove_actions, $field);
51
- $acfe_repeater_remove_actions = apply_filters('acfe/repeater/remove_actions/name=' . $field['_name'], $acfe_repeater_remove_actions, $field);
52
- $acfe_repeater_remove_actions = apply_filters('acfe/repeater/remove_actions/key=' . $field['key'], $acfe_repeater_remove_actions, $field);
53
-
54
- if($acfe_repeater_remove_actions){
55
-
56
- $wrapper['data-acfe-repeater-remove-actions'] = 1;
57
-
58
- }
59
-
60
- return $wrapper;
61
-
62
  }
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ /**
7
+ * Add Settings
8
+ */
9
+ add_action('acf/render_field_settings/type=repeater', 'acfe_repeater_settings', 0);
10
+ function acfe_repeater_settings($field){
11
+
12
+ // Stylised button
13
+ acf_render_field_setting($field, array(
14
+ 'label' => __('Stylised Button'),
15
+ 'name' => 'acfe_repeater_stylised_button',
16
+ 'key' => 'acfe_repeater_stylised_button',
17
+ 'instructions' => __('Better row button integration'),
18
+ 'type' => 'true_false',
19
+ 'message' => '',
20
+ 'default_value' => false,
21
+ 'ui' => true,
22
+ ));
23
+
24
+ }
25
+
26
+ add_filter('acfe/field_wrapper_attributes/type=repeater', 'acfe_repeater_wrapper', 10, 2);
27
+ function acfe_repeater_wrapper($wrapper, $field){
28
+
29
+ // Stylised button
30
+ if(isset($field['acfe_repeater_stylised_button']) && !empty($field['acfe_repeater_stylised_button'])){
31
+
32
+ $wrapper['data-acfe-repeater-stylised-button'] = 1;
33
+
34
+ }
35
+
36
+ // Lock sortable
37
+ $acfe_repeater_lock_sortable = false;
38
+ $acfe_repeater_lock_sortable = apply_filters('acfe/repeater/lock', $acfe_repeater_lock_sortable, $field);
39
+ $acfe_repeater_lock_sortable = apply_filters('acfe/repeater/lock/name=' . $field['_name'], $acfe_repeater_lock_sortable, $field);
40
+ $acfe_repeater_lock_sortable = apply_filters('acfe/repeater/lock/key=' . $field['key'], $acfe_repeater_lock_sortable, $field);
41
+
42
+ if($acfe_repeater_lock_sortable){
43
+
44
+ $wrapper['data-acfe-repeater-lock'] = 1;
45
+
46
+ }
47
+
48
+ // Remove actions
49
+ $acfe_repeater_remove_actions = false;
50
+ $acfe_repeater_remove_actions = apply_filters('acfe/repeater/remove_actions', $acfe_repeater_remove_actions, $field);
51
+ $acfe_repeater_remove_actions = apply_filters('acfe/repeater/remove_actions/name=' . $field['_name'], $acfe_repeater_remove_actions, $field);
52
+ $acfe_repeater_remove_actions = apply_filters('acfe/repeater/remove_actions/key=' . $field['key'], $acfe_repeater_remove_actions, $field);
53
+
54
+ if($acfe_repeater_remove_actions){
55
+
56
+ $wrapper['data-acfe-repeater-remove-actions'] = 1;
57
+
58
+ }
59
+
60
+ return $wrapper;
61
+
62
  }
includes/fields/field-slug.php CHANGED
@@ -1,105 +1,105 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('acfe_field_slug')):
7
-
8
- class acfe_field_slug extends acf_field{
9
-
10
- function __construct(){
11
-
12
- $this->name = 'acfe_slug';
13
- $this->label = __('Slug', 'acfe');
14
- $this->category = 'basic';
15
- $this->defaults = array(
16
- 'default_value' => '',
17
- 'maxlength' => '',
18
- 'placeholder' => '',
19
- 'prepend' => '',
20
- 'append' => ''
21
- );
22
-
23
- parent::__construct();
24
-
25
- }
26
-
27
- function render_field($field){
28
-
29
- $field['type'] = 'text';
30
-
31
- acf_get_field_type('text')->render_field($field);
32
-
33
- }
34
-
35
- function render_field_settings($field){
36
-
37
- // default_value
38
- acf_render_field_setting($field, array(
39
- 'label' => __('Default Value','acf'),
40
- 'instructions' => __('Appears when creating a new post','acf'),
41
- 'type' => 'text',
42
- 'name' => 'default_value',
43
- ));
44
-
45
-
46
- // placeholder
47
- acf_render_field_setting($field, array(
48
- 'label' => __('Placeholder Text','acf'),
49
- 'instructions' => __('Appears within the input','acf'),
50
- 'type' => 'text',
51
- 'name' => 'placeholder',
52
- ));
53
-
54
-
55
- // prepend
56
- acf_render_field_setting($field, array(
57
- 'label' => __('Prepend','acf'),
58
- 'instructions' => __('Appears before the input','acf'),
59
- 'type' => 'text',
60
- 'name' => 'prepend',
61
- ));
62
-
63
-
64
- // append
65
- acf_render_field_setting($field, array(
66
- 'label' => __('Append','acf'),
67
- 'instructions' => __('Appears after the input','acf'),
68
- 'type' => 'text',
69
- 'name' => 'append',
70
- ));
71
-
72
-
73
- // maxlength
74
- acf_render_field_setting($field, array(
75
- 'label' => __('Character Limit','acf'),
76
- 'instructions' => __('Leave blank for no limit','acf'),
77
- 'type' => 'number',
78
- 'name' => 'maxlength',
79
- ));
80
-
81
- }
82
-
83
- function validate_value($valid, $value, $field, $input){
84
-
85
- $value = sanitize_title($value);
86
-
87
- if($field['maxlength'] && mb_strlen(wp_unslash($value)) > $field['maxlength'])
88
- return sprintf(__('Value must not exceed %d characters', 'acf'), $field['maxlength']);
89
-
90
- return $valid;
91
-
92
- }
93
-
94
- function update_value($value, $post_id, $field){
95
-
96
- return sanitize_title($value);
97
-
98
- }
99
-
100
- }
101
-
102
- // initialize
103
- acf_register_field_type('acfe_field_slug');
104
-
105
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('acfe_field_slug')):
7
+
8
+ class acfe_field_slug extends acf_field{
9
+
10
+ function __construct(){
11
+
12
+ $this->name = 'acfe_slug';
13
+ $this->label = __('Slug', 'acfe');
14
+ $this->category = 'basic';
15
+ $this->defaults = array(
16
+ 'default_value' => '',
17
+ 'maxlength' => '',
18
+ 'placeholder' => '',
19
+ 'prepend' => '',
20
+ 'append' => ''
21
+ );
22
+
23
+ parent::__construct();
24
+
25
+ }
26
+
27
+ function render_field($field){
28
+
29
+ $field['type'] = 'text';
30
+
31
+ acf_get_field_type('text')->render_field($field);
32
+
33
+ }
34
+
35
+ function render_field_settings($field){
36
+
37
+ // default_value
38
+ acf_render_field_setting($field, array(
39
+ 'label' => __('Default Value','acf'),
40
+ 'instructions' => __('Appears when creating a new post','acf'),
41
+ 'type' => 'text',
42
+ 'name' => 'default_value',
43
+ ));
44
+
45
+
46
+ // placeholder
47
+ acf_render_field_setting($field, array(
48
+ 'label' => __('Placeholder Text','acf'),
49
+ 'instructions' => __('Appears within the input','acf'),
50
+ 'type' => 'text',
51
+ 'name' => 'placeholder',
52
+ ));
53
+
54
+
55
+ // prepend
56
+ acf_render_field_setting($field, array(
57
+ 'label' => __('Prepend','acf'),
58
+ 'instructions' => __('Appears before the input','acf'),
59
+ 'type' => 'text',
60
+ 'name' => 'prepend',
61
+ ));
62
+
63
+
64
+ // append
65
+ acf_render_field_setting($field, array(
66
+ 'label' => __('Append','acf'),
67
+ 'instructions' => __('Appears after the input','acf'),
68
+ 'type' => 'text',
69
+ 'name' => 'append',
70
+ ));
71
+
72
+
73
+ // maxlength
74
+ acf_render_field_setting($field, array(
75
+ 'label' => __('Character Limit','acf'),
76
+ 'instructions' => __('Leave blank for no limit','acf'),
77
+ 'type' => 'number',
78
+ 'name' => 'maxlength',
79
+ ));
80
+
81
+ }
82
+
83
+ function validate_value($valid, $value, $field, $input){
84
+
85
+ $value = sanitize_title($value);
86
+
87
+ if($field['maxlength'] && mb_strlen(wp_unslash($value)) > $field['maxlength'])
88
+ return sprintf(__('Value must not exceed %d characters', 'acf'), $field['maxlength']);
89
+
90
+ return $valid;
91
+
92
+ }
93
+
94
+ function update_value($value, $post_id, $field){
95
+
96
+ return sanitize_title($value);
97
+
98
+ }
99
+
100
+ }
101
+
102
+ // initialize
103
+ acf_register_field_type('acfe_field_slug');
104
+
105
  endif;
includes/fields/field-textarea.php CHANGED
@@ -1,50 +1,50 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- // Settings
7
- add_action('acf/render_field_settings/type=textarea', 'acfe_field_textarea_settings');
8
- function acfe_field_textarea_settings($field){
9
-
10
- acf_render_field_setting($field, array(
11
- 'label' => __('Code mode'),
12
- 'name' => 'acfe_textarea_code',
13
- 'key' => 'acfe_textarea_code',
14
- 'instructions' => __('Switch font family to monospace and allow tab indent. For a more advanced code editor, please use the <code>Code Editor</code> field type'),
15
- 'type' => 'true_false',
16
- 'ui' => 1,
17
- ));
18
-
19
- }
20
-
21
- // Field wrapper
22
- add_filter('acfe/field_wrapper_attributes/type=textarea', 'acfe_field_textarea_wrapper', 10, 2);
23
- function acfe_field_textarea_wrapper($wrapper, $field){
24
-
25
- if(acf_maybe_get($field, 'acfe_textarea_code')){
26
-
27
- $wrapper['data-acfe-textarea-code'] = 1;
28
-
29
- }
30
-
31
- return $wrapper;
32
-
33
- }
34
-
35
- add_filter('acf/prepare_field/name=new_lines', 'acfe_field_textarea_new_lines');
36
- function acfe_field_textarea_new_lines($field){
37
-
38
- $field['conditional_logic'] = array(
39
- array(
40
- array(
41
- 'field' => 'acfe_textarea_code',
42
- 'operator' => '!=',
43
- 'value' => '1'
44
- )
45
- )
46
- );
47
-
48
- return $field;
49
-
50
  }
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ // Settings
7
+ add_action('acf/render_field_settings/type=textarea', 'acfe_field_textarea_settings');
8
+ function acfe_field_textarea_settings($field){
9
+
10
+ acf_render_field_setting($field, array(
11
+ 'label' => __('Code mode'),
12
+ 'name' => 'acfe_textarea_code',
13
+ 'key' => 'acfe_textarea_code',
14
+ 'instructions' => __('Switch font family to monospace and allow tab indent. For a more advanced code editor, please use the <code>Code Editor</code> field type'),
15
+ 'type' => 'true_false',
16
+ 'ui' => 1,
17
+ ));
18
+
19
+ }
20
+
21
+ // Field wrapper
22
+ add_filter('acfe/field_wrapper_attributes/type=textarea', 'acfe_field_textarea_wrapper', 10, 2);
23
+ function acfe_field_textarea_wrapper($wrapper, $field){
24
+
25
+ if(acf_maybe_get($field, 'acfe_textarea_code')){
26
+
27
+ $wrapper['data-acfe-textarea-code'] = 1;
28
+
29
+ }
30
+
31
+ return $wrapper;
32
+
33
+ }
34
+
35
+ add_filter('acf/prepare_field/name=new_lines', 'acfe_field_textarea_new_lines');
36
+ function acfe_field_textarea_new_lines($field){
37
+
38
+ $field['conditional_logic'] = array(
39
+ array(
40
+ array(
41
+ 'field' => 'acfe_textarea_code',
42
+ 'operator' => '!=',
43
+ 'value' => '1'
44
+ )
45
+ )
46
+ );
47
+
48
+ return $field;
49
+
50
  }
includes/locations/post-type-all.php CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- /**
7
- * ACFE Location: Post Type All Choices
8
- */
9
- add_filter('acf/location/rule_values/post_type', 'acfe_location_post_type_all_choices');
10
- function acfe_location_post_type_all_choices($choices){
11
-
12
- $choices = array_merge(array('all' => __('All', 'acf')), $choices);
13
-
14
- return $choices;
15
-
16
- }
17
-
18
- /**
19
- * ACFE Location: Post Type All Matching
20
- */
21
- add_filter('acf/location/rule_match/post_type', 'acfe_location_post_type_all_match', 10, 3);
22
- function acfe_location_post_type_all_match($match, $rule, $options){
23
-
24
- if($rule['value'] !== 'all')
25
- return $match;
26
-
27
- if(!acf_maybe_get($options, 'post_type'))
28
- return $match;
29
-
30
- $post_types = acf_get_post_types();
31
-
32
- $match = in_array($options['post_type'], $post_types);
33
-
34
- if($rule['operator'] === '!=')
35
- $match = !$match;
36
-
37
- return $match;
38
-
39
  }
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ /**
7
+ * ACFE Location: Post Type All Choices
8
+ */
9
+ add_filter('acf/location/rule_values/post_type', 'acfe_location_post_type_all_choices');
10
+ function acfe_location_post_type_all_choices($choices){
11
+
12
+ $choices = array_merge(array('all' => __('All', 'acf')), $choices);
13
+
14
+ return $choices;
15
+
16
+ }
17
+
18
+ /**
19
+ * ACFE Location: Post Type All Matching
20
+ */
21
+ add_filter('acf/location/rule_match/post_type', 'acfe_location_post_type_all_match', 10, 3);
22
+ function acfe_location_post_type_all_match($match, $rule, $options){
23
+
24
+ if($rule['value'] !== 'all')
25
+ return $match;
26
+
27
+ if(!acf_maybe_get($options, 'post_type'))
28
+ return $match;
29
+
30
+ $post_types = acf_get_post_types();
31
+
32
+ $match = in_array($options['post_type'], $post_types);
33
+
34
+ if($rule['operator'] === '!=')
35
+ $match = !$match;
36
+
37
+ return $match;
38
+
39
  }
includes/locations/post-type-list.php CHANGED
@@ -1,428 +1,428 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('acfe_location_post_type_list')):
7
-
8
- class acfe_location_post_type_list{
9
-
10
- public $post_type;
11
-
12
- public $field_groups;
13
-
14
- function __construct(){
15
-
16
- add_action('load-edit.php', array($this, 'load'));
17
-
18
- add_filter('acf/location/rule_types', array($this, 'location_types'));
19
- add_filter('acf/location/rule_values/post_type_list', array($this, 'location_values'));
20
- add_filter('acf/location/rule_match/post_type_list', array($this, 'location_match'), 10, 3);
21
-
22
- }
23
-
24
- function load(){
25
-
26
- // Get post type
27
- global $typenow;
28
-
29
- $get_post_types = acf_get_post_types(array(
30
- 'show_ui' => 1,
31
- 'exclude' => array('attachment')
32
- ));
33
-
34
- // Check post type
35
- if(!in_array($typenow, $get_post_types))
36
- return;
37
-
38
- // vars
39
- $this->post_type = $typenow;
40
-
41
- $this->post_id = acf_get_valid_post_id($this->post_type . '_options');
42
-
43
- $this->field_groups = acf_get_field_groups(array(
44
- 'post_type_list' => $this->post_type
45
- ));
46
-
47
- if(empty($this->field_groups))
48
- return;
49
-
50
- // Submit
51
- if(acf_verify_nonce('post_type_list')){
52
-
53
- // Validate
54
- if(acf_validate_save_post(true)){
55
-
56
- // Autoload
57
- acf_update_setting('autoload', false);
58
-
59
- // Save
60
- acf_save_post($this->post_id);
61
-
62
- // Redirect
63
- wp_redirect(add_query_arg(array('message' => 'acfe_post_type_list')));
64
- exit;
65
-
66
- }
67
-
68
- }
69
-
70
- // Enqueue ACF JS
71
- acf_enqueue_scripts();
72
-
73
- // Success message
74
- if(isset($_GET['message']) && $_GET['message'] === 'acfe_post_type_list'){
75
-
76
- $object = get_post_type_object($this->post_type);
77
-
78
- acf_add_admin_notice($object->label . ' List Saved.', 'success');
79
-
80
- }
81
-
82
- add_action('in_admin_header', array($this, 'in_admin_header'));
83
-
84
- add_action('admin_footer', array($this, 'admin_footer'));
85
-
86
- }
87
-
88
- function admin_footer(){
89
-
90
- // Init field groups by position
91
- $field_groups = array();
92
-
93
- foreach($this->field_groups as $field_group){
94
-
95
- $field_groups[$field_group['position']][] = $field_group;
96
-
97
- }
98
-
99
- // Position: After Title
100
- if(acf_maybe_get($field_groups, 'acf_after_title')){
101
-
102
- $total = count($field_groups['acf_after_title']);
103
-
104
- $current = 0; foreach($field_groups['acf_after_title'] as $field_group){ $current++;
105
-
106
- add_meta_box(
107
-
108
- // ID
109
- 'acf-' . $field_group['ID'],
110
-
111
- // Title
112
- $field_group['title'],
113
-
114
- // Render
115
- array($this, 'metabox_render'),
116
-
117
- // Screen
118
- 'edit',
119
-
120
- // Position
121
- $field_group['position'],
122
-
123
- // Priority
124
- 'default',
125
-
126
- // Args
127
- array(
128
- 'total' => $total,
129
- 'current' => $current,
130
- 'field_group' => $field_group
131
- )
132
-
133
- );
134
-
135
- }
136
-
137
- ?>
138
- <div id="tmpl-acf-after-title" class="acfe-postbox acfe-postbox-no-handle">
139
- <form class="acf-form" action="" method="post">
140
-
141
- <div id="poststuff" style="padding-top:0;">
142
-
143
- <?php do_meta_boxes('edit', 'acf_after_title', array()); ?>
144
-
145
- </div>
146
-
147
- </form>
148
- </div>
149
- <script type="text/javascript">
150
- (function($){
151
-
152
- // add after title
153
- $('.subsubsub').before($('#tmpl-acf-after-title'));
154
-
155
- })(jQuery);
156
- </script>
157
- <?php
158
-
159
- }
160
-
161
- // Position: Normal
162
- if(acf_maybe_get($field_groups, 'normal')){
163
-
164
- $total = count($field_groups['normal']);
165
-
166
- $current = 0; foreach($field_groups['normal'] as $field_group){ $current++;
167
-
168
- add_meta_box(
169
-
170
- // ID
171
- 'acf-' . $field_group['ID'],
172
-
173
- // Title
174
- $field_group['title'],
175
-
176
- // Render
177
- array($this, 'metabox_render'),
178
-
179
- // Screen
180
- 'edit',
181
-
182
- // Position
183
- $field_group['position'],
184
-
185
- // Priority
186
- 'default',
187
-
188
- // Args
189
- array(
190
- 'total' => $total,
191
- 'current' => $current,
192
- 'field_group' => $field_group
193
- )
194
-
195
- );
196
-
197
- }
198
-
199
- ?>
200
- <div id="tmpl-acf-normal" class="acfe-postbox acfe-postbox-no-handle">
201
- <form class="acf-form" action="" method="post">
202
-
203
- <div id="poststuff">
204
-
205
- <?php do_meta_boxes('edit', 'normal', array()); ?>
206
-
207
- </div>
208
-
209
- </form>
210
- </div>
211
- <script type="text/javascript">
212
- (function($){
213
-
214
- // add normal
215
- $('#posts-filter').after($('#tmpl-acf-normal'));
216
-
217
- })(jQuery);
218
- </script>
219
- <?php
220
-
221
- }
222
-
223
- // Position: Side
224
- if(acf_maybe_get($field_groups, 'side')){
225
-
226
- $total = count($field_groups['side']);
227
-
228
- $current = 0; foreach($field_groups['side'] as $field_group){ $current++;
229
-
230
- add_meta_box(
231
-
232
- // ID
233
- 'acf-' . $field_group['ID'],
234
-
235
- // Title
236
- $field_group['title'],
237
-
238
- // Render
239
- array($this, 'metabox_render'),
240
-
241
- // Screen
242
- 'edit',
243
-
244
- // Position
245
- $field_group['position'],
246
-
247
- // Priority
248
- 'default',
249
-
250
- // Args
251
- array(
252
- 'total' => $total,
253
- 'current' => $current,
254
- 'field_group' => $field_group
255
- )
256
-
257
- );
258
-
259
- }
260
-
261
- ?>
262
- <div id="tmpl-acf-side" class="acfe-postbox acfe-postbox-no-handle">
263
- <div class="acf-column-2">
264
- <form class="acf-form" action="" method="post">
265
-
266
- <div id="poststuff" style="padding-top:0; min-width:auto;">
267
-
268
- <?php do_meta_boxes('edit', 'side', array()); ?>
269
-
270
- </div>
271
-
272
- </form>
273
- </div>
274
- </div>
275
- <script type="text/javascript">
276
- (function($){
277
-
278
- // wrap form
279
- $('#posts-filter').wrap('<div class="acf-columns-2" />');
280
-
281
- // Move subsubsub inside column
282
- $('#posts-filter').prepend($('.subsubsub'));
283
-
284
- // Move After title field group
285
- $('#posts-filter').prepend($('#tmpl-acf-after-title'));
286
-
287
- // Move Normal field group
288
- $('#posts-filter').append($('#tmpl-acf-normal'));
289
-
290
- // add column main
291
- $('#posts-filter').addClass('acf-column-1');
292
-
293
- // add column side
294
- $('#posts-filter').after($('#tmpl-acf-side'));
295
-
296
- })(jQuery);
297
- </script>
298
- <?php
299
-
300
- }
301
-
302
- }
303
-
304
- function metabox_render($array, $args){
305
-
306
- $total = $args['args']['total'];
307
- $current = $args['args']['current'];
308
- $field_group = $args['args']['field_group'];
309
-
310
- // Set post_id
311
- $post_id = $this->post_id;
312
-
313
- // Set form data
314
- acf_form_data(array(
315
- 'screen' => 'post_type_list',
316
- 'post_id' => $post_id,
317
- ));
318
-
319
- // Get fields
320
- $fields = acf_get_fields($field_group);
321
-
322
- // Render fields
323
- acf_render_fields($fields, $post_id, 'div', $field_group['instruction_placement']);
324
-
325
- if($current === $total){ ?>
326
-
327
- <?php
328
- $id = ($field_group['style'] != 'seamless') ? 'major-publishing-actions' : '';
329
- $style = ($field_group['style'] === 'seamless') ? 'padding:0 12px;' : '';
330
- ?>
331
-
332
- <div id="<?php echo $id; ?>" style="<?php echo $style; ?>">
333
-
334
- <div id="publishing-action">
335
-
336
- <div class="acf-form-submit">
337
- <input type="submit" class="acf-button button button-primary button-large" value="<?php _e('Update', 'acfe'); ?>" />
338
- <span class="acf-spinner"></span>
339
- </div>
340
-
341
- </div>
342
- <div class="clear"></div>
343
-
344
- </div>
345
-
346
- <?php }
347
-
348
- // Create metabox localized data.
349
- $data = array(
350
- 'id' => 'acf-' . $field_group['ID'],
351
- 'key' => $field_group['key'],
352
- 'style' => $field_group['style'],
353
- 'label' => $field_group['label_placement'],
354
- 'edit' => acf_get_field_group_edit_link($field_group['ID'])
355
- );
356
-
357
- ?>
358
- <script type="text/javascript">
359
- if( typeof acf !== 'undefined' ) {
360
- acf.newPostbox(<?php echo wp_json_encode($data); ?>);
361
- }
362
- </script>
363
-
364
- <?php
365
-
366
- }
367
-
368
- function in_admin_header(){
369
-
370
- acf_enqueue_uploader();
371
-
372
- }
373
-
374
- function location_types($choices){
375
-
376
- $name = __('Post', 'acf');
377
-
378
- $choices[$name] = acfe_array_insert_after('post_type', $choices[$name], 'post_type_list', __('Post Type List'));
379
-
380
- return $choices;
381
-
382
- }
383
-
384
-
385
- function location_values($choices){
386
-
387
- $post_types = acf_get_post_types(array(
388
- 'show_ui' => 1,
389
- 'exclude' => array('attachment')
390
- ));
391
-
392
- $pretty_post_types = array();
393
-
394
- if(!empty($post_types)){
395
-
396
- $pretty_post_types = acf_get_pretty_post_types($post_types);
397
-
398
- }
399
-
400
- $choices = array('all' => __('All', 'acf'));
401
- $choices = array_merge($choices, $pretty_post_types);
402
-
403
- return $choices;
404
-
405
- }
406
-
407
- function location_match($match, $rule, $screen){
408
-
409
- if(!acf_maybe_get($screen, 'post_type_list') || !acf_maybe_get($rule, 'value'))
410
- return $match;
411
-
412
- $match = ($screen['post_type_list'] === $rule['value']);
413
-
414
- if($rule['value'] === 'all')
415
- $match = true;
416
-
417
- if($rule['operator'] === '!=')
418
- $match = !$match;
419
-
420
- return $match;
421
-
422
- }
423
-
424
- }
425
-
426
- new acfe_location_post_type_list();
427
-
428
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('acfe_location_post_type_list')):
7
+
8
+ class acfe_location_post_type_list{
9
+
10
+ public $post_type;
11
+
12
+ public $field_groups;
13
+
14
+ function __construct(){
15
+
16
+ add_action('load-edit.php', array($this, 'load'));
17
+
18
+ add_filter('acf/location/rule_types', array($this, 'location_types'));
19
+ add_filter('acf/location/rule_values/post_type_list', array($this, 'location_values'));
20
+ add_filter('acf/location/rule_match/post_type_list', array($this, 'location_match'), 10, 3);
21
+
22
+ }
23
+
24
+ function load(){
25
+
26
+ // Get post type
27
+ global $typenow;
28
+
29
+ $get_post_types = acf_get_post_types(array(
30
+ 'show_ui' => 1,
31
+ 'exclude' => array('attachment')
32
+ ));
33
+
34
+ // Check post type
35
+ if(!in_array($typenow, $get_post_types))
36
+ return;
37
+
38
+ // vars
39
+ $this->post_type = $typenow;
40
+
41
+ $this->post_id = acf_get_valid_post_id($this->post_type . '_options');
42
+
43
+ $this->field_groups = acf_get_field_groups(array(
44
+ 'post_type_list' => $this->post_type
45
+ ));
46
+
47
+ if(empty($this->field_groups))
48
+ return;
49
+
50
+ // Submit
51
+ if(acf_verify_nonce('post_type_list')){
52
+
53
+ // Validate
54
+ if(acf_validate_save_post(true)){
55
+
56
+ // Autoload
57
+ acf_update_setting('autoload', false);
58
+
59
+ // Save
60
+ acf_save_post($this->post_id);
61
+
62
+ // Redirect
63
+ wp_redirect(add_query_arg(array('message' => 'acfe_post_type_list')));
64
+ exit;
65
+
66
+ }
67
+
68
+ }
69
+
70
+ // Enqueue ACF JS
71
+ acf_enqueue_scripts();
72
+
73
+ // Success message
74
+ if(isset($_GET['message']) && $_GET['message'] === 'acfe_post_type_list'){
75
+
76
+ $object = get_post_type_object($this->post_type);
77
+
78
+ acf_add_admin_notice($object->label . ' List Saved.', 'success');
79
+
80
+ }
81
+
82
+ add_action('in_admin_header', array($this, 'in_admin_header'));
83
+
84
+ add_action('admin_footer', array($this, 'admin_footer'));
85
+
86
+ }
87
+
88
+ function admin_footer(){
89
+
90
+ // Init field groups by position
91
+ $field_groups = array();
92
+
93
+ foreach($this->field_groups as $field_group){
94
+
95
+ $field_groups[$field_group['position']][] = $field_group;
96
+
97
+ }
98
+
99
+ // Position: After Title
100
+ if(acf_maybe_get($field_groups, 'acf_after_title')){
101
+
102
+ $total = count($field_groups['acf_after_title']);
103
+
104
+ $current = 0; foreach($field_groups['acf_after_title'] as $field_group){ $current++;
105
+
106
+ add_meta_box(
107
+
108
+ // ID
109
+ 'acf-' . $field_group['ID'],
110
+
111
+ // Title
112
+ $field_group['title'],
113
+
114
+ // Render
115
+ array($this, 'metabox_render'),
116
+
117
+ // Screen
118
+ 'edit',
119
+
120
+ // Position
121
+ $field_group['position'],
122
+
123
+ // Priority
124
+ 'default',
125
+
126
+ // Args
127
+ array(
128
+ 'total' => $total,
129
+ 'current' => $current,
130
+ 'field_group' => $field_group
131
+ )
132
+
133
+ );
134
+
135
+ }
136
+
137
+ ?>
138
+ <div id="tmpl-acf-after-title" class="acfe-postbox acfe-postbox-no-handle">
139
+ <form class="acf-form" action="" method="post">
140
+
141
+ <div id="poststuff" style="padding-top:0;">
142
+
143
+ <?php do_meta_boxes('edit', 'acf_after_title', array()); ?>
144
+
145
+ </div>
146
+
147
+ </form>
148
+ </div>
149
+ <script type="text/javascript">
150
+ (function($){
151
+
152
+ // add after title
153
+ $('.subsubsub').before($('#tmpl-acf-after-title'));
154
+
155
+ })(jQuery);
156
+ </script>
157
+ <?php
158
+
159
+ }
160
+
161
+ // Position: Normal
162
+ if(acf_maybe_get($field_groups, 'normal')){
163
+
164
+ $total = count($field_groups['normal']);
165
+
166
+ $current = 0; foreach($field_groups['normal'] as $field_group){ $current++;
167
+
168
+ add_meta_box(
169
+
170
+ // ID
171
+ 'acf-' . $field_group['ID'],
172
+
173
+ // Title
174
+ $field_group['title'],
175
+
176
+ // Render
177
+ array($this, 'metabox_render'),
178
+
179
+ // Screen
180
+ 'edit',
181
+
182
+ // Position
183
+ $field_group['position'],
184
+
185
+ // Priority
186
+ 'default',
187
+
188
+ // Args
189
+ array(
190
+ 'total' => $total,
191
+ 'current' => $current,
192
+ 'field_group' => $field_group
193
+ )
194
+
195
+ );
196
+
197
+ }
198
+
199
+ ?>
200
+ <div id="tmpl-acf-normal" class="acfe-postbox acfe-postbox-no-handle">
201
+ <form class="acf-form" action="" method="post">
202
+
203
+ <div id="poststuff">
204
+
205
+ <?php do_meta_boxes('edit', 'normal', array()); ?>
206
+
207
+ </div>
208
+
209
+ </form>
210
+ </div>
211
+ <script type="text/javascript">
212
+ (function($){
213
+
214
+ // add normal
215
+ $('#posts-filter').after($('#tmpl-acf-normal'));
216
+
217
+ })(jQuery);
218
+ </script>
219
+ <?php
220
+
221
+ }
222
+
223
+ // Position: Side
224
+ if(acf_maybe_get($field_groups, 'side')){
225
+
226
+ $total = count($field_groups['side']);
227
+
228
+ $current = 0; foreach($field_groups['side'] as $field_group){ $current++;
229
+
230
+ add_meta_box(
231
+
232
+ // ID
233
+ 'acf-' . $field_group['ID'],
234
+
235
+ // Title
236
+ $field_group['title'],
237
+
238
+ // Render
239
+ array($this, 'metabox_render'),
240
+
241
+ // Screen
242
+ 'edit',
243
+
244
+ // Position
245
+ $field_group['position'],
246
+
247
+ // Priority
248
+ 'default',
249
+
250
+ // Args
251
+ array(
252
+ 'total' => $total,
253
+ 'current' => $current,
254
+ 'field_group' => $field_group
255
+ )
256
+
257
+ );
258
+
259
+ }
260
+
261
+ ?>
262
+ <div id="tmpl-acf-side" class="acfe-postbox acfe-postbox-no-handle">
263
+ <div class="acf-column-2">
264
+ <form class="acf-form" action="" method="post">
265
+
266
+ <div id="poststuff" style="padding-top:0; min-width:auto;">
267
+
268
+ <?php do_meta_boxes('edit', 'side', array()); ?>
269
+
270
+ </div>
271
+
272
+ </form>
273
+ </div>
274
+ </div>
275
+ <script type="text/javascript">
276
+ (function($){
277
+
278
+ // wrap form
279
+ $('#posts-filter').wrap('<div class="acf-columns-2" />');
280
+
281
+ // Move subsubsub inside column
282
+ $('#posts-filter').prepend($('.subsubsub'));
283
+
284
+ // Move After title field group
285
+ $('#posts-filter').prepend($('#tmpl-acf-after-title'));
286
+
287
+ // Move Normal field group
288
+ $('#posts-filter').append($('#tmpl-acf-normal'));
289
+
290
+ // add column main
291
+ $('#posts-filter').addClass('acf-column-1');
292
+
293
+ // add column side
294
+ $('#posts-filter').after($('#tmpl-acf-side'));
295
+
296
+ })(jQuery);
297
+ </script>
298
+ <?php
299
+
300
+ }
301
+
302
+ }
303
+
304
+ function metabox_render($array, $args){
305
+
306
+ $total = $args['args']['total'];
307
+ $current = $args['args']['current'];
308
+ $field_group = $args['args']['field_group'];
309
+
310
+ // Set post_id
311
+ $post_id = $this->post_id;
312
+
313
+ // Set form data
314
+ acf_form_data(array(
315
+ 'screen' => 'post_type_list',
316
+ 'post_id' => $post_id,
317
+ ));
318
+
319
+ // Get fields
320
+ $fields = acf_get_fields($field_group);
321
+
322
+ // Render fields
323
+ acf_render_fields($fields, $post_id, 'div', $field_group['instruction_placement']);
324
+
325
+ if($current === $total){ ?>
326
+
327
+ <?php
328
+ $id = ($field_group['style'] != 'seamless') ? 'major-publishing-actions' : '';
329
+ $style = ($field_group['style'] === 'seamless') ? 'padding:0 12px;' : '';
330
+ ?>
331
+
332
+ <div id="<?php echo $id; ?>" style="<?php echo $style; ?>">
333
+
334
+ <div id="publishing-action">
335
+
336
+ <div class="acf-form-submit">
337
+ <input type="submit" class="acf-button button button-primary button-large" value="<?php _e('Update', 'acfe'); ?>" />
338
+ <span class="acf-spinner"></span>
339
+ </div>
340
+
341
+ </div>
342
+ <div class="clear"></div>
343
+
344
+ </div>
345
+
346
+ <?php }
347
+
348
+ // Create metabox localized data.
349
+ $data = array(
350
+ 'id' => 'acf-' . $field_group['ID'],
351
+ 'key' => $field_group['key'],
352
+ 'style' => $field_group['style'],
353
+ 'label' => $field_group['label_placement'],
354
+ 'edit' => acf_get_field_group_edit_link($field_group['ID'])
355
+ );
356
+
357
+ ?>
358
+ <script type="text/javascript">
359
+ if( typeof acf !== 'undefined' ) {
360
+ acf.newPostbox(<?php echo wp_json_encode($data); ?>);
361
+ }
362
+ </script>
363
+
364
+ <?php
365
+
366
+ }
367
+
368
+ function in_admin_header(){
369
+
370
+ acf_enqueue_uploader();
371
+
372
+ }
373
+
374
+ function location_types($choices){
375
+
376
+ $name = __('Post', 'acf');
377
+
378
+ $choices[$name] = acfe_array_insert_after('post_type', $choices[$name], 'post_type_list', __('Post Type List'));
379
+
380
+ return $choices;
381
+
382
+ }
383
+
384
+
385
+ function location_values($choices){
386
+
387
+ $post_types = acf_get_post_types(array(
388
+ 'show_ui' => 1,
389
+ 'exclude' => array('attachment')
390
+ ));
391
+
392
+ $pretty_post_types = array();
393
+
394
+ if(!empty($post_types)){
395
+
396
+ $pretty_post_types = acf_get_pretty_post_types($post_types);
397
+
398
+ }
399
+
400
+ $choices = array('all' => __('All', 'acf'));
401
+ $choices = array_merge($choices, $pretty_post_types);
402
+
403
+ return $choices;
404
+
405
+ }
406
+
407
+ function location_match($match, $rule, $screen){
408
+
409
+ if(!acf_maybe_get($screen, 'post_type_list') || !acf_maybe_get($rule, 'value'))
410
+ return $match;
411
+
412
+ $match = ($screen['post_type_list'] === $rule['value']);
413
+
414
+ if($rule['value'] === 'all')
415
+ $match = true;
416
+
417
+ if($rule['operator'] === '!=')
418
+ $match = !$match;
419
+
420
+ return $match;
421
+
422
+ }
423
+
424
+ }
425
+
426
+ new acfe_location_post_type_list();
427
+
428
  endif;
includes/locations/taxonomy-list.php CHANGED
@@ -1,405 +1,405 @@
1
- <?php
2
-
3
- if(!defined('ABSPATH'))
4
- exit;
5
-
6
- if(!class_exists('acfe_location_taxonomy_list')):
7
-
8
- class acfe_location_taxonomy_list{
9
-
10
- public $taxonomy;
11
-
12
- public $field_groups;
13
-
14
- function __construct(){
15
-
16
- add_action('load-edit-tags.php', array($this, 'load'));
17
-
18
- add_filter('acf/location/rule_types', array($this, 'location_types'));
19
- add_filter('acf/location/rule_values/taxonomy_list', array($this, 'location_values'));
20
- add_filter('acf/location/rule_match/taxonomy_list', array($this, 'location_match'), 10, 3);
21
-
22
- }
23
-
24
- function load(){
25
-
26
- // Get page
27
- global $pagenow;
28
-
29
- if($pagenow === 'term.php')
30
- return;
31
-
32
- // Get taxonomy
33
- global $taxnow;
34
-
35
- // Check taxonomies
36
- if(!in_array($taxnow, acf_get_taxonomies()))
37
- return;
38
-
39
- $this->taxonomy = $taxnow;
40
-
41
- $this->post_id = acf_get_valid_post_id('tax_' . $this->taxonomy . '_options');
42
-
43
- $this->field_groups = acf_get_field_groups(array(
44
- 'taxonomy_list' => $this->taxonomy
45
- ));
46
-
47
- if(empty($this->field_groups))
48
- return;
49
-
50
- // Submit
51
- if(acf_verify_nonce('taxonomy_list')){
52
-
53
- // Validate
54
- if(acf_validate_save_post(true)){
55
-
56
- // Autoload
57
- acf_update_setting('autoload', false);
58
-
59
- // Save
60
- acf_save_post($this->post_id);
61
-
62
- // Redirect
63
- wp_redirect(add_query_arg(array('message' => 'acfe_taxonomy_list')));
64
- exit;
65
-
66
- }
67
-
68
- }
69
-
70
- // Enqueue ACF JS
71
- acf_enqueue_scripts();
72
-
73
- // Success message
74
- if(isset($_GET['message']) && $_GET['message'] === 'acfe_taxonomy_list'){
75
-
76
- $object = get_taxonomy($this->taxonomy);
77
-
78
- acf_add_admin_notice($object->label . ' List Saved.', 'success');
79
-
80
- }
81
-
82
- add_action('in_admin_header', array($this, 'in_admin_header'));
83
-
84
- add_action('admin_footer', array($this, 'admin_footer'));
85
-
86
- }
87
-
88
- function admin_footer(){
89
-
90
- // Init field groups by position
91
- $field_groups = array();
92
-
93
- foreach($this->field_groups as $field_group){
94
-
95
- $field_groups[$field_group['position']][] = $field_group;
96
-
97
- }
98
-
99
- // Position: After Title
100
- if(acf_maybe_get($field_groups, 'acf_after_title')){
101
-
102
- $total = count($field_groups['acf_after_title']);
103
-
104
- $current = 0; foreach($field_groups['acf_after_title'] as $field_group){ $current++;
105
-
106
- add_meta_box(
107
-
108
- // ID
109
- 'acf-' . $field_group['ID'],
110
-
111
- // Title
112
- $field_group['title'],
113
-
114
- // Render
115
- array($this, 'metabox_render'),
116
-
117
- // Screen
118
- 'edit',
119
-
120
- // Position
121
- $field_group['position'],
122
-
123
- // Priority
124
- 'default',
125
-
126
- // Args
127
- array(
128
- 'total' => $total,
129
- 'current' => $current,
130
- 'field_group' => $field_group
131
- )
132
-
133
- );
134
-
135
- }
136
-
137
- ?>
138
- <div id="tmpl-acf-after-title" class="acfe-postbox acfe-postbox-no-handle">
139
- <form class="acf-form" action="" method="post">
140
-
141
- <div id="poststuff">
142
-
143
- <?php do_meta_boxes('edit', 'acf_after_title', array()); ?>
144
-
145
- </div>
146
-
147
- </form>
148
- </div>
149
- <script type="text/javascript">
150
- (function($){
151
-
152
- // add after title
153
- $('.search-form').before($('#tmpl-acf-after-title'));
154
-
155
- })(jQuery);
156
- </script>
157
- <?php
158
-
159
- }
160
-
161
- // Position: Normal
162
- if(acf_maybe_get($field_groups, 'normal')){
163
-
164
- $total = count($field_groups['normal']);
165
-
166
- $current = 0; foreach($field_groups['normal'] as $field_group){ $current++;
167
-
168
- add_meta_box(
169
-
170
- // ID
171
- 'acf-' . $field_group['ID'],
172
-
173
- // Title
174
- $field_group['title'],
175
-
176
- // Render
177
- array($this, 'metabox_render'),
178
-
179
- // Screen
180
- 'edit',
181
-
182
- // Position
183
- $field_group['position'],
184
-
185
- // Priority
186
- 'default',
187
-
188
- // Args
189
- array(
190
- 'total' => $total,
191
- 'current' => $current,
192
- 'field_group' => $field_group
193
- )
194
-
195
- );
196
-
197
- }
198
-
199
- ?>
200
- <div id="tmpl-acf-normal" class="acfe-postbox acfe-postbox-no-handle">
201
- <form class="acf-form" action="" method="post">
202
-
203
- <div id="poststuff">
204
-
205
- <?php do_meta_boxes('edit', 'normal', array()); ?>
206
-
207
- </div>
208
-
209
- </form>
210
- </div>
211
- <script type="text/javascript">
212
- (function($){
213
-
214
- // add normal
215
- $('#posts-filter').after($('#tmpl-acf-normal'));
216
-
217
- })(jQuery);
218
- </script>
219
- <?php
220
-
221
- }
222
-
223
- // Position: Side
224
- if(acf_maybe_get($field_groups, 'side')){
225
-
226
- $total = count($field_groups['side']);
227
-
228
- $current = 0; foreach($field_groups['side'] as $field_group){ $current++;
229
-
230
- add_meta_box(
231
-
232
- // ID
233
- 'acf-' . $field_group['ID'],
234
-
235
- // Title
236
- $field_group['title'],
237
-
238
- // Render
239
- array($this, 'metabox_render'),
240
-
241
- // Screen
242
- 'edit',
243
-
244
- // Position
245
- $field_group['position'],
246
-
247
- // Priority
248
- 'default',
249
-
250
- // Args
251
- array(
252
- 'total' => $total,
253
- 'current' => $current,
254
- 'field_group' => $field_group
255
- )
256
-
257
- );
258
-
259
- }
260
-
261
- ?>
262
- <div id="tmpl-acf-side" class="acfe-postbox acfe-postbox-no-handle">
263
- <div class="acf-column-2">
264
- <form class="acf-form" action="" method="post">
265
-
266
- <div id="poststuff" style="padding-top:0; min-width:auto;">
267
-
268
- <?php do_meta_boxes('edit', 'side', array()); ?>
269
-
270
- </div>
271
-
272
- </form>
273
- </div>
274
- </div>
275
- <script type="text/javascript">
276
- (function($){
277
-
278
- // Wrap form
279
- $('.search-form').next('#col-container').andSelf().wrapAll('<div class="acf-columns-2"><div class="acf-column-1"></div></div>');
280
-
281
- // Move After title field group
282
- $('.acf-column-1').prepend($('#tmpl-acf-after-title'));
283
-
284
- // Add column side
285
- $('.acf-column-1').after($('#tmpl-acf-side'));
286
-
287
- })(jQuery);
288
- </script>
289
- <?php
290
-
291
- }
292
-
293
- }
294
-
295
- function metabox_render($array, $args){
296
-
297
- $total = $args['args']['total'];
298
- $current = $args['args']['current'];
299
- $field_group = $args['args']['field_group'];
300
-
301
- // Set post_id
302
- $post_id = $this->post_id;
303
-
304
- // Set form data
305
- acf_form_data(array(
306
- 'screen' => 'taxonomy_list',
307
- 'post_id' => $post_id,
308
- ));
309
-
310
- // Get fields
311
- $fields = acf_get_fields($field_group);
312
-
313
- // Render fields
314
- acf_render_fields($fields, $post_id, 'div', $field_group['instruction_placement']);
315
-
316
- if($current === $total){ ?>
317
-
318
- <?php
319
- $id = ($field_group['style'] != 'seamless') ? 'major-publishing-actions' : '';
320
- $style = ($field_group['style'] === 'seamless') ? 'padding:0 12px;' : '';
321
- ?>
322
-
323
- <div id="<?php echo $id; ?>" style="<?php echo $style; ?>">
324
-
325
- <div id="publishing-action">
326
-
327
- <div class="acf-form-submit">
328
- <input type="submit" class="acf-button button button-primary button-large" value="<?php _e('Update', 'acfe'); ?>" />
329
- <span class="acf-spinner"></span>
330
- </div>
331
-
332
- </div>
333
- <div class="clear"></div>
334
-
335
- </div>
336
-
337
- <?php }
338
-
339
- // Create metabox localized data.
340
- $data = array(
341
- 'id' => 'acf-' . $field_group['ID'],
342
- 'key' => $field_group['key'],
343
- 'style' => $field_group['style'],
344
- 'label' => $field_group['label_placement'],
345
- 'edit' => acf_get_field_group_edit_link($field_group['ID'])
346
- );
347
-
348
- ?>
349
- <script type="text/javascript">
350
- if( typeof acf !== 'undefined' ) {
351
- acf.newPostbox(<?php echo wp_json_encode($data); ?>);
352
- }
353
- </script>
354
-
355
- <?php
356
-
357
- }
358
-
359
- function in_admin_header(){
360
-
361
- acf_enqueue_uploader();
362
-
363
- }
364
-
365
- function location_types($choices){
366
-
367
- $name = __('Forms', 'acf');
368
-
369
- $choices[$name] = acfe_array_insert_after('taxonomy', $choices[$name], 'taxonomy_list', __('Taxonomy List'));
370
-
371
- return $choices;
372
-
373
- }
374
-
375
- function location_values($choices){
376
-
377
- $choices = array('all' => __('All', 'acf'));
378
- $choices = array_merge($choices, acf_get_taxonomy_labels());
379
-
380
- return $choices;
381
-
382
- }
383
-
384
- function location_match($match, $rule, $screen){
385
-
386
- if(!acf_maybe_get($screen, 'taxonomy_list') || !acf_maybe_get($rule, 'value'))
387
- return $match;
388
-
389
- $match = ($screen['taxonomy_list'] === $rule['value']);
390
-
391
- if($rule['value'] === 'all')
392
- $match = true;
393
-
394
- if($rule['operator'] === '!=')
395
- $match = !$match;
396
-
397
- return $match;
398
-
399
- }
400
-
401
- }
402
-
403
- new acfe_location_taxonomy_list();
404
-
405
  endif;
1
+ <?php
2
+
3
+ if(!defined('ABSPATH'))
4
+ exit;
5
+
6
+ if(!class_exists('acfe_location_taxonomy_list')):
7
+
8
+ class acfe_location_taxonomy_list{
9
+
10
+ public $taxonomy;
11
+
12
+ public $field_groups;
13
+
14
+ function __construct(){
15
+
16
+ add_action('load-edit-tags.php', array($this, 'load'));
17
+
18
+ add_filter('acf/location/rule_types', array($this, 'location_types'));
19
+ add_filter('acf/location/rule_values/taxonomy_list', array($this, 'location_values'));
20
+ add_filter('acf/location/rule_match/taxonomy_list', array($this, 'location_match'), 10, 3);
21
+
22
+ }
23
+
24
+ function load(){
25
+
26
+ // Get page
27
+ global $pagenow;
28
+
29
+ if($pagenow === 'term.php')
30
+ return;
31
+
32
+ // Get taxonomy
33
+ global $taxnow;
34
+
35
+ // Check taxonomies
36
+ if(!in_array($taxnow, acf_get_taxonomies()))
37
+ return;
38
+
39
+ $this->taxonomy = $taxnow;
40
+
41
+ $this->post_id = acf_get_valid_post_id('tax_' . $this->taxonomy . '_options');
42
+
43
+ $this->field_groups = acf_get_field_groups(array(
44
+ 'taxonomy_list' => $this->taxonomy
45
+ ));
46
+
47
+ if(empty($this->field_groups))
48
+ return;
49
+
50
+ // Submit
51
+ if(acf_verify_nonce('taxonomy_list')){
52
+
53
+ // Validate
54
+ if(acf_validate_save_post(true)){
55
+
56
+ // Autoload
57
+ acf_update_setting('autoload', false);
58
+
59
+ // Save
60
+ acf_save_post($this->post_id);
61
+
62
+ // Redirect
63
+ wp_redirect(add_query_arg(array('message' => 'acfe_taxonomy_list')));
64
+ exit;
65
+
66
+ }
67
+
68
+ }
69
+
70
+ // Enqueue ACF JS
71
+ acf_enqueue_scripts();
72
+
73
+ // Success message
74
+ if(isset($_GET['message']) && $_GET['message'] === 'acfe_taxonomy_list'){
75
+
76
+ $object = get_taxonomy($this->taxonomy);
77
+
78
+ acf_add_admin_notice($object->label . ' List Saved.', 'success');
79
+
80
+ }
81
+
82
+ add_action('in_admin_header', array($this, 'in_admin_header'));
83
+
84
+ add_action('admin_footer', array($this, 'admin_footer'));
85
+
86
+ }
87
+
88
+ function admin_footer(){
89
+
90
+ // Init field groups by position
91
+ $field_groups = array();
92
+
93
+ foreach($this->field_groups as $field_group){
94
+
95
+ $field_groups[$field_group['position']][] = $field_group;
96
+
97
+ }
98
+
99
+ // Position: After Title
100
+ if(acf_maybe_get($field_groups, 'acf_after_title')){
101
+
102
+ $total = count($field_groups['acf_after_title']);
103
+
104
+ $current = 0; foreach($field_groups['acf_after_title'] as $field_group){ $current++;
105
+
106
+ add_meta_box(
107
+
108
+ // ID
109
+ 'acf-' . $field_group['ID'],
110
+
111
+ // Title
112
+ $field_group['title'],
113
+
114
+ // Render
115
+ array($this, 'metabox_render'),
116
+
117
+ // Screen
118
+ 'edit',
119
+
120
+ // Position
121
+ $field_group['position'],
122
+
123
+ // Priority
124
+ 'default',
125
+
126
+ // Args
127
+ array(
128
+ 'total' => $total,
129
+ 'current' => $current,
130
+ 'field_group' => $field_group
131
+ )
132
+
133
+ );
134
+
135
+ }
136
+
137
+ ?>
138
+ <div id="tmpl-acf-after-title" class="acfe-postbox acfe-postbox-no-handle">
139
+ <form class="acf-form" action="" method="post">
140
+
141
+ <div id="poststuff">
142
+
143
+ <?php do_meta_boxes('edit', 'acf_after_title', array()); ?>
144
+
145
+ </div>
146
+
147
+ </form>
148
+ </div>
149
+ <script type="text/javascript">
150
+ (function($){
151
+
152
+ // add after title
153
+ $('.search-form').before($('#tmpl-acf-after-title'));
154
+
155
+ })(jQuery);
156
+ </script>
157
+ <?php
158
+
159
+ }
160
+
161
+ // Position: Normal
162
+ if(acf_maybe_get($field_groups, 'normal')){
163
+
164
+ $total = count($field_groups['normal']);
165
+
166
+ $current = 0; foreach($field_groups['normal'] as $field_group){ $current++;
167
+
168
+ add_meta_box(
169
+
170
+ // ID
171
+ 'acf-' . $field_group['ID'],
172
+
173
+ // Title
174
+ $field_group['title'],
175
+
176
+ // Render
177
+ array($this, 'metabox_render'),
178
+
179
+ // Screen
180
+ 'edit',
181
+
182
+ // Position
183
+ $field_group['position'],
184
+
185
+ // Priority
186
+ 'default',
187
+
188
+ // Args
189
+ array(
190
+ 'total' => $total,
191
+ 'current' => $current,
192
+ 'field_group' => $field_group
193
+ )
194
+
195
+ );
196
+
197
+ }
198
+
199
+ ?>
200
+ <div id="tmpl-acf-normal" class="acfe-postbox acfe-postbox-no-handle">
201
+ <form class="acf-form" action="" method="post">
202
+
203
+ <div id="poststuff">
204
+
205
+ <?php do_meta_boxes('edit', 'normal', array()); ?>
206
+
207
+ </div>
208
+
209
+ </form>
210
+ </div>
211
+ <script type="text/javascript">
212
+ (function($){
213
+
214
+ // add normal
215
+ $('#posts-filter').after($('#tmpl-acf-normal'));
216
+
217
+ })(jQuery);
218
+ </script>
219
+ <?php
220
+
221
+ }
222
+
223
+ // Position: Side
224
+ if(acf_maybe_get($field_groups, 'side')){
225
+
226
+ $total = count($field_groups['side']);
227
+
228
+ $current = 0; foreach($field_groups['side'] as $field_group){ $current++;
229
+
230
+ add_meta_box(
231
+
232
+ // ID
233
+ 'acf-' . $field_group['ID'],
234
+
235
+ // Title
236
+ $field_group['title'],
237
+
238
+ // Render
239
+ array($this, 'metabox_render'),
240
+
241
+ // Screen
242
+ 'edit',
243
+
244
+ // Position
245
+ $field_group['position'],
246
+
247
+ // Priority
248
+ 'default',
249
+
250
+ // Args
251
+ array(
252
+ 'total' => $total,
253
+ 'current' => $current,
254
+ 'field_group' => $field_group
255
+ )
256
+
257
+ );
258
+
259
+ }
260
+
261
+ ?>
262
+ <div id="tmpl-acf-side" class="acfe-postbox acfe-postbox-no-handle">
263
+ <div class="acf-column-2">
264
+ <form class="acf-form" action="" method="post">
265
+
266
+ <div id="poststuff" style="padding-top:0; min-width:auto;">
267
+
268
+ <?php do_meta_boxes('edit', 'side', array()); ?>
269
+
270
+ </div>
271
+
272
+ </form>
273
+ </div>
274
+ </div>
275
+ <script type="text/javascript">
276
+ (function($){
277
+
278
+ // Wrap form
279
+ $('.search-form').next('#col-container').andSelf().wrapAll('<div class="acf-columns-2"><div class="acf-column-1"></div></div>');
280
+
281
+ // Move After title field group
282
+ $('.acf-column-1').prepend($('#tmpl-acf-after-title'));
283
+
284
+ // Add column side
285
+ $('.acf-column-1').after($('#tmpl-acf-side'));
286
+
287
+ })(jQuery);
288
+ </script>
289
+ <?php
290
+
291
+ }
292
+
293
+ }
294
+
295
+ function metabox_render($array, $args){
296
+
297
+ $total = $args['args']['total'];
298
+ $current = $args['args']['current'];
299
+ $field_group = $args['args']['field_group'];
300
+
301
+ // Set post_id
302
+ $post_id = $this->post_id;
303
+
304
+ // Set form data
305
+ acf_form_data(array(
306
+ 'screen' => 'taxonomy_list',
307
+ 'post_id' => $post_id,
308
+ ));
309
+
310
+ // Get fields
311
+ $fields = acf_get_fields($field_group);
312
+
313
+ // Render fields
314
+ acf_render_fields($fields, $post_id, 'div', $field_group['instruction_placement']);
315
+
316
+ if($current === $total){ ?>
317
+
318
+ <?php
319
+ $id = ($field_group['style'] != 'seamless') ? 'major-publishing-actions' : '';
320
+ $style = ($field_group['style'] === 'seamless') ? 'padding:0 12px;' : '';
321
+ ?>
322
+
323
+ <div id="<?php echo $id; ?>" style="<?php echo $style; ?>">
324
+
325
+ <div id="publishing-action">
326
+
327
+ <div class="acf-form-submit">
328
+ <input type="submit" class="acf-button button button-primary button-large" value="<?php _e('Update', 'acfe'); ?>" />
329
+ <span class="acf-spinner"></span>
330
+ </div>
331
+
332
+ </div>
333
+ <div class="clear"></div>
334
+
335
+ </div>
336
+
337
+ <?php }
338
+
339
+ // Create metabox localized data.
340
+ $data = array(
341
+ 'id' => 'acf-' . $field_group['ID'],
342
+ 'key' => $field_group['key'],
343
+ 'style' => $field_group['style'],
344
+ 'label' => $field_group['label_placement'],
345
+ 'edit' => acf_get_field_group_edit_link($field_group['ID'])
346
+ );
347
+
348
+ ?>
349
+ <script type="text/javascript">
350
+ if( typeof acf !== 'undefined' ) {
351
+ acf.newPostbox(<?php echo wp_json_encode($data); ?>);
352
+ }
353
+ </script>
354
+
355
+ <?php
356
+
357
+ }
358
+
359
+ function in_admin_header(){
360
+
361
+ acf_enqueue_uploader();
362
+
363
+ }
364
+
365
+ function location_types($choices){
366
+
367
+ $name = __('Forms', 'acf');
368
+
369
+ $choices[$name] = acfe_array_insert_after('taxonomy', $choices[$name], 'taxonomy_list', __('Taxonomy List'));
370
+
371
+ return $choices;
372
+
373
+ }
374
+
375
+ function location_values($choices){
376
+
377
+ $choices = array('all' => __('All', 'acf'));
378
+ $choices = array_merge($choices, acf_get_taxonomy_labels());
379
+
380
+ return $choices;
381
+
382
+ }
383
+
384
+ function location_match($match, $rule, $screen){
385
+
386
+ if(!acf_maybe_get($screen, 'taxonomy_list') || !acf_maybe_get($rule, 'value'))
387
+ return $match;
388
+
389
+ $match = ($screen['taxonomy_list'] === $rule['value']);
390
+
391
+ if($rule['value'] === 'all')
392
+ $match = true;
393
+
394
+ if($rule['operator'] === '!=')
395
+ $match = !$match;
396
+
397
+ return $match;
398
+
399
+ }
400
+
401
+ }
402
+
403
+ new acfe_location_taxonomy_list();
404
+
405
  endif;
includes/modules/dynamic-block-type.php CHANGED
@@ -115,11 +115,9 @@ function acfe_dbt_registers(){
115
  }
116
 
117
  // Template
118
- $render_template = $args['render_template'];
119
 
120
- if(!empty($render_template)){
121
-
122
- $template = acfe_locate_file_path($render_template);
123
 
124
  if(!empty($template)){
125
 
@@ -131,11 +129,9 @@ function acfe_dbt_registers(){
131
 
132
 
133
  // Style
134
- $enqueue_style = $args['enqueue_style'];
135
 
136
- if(!empty($enqueue_style)){
137
-
138
- $style = acfe_locate_file_url($enqueue_style);
139
 
140
  if(!empty($style)){
141
 
@@ -147,11 +143,9 @@ function acfe_dbt_registers(){
147
 
148
 
149
  // Script
150
- $enqueue_script = $args['enqueue_script'];
151
 
152
- if(!empty($enqueue_script)){
153
-
154
- $script = acfe_locate_file_url($enqueue_script);
155
 
156
  if(!empty($script)){
157
 
@@ -163,7 +157,7 @@ function acfe_dbt_registers(){
163
 
164
  // Register Block Type
165
  acf_register_block_type($args);
166
-
167
  }
168
 
169
  }
115
  }
116
 
117
  // Template
118
+ if(acf_maybe_get($args, 'render_template')){
119
 
120
+ $template = acfe_locate_file_path($args['render_template']);
 
 
121
 
122
  if(!empty($template)){
123
 
129
 
130
 
131
  // Style
132
+ if(acf_maybe_get($args, 'enqueue_style')){
133
 
134
+ $style = acfe_locate_file_url($args['enqueue_style']);
 
 
135
 
136
  if(!empty($style)){
137
 
143
 
144
 
145
  // Script
146
+ if(acf_maybe_get($args, 'enqueue_script')){
147
 
148
+ $script = acfe_locate_file_url($args['enqueue_script']);
 
 
149
 
150
  if(!empty($script)){
151
 
157
 
158
  // Register Block Type
159
  acf_register_block_type($args);
160
+
161
  }
162
 
163
  }
includes/modules/dynamic-post-type.php CHANGED
@@ -99,7 +99,11 @@ function acfe_dpt_registers(){
99
  }
100
 
101
  // Register: Execute
102
- register_post_type($name, $args);
 
 
 
 
103
 
104
  }
105
 
@@ -1090,8 +1094,8 @@ acf_add_local_field_group(array(
1090
  'placeholder' => '',
1091
  ),
1092
  array(
1093
- 'key' => 'field_acfe_dpt_tab_labels',
1094
- 'label' => 'Labels',
1095
  'name' => '',
1096
  'type' => 'tab',
1097
  'instructions' => '',
@@ -1107,12 +1111,11 @@ acf_add_local_field_group(array(
1107
  'endpoint' => 0,
1108
  ),
1109
  array(
1110
- 'key' => 'field_acfe_dpt_labels',
1111
- 'label' => 'Labels',
1112
- 'name' => 'labels',
1113
- 'type' => 'group',
1114
- 'instructions' => 'An array of labels for this post type. By default, post labels are used for non-hierarchical post types and page labels for hierarchical ones.<br /><br />
1115
- Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\' is set to value of \'name\'.',
1116
  'required' => 0,
1117
  'conditional_logic' => 0,
1118
  'wrapper' => array(
@@ -1120,193 +1123,490 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1120
  'class' => '',
1121
  'id' => '',
1122
  ),
 
 
1123
  'acfe_permissions' => '',
1124
- 'layout' => 'row',
1125
- 'sub_fields' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1126
  array(
1127
- 'key' => 'field_acfe_dpt_singular_name',
1128
- 'label' => 'Singular name',
1129
- 'name' => 'singular_name',
1130
- 'type' => 'text',
1131
- 'instructions' => '',
1132
- 'required' => 0,
1133
- 'conditional_logic' => 0,
1134
- 'wrapper' => array(
1135
- 'width' => '',
1136
- 'class' => '',
1137
- 'id' => '',
1138
  ),
1139
- 'acfe_validate' => '',
1140
- 'acfe_update' => '',
1141
- 'acfe_permissions' => '',
1142
- 'default_value' => '',
1143
- 'placeholder' => '',
1144
- 'prepend' => '',
1145
- 'append' => '',
1146
- 'maxlength' => '',
1147
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1148
  array(
1149
- 'key' => 'field_acfe_dpt_add_new',
1150
- 'label' => 'Add new',
1151
- 'name' => 'add_new',
1152
- 'type' => 'text',
1153
- 'instructions' => '',
1154
- 'required' => 0,
1155
- 'conditional_logic' => 0,
1156
- 'wrapper' => array(
1157
- 'width' => '',
1158
- 'class' => '',
1159
- 'id' => '',
1160
  ),
1161
- 'acfe_validate' => '',
1162
- 'acfe_update' => '',
1163
- 'acfe_permissions' => '',
1164
- 'default_value' => '',
1165
- 'placeholder' => '',
1166
- 'prepend' => '',
1167
- 'append' => '',
1168
- 'maxlength' => '',
1169
  ),
1170
- array(
1171
- 'key' => 'field_acfe_dpt_add_new_item',
1172
- 'label' => 'Add new item',
1173
- 'name' => 'add_new_item',
1174
- 'type' => 'text',
1175
- 'instructions' => '',
1176
- 'required' => 0,
1177
- 'conditional_logic' => 0,
1178
- 'wrapper' => array(
1179
- 'width' => '',
1180
- 'class' => '',
1181
- 'id' => '',
1182
- ),
1183
- 'acfe_validate' => '',
1184
- 'acfe_update' => '',
1185
- 'acfe_permissions' => '',
1186
- 'default_value' => '',
1187
- 'placeholder' => '',
1188
- 'prepend' => '',
1189
- 'append' => '',
1190
- 'maxlength' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1191
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1192
  array(
1193
- 'key' => 'field_acfe_dpt_edit_item',
1194
- 'label' => 'Edit item',
1195
- 'name' => 'edit_item',
1196
- 'type' => 'text',
1197
- 'instructions' => '',
1198
- 'required' => 0,
1199
- 'conditional_logic' => 0,
1200
- 'wrapper' => array(
1201
- 'width' => '',
1202
- 'class' => '',
1203
- 'id' => '',
1204
  ),
1205
- 'acfe_validate' => '',
1206
- 'acfe_update' => '',
1207
- 'acfe_permissions' => '',
1208
- 'default_value' => '',
1209
- 'placeholder' => '',
1210
- 'prepend' => '',
1211
- 'append' => '',
1212
- 'maxlength' => '',
1213
- ),
1214
- array(
1215
- 'key' => 'field_acfe_dpt_new_item',
1216
- 'label' => 'New item',
1217
- 'name' => 'new_item',
1218
- 'type' => 'text',
1219
- 'instructions' => '',
1220
- 'required' => 0,
1221
- 'conditional_logic' => 0,
1222
- 'wrapper' => array(
1223
- 'width' => '',
1224
- 'class' => '',
1225
- 'id' => '',
1226
- ),
1227
- 'acfe_validate' => '',
1228
- 'acfe_update' => '',
1229
- 'acfe_permissions' => '',
1230
- 'default_value' => '',
1231
- 'placeholder' => '',
1232
- 'prepend' => '',
1233
- 'append' => '',
1234
- 'maxlength' => '',
1235
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1236
  array(
1237
- 'key' => 'field_acfe_dpt_view_item',
1238
- 'label' => 'View item',
1239
- 'name' => 'view_item',
1240
- 'type' => 'text',
1241
- 'instructions' => '',
1242
- 'required' => 0,
1243
- 'conditional_logic' => 0,
1244
- 'wrapper' => array(
1245
- 'width' => '',
1246
- 'class' => '',
1247
- 'id' => '',
1248
  ),
1249
- 'acfe_validate' => '',
1250
- 'acfe_update' => '',
1251
- 'acfe_permissions' => '',
1252
- 'default_value' => '',
1253
- 'placeholder' => '',
1254
- 'prepend' => '',
1255
- 'append' => '',
1256
- 'maxlength' => '',
1257
- ),
1258
- array(
1259
- 'key' => 'field_acfe_dpt_view_items',
1260
- 'label' => 'View items',
1261
- 'name' => 'view_items',
1262
- 'type' => 'text',
1263
- 'instructions' => '',
1264
- 'required' => 0,
1265
- 'conditional_logic' => 0,
1266
- 'wrapper' => array(
1267
- 'width' => '',
1268
- 'class' => '',
1269
- 'id' => '',
1270
  ),
1271
- 'acfe_validate' => '',
1272
- 'acfe_update' => '',
1273
- 'acfe_permissions' => '',
1274
- 'default_value' => '',
1275
- 'placeholder' => '',
1276
- 'prepend' => '',
1277
- 'append' => '',
1278
- 'maxlength' => '',
1279
  ),
 
 
 
 
 
 
 
 
 
 
 
1280
  array(
1281
- 'key' => 'field_acfe_dpt_search_items',
1282
- 'label' => 'Search items',
1283
- 'name' => 'search_items',
1284
  'type' => 'text',
1285
- 'instructions' => '',
1286
  'required' => 0,
1287
- 'conditional_logic' => 0,
1288
- 'wrapper' => array(
1289
- 'width' => '',
1290
- 'class' => '',
1291
- 'id' => '',
 
 
 
1292
  ),
1293
- 'acfe_validate' => '',
1294
- 'acfe_update' => '',
1295
- 'acfe_permissions' => '',
1296
- 'default_value' => '',
1297
- 'placeholder' => '',
1298
- 'prepend' => '',
1299
- 'append' => '',
1300
- 'maxlength' => '',
1301
- ),
1302
- array(
1303
- 'key' => 'field_acfe_dpt_not_found',
1304
- 'label' => 'Not found',
1305
- 'name' => 'not_found',
1306
- 'type' => 'text',
1307
- 'instructions' => '',
1308
- 'required' => 0,
1309
- 'conditional_logic' => 0,
1310
  'wrapper' => array(
1311
  'width' => '',
1312
  'class' => '',
@@ -1316,41 +1616,27 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1316
  'acfe_update' => '',
1317
  'acfe_permissions' => '',
1318
  'default_value' => '',
1319
- 'placeholder' => '',
1320
  'prepend' => '',
1321
  'append' => '',
1322
  'maxlength' => '',
1323
  ),
1324
  array(
1325
- 'key' => 'field_acfe_dpt_not_found_in_trash',
1326
- 'label' => 'Not found in trash',
1327
- 'name' => 'not_found_in_trash',
1328
- 'type' => 'text',
1329
- 'instructions' => '',
1330
  'required' => 0,
1331
- 'conditional_logic' => 0,
1332
- 'wrapper' => array(
1333
- 'width' => '',
1334
- 'class' => '',
1335
- 'id' => '',
 
 
 
1336
  ),
1337
- 'acfe_validate' => '',
1338
- 'acfe_update' => '',
1339
- 'acfe_permissions' => '',
1340
- 'default_value' => '',
1341
- 'placeholder' => '',
1342
- 'prepend' => '',
1343
- 'append' => '',
1344
- 'maxlength' => '',
1345
- ),
1346
- array(
1347
- 'key' => 'field_acfe_dpt_parent_item_colon',
1348
- 'label' => 'Parent item colon',
1349
- 'name' => 'parent_item_colon',
1350
- 'type' => 'text',
1351
- 'instructions' => '',
1352
- 'required' => 0,
1353
- 'conditional_logic' => 0,
1354
  'wrapper' => array(
1355
  'width' => '',
1356
  'class' => '',
@@ -1359,20 +1645,28 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1359
  'acfe_validate' => '',
1360
  'acfe_update' => '',
1361
  'acfe_permissions' => '',
1362
- 'default_value' => '',
1363
- 'placeholder' => '',
1364
- 'prepend' => '',
1365
- 'append' => '',
1366
- 'maxlength' => '',
1367
  ),
1368
  array(
1369
- 'key' => 'field_acfe_dpt_all_items',
1370
- 'label' => 'All items',
1371
- 'name' => 'all_items',
1372
- 'type' => 'text',
1373
- 'instructions' => '',
1374
  'required' => 0,
1375
- 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
1376
  'wrapper' => array(
1377
  'width' => '',
1378
  'class' => '',
@@ -1381,20 +1675,28 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1381
  'acfe_validate' => '',
1382
  'acfe_update' => '',
1383
  'acfe_permissions' => '',
1384
- 'default_value' => '',
1385
- 'placeholder' => '',
1386
- 'prepend' => '',
1387
- 'append' => '',
1388
- 'maxlength' => '',
1389
  ),
1390
  array(
1391
- 'key' => 'field_acfe_dpt_archives',
1392
- 'label' => 'Archives',
1393
- 'name' => 'archives',
1394
- 'type' => 'text',
1395
- 'instructions' => '',
1396
  'required' => 0,
1397
- 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
1398
  'wrapper' => array(
1399
  'width' => '',
1400
  'class' => '',
@@ -1403,21 +1705,175 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1403
  'acfe_validate' => '',
1404
  'acfe_update' => '',
1405
  'acfe_permissions' => '',
1406
- 'default_value' => '',
1407
- 'placeholder' => '',
1408
- 'prepend' => '',
1409
- 'append' => '',
1410
- 'maxlength' => '',
1411
  ),
1412
- array(
1413
- 'key' => 'field_acfe_dpt_attributes',
1414
- 'label' => 'Attributes',
1415
- 'name' => 'attributes',
1416
- 'type' => 'text',
1417
- 'instructions' => '',
1418
- 'required' => 0,
1419
- 'conditional_logic' => 0,
1420
- 'wrapper' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1421
  'width' => '',
1422
  'class' => '',
1423
  'id' => '',
@@ -1432,9 +1888,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1432
  'maxlength' => '',
1433
  ),
1434
  array(
1435
- 'key' => 'field_acfe_dpt_insert_into_item',
1436
- 'label' => 'Insert into item',
1437
- 'name' => 'insert_into_item',
1438
  'type' => 'text',
1439
  'instructions' => '',
1440
  'required' => 0,
@@ -1454,9 +1910,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1454
  'maxlength' => '',
1455
  ),
1456
  array(
1457
- 'key' => 'field_acfe_dpt_uploaded_to_this_item',
1458
- 'label' => 'Uploaded to this item',
1459
- 'name' => 'uploaded_to_this_item',
1460
  'type' => 'text',
1461
  'instructions' => '',
1462
  'required' => 0,
@@ -1476,9 +1932,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1476
  'maxlength' => '',
1477
  ),
1478
  array(
1479
- 'key' => 'field_acfe_dpt_featured_image',
1480
- 'label' => 'Featured image',
1481
- 'name' => 'featured_image',
1482
  'type' => 'text',
1483
  'instructions' => '',
1484
  'required' => 0,
@@ -1498,9 +1954,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1498
  'maxlength' => '',
1499
  ),
1500
  array(
1501
- 'key' => 'field_acfe_dpt_set_featured_image',
1502
- 'label' => 'Set featured image',
1503
- 'name' => 'set_featured_image',
1504
  'type' => 'text',
1505
  'instructions' => '',
1506
  'required' => 0,
@@ -1520,9 +1976,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1520
  'maxlength' => '',
1521
  ),
1522
  array(
1523
- 'key' => 'field_acfe_dpt_remove_featured_image',
1524
- 'label' => 'Remove featured image',
1525
- 'name' => 'remove_featured_image',
1526
  'type' => 'text',
1527
  'instructions' => '',
1528
  'required' => 0,
@@ -1542,9 +1998,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1542
  'maxlength' => '',
1543
  ),
1544
  array(
1545
- 'key' => 'field_acfe_dpt_use_featured_image',
1546
- 'label' => 'Use featured image',
1547
- 'name' => 'use_featured_image',
1548
  'type' => 'text',
1549
  'instructions' => '',
1550
  'required' => 0,
@@ -1564,9 +2020,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1564
  'maxlength' => '',
1565
  ),
1566
  array(
1567
- 'key' => 'field_acfe_dpt_menu_name',
1568
- 'label' => 'Menu name',
1569
- 'name' => 'menu_name',
1570
  'type' => 'text',
1571
  'instructions' => '',
1572
  'required' => 0,
@@ -1586,9 +2042,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1586
  'maxlength' => '',
1587
  ),
1588
  array(
1589
- 'key' => 'field_acfe_dpt_filter_items_list',
1590
- 'label' => 'Filter items list',
1591
- 'name' => 'filter_items_list',
1592
  'type' => 'text',
1593
  'instructions' => '',
1594
  'required' => 0,
@@ -1608,9 +2064,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1608
  'maxlength' => '',
1609
  ),
1610
  array(
1611
- 'key' => 'field_acfe_dpt_items_list_navigation',
1612
- 'label' => 'Items list navigation',
1613
- 'name' => 'items_list_navigation',
1614
  'type' => 'text',
1615
  'instructions' => '',
1616
  'required' => 0,
@@ -1630,9 +2086,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1630
  'maxlength' => '',
1631
  ),
1632
  array(
1633
- 'key' => 'field_acfe_dpt_items_list',
1634
- 'label' => 'Items list',
1635
- 'name' => 'items_list',
1636
  'type' => 'text',
1637
  'instructions' => '',
1638
  'required' => 0,
@@ -1652,9 +2108,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1652
  'maxlength' => '',
1653
  ),
1654
  array(
1655
- 'key' => 'field_acfe_dpt_name_admin_bar',
1656
- 'label' => 'Name admin bar',
1657
- 'name' => 'name_admin_bar',
1658
  'type' => 'text',
1659
  'instructions' => '',
1660
  'required' => 0,
@@ -1674,9 +2130,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1674
  'maxlength' => '',
1675
  ),
1676
  array(
1677
- 'key' => 'field_acfe_dpt_item_published',
1678
- 'label' => 'Item published',
1679
- 'name' => 'item_published',
1680
  'type' => 'text',
1681
  'instructions' => '',
1682
  'required' => 0,
@@ -1696,9 +2152,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1696
  'maxlength' => '',
1697
  ),
1698
  array(
1699
- 'key' => 'field_acfe_dpt_item_published_privately',
1700
- 'label' => 'Item published privately',
1701
- 'name' => 'item_published_privately',
1702
  'type' => 'text',
1703
  'instructions' => '',
1704
  'required' => 0,
@@ -1718,9 +2174,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1718
  'maxlength' => '',
1719
  ),
1720
  array(
1721
- 'key' => 'field_acfe_dpt_item_reverted_to_draft',
1722
- 'label' => 'Item reverted to draft',
1723
- 'name' => 'item_reverted_to_draft',
1724
  'type' => 'text',
1725
  'instructions' => '',
1726
  'required' => 0,
@@ -1740,9 +2196,9 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1740
  'maxlength' => '',
1741
  ),
1742
  array(
1743
- 'key' => 'field_acfe_dpt_item_scheduled',
1744
- 'label' => 'Item scheduled',
1745
- 'name' => 'item_scheduled',
1746
  'type' => 'text',
1747
  'instructions' => '',
1748
  'required' => 0,
@@ -1762,11 +2218,11 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1762
  'maxlength' => '',
1763
  ),
1764
  array(
1765
- 'key' => 'field_acfe_dpt_item_updated',
1766
- 'label' => 'Item updated',
1767
- 'name' => 'item_updated',
1768
- 'type' => 'text',
1769
- 'instructions' => '',
1770
  'required' => 0,
1771
  'conditional_logic' => 0,
1772
  'wrapper' => array(
@@ -1783,624 +2239,168 @@ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\'
1783
  'append' => '',
1784
  'maxlength' => '',
1785
  ),
1786
- ),
1787
- ),
1788
- array(
1789
- 'key' => 'field_acfe_dpt_tab_menu',
1790
- 'label' => 'Menu',
1791
- 'name' => '',
1792
- 'type' => 'tab',
1793
- 'instructions' => '',
1794
- 'required' => 0,
1795
- 'conditional_logic' => 0,
1796
- 'wrapper' => array(
1797
- 'width' => '',
1798
- 'class' => '',
1799
- 'id' => '',
1800
- ),
1801
- 'acfe_permissions' => '',
1802
- 'placement' => 'top',
1803
- 'endpoint' => 0,
1804
- ),
1805
- array(
1806
- 'key' => 'field_acfe_dpt_menu_position',
1807
- 'label' => 'Menu position',
1808
- 'name' => 'menu_position',
1809
- 'type' => 'number',
1810
- 'instructions' => 'The position in the menu order the post type should appear. show_in_menu must be true',
1811
- 'required' => 0,
1812
- 'conditional_logic' => 0,
1813
- 'wrapper' => array(
1814
- 'width' => '',
1815
- 'class' => '',
1816
- 'id' => '',
1817
- ),
1818
- 'acfe_validate' => '',
1819
- 'acfe_update' => '',
1820
- 'acfe_permissions' => '',
1821
- 'default_value' => 20,
1822
- 'placeholder' => '',
1823
- 'prepend' => '',
1824
- 'append' => '',
1825
- 'min' => 0,
1826
- 'max' => '',
1827
- 'step' => '',
1828
- ),
1829
- array(
1830
- 'key' => 'field_acfe_dpt_menu_icon',
1831
- 'label' => 'Menu icon',
1832
- 'name' => 'menu_icon',
1833
- 'type' => 'text',
1834
- 'instructions' => 'The url to the icon to be used for this menu or the name of the icon from the iconfont (<a href="https://developer.wordpress.org/resource/dashicons/" target="_blank">Dashicons</a>)',
1835
- 'required' => 0,
1836
- 'conditional_logic' => 0,
1837
- 'wrapper' => array(
1838
- 'width' => '',
1839
- 'class' => '',
1840
- 'id' => '',
1841
- ),
1842
- 'acfe_validate' => '',
1843
- 'acfe_update' => '',
1844
- 'acfe_permissions' => '',
1845
- 'default_value' => 'dashicons-admin-post',
1846
- 'placeholder' => '',
1847
- 'prepend' => '',
1848
- 'append' => '',
1849
- 'maxlength' => '',
1850
- ),
1851
- array(
1852
- 'key' => 'field_acfe_dpt_show_ui',
1853
- 'label' => 'Show UI',
1854
- 'name' => 'show_ui',
1855
- 'type' => 'true_false',
1856
- 'instructions' => 'Whether to generate a default UI for managing this post type in the admin',
1857
- 'required' => 0,
1858
- 'conditional_logic' => 0,
1859
- 'wrapper' => array(
1860
- 'width' => '',
1861
- 'class' => '',
1862
- 'id' => '',
1863
- ),
1864
- 'acfe_validate' => '',
1865
- 'acfe_update' => '',
1866
- 'acfe_permissions' => '',
1867
- 'message' => '',
1868
- 'default_value' => 1,
1869
- 'ui' => 1,
1870
- 'ui_on_text' => '',
1871
- 'ui_off_text' => '',
1872
- ),
1873
- array(
1874
- 'key' => 'field_acfe_dpt_show_in_menu',
1875
- 'label' => 'Show in menu',
1876
- 'name' => 'show_in_menu',
1877
- 'type' => 'true_false',
1878
- 'instructions' => 'Where to show the post type in the admin menu. show_ui must be true',
1879
- 'required' => 0,
1880
- 'conditional_logic' => 0,
1881
- 'wrapper' => array(
1882
- 'width' => '',
1883
- 'class' => '',
1884
- 'id' => '',
1885
- ),
1886
- 'acfe_validate' => '',
1887
- 'acfe_update' => '',
1888
- 'acfe_permissions' => '',
1889
- 'message' => '',
1890
- 'default_value' => 1,
1891
- 'ui' => 1,
1892
- 'ui_on_text' => '',
1893
- 'ui_off_text' => '',
1894
- ),
1895
- array(
1896
- 'key' => 'field_acfe_dpt_show_in_menu_text',
1897
- 'label' => 'Show in menu (text)',
1898
- 'name' => 'show_in_menu_text',
1899
- 'type' => 'text',
1900
- 'instructions' => 'If an existing top level page such as \'tools.php\' or \'edit.php?post_type=page\', the post type will be placed as a sub menu of that',
1901
- 'required' => 0,
1902
- 'conditional_logic' => array(
1903
  array(
1904
- array(
1905
- 'field' => 'field_5c9f5dd58d5ee',
1906
- 'operator' => '==',
1907
- 'value' => '1',
 
 
 
 
 
 
 
1908
  ),
 
 
 
 
 
 
 
 
1909
  ),
1910
- ),
1911
- 'wrapper' => array(
1912
- 'width' => '',
1913
- 'class' => '',
1914
- 'id' => '',
1915
- ),
1916
- 'acfe_validate' => '',
1917
- 'acfe_update' => '',
1918
- 'acfe_permissions' => '',
1919
- 'default_value' => '',
1920
- 'placeholder' => '',
1921
- 'prepend' => '',
1922
- 'append' => '',
1923
- 'maxlength' => '',
1924
- ),
1925
- array(
1926
- 'key' => 'field_acfe_dpt_show_in_nav_menus',
1927
- 'label' => 'Show in nav menus',
1928
- 'name' => 'show_in_nav_menus',
1929
- 'type' => 'true_false',
1930
- 'instructions' => 'Whether post_type is available for selection in navigation menus',
1931
- 'required' => 0,
1932
- 'conditional_logic' => 0,
1933
- 'wrapper' => array(
1934
- 'width' => '',
1935
- 'class' => '',
1936
- 'id' => '',
1937
- ),
1938
- 'acfe_validate' => '',
1939
- 'acfe_update' => '',
1940
- 'acfe_permissions' => '',
1941
- 'message' => '',
1942
- 'default_value' => 1,
1943
- 'ui' => 1,
1944
- 'ui_on_text' => '',
1945
- 'ui_off_text' => '',
1946
- ),
1947
- array(
1948
- 'key' => 'field_acfe_dpt_show_in_admin_bar',
1949
- 'label' => 'Show in admin bar',
1950
- 'name' => 'show_in_admin_bar',
1951
- 'type' => 'true_false',
1952
- 'instructions' => 'Where to show the post type in the admin menu. show_ui must be true',
1953
- 'required' => 0,
1954
- 'conditional_logic' => 0,
1955
- 'wrapper' => array(
1956
- 'width' => '',
1957
- 'class' => '',
1958
- 'id' => '',
1959
- ),
1960
- 'acfe_validate' => '',
1961
- 'acfe_update' => '',
1962
- 'acfe_permissions' => '',
1963
- 'message' => '',
1964
- 'default_value' => 1,
1965
- 'ui' => 1,
1966
- 'ui_on_text' => '',
1967
- 'ui_off_text' => '',
1968
- ),
1969
- array(
1970
- 'key' => 'field_acfe_dpt_tab_capability',
1971
- 'label' => 'Capability',
1972
- 'name' => '',
1973
- 'type' => 'tab',
1974
- 'instructions' => '',
1975
- 'required' => 0,
1976
- 'conditional_logic' => 0,
1977
- 'wrapper' => array(
1978
- 'width' => '',
1979
- 'class' => '',
1980
- 'id' => '',
1981
- ),
1982
- 'acfe_permissions' => '',
1983
- 'placement' => 'top',
1984
- 'endpoint' => 0,
1985
- ),
1986
- array(
1987
- 'key' => 'field_acfe_dpt_capability_type',
1988
- 'label' => 'Capability type',
1989
- 'name' => 'capability_type',
1990
- 'type' => 'textarea',
1991
- 'instructions' => 'The string to use to build the read, edit, and delete capabilities.<br />
1992
- May be passed as an array to allow for alternative plurals when using this argument as a base to construct the capabilities, like this:<br /><br />
1993
-
1994
- story<br />
1995
- stories',
1996
- 'required' => 0,
1997
- 'conditional_logic' => 0,
1998
- 'wrapper' => array(
1999
- 'width' => '',
2000
- 'class' => '',
2001
- 'id' => '',
2002
- ),
2003
- 'acfe_validate' => '',
2004
- 'acfe_update' => '',
2005
- 'acfe_permissions' => '',
2006
- 'default_value' => 'post',
2007
- 'placeholder' => '',
2008
- 'maxlength' => '',
2009
- 'rows' => '',
2010
- 'new_lines' => '',
2011
- ),
2012
- array(
2013
- 'key' => 'field_acfe_dpt_capabilities',
2014
- 'label' => 'Capabilities',
2015
- 'name' => 'capabilities',
2016
- 'type' => 'textarea',
2017
- 'instructions' => 'An array of the capabilities for this post type. Specify capabilities like this:<br /><br />
2018
- publish_posts : publish_posts<br />
2019
- edit_post : edit_post<br />
2020
- edit_posts : edit_posts<br />
2021
- read_post : read_post<br />
2022
- delete_post : delete_post<br />
2023
- etc...',
2024
- 'required' => 0,
2025
- 'conditional_logic' => 0,
2026
- 'wrapper' => array(
2027
- 'width' => '',
2028
- 'class' => '',
2029
- 'id' => '',
2030
- ),
2031
- 'acfe_validate' => '',
2032
- 'acfe_update' => '',
2033
- 'acfe_permissions' => '',
2034
- 'default_value' => '',
2035
- 'placeholder' => '',
2036
- 'maxlength' => '',
2037
- 'rows' => '',
2038
- 'new_lines' => '',
2039
- ),
2040
- array(
2041
- 'key' => 'field_acfe_dpt_map_meta_cap',
2042
- 'label' => 'Map meta cap',
2043
- 'name' => 'map_meta_cap',
2044
- 'type' => 'select',
2045
- 'instructions' => '',
2046
- 'required' => 0,
2047
- 'conditional_logic' => 0,
2048
- 'wrapper' => array(
2049
- 'width' => '',
2050
- 'class' => '',
2051
- 'id' => '',
2052
- ),
2053
- 'acfe_validate' => '',
2054
- 'acfe_update' => '',
2055
- 'acfe_permissions' => '',
2056
- 'choices' => array(
2057
- 'null' => 'Null (default)',
2058
- 'false' => 'False',
2059
- 'true' => 'True',
2060
- ),
2061
- 'default_value' => array(
2062
- 0 => 'null',
2063
- ),
2064
- 'allow_null' => 0,
2065
- 'multiple' => 0,
2066
- 'ui' => 0,
2067
- 'return_format' => 'value',
2068
- 'ajax' => 0,
2069
- 'placeholder' => '',
2070
- ),
2071
- array(
2072
- 'key' => 'field_acfe_dpt_tab_archive',
2073
- 'label' => 'Archive',
2074
- 'name' => '',
2075
- 'type' => 'tab',
2076
- 'instructions' => '',
2077
- 'required' => 0,
2078
- 'conditional_logic' => 0,
2079
- 'wrapper' => array(
2080
- 'width' => '',
2081
- 'class' => '',
2082
- 'id' => '',
2083
- ),
2084
- 'acfe_permissions' => '',
2085
- 'placement' => 'top',
2086
- 'endpoint' => 0,
2087
- ),
2088
- array(
2089
- 'key' => 'field_acfe_dpt_archive_template',
2090
- 'label' => 'Template',
2091
- 'name' => 'acfe_dpt_archive_template',
2092
- 'type' => 'text',
2093
- 'instructions' => 'ACF Extended: Which template file to load for the archive query. More informations on <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">Template hierarchy</a>',
2094
- 'required' => 0,
2095
- 'conditional_logic' => 0,
2096
- 'wrapper' => array(
2097
- 'width' => '',
2098
- 'class' => '',
2099
- 'id' => '',
2100
- ),
2101
- 'acfe_validate' => '',
2102
- 'acfe_update' => '',
2103
- 'acfe_permissions' => '',
2104
- 'default_value' => '',
2105
- 'placeholder' => 'my-template.php',
2106
- 'prepend' => trailingslashit(acfe_get_setting('theme_folder')),
2107
- 'append' => '',
2108
- 'maxlength' => '',
2109
- ),
2110
- array(
2111
- 'key' => 'field_acfe_dpt_has_archive',
2112
- 'label' => 'Has archive',
2113
- 'name' => 'has_archive',
2114
- 'type' => 'true_false',
2115
- 'instructions' => 'Enables post type archives.',
2116
- 'required' => 0,
2117
- 'conditional_logic' => 0,
2118
- 'wrapper' => array(
2119
- 'width' => '',
2120
- 'class' => '',
2121
- 'id' => '',
2122
- ),
2123
- 'acfe_validate' => '',
2124
- 'acfe_update' => '',
2125
- 'acfe_permissions' => '',
2126
- 'message' => '',
2127
- 'default_value' => 1,
2128
- 'ui' => 1,
2129
- 'ui_on_text' => '',
2130
- 'ui_off_text' => '',
2131
- ),
2132
- array(
2133
- 'key' => 'field_acfe_dpt_has_archive_slug',
2134
- 'label' => 'Slug',
2135
- 'name' => 'has_archive_slug',
2136
- 'type' => 'text',
2137
- 'instructions' => 'Will use post type name as archive slug by default.',
2138
- 'required' => 0,
2139
- 'conditional_logic' => array(
2140
  array(
2141
- array(
2142
- 'field' => 'field_acfe_dpt_has_archive',
2143
- 'operator' => '==',
2144
- 'value' => '1',
 
 
 
 
 
 
 
2145
  ),
 
 
 
 
 
 
 
 
2146
  ),
2147
- ),
2148
- 'wrapper' => array(
2149
- 'width' => '',
2150
- 'class' => '',
2151
- 'id' => '',
2152
- ),
2153
- 'acfe_validate' => '',
2154
- 'acfe_update' => '',
2155
- 'acfe_permissions' => '',
2156
- 'default_value' => '',
2157
- 'placeholder' => 'Default',
2158
- 'prepend' => '',
2159
- 'append' => '',
2160
- 'maxlength' => '',
2161
- ),
2162
- array(
2163
- 'key' => 'field_acfe_dpt_archive_posts_per_page',
2164
- 'label' => 'Posts per page',
2165
- 'name' => 'acfe_dpt_archive_posts_per_page',
2166
- 'type' => 'number',
2167
- 'instructions' => 'ACF Extended: Number of posts to display in the archive page',
2168
- 'required' => 0,
2169
- 'wrapper' => array(
2170
- 'width' => '',
2171
- 'class' => '',
2172
- 'id' => '',
2173
- ),
2174
- 'acfe_validate' => '',
2175
- 'acfe_update' => '',
2176
- 'acfe_permissions' => '',
2177
- 'default_value' => 10,
2178
- 'placeholder' => '',
2179
- 'prepend' => '',
2180
- 'append' => '',
2181
- 'min' => -1,
2182
- 'max' => '',
2183
- 'step' => '',
2184
- 'conditional_logic' => array(
2185
- array(
2186
- array(
2187
- 'field' => 'field_acfe_dpt_has_archive',
2188
- 'operator' => '==',
2189
- 'value' => '1',
2190
- ),
2191
- ),
2192
- ),
2193
- ),
2194
- array(
2195
- 'key' => 'field_acfe_dpt_archive_orderby',
2196
- 'label' => 'Order by',
2197
- 'name' => 'acfe_dpt_archive_orderby',
2198
- 'type' => 'text',
2199
- 'instructions' => 'ACF Extended: Sort retrieved posts by parameter in the archive page. Defaults to \'date (post_date)\'.',
2200
- 'required' => 0,
2201
- 'wrapper' => array(
2202
- 'width' => '',
2203
- 'class' => '',
2204
- 'id' => '',
2205
- ),
2206
- 'acfe_validate' => '',
2207
- 'acfe_update' => array(
2208
- '5c9479dec93c4' => array(
2209
- 'acfe_update_function' => 'sanitize_title',
2210
  ),
2211
- ),
2212
- 'acfe_permissions' => '',
2213
- 'default_value' => 'date',
2214
- 'placeholder' => '',
2215
- 'prepend' => '',
2216
- 'append' => '',
2217
- 'maxlength' => '',
2218
- 'conditional_logic' => array(
2219
- array(
2220
- array(
2221
- 'field' => 'field_acfe_dpt_has_archive',
2222
- 'operator' => '==',
2223
- 'value' => '1',
2224
- ),
2225
- ),
2226
- ),
2227
- ),
2228
- array(
2229
- 'key' => 'field_acfe_dpt_archive_order',
2230
- 'label' => 'Order',
2231
- 'name' => 'acfe_dpt_archive_order',
2232
- 'type' => 'select',
2233
- 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the archive page. Defaults to \'DESC\'.',
2234
- 'required' => 0,
2235
- 'wrapper' => array(
2236
- 'width' => '',
2237
- 'class' => '',
2238
- 'id' => '',
2239
- ),
2240
- 'acfe_validate' => '',
2241
- 'acfe_update' => '',
2242
- 'acfe_permissions' => '',
2243
- 'choices' => array(
2244
- 'ASC' => 'ASC',
2245
- 'DESC' => 'DESC',
2246
- ),
2247
- 'default_value' => array(
2248
- 0 => 'DESC',
2249
- ),
2250
- 'allow_null' => 0,
2251
- 'multiple' => 0,
2252
- 'ui' => 0,
2253
- 'return_format' => 'value',
2254
- 'ajax' => 0,
2255
- 'placeholder' => '',
2256
- 'conditional_logic' => array(
2257
- array(
2258
- array(
2259
- 'field' => 'field_acfe_dpt_has_archive',
2260
- 'operator' => '==',
2261
- 'value' => '1',
2262
- ),
2263
- ),
2264
- ),
2265
- ),
2266
- array(
2267
- 'key' => 'field_acfe_dpt_tab_single',
2268
- 'label' => 'Single',
2269
- 'name' => '',
2270
- 'type' => 'tab',
2271
- 'instructions' => '',
2272
- 'required' => 0,
2273
- 'conditional_logic' => 0,
2274
- 'wrapper' => array(
2275
- 'width' => '',
2276
- 'class' => '',
2277
- 'id' => '',
2278
- ),
2279
- 'acfe_permissions' => '',
2280
- 'placement' => 'top',
2281
- 'endpoint' => 0,
2282
- ),
2283
- array(
2284
- 'key' => 'field_acfe_dpt_single_template',
2285
- 'label' => 'Template',
2286
- 'name' => 'acfe_dpt_single_template',
2287
- 'type' => 'text',
2288
- 'instructions' => 'ACF Extended: Which template file to load for the single query. More informations on <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">Template hierarchy</a>',
2289
- 'required' => 0,
2290
- 'conditional_logic' => 0,
2291
- 'wrapper' => array(
2292
- 'width' => '',
2293
- 'class' => '',
2294
- 'id' => '',
2295
- ),
2296
- 'acfe_validate' => '',
2297
- 'acfe_update' => '',
2298
- 'acfe_permissions' => '',
2299
- 'default_value' => '',
2300
- 'placeholder' => 'my-template.php',
2301
- 'prepend' => trailingslashit(acfe_get_setting('theme_folder')),
2302
- 'append' => '',
2303
- 'maxlength' => '',
2304
- ),
2305
- array(
2306
- 'key' => 'field_acfe_dpt_rewrite',
2307
- 'label' => 'Rewrite',
2308
- 'name' => 'rewrite',
2309
- 'type' => 'true_false',
2310
- 'instructions' => 'Triggers the handling of rewrites for this post type. To prevent rewrites, set to false.',
2311
- 'required' => 0,
2312
- 'conditional_logic' => 0,
2313
- 'wrapper' => array(
2314
- 'width' => '',
2315
- 'class' => '',
2316
- 'id' => '',
2317
- ),
2318
- 'acfe_validate' => '',
2319
- 'acfe_update' => '',
2320
- 'acfe_permissions' => '',
2321
- 'message' => '',
2322
- 'default_value' => 1,
2323
- 'ui' => 1,
2324
- 'ui_on_text' => '',
2325
- 'ui_off_text' => '',
2326
- ),
2327
- array(
2328
- 'key' => 'field_acfe_dpt_rewrite_args_select',
2329
- 'label' => 'Rewrite Arguments',
2330
- 'name' => 'rewrite_args_select',
2331
- 'type' => 'true_false',
2332
- 'instructions' => 'Use additional rewrite arguments',
2333
- 'required' => 0,
2334
- 'conditional_logic' => array(
2335
  array(
2336
- array(
2337
- 'field' => 'field_acfe_dpt_rewrite',
2338
- 'operator' => '==',
2339
- 'value' => '1',
 
 
 
 
 
 
 
2340
  ),
 
 
 
 
 
 
 
 
2341
  ),
2342
- ),
2343
- 'wrapper' => array(
2344
- 'width' => '',
2345
- 'class' => '',
2346
- 'id' => '',
2347
- ),
2348
- 'acfe_validate' => '',
2349
- 'acfe_update' => '',
2350
- 'acfe_permissions' => '',
2351
- 'message' => '',
2352
- 'default_value' => 0,
2353
- 'ui' => 1,
2354
- 'ui_on_text' => '',
2355
- 'ui_off_text' => '',
2356
- ),
2357
- array(
2358
- 'key' => 'field_acfe_dpt_rewrite_args',
2359
- 'label' => 'Rewrite Arguments',
2360
- 'name' => 'rewrite_args',
2361
- 'type' => 'group',
2362
- 'instructions' => 'Additional arguments',
2363
- 'required' => 0,
2364
- 'conditional_logic' => array(
2365
  array(
2366
- array(
2367
- 'field' => 'field_acfe_dpt_rewrite',
2368
- 'operator' => '==',
2369
- 'value' => '1',
 
 
 
 
 
 
 
2370
  ),
2371
- array(
2372
- 'field' => 'field_acfe_dpt_rewrite_args_select',
2373
- 'operator' => '==',
2374
- 'value' => '1',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2375
  ),
 
 
 
 
 
 
 
 
2376
  ),
2377
- ),
2378
- 'wrapper' => array(
2379
- 'width' => '',
2380
- 'class' => '',
2381
- 'id' => '',
2382
- ),
2383
- 'acfe_validate' => '',
2384
- 'acfe_update' => '',
2385
- 'acfe_permissions' => '',
2386
- 'layout' => 'row',
2387
- 'sub_fields' => array(
2388
  array(
2389
- 'key' => 'field_acfe_dpt_rewrite_slug',
2390
- 'label' => 'Slug',
2391
- 'name' => 'acfe_dpt_rewrite_slug',
2392
  'type' => 'text',
2393
- 'instructions' => 'Customize the permalink structure slug. Defaults to the post type name value. Should be translatable.',
2394
  'required' => 0,
2395
- 'conditional_logic' => array(
2396
- array(
2397
- array(
2398
- 'field' => 'field_acfe_dpt_rewrite_args_select',
2399
- 'operator' => '==',
2400
- 'value' => '1',
2401
- ),
2402
- ),
2403
- ),
2404
  'wrapper' => array(
2405
  'width' => '',
2406
  'class' => '',
@@ -2410,27 +2410,19 @@ etc...',
2410
  'acfe_update' => '',
2411
  'acfe_permissions' => '',
2412
  'default_value' => '',
2413
- 'placeholder' => 'Default',
2414
  'prepend' => '',
2415
  'append' => '',
2416
  'maxlength' => '',
2417
  ),
2418
  array(
2419
- 'key' => 'field_acfe_dpt_rewrite_with_front',
2420
- 'label' => 'With front',
2421
- 'name' => 'acfe_dpt_rewrite_with_front',
2422
- 'type' => 'true_false',
2423
- 'instructions' => 'Should the permalink structure be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true.',
2424
  'required' => 0,
2425
- 'conditional_logic' => array(
2426
- array(
2427
- array(
2428
- 'field' => 'field_acfe_dpt_rewrite_args_select',
2429
- 'operator' => '==',
2430
- 'value' => '1',
2431
- ),
2432
- ),
2433
- ),
2434
  'wrapper' => array(
2435
  'width' => '',
2436
  'class' => '',
@@ -2439,28 +2431,42 @@ etc...',
2439
  'acfe_validate' => '',
2440
  'acfe_update' => '',
2441
  'acfe_permissions' => '',
2442
- 'message' => '',
2443
- 'default_value' => 1,
2444
- 'ui' => 1,
2445
- 'ui_on_text' => '',
2446
- 'ui_off_text' => '',
2447
  ),
2448
  array(
2449
- 'key' => 'field_acfe_dpt_rewrite_feeds',
2450
- 'label' => 'Feeds',
2451
- 'name' => 'feeds',
2452
- 'type' => 'true_false',
2453
- 'instructions' => 'Should a feed permalink structure be built for this post type. Defaults to has_archive value.',
2454
  'required' => 0,
2455
- 'conditional_logic' => array(
2456
- array(
2457
- array(
2458
- 'field' => 'field_acfe_dpt_rewrite_args_select',
2459
- 'operator' => '==',
2460
- 'value' => '1',
2461
- ),
2462
- ),
2463
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2464
  'wrapper' => array(
2465
  'width' => '',
2466
  'class' => '',
@@ -2469,28 +2475,42 @@ etc...',
2469
  'acfe_validate' => '',
2470
  'acfe_update' => '',
2471
  'acfe_permissions' => '',
2472
- 'message' => '',
2473
- 'default_value' => 1,
2474
- 'ui' => 1,
2475
- 'ui_on_text' => '',
2476
- 'ui_off_text' => '',
2477
  ),
2478
  array(
2479
- 'key' => 'field_acfe_dpt_rewrite_pages',
2480
- 'label' => 'Pages',
2481
- 'name' => 'pages',
2482
- 'type' => 'true_false',
2483
- 'instructions' => 'Should the permalink structure provide for pagination. Defaults to true.',
2484
  'required' => 0,
2485
- 'conditional_logic' => array(
2486
- array(
2487
- array(
2488
- 'field' => 'field_acfe_dpt_rewrite_args_select',
2489
- 'operator' => '==',
2490
- 'value' => '1',
2491
- ),
2492
- ),
2493
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2494
  'wrapper' => array(
2495
  'width' => '',
2496
  'class' => '',
@@ -2499,17 +2519,17 @@ etc...',
2499
  'acfe_validate' => '',
2500
  'acfe_update' => '',
2501
  'acfe_permissions' => '',
2502
- 'message' => '',
2503
- 'default_value' => 1,
2504
- 'ui' => 1,
2505
- 'ui_on_text' => '',
2506
- 'ui_off_text' => '',
2507
  ),
2508
  ),
2509
  ),
2510
  array(
2511
- 'key' => 'field_acfe_dpt_tab_admin',
2512
- 'label' => 'Admin',
2513
  'name' => '',
2514
  'type' => 'tab',
2515
  'instructions' => '',
@@ -2525,32 +2545,15 @@ etc...',
2525
  'endpoint' => 0,
2526
  ),
2527
  array(
2528
- 'key' => 'field_acfe_dpt_admin_archive',
2529
- 'label' => 'Archive Page',
2530
- 'name' => 'acfe_dpt_admin_archive',
2531
- 'type' => 'true_false',
2532
- 'instructions' => 'Add archive page to the post type administration.',
2533
- 'required' => 0,
2534
- 'wrapper' => array(
2535
- 'width' => '',
2536
- 'class' => '',
2537
- 'id' => '',
2538
- ),
2539
- 'acfe_validate' => '',
2540
- 'acfe_update' => '',
2541
- 'acfe_permissions' => '',
2542
- 'message' => '',
2543
- 'default_value' => 0,
2544
- 'ui' => 1,
2545
- 'ui_on_text' => '',
2546
- 'ui_off_text' => '',
2547
- ),
2548
- array(
2549
- 'key' => 'field_acfe_dpt_admin_posts_per_page',
2550
- 'label' => 'Posts per page',
2551
- 'name' => 'acfe_dpt_admin_posts_per_page',
2552
- 'type' => 'number',
2553
- 'instructions' => 'ACF Extended: Number of posts to display on the admin list screen',
2554
  'required' => 0,
2555
  'conditional_logic' => 0,
2556
  'wrapper' => array(
@@ -2561,20 +2564,24 @@ etc...',
2561
  'acfe_validate' => '',
2562
  'acfe_update' => '',
2563
  'acfe_permissions' => '',
2564
- 'default_value' => 10,
2565
  'placeholder' => '',
2566
- 'prepend' => '',
2567
- 'append' => '',
2568
- 'min' => -1,
2569
- 'max' => '',
2570
- 'step' => '',
2571
  ),
2572
  array(
2573
- 'key' => 'field_acfe_dpt_admin_orderby',
2574
- 'label' => 'Order by',
2575
- 'name' => 'acfe_dpt_admin_orderby',
2576
- 'type' => 'text',
2577
- 'instructions' => 'ACF Extended: Sort retrieved posts by parameter in the admin list screen. Defaults to \'date (post_date)\'.',
 
 
 
 
 
 
2578
  'required' => 0,
2579
  'conditional_logic' => 0,
2580
  'wrapper' => array(
@@ -2583,24 +2590,20 @@ etc...',
2583
  'id' => '',
2584
  ),
2585
  'acfe_validate' => '',
2586
- 'acfe_update' => array(
2587
- '5c9479dec93c4' => array(
2588
- 'acfe_update_function' => 'sanitize_title',
2589
- ),
2590
- ),
2591
  'acfe_permissions' => '',
2592
- 'default_value' => 'date',
2593
  'placeholder' => '',
2594
- 'prepend' => '',
2595
- 'append' => '',
2596
  'maxlength' => '',
 
 
2597
  ),
2598
  array(
2599
- 'key' => 'field_acfe_dpt_admin_order',
2600
- 'label' => 'Order',
2601
- 'name' => 'acfe_dpt_admin_order',
2602
  'type' => 'select',
2603
- 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the admin list screen. Defaults to \'DESC\'.',
2604
  'required' => 0,
2605
  'conditional_logic' => 0,
2606
  'wrapper' => array(
@@ -2612,11 +2615,12 @@ etc...',
2612
  'acfe_update' => '',
2613
  'acfe_permissions' => '',
2614
  'choices' => array(
2615
- 'ASC' => 'ASC',
2616
- 'DESC' => 'DESC',
 
2617
  ),
2618
  'default_value' => array(
2619
- 0 => 'DESC',
2620
  ),
2621
  'allow_null' => 0,
2622
  'multiple' => 0,
99
  }
100
 
101
  // Register: Execute
102
+ if(!empty($name)){
103
+
104
+ register_post_type($name, $args);
105
+
106
+ }
107
 
108
  }
109
 
1094
  'placeholder' => '',
1095
  ),
1096
  array(
1097
+ 'key' => 'field_acfe_dpt_tab_menu',
1098
+ 'label' => 'Menu',
1099
  'name' => '',
1100
  'type' => 'tab',
1101
  'instructions' => '',
1111
  'endpoint' => 0,
1112
  ),
1113
  array(
1114
+ 'key' => 'field_acfe_dpt_menu_position',
1115
+ 'label' => 'Menu position',
1116
+ 'name' => 'menu_position',
1117
+ 'type' => 'number',
1118
+ 'instructions' => 'The position in the menu order the post type should appear. show_in_menu must be true',
 
1119
  'required' => 0,
1120
  'conditional_logic' => 0,
1121
  'wrapper' => array(
1123
  'class' => '',
1124
  'id' => '',
1125
  ),
1126
+ 'acfe_validate' => '',
1127
+ 'acfe_update' => '',
1128
  'acfe_permissions' => '',
1129
+ 'default_value' => 20,
1130
+ 'placeholder' => '',
1131
+ 'prepend' => '',
1132
+ 'append' => '',
1133
+ 'min' => 0,
1134
+ 'max' => '',
1135
+ 'step' => '',
1136
+ ),
1137
+ array(
1138
+ 'key' => 'field_acfe_dpt_menu_icon',
1139
+ 'label' => 'Menu icon',
1140
+ 'name' => 'menu_icon',
1141
+ 'type' => 'text',
1142
+ 'instructions' => 'The url to the icon to be used for this menu or the name of the icon from the iconfont (<a href="https://developer.wordpress.org/resource/dashicons/" target="_blank">Dashicons</a>)',
1143
+ 'required' => 0,
1144
+ 'conditional_logic' => 0,
1145
+ 'wrapper' => array(
1146
+ 'width' => '',
1147
+ 'class' => '',
1148
+ 'id' => '',
1149
+ ),
1150
+ 'acfe_validate' => '',
1151
+ 'acfe_update' => '',
1152
+ 'acfe_permissions' => '',
1153
+ 'default_value' => 'dashicons-admin-post',
1154
+ 'placeholder' => '',
1155
+ 'prepend' => '',
1156
+ 'append' => '',
1157
+ 'maxlength' => '',
1158
+ ),
1159
+ array(
1160
+ 'key' => 'field_acfe_dpt_show_ui',
1161
+ 'label' => 'Show UI',
1162
+ 'name' => 'show_ui',
1163
+ 'type' => 'true_false',
1164
+ 'instructions' => 'Whether to generate a default UI for managing this post type in the admin',
1165
+ 'required' => 0,
1166
+ 'conditional_logic' => 0,
1167
+ 'wrapper' => array(
1168
+ 'width' => '',
1169
+ 'class' => '',
1170
+ 'id' => '',
1171
+ ),
1172
+ 'acfe_validate' => '',
1173
+ 'acfe_update' => '',
1174
+ 'acfe_permissions' => '',
1175
+ 'message' => '',
1176
+ 'default_value' => 1,
1177
+ 'ui' => 1,
1178
+ 'ui_on_text' => '',
1179
+ 'ui_off_text' => '',
1180
+ ),
1181
+ array(
1182
+ 'key' => 'field_acfe_dpt_show_in_menu',
1183
+ 'label' => 'Show in menu',
1184
+ 'name' => 'show_in_menu',
1185
+ 'type' => 'true_false',
1186
+ 'instructions' => 'Where to show the post type in the admin menu. show_ui must be true',
1187
+ 'required' => 0,
1188
+ 'conditional_logic' => 0,
1189
+ 'wrapper' => array(
1190
+ 'width' => '',
1191
+ 'class' => '',
1192
+ 'id' => '',
1193
+ ),
1194
+ 'acfe_validate' => '',
1195
+ 'acfe_update' => '',
1196
+ 'acfe_permissions' => '',
1197
+ 'message' => '',
1198
+ 'default_value' => 1,
1199
+ 'ui' => 1,
1200
+ 'ui_on_text' => '',
1201
+ 'ui_off_text' => '',
1202
+ ),
1203
+ array(
1204
+ 'key' => 'field_acfe_dpt_show_in_menu_text',
1205
+ 'label' => 'Show in menu (text)',
1206
+ 'name' => 'show_in_menu_text',
1207
+ 'type' => 'text',
1208
+ 'instructions' => 'If an existing top level page such as \'tools.php\' or \'edit.php?post_type=page\', the post type will be placed as a sub menu of that page',
1209
+ 'required' => 0,
1210
+ 'conditional_logic' => array(
1211
  array(
1212
+ array(
1213
+ 'field' => 'field_acfe_dpt_show_in_menu',
1214
+ 'operator' => '==',
1215
+ 'value' => '1',
 
 
 
 
 
 
 
1216
  ),
 
 
 
 
 
 
 
 
1217
  ),
1218
+ ),
1219
+ 'wrapper' => array(
1220
+ 'width' => '',
1221
+ 'class' => '',
1222
+ 'id' => '',
1223
+ ),
1224
+ 'acfe_validate' => '',
1225
+ 'acfe_update' => '',
1226
+ 'acfe_permissions' => '',
1227
+ 'default_value' => '',
1228
+ 'placeholder' => '',
1229
+ 'prepend' => '',
1230
+ 'append' => '',
1231
+ 'maxlength' => '',
1232
+ ),
1233
+ array(
1234
+ 'key' => 'field_acfe_dpt_show_in_nav_menus',
1235
+ 'label' => 'Show in nav menus',
1236
+ 'name' => 'show_in_nav_menus',
1237
+ 'type' => 'true_false',
1238
+ 'instructions' => 'Whether post_type is available for selection in navigation menus',
1239
+ 'required' => 0,
1240
+ 'conditional_logic' => 0,
1241
+ 'wrapper' => array(
1242
+ 'width' => '',
1243
+ 'class' => '',
1244
+ 'id' => '',
1245
+ ),
1246
+ 'acfe_validate' => '',
1247
+ 'acfe_update' => '',
1248
+ 'acfe_permissions' => '',
1249
+ 'message' => '',
1250
+ 'default_value' => 1,
1251
+ 'ui' => 1,
1252
+ 'ui_on_text' => '',
1253
+ 'ui_off_text' => '',
1254
+ ),
1255
+ array(
1256
+ 'key' => 'field_acfe_dpt_show_in_admin_bar',
1257
+ 'label' => 'Show in admin bar',
1258
+ 'name' => 'show_in_admin_bar',
1259
+ 'type' => 'true_false',
1260
+ 'instructions' => 'Where to show the post type in the admin menu. show_ui must be true',
1261
+ 'required' => 0,
1262
+ 'conditional_logic' => 0,
1263
+ 'wrapper' => array(
1264
+ 'width' => '',
1265
+ 'class' => '',
1266
+ 'id' => '',
1267
+ ),
1268
+ 'acfe_validate' => '',
1269
+ 'acfe_update' => '',
1270
+ 'acfe_permissions' => '',
1271
+ 'message' => '',
1272
+ 'default_value' => 1,
1273
+ 'ui' => 1,
1274
+ 'ui_on_text' => '',
1275
+ 'ui_off_text' => '',
1276
+ ),
1277
+ array(
1278
+ 'key' => 'field_acfe_dpt_tab_archive',
1279
+ 'label' => 'Archive',
1280
+ 'name' => '',
1281
+ 'type' => 'tab',
1282
+ 'instructions' => '',
1283
+ 'required' => 0,
1284
+ 'conditional_logic' => 0,
1285
+ 'wrapper' => array(
1286
+ 'width' => '',
1287
+ 'class' => '',
1288
+ 'id' => '',
1289
+ ),
1290
+ 'acfe_permissions' => '',
1291
+ 'placement' => 'top',
1292
+ 'endpoint' => 0,
1293
+ ),
1294
+ array(
1295
+ 'key' => 'field_acfe_dpt_archive_template',
1296
+ 'label' => 'Template',
1297
+ 'name' => 'acfe_dpt_archive_template',
1298
+ 'type' => 'text',
1299
+ 'instructions' => 'ACF Extended: Which template file to load for the archive query. More informations on <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">Template hierarchy</a>',
1300
+ 'required' => 0,
1301
+ 'conditional_logic' => 0,
1302
+ 'wrapper' => array(
1303
+ 'width' => '',
1304
+ 'class' => '',
1305
+ 'id' => '',
1306
+ ),
1307
+ 'acfe_validate' => '',
1308
+ 'acfe_update' => '',
1309
+ 'acfe_permissions' => '',
1310
+ 'default_value' => '',
1311
+ 'placeholder' => 'my-template.php',
1312
+ 'prepend' => trailingslashit(acfe_get_setting('theme_folder')),
1313
+ 'append' => '',
1314
+ 'maxlength' => '',
1315
+ ),
1316
+ array(
1317
+ 'key' => 'field_acfe_dpt_has_archive',
1318
+ 'label' => 'Has archive',
1319
+ 'name' => 'has_archive',
1320
+ 'type' => 'true_false',
1321
+ 'instructions' => 'Enables post type archives.',
1322
+ 'required' => 0,
1323
+ 'conditional_logic' => 0,
1324
+ 'wrapper' => array(
1325
+ 'width' => '',
1326
+ 'class' => '',
1327
+ 'id' => '',
1328
+ ),
1329
+ 'acfe_validate' => '',
1330
+ 'acfe_update' => '',
1331
+ 'acfe_permissions' => '',
1332
+ 'message' => '',
1333
+ 'default_value' => 1,
1334
+ 'ui' => 1,
1335
+ 'ui_on_text' => '',
1336
+ 'ui_off_text' => '',
1337
+ ),
1338
+ array(
1339
+ 'key' => 'field_acfe_dpt_has_archive_slug',
1340
+ 'label' => 'Slug',
1341
+ 'name' => 'has_archive_slug',
1342
+ 'type' => 'text',
1343
+ 'instructions' => 'Will use post type name as archive slug by default.',
1344
+ 'required' => 0,
1345
+ 'conditional_logic' => array(
1346
  array(
1347
+ array(
1348
+ 'field' => 'field_acfe_dpt_has_archive',
1349
+ 'operator' => '==',
1350
+ 'value' => '1',
 
 
 
 
 
 
 
1351
  ),
 
 
 
 
 
 
 
 
1352
  ),
1353
+ ),
1354
+ 'wrapper' => array(
1355
+ 'width' => '',
1356
+ 'class' => '',
1357
+ 'id' => '',
1358
+ ),
1359
+ 'acfe_validate' => '',
1360
+ 'acfe_update' => '',
1361
+ 'acfe_permissions' => '',
1362
+ 'default_value' => '',
1363
+ 'placeholder' => 'Default',
1364
+ 'prepend' => '',
1365
+ 'append' => '',
1366
+ 'maxlength' => '',
1367
+ ),
1368
+ array(
1369
+ 'key' => 'field_acfe_dpt_archive_posts_per_page',
1370
+ 'label' => 'Posts per page',
1371
+ 'name' => 'acfe_dpt_archive_posts_per_page',
1372
+ 'type' => 'number',
1373
+ 'instructions' => 'ACF Extended: Number of posts to display in the archive page',
1374
+ 'required' => 0,
1375
+ 'wrapper' => array(
1376
+ 'width' => '',
1377
+ 'class' => '',
1378
+ 'id' => '',
1379
+ ),
1380
+ 'acfe_validate' => '',
1381
+ 'acfe_update' => '',
1382
+ 'acfe_permissions' => '',
1383
+ 'default_value' => 10,
1384
+ 'placeholder' => '',
1385
+ 'prepend' => '',
1386
+ 'append' => '',
1387
+ 'min' => -1,
1388
+ 'max' => '',
1389
+ 'step' => '',
1390
+ 'conditional_logic' => array(
1391
+ array(
1392
+ array(
1393
+ 'field' => 'field_acfe_dpt_has_archive',
1394
+ 'operator' => '==',
1395
+ 'value' => '1',
1396
+ ),
1397
+ ),
1398
+ ),
1399
+ ),
1400
+ array(
1401
+ 'key' => 'field_acfe_dpt_archive_orderby',
1402
+ 'label' => 'Order by',
1403
+ 'name' => 'acfe_dpt_archive_orderby',
1404
+ 'type' => 'text',
1405
+ 'instructions' => 'ACF Extended: Sort retrieved posts by parameter in the archive page. Defaults to \'date (post_date)\'.',
1406
+ 'required' => 0,
1407
+ 'wrapper' => array(
1408
+ 'width' => '',
1409
+ 'class' => '',
1410
+ 'id' => '',
1411
+ ),
1412
+ 'acfe_validate' => '',
1413
+ 'acfe_update' => array(
1414
+ '5c9479dec93c4' => array(
1415
+ 'acfe_update_function' => 'sanitize_title',
1416
  ),
1417
+ ),
1418
+ 'acfe_permissions' => '',
1419
+ 'default_value' => 'date',
1420
+ 'placeholder' => '',
1421
+ 'prepend' => '',
1422
+ 'append' => '',
1423
+ 'maxlength' => '',
1424
+ 'conditional_logic' => array(
1425
+ array(
1426
+ array(
1427
+ 'field' => 'field_acfe_dpt_has_archive',
1428
+ 'operator' => '==',
1429
+ 'value' => '1',
1430
+ ),
1431
+ ),
1432
+ ),
1433
+ ),
1434
+ array(
1435
+ 'key' => 'field_acfe_dpt_archive_order',
1436
+ 'label' => 'Order',
1437
+ 'name' => 'acfe_dpt_archive_order',
1438
+ 'type' => 'select',
1439
+ 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the archive page. Defaults to \'DESC\'.',
1440
+ 'required' => 0,
1441
+ 'wrapper' => array(
1442
+ 'width' => '',
1443
+ 'class' => '',
1444
+ 'id' => '',
1445
+ ),
1446
+ 'acfe_validate' => '',
1447
+ 'acfe_update' => '',
1448
+ 'acfe_permissions' => '',
1449
+ 'choices' => array(
1450
+ 'ASC' => 'ASC',
1451
+ 'DESC' => 'DESC',
1452
+ ),
1453
+ 'default_value' => array(
1454
+ 0 => 'DESC',
1455
+ ),
1456
+ 'allow_null' => 0,
1457
+ 'multiple' => 0,
1458
+ 'ui' => 0,
1459
+ 'return_format' => 'value',
1460
+ 'ajax' => 0,
1461
+ 'placeholder' => '',
1462
+ 'conditional_logic' => array(
1463
+ array(
1464
+ array(
1465
+ 'field' => 'field_acfe_dpt_has_archive',
1466
+ 'operator' => '==',
1467
+ 'value' => '1',
1468
+ ),
1469
+ ),
1470
+ ),
1471
+ ),
1472
+ array(
1473
+ 'key' => 'field_acfe_dpt_tab_single',
1474
+ 'label' => 'Single',
1475
+ 'name' => '',
1476
+ 'type' => 'tab',
1477
+ 'instructions' => '',
1478
+ 'required' => 0,
1479
+ 'conditional_logic' => 0,
1480
+ 'wrapper' => array(
1481
+ 'width' => '',
1482
+ 'class' => '',
1483
+ 'id' => '',
1484
+ ),
1485
+ 'acfe_permissions' => '',
1486
+ 'placement' => 'top',
1487
+ 'endpoint' => 0,
1488
+ ),
1489
+ array(
1490
+ 'key' => 'field_acfe_dpt_single_template',
1491
+ 'label' => 'Template',
1492
+ 'name' => 'acfe_dpt_single_template',
1493
+ 'type' => 'text',
1494
+ 'instructions' => 'ACF Extended: Which template file to load for the single query. More informations on <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">Template hierarchy</a>',
1495
+ 'required' => 0,
1496
+ 'conditional_logic' => 0,
1497
+ 'wrapper' => array(
1498
+ 'width' => '',
1499
+ 'class' => '',
1500
+ 'id' => '',
1501
+ ),
1502
+ 'acfe_validate' => '',
1503
+ 'acfe_update' => '',
1504
+ 'acfe_permissions' => '',
1505
+ 'default_value' => '',
1506
+ 'placeholder' => 'my-template.php',
1507
+ 'prepend' => trailingslashit(acfe_get_setting('theme_folder')),
1508
+ 'append' => '',
1509
+ 'maxlength' => '',
1510
+ ),
1511
+ array(
1512
+ 'key' => 'field_acfe_dpt_rewrite',
1513
+ 'label' => 'Rewrite',
1514
+ 'name' => 'rewrite',
1515
+ 'type' => 'true_false',
1516
+ 'instructions' => 'Triggers the handling of rewrites for this post type. To prevent rewrites, set to false.',
1517
+ 'required' => 0,
1518
+ 'conditional_logic' => 0,
1519
+ 'wrapper' => array(
1520
+ 'width' => '',
1521
+ 'class' => '',
1522
+ 'id' => '',
1523
+ ),
1524
+ 'acfe_validate' => '',
1525
+ 'acfe_update' => '',
1526
+ 'acfe_permissions' => '',
1527
+ 'message' => '',
1528
+ 'default_value' => 1,
1529
+ 'ui' => 1,
1530
+ 'ui_on_text' => '',
1531
+ 'ui_off_text' => '',
1532
+ ),
1533
+ array(
1534
+ 'key' => 'field_acfe_dpt_rewrite_args_select',
1535
+ 'label' => 'Rewrite Arguments',
1536
+ 'name' => 'rewrite_args_select',
1537
+ 'type' => 'true_false',
1538
+ 'instructions' => 'Use additional rewrite arguments',
1539
+ 'required' => 0,
1540
+ 'conditional_logic' => array(
1541
  array(
1542
+ array(
1543
+ 'field' => 'field_acfe_dpt_rewrite',
1544
+ 'operator' => '==',
1545
+ 'value' => '1',
 
 
 
 
 
 
 
1546
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1547
  ),
1548
+ ),
1549
+ 'wrapper' => array(
1550
+ 'width' => '',
1551
+ 'class' => '',
1552
+ 'id' => '',
1553
+ ),
1554
+ 'acfe_validate' => '',
1555
+ 'acfe_update' => '',
1556
+ 'acfe_permissions' => '',
1557
+ 'message' => '',
1558
+ 'default_value' => 0,
1559
+ 'ui' => 1,
1560
+ 'ui_on_text' => '',
1561
+ 'ui_off_text' => '',
1562
+ ),
1563
+ array(
1564
+ 'key' => 'field_acfe_dpt_rewrite_args',
1565
+ 'label' => 'Rewrite Arguments',
1566
+ 'name' => 'rewrite_args',
1567
+ 'type' => 'group',
1568
+ 'instructions' => 'Additional arguments',
1569
+ 'required' => 0,
1570
+ 'conditional_logic' => array(
1571
  array(
1572
+ array(
1573
+ 'field' => 'field_acfe_dpt_rewrite',
1574
+ 'operator' => '==',
1575
+ 'value' => '1',
 
 
 
 
 
 
 
1576
  ),
1577
+ array(
1578
+ 'field' => 'field_acfe_dpt_rewrite_args_select',
1579
+ 'operator' => '==',
1580
+ 'value' => '1',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1581
  ),
 
 
 
 
 
 
 
 
1582
  ),
1583
+ ),
1584
+ 'wrapper' => array(
1585
+ 'width' => '',
1586
+ 'class' => '',
1587
+ 'id' => '',
1588
+ ),
1589
+ 'acfe_validate' => '',
1590
+ 'acfe_update' => '',
1591
+ 'acfe_permissions' => '',
1592
+ 'layout' => 'row',
1593
+ 'sub_fields' => array(
1594
  array(
1595
+ 'key' => 'field_acfe_dpt_rewrite_slug',
1596
+ 'label' => 'Slug',
1597
+ 'name' => 'acfe_dpt_rewrite_slug',
1598
  'type' => 'text',
1599
+ 'instructions' => 'Customize the permalink structure slug. Defaults to the post type name value. Should be translatable.',
1600
  'required' => 0,
1601
+ 'conditional_logic' => array(
1602
+ array(
1603
+ array(
1604
+ 'field' => 'field_acfe_dpt_rewrite_args_select',
1605
+ 'operator' => '==',
1606
+ 'value' => '1',
1607
+ ),
1608
+ ),
1609
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1610
  'wrapper' => array(
1611
  'width' => '',
1612
  'class' => '',
1616
  'acfe_update' => '',
1617
  'acfe_permissions' => '',
1618
  'default_value' => '',
1619
+ 'placeholder' => 'Default',
1620
  'prepend' => '',
1621
  'append' => '',
1622
  'maxlength' => '',
1623
  ),
1624
  array(
1625
+ 'key' => 'field_acfe_dpt_rewrite_with_front',
1626
+ 'label' => 'With front',
1627
+ 'name' => 'acfe_dpt_rewrite_with_front',
1628
+ 'type' => 'true_false',
1629
+ 'instructions' => 'Should the permalink structure be prepended with the front base. (example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/). Defaults to true.',
1630
  'required' => 0,
1631
+ 'conditional_logic' => array(
1632
+ array(
1633
+ array(
1634
+ 'field' => 'field_acfe_dpt_rewrite_args_select',
1635
+ 'operator' => '==',
1636
+ 'value' => '1',
1637
+ ),
1638
+ ),
1639
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1640
  'wrapper' => array(
1641
  'width' => '',
1642
  'class' => '',
1645
  'acfe_validate' => '',
1646
  'acfe_update' => '',
1647
  'acfe_permissions' => '',
1648
+ 'message' => '',
1649
+ 'default_value' => 1,
1650
+ 'ui' => 1,
1651
+ 'ui_on_text' => '',
1652
+ 'ui_off_text' => '',
1653
  ),
1654
  array(
1655
+ 'key' => 'field_acfe_dpt_rewrite_feeds',
1656
+ 'label' => 'Feeds',
1657
+ 'name' => 'feeds',
1658
+ 'type' => 'true_false',
1659
+ 'instructions' => 'Should a feed permalink structure be built for this post type. Defaults to has_archive value.',
1660
  'required' => 0,
1661
+ 'conditional_logic' => array(
1662
+ array(
1663
+ array(
1664
+ 'field' => 'field_acfe_dpt_rewrite_args_select',
1665
+ 'operator' => '==',
1666
+ 'value' => '1',
1667
+ ),
1668
+ ),
1669
+ ),
1670
  'wrapper' => array(
1671
  'width' => '',
1672
  'class' => '',
1675
  'acfe_validate' => '',
1676
  'acfe_update' => '',
1677
  'acfe_permissions' => '',
1678
+ 'message' => '',
1679
+ 'default_value' => 1,
1680
+ 'ui' => 1,
1681
+ 'ui_on_text' => '',
1682
+ 'ui_off_text' => '',
1683
  ),
1684
  array(
1685
+ 'key' => 'field_acfe_dpt_rewrite_pages',
1686
+ 'label' => 'Pages',
1687
+ 'name' => 'pages',
1688
+ 'type' => 'true_false',
1689
+ 'instructions' => 'Should the permalink structure provide for pagination. Defaults to true.',
1690
  'required' => 0,
1691
+ 'conditional_logic' => array(
1692
+ array(
1693
+ array(
1694
+ 'field' => 'field_acfe_dpt_rewrite_args_select',
1695
+ 'operator' => '==',
1696
+ 'value' => '1',
1697
+ ),
1698
+ ),
1699
+ ),
1700
  'wrapper' => array(
1701
  'width' => '',
1702
  'class' => '',
1705
  'acfe_validate' => '',
1706
  'acfe_update' => '',
1707
  'acfe_permissions' => '',
1708
+ 'message' => '',
1709
+ 'default_value' => 1,
1710
+ 'ui' => 1,
1711
+ 'ui_on_text' => '',
1712
+ 'ui_off_text' => '',
1713
  ),
1714
+ ),
1715
+ ),
1716
+ array(
1717
+ 'key' => 'field_acfe_dpt_tab_admin',
1718
+ 'label' => 'Admin',
1719
+ 'name' => '',
1720
+ 'type' => 'tab',
1721
+ 'instructions' => '',
1722
+ 'required' => 0,
1723
+ 'conditional_logic' => 0,
1724
+ 'wrapper' => array(
1725
+ 'width' => '',
1726
+ 'class' => '',
1727
+ 'id' => '',
1728
+ ),
1729
+ 'acfe_permissions' => '',
1730
+ 'placement' => 'top',
1731
+ 'endpoint' => 0,
1732
+ ),
1733
+ array(
1734
+ 'key' => 'field_acfe_dpt_admin_archive',
1735
+ 'label' => 'Archive Page',
1736
+ 'name' => 'acfe_dpt_admin_archive',
1737
+ 'type' => 'true_false',
1738
+ 'instructions' => 'ACF Extended: Add an "Archive" Options Page as submenu of the post type.',
1739
+ 'required' => 0,
1740
+ 'wrapper' => array(
1741
+ 'width' => '',
1742
+ 'class' => '',
1743
+ 'id' => '',
1744
+ ),
1745
+ 'acfe_validate' => '',
1746
+ 'acfe_update' => '',
1747
+ 'acfe_permissions' => '',
1748
+ 'message' => '',
1749
+ 'default_value' => 0,
1750
+ 'ui' => 1,
1751
+ 'ui_on_text' => '',
1752
+ 'ui_off_text' => '',
1753
+ ),
1754
+ array(
1755
+ 'key' => 'field_acfe_dpt_admin_posts_per_page',
1756
+ 'label' => 'Posts per page',
1757
+ 'name' => 'acfe_dpt_admin_posts_per_page',
1758
+ 'type' => 'number',
1759
+ 'instructions' => 'ACF Extended: Number of posts to display on the admin list screen.',
1760
+ 'required' => 0,
1761
+ 'conditional_logic' => 0,
1762
+ 'wrapper' => array(
1763
+ 'width' => '',
1764
+ 'class' => '',
1765
+ 'id' => '',
1766
+ ),
1767
+ 'acfe_validate' => '',
1768
+ 'acfe_update' => '',
1769
+ 'acfe_permissions' => '',
1770
+ 'default_value' => 10,
1771
+ 'placeholder' => '',
1772
+ 'prepend' => '',
1773
+ 'append' => '',
1774
+ 'min' => -1,
1775
+ 'max' => '',
1776
+ 'step' => '',
1777
+ ),
1778
+ array(
1779
+ 'key' => 'field_acfe_dpt_admin_orderby',
1780
+ 'label' => 'Order by',
1781
+ 'name' => 'acfe_dpt_admin_orderby',
1782
+ 'type' => 'text',
1783
+ 'instructions' => 'ACF Extended: Sort retrieved posts by parameter in the admin list screen. Defaults to \'date (post_date)\'.',
1784
+ 'required' => 0,
1785
+ 'conditional_logic' => 0,
1786
+ 'wrapper' => array(
1787
+ 'width' => '',
1788
+ 'class' => '',
1789
+ 'id' => '',
1790
+ ),
1791
+ 'acfe_validate' => '',
1792
+ 'acfe_update' => array(
1793
+ '5c9479dec93c4' => array(
1794
+ 'acfe_update_function' => 'sanitize_title',
1795
+ ),
1796
+ ),
1797
+ 'acfe_permissions' => '',
1798
+ 'default_value' => 'date',
1799
+ 'placeholder' => '',
1800
+ 'prepend' => '',
1801
+ 'append' => '',
1802
+ 'maxlength' => '',
1803
+ ),
1804
+ array(
1805
+ 'key' => 'field_acfe_dpt_admin_order',
1806
+ 'label' => 'Order',
1807
+ 'name' => 'acfe_dpt_admin_order',
1808
+ 'type' => 'select',
1809
+ 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the admin list screen. Defaults to \'DESC\'.',
1810
+ 'required' => 0,
1811
+ 'conditional_logic' => 0,
1812
+ 'wrapper' => array(
1813
+ 'width' => '',
1814
+ 'class' => '',
1815
+ 'id' => '',
1816
+ ),
1817
+ 'acfe_validate' => '',
1818
+ 'acfe_update' => '',
1819
+ 'acfe_permissions' => '',
1820
+ 'choices' => array(
1821
+ 'ASC' => 'ASC',
1822
+ 'DESC' => 'DESC',
1823
+ ),
1824
+ 'default_value' => array(
1825
+ 0 => 'DESC',
1826
+ ),
1827
+ 'allow_null' => 0,
1828
+ 'multiple' => 0,
1829
+ 'ui' => 0,
1830
+ 'return_format' => 'value',
1831
+ 'ajax' => 0,
1832
+ 'placeholder' => '',
1833
+ ),
1834
+ array(
1835
+ 'key' => 'field_acfe_dpt_tab_labels',
1836
+ 'label' => 'Labels',
1837
+ 'name' => '',
1838
+ 'type' => 'tab',
1839
+ 'instructions' => '',
1840
+ 'required' => 0,
1841
+ 'conditional_logic' => 0,
1842
+ 'wrapper' => array(
1843
+ 'width' => '',
1844
+ 'class' => '',
1845
+ 'id' => '',
1846
+ ),
1847
+ 'acfe_permissions' => '',
1848
+ 'placement' => 'top',
1849
+ 'endpoint' => 0,
1850
+ ),
1851
+ array(
1852
+ 'key' => 'field_acfe_dpt_labels',
1853
+ 'label' => 'Labels',
1854
+ 'name' => 'labels',
1855
+ 'type' => 'group',
1856
+ 'instructions' => 'An array of labels for this post type. By default, post labels are used for non-hierarchical post types and page labels for hierarchical ones.<br /><br />
1857
+ Default: if empty, \'name\' is set to value of \'label\', and \'singular_name\' is set to value of \'name\'.',
1858
+ 'required' => 0,
1859
+ 'conditional_logic' => 0,
1860
+ 'wrapper' => array(
1861
+ 'width' => '',
1862
+ 'class' => '',
1863
+ 'id' => '',
1864
+ ),
1865
+ 'acfe_permissions' => '',
1866
+ 'layout' => 'row',
1867
+ 'sub_fields' => array(
1868
+ array(
1869
+ 'key' => 'field_acfe_dpt_singular_name',
1870
+ 'label' => 'Singular name',
1871
+ 'name' => 'singular_name',
1872
+ 'type' => 'text',
1873
+ 'instructions' => '',
1874
+ 'required' => 0,
1875
+ 'conditional_logic' => 0,
1876
+ 'wrapper' => array(
1877
  'width' => '',
1878
  'class' => '',
1879
  'id' => '',
1888
  'maxlength' => '',
1889
  ),
1890
  array(
1891
+ 'key' => 'field_acfe_dpt_add_new',
1892
+ 'label' => 'Add new',
1893
+ 'name' => 'add_new',
1894
  'type' => 'text',
1895
  'instructions' => '',
1896
  'required' => 0,
1910
  'maxlength' => '',
1911
  ),
1912
  array(
1913
+ 'key' => 'field_acfe_dpt_add_new_item',
1914
+ 'label' => 'Add new item',
1915
+ 'name' => 'add_new_item',
1916
  'type' => 'text',
1917
  'instructions' => '',
1918
  'required' => 0,
1932
  'maxlength' => '',
1933
  ),
1934
  array(
1935
+ 'key' => 'field_acfe_dpt_edit_item',
1936
+ 'label' => 'Edit item',
1937
+ 'name' => 'edit_item',
1938
  'type' => 'text',
1939
  'instructions' => '',
1940
  'required' => 0,
1954
  'maxlength' => '',
1955
  ),
1956
  array(
1957
+ 'key' => 'field_acfe_dpt_new_item',
1958
+ 'label' => 'New item',
1959
+ 'name' => 'new_item',
1960
  'type' => 'text',
1961
  'instructions' => '',
1962
  'required' => 0,
1976
  'maxlength' => '',
1977
  ),
1978
  array(
1979
+ 'key' => 'field_acfe_dpt_view_item',
1980
+ 'label' => 'View item',
1981
+ 'name' => 'view_item',
1982
  'type' => 'text',
1983
  'instructions' => '',
1984
  'required' => 0,
1998
  'maxlength' => '',
1999
  ),
2000
  array(
2001
+ 'key' => 'field_acfe_dpt_view_items',
2002
+ 'label' => 'View items',
2003
+ 'name' => 'view_items',
2004
  'type' => 'text',
2005
  'instructions' => '',
2006
  'required' => 0,
2020
  'maxlength' => '',
2021
  ),
2022
  array(
2023
+ 'key' => 'field_acfe_dpt_search_items',
2024
+ 'label' => 'Search items',
2025
+ 'name' => 'search_items',
2026
  'type' => 'text',
2027
  'instructions' => '',
2028
  'required' => 0,
2042
  'maxlength' => '',
2043
  ),
2044
  array(
2045
+ 'key' => 'field_acfe_dpt_not_found',
2046
+ 'label' => 'Not found',
2047
+ 'name' => 'not_found',
2048
  'type' => 'text',
2049
  'instructions' => '',
2050
  'required' => 0,
2064
  'maxlength' => '',
2065
  ),
2066
  array(
2067
+ 'key' => 'field_acfe_dpt_not_found_in_trash',
2068
+ 'label' => 'Not found in trash',
2069
+ 'name' => 'not_found_in_trash',
2070
  'type' => 'text',
2071
  'instructions' => '',
2072
  'required' => 0,
2086
  'maxlength' => '',
2087
  ),
2088
  array(
2089
+ 'key' => 'field_acfe_dpt_parent_item_colon',
2090
+ 'label' => 'Parent item colon',
2091
+ 'name' => 'parent_item_colon',
2092
  'type' => 'text',
2093
  'instructions' => '',
2094
  'required' => 0,
2108
  'maxlength' => '',
2109
  ),
2110
  array(
2111
+ 'key' => 'field_acfe_dpt_all_items',
2112
+ 'label' => 'All items',
2113
+ 'name' => 'all_items',
2114
  'type' => 'text',
2115
  'instructions' => '',
2116
  'required' => 0,
2130
  'maxlength' => '',
2131
  ),
2132
  array(
2133
+ 'key' => 'field_acfe_dpt_archives',
2134
+ 'label' => 'Archives',
2135
+ 'name' => 'archives',
2136
  'type' => 'text',
2137
  'instructions' => '',
2138
  'required' => 0,
2152
  'maxlength' => '',
2153
  ),
2154
  array(
2155
+ 'key' => 'field_acfe_dpt_attributes',
2156
+ 'label' => 'Attributes',
2157
+ 'name' => 'attributes',
2158
  'type' => 'text',
2159
  'instructions' => '',
2160
  'required' => 0,
2174
  'maxlength' => '',
2175
  ),
2176
  array(
2177
+ 'key' => 'field_acfe_dpt_insert_into_item',
2178
+ 'label' => 'Insert into item',
2179
+ 'name' => 'insert_into_item',
2180
  'type' => 'text',
2181
  'instructions' => '',
2182
  'required' => 0,
2196
  'maxlength' => '',
2197
  ),
2198
  array(
2199
+ 'key' => 'field_acfe_dpt_uploaded_to_this_item',
2200
+ 'label' => 'Uploaded to this item',
2201
+ 'name' => 'uploaded_to_this_item',
2202
  'type' => 'text',
2203
  'instructions' => '',
2204
  'required' => 0,
2218
  'maxlength' => '',
2219
  ),
2220
  array(
2221
+ 'key' => 'field_acfe_dpt_featured_image',
2222
+ 'label' => 'Featured image',
2223
+ 'name' => 'featured_image',
2224
+ 'type' => 'text',
2225
+ 'instructions' => '',
2226
  'required' => 0,
2227
  'conditional_logic' => 0,
2228
  'wrapper' => array(
2239
  'append' => '',
2240
  'maxlength' => '',
2241
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2242
  array(
2243
+ 'key' => 'field_acfe_dpt_set_featured_image',
2244
+ 'label' => 'Set featured image',
2245
+ 'name' => 'set_featured_image',
2246
+ 'type' => 'text',
2247
+ 'instructions' => '',
2248
+ 'required' => 0,
2249
+ 'conditional_logic' => 0,
2250
+ 'wrapper' => array(
2251
+ 'width' => '',
2252
+ 'class' => '',
2253
+ 'id' => '',
2254
  ),
2255
+ 'acfe_validate' => '',
2256
+ 'acfe_update' => '',
2257
+ 'acfe_permissions' => '',
2258
+ 'default_value' => '',
2259
+ 'placeholder' => '',
2260
+ 'prepend' => '',
2261
+ 'append' => '',
2262
+ 'maxlength' => '',
2263
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2264
  array(
2265
+ 'key' => 'field_acfe_dpt_remove_featured_image',
2266
+ 'label' => 'Remove featured image',
2267
+ 'name' => 'remove_featured_image',
2268
+ 'type' => 'text',
2269
+ 'instructions' => '',
2270
+ 'required' => 0,
2271
+ 'conditional_logic' => 0,
2272
+ 'wrapper' => array(
2273
+ 'width' => '',
2274
+ 'class' => '',
2275
+ 'id' => '',
2276
  ),
2277
+ 'acfe_validate' => '',
2278
+ 'acfe_update' => '',
2279
+ 'acfe_permissions' => '',
2280
+ 'default_value' => '',
2281
+ 'placeholder' => '',
2282
+ 'prepend' => '',
2283
+ 'append' => '',
2284
+ 'maxlength' => '',
2285
  ),
2286
+ array(
2287
+ 'key' => 'field_acfe_dpt_use_featured_image',
2288
+ 'label' => 'Use featured image',
2289
+ 'name' => 'use_featured_image',
2290
+ 'type' => 'text',
2291
+ 'instructions' => '',
2292
+ 'required' => 0,
2293
+ 'conditional_logic' => 0,
2294
+ 'wrapper' => array(
2295
+ 'width' => '',
2296
+ 'class' => '',
2297
+ 'id' => '',
2298
+ ),
2299
+ 'acfe_validate' => '',
2300
+ 'acfe_update' => '',
2301
+ 'acfe_permissions' => '',
2302
+ 'default_value' => '',
2303
+ 'placeholder' => '',
2304
+ 'prepend' => '',
2305
+ 'append' => '',
2306
+ 'maxlength' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2307
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2308
  array(
2309
+ 'key' => 'field_acfe_dpt_menu_name',
2310
+ 'label' => 'Menu name',
2311
+ 'name' => 'menu_name',
2312
+ 'type' => 'text',
2313
+ 'instructions' => '',
2314
+ 'required' => 0,
2315
+ 'conditional_logic' => 0,
2316
+ 'wrapper' => array(
2317
+ 'width' => '',
2318
+ 'class' => '',
2319
+ 'id' => '',
2320
  ),
2321
+ 'acfe_validate' => '',
2322
+ 'acfe_update' => '',
2323
+ 'acfe_permissions' => '',
2324
+ 'default_value' => '',
2325
+ 'placeholder' => '',
2326
+ 'prepend' => '',
2327
+ 'append' => '',
2328
+ 'maxlength' => '',
2329
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2330
  array(
2331
+ 'key' => 'field_acfe_dpt_filter_items_list',
2332
+ 'label' => 'Filter items list',
2333
+ 'name' => 'filter_items_list',
2334
+ 'type' => 'text',
2335
+ 'instructions' => '',
2336
+ 'required' => 0,
2337
+ 'conditional_logic' => 0,
2338
+ 'wrapper' => array(
2339
+ 'width' => '',
2340
+ 'class' => '',
2341
+ 'id' => '',
2342
  ),
2343
+ 'acfe_validate' => '',
2344
+ 'acfe_update' => '',
2345
+ 'acfe_permissions' => '',
2346
+ 'default_value' => '',
2347
+ 'placeholder' => '',
2348
+ 'prepend' => '',
2349
+ 'append' => '',
2350
+ 'maxlength' => '',
2351
+ ),
2352
+ array(
2353
+ 'key' => 'field_acfe_dpt_items_list_navigation',
2354
+ 'label' => 'Items list navigation',
2355
+ 'name' => 'items_list_navigation',
2356
+ 'type' => 'text',
2357
+ 'instructions' => '',
2358
+ 'required' => 0,
2359
+ 'conditional_logic' => 0,
2360
+ 'wrapper' => array(
2361
+ 'width' => '',
2362
+ 'class' => '',
2363
+ 'id' => '',
2364
+ ),
2365
+ 'acfe_validate' => '',
2366
+ 'acfe_update' => '',
2367
+ 'acfe_permissions' => '',
2368
+ 'default_value' => '',
2369
+ 'placeholder' => '',
2370
+ 'prepend' => '',
2371
+ 'append' => '',
2372
+ 'maxlength' => '',
2373
+ ),
2374
+ array(
2375
+ 'key' => 'field_acfe_dpt_items_list',
2376
+ 'label' => 'Items list',
2377
+ 'name' => 'items_list',
2378
+ 'type' => 'text',
2379
+ 'instructions' => '',
2380
+ 'required' => 0,
2381
+ 'conditional_logic' => 0,
2382
+ 'wrapper' => array(
2383
+ 'width' => '',
2384
+ 'class' => '',
2385
+ 'id' => '',
2386
  ),
2387
+ 'acfe_validate' => '',
2388
+ 'acfe_update' => '',
2389
+ 'acfe_permissions' => '',
2390
+ 'default_value' => '',
2391
+ 'placeholder' => '',
2392
+ 'prepend' => '',
2393
+ 'append' => '',
2394
+ 'maxlength' => '',
2395
  ),
 
 
 
 
 
 
 
 
 
 
 
2396
  array(
2397
+ 'key' => 'field_acfe_dpt_name_admin_bar',
2398
+ 'label' => 'Name admin bar',
2399
+ 'name' => 'name_admin_bar',
2400
  'type' => 'text',
2401
+ 'instructions' => '',
2402
  'required' => 0,
2403
+ 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
2404
  'wrapper' => array(
2405
  'width' => '',
2406
  'class' => '',
2410
  'acfe_update' => '',
2411
  'acfe_permissions' => '',
2412
  'default_value' => '',
2413
+ 'placeholder' => '',
2414
  'prepend' => '',
2415
  'append' => '',
2416
  'maxlength' => '',
2417
  ),
2418
  array(
2419
+ 'key' => 'field_acfe_dpt_item_published',
2420
+ 'label' => 'Item published',
2421
+ 'name' => 'item_published',
2422
+ 'type' => 'text',
2423
+ 'instructions' => '',
2424
  'required' => 0,
2425
+ 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
2426
  'wrapper' => array(
2427
  'width' => '',
2428
  'class' => '',
2431
  'acfe_validate' => '',
2432
  'acfe_update' => '',
2433
  'acfe_permissions' => '',
2434
+ 'default_value' => '',
2435
+ 'placeholder' => '',
2436
+ 'prepend' => '',
2437
+ 'append' => '',
2438
+ 'maxlength' => '',
2439
  ),
2440
  array(
2441
+ 'key' => 'field_acfe_dpt_item_published_privately',
2442
+ 'label' => 'Item published privately',
2443
+ 'name' => 'item_published_privately',
2444
+ 'type' => 'text',
2445
+ 'instructions' => '',
2446
  'required' => 0,
2447
+ 'conditional_logic' => 0,
2448
+ 'wrapper' => array(
2449
+ 'width' => '',
2450
+ 'class' => '',
2451
+ 'id' => '',
 
 
 
2452
  ),
2453
+ 'acfe_validate' => '',
2454
+ 'acfe_update' => '',
2455
+ 'acfe_permissions' => '',
2456
+ 'default_value' => '',
2457
+ 'placeholder' => '',
2458
+ 'prepend' => '',
2459
+ 'append' => '',
2460
+ 'maxlength' => '',
2461
+ ),
2462
+ array(
2463
+ 'key' => 'field_acfe_dpt_item_reverted_to_draft',
2464
+ 'label' => 'Item reverted to draft',
2465
+ 'name' => 'item_reverted_to_draft',
2466
+ 'type' => 'text',
2467
+ 'instructions' => '',
2468
+ 'required' => 0,
2469
+ 'conditional_logic' => 0,
2470
  'wrapper' => array(
2471
  'width' => '',
2472
  'class' => '',
2475
  'acfe_validate' => '',
2476
  'acfe_update' => '',
2477
  'acfe_permissions' => '',
2478
+ 'default_value' => '',
2479
+ 'placeholder' => '',
2480
+ 'prepend' => '',
2481
+ 'append' => '',
2482
+ 'maxlength' => '',
2483
  ),
2484
  array(
2485
+ 'key' => 'field_acfe_dpt_item_scheduled',
2486
+ 'label' => 'Item scheduled',
2487
+ 'name' => 'item_scheduled',
2488
+ 'type' => 'text',
2489
+ 'instructions' => '',
2490
  'required' => 0,
2491
+ 'conditional_logic' => 0,
2492
+ 'wrapper' => array(
2493
+ 'width' => '',
2494
+ 'class' => '',
2495
+ 'id' => '',
 
 
 
2496
  ),
2497
+ 'acfe_validate' => '',
2498
+ 'acfe_update' => '',
2499
+ 'acfe_permissions' => '',
2500
+ 'default_value' => '',
2501
+ 'placeholder' => '',
2502
+ 'prepend' => '',
2503
+ 'append' => '',
2504
+ 'maxlength' => '',
2505
+ ),
2506
+ array(
2507
+ 'key' => 'field_acfe_dpt_item_updated',
2508
+ 'label' => 'Item updated',
2509
+ 'name' => 'item_updated',
2510
+ 'type' => 'text',
2511
+ 'instructions' => '',
2512
+ 'required' => 0,
2513
+ 'conditional_logic' => 0,
2514
  'wrapper' => array(
2515
  'width' => '',
2516
  'class' => '',
2519
  'acfe_validate' => '',
2520
  'acfe_update' => '',
2521
  'acfe_permissions' => '',
2522
+ 'default_value' => '',
2523
+ 'placeholder' => '',
2524
+ 'prepend' => '',
2525
+ 'append' => '',
2526
+ 'maxlength' => '',
2527
  ),
2528
  ),
2529
  ),
2530
  array(
2531
+ 'key' => 'field_acfe_dpt_tab_capability',
2532
+ 'label' => 'Capability',
2533
  'name' => '',
2534
  'type' => 'tab',
2535
  'instructions' => '',
2545
  'endpoint' => 0,
2546
  ),
2547
  array(
2548
+ 'key' => 'field_acfe_dpt_capability_type',
2549
+ 'label' => 'Capability type',
2550
+ 'name' => 'capability_type',
2551
+ 'type' => 'textarea',
2552
+ 'instructions' => 'The string to use to build the read, edit, and delete capabilities.<br />
2553
+ May be passed as an array to allow for alternative plurals when using this argument as a base to construct the capabilities, like this:<br /><br />
2554
+
2555
+ story<br />
2556
+ stories',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2557
  'required' => 0,
2558
  'conditional_logic' => 0,
2559
  'wrapper' => array(
2564
  'acfe_validate' => '',
2565
  'acfe_update' => '',
2566
  'acfe_permissions' => '',
2567
+ 'default_value' => 'post',
2568
  'placeholder' => '',
2569
+ 'maxlength' => '',
2570
+ 'rows' => '',
2571
+ 'new_lines' => '',
 
 
2572
  ),
2573
  array(
2574
+ 'key' => 'field_acfe_dpt_capabilities',
2575
+ 'label' => 'Capabilities',
2576
+ 'name' => 'capabilities',
2577
+ 'type' => 'textarea',
2578
+ 'instructions' => 'An array of the capabilities for this post type. Specify capabilities like this:<br /><br />
2579
+ publish_posts : publish_posts<br />
2580
+ edit_post : edit_post<br />
2581
+ edit_posts : edit_posts<br />
2582
+ read_post : read_post<br />
2583
+ delete_post : delete_post<br />
2584
+ etc...',
2585
  'required' => 0,
2586
  'conditional_logic' => 0,
2587
  'wrapper' => array(
2590
  'id' => '',
2591
  ),
2592
  'acfe_validate' => '',
2593
+ 'acfe_update' => '',
 
 
 
 
2594
  'acfe_permissions' => '',
2595
+ 'default_value' => '',
2596
  'placeholder' => '',
 
 
2597
  'maxlength' => '',
2598
+ 'rows' => '',
2599
+ 'new_lines' => '',
2600
  ),
2601
  array(
2602
+ 'key' => 'field_acfe_dpt_map_meta_cap',
2603
+ 'label' => 'Map meta cap',
2604
+ 'name' => 'map_meta_cap',
2605
  'type' => 'select',
2606
+ 'instructions' => '',
2607
  'required' => 0,
2608
  'conditional_logic' => 0,
2609
  'wrapper' => array(
2615
  'acfe_update' => '',
2616
  'acfe_permissions' => '',
2617
  'choices' => array(
2618
+ 'null' => 'Null (default)',
2619
+ 'false' => 'False',
2620
+ 'true' => 'True',
2621
  ),
2622
  'default_value' => array(
2623
+ 0 => 'null',
2624
  ),
2625
  'allow_null' => 0,
2626
  'multiple' => 0,
includes/modules/dynamic-taxonomy.php CHANGED
@@ -102,10 +102,14 @@ function acfe_dt_registers(){
102
  }
103
 
104
  // Register: Execute
105
- register_taxonomy($name, $post_types, $args);
106
-
107
- // Filter Admin: Posts Per Page
108
- add_filter('edit_' . $name . '_per_page', 'acfe_dt_filter_admin_ppp');
 
 
 
 
109
 
110
  }
111
 
@@ -1049,7 +1053,6 @@ acf_add_local_field_group(array(
1049
  'type' => 'text',
1050
  'instructions' => '',
1051
  'required' => 0,
1052
- 'conditional_logic' => 0,
1053
  'wrapper' => array(
1054
  'width' => '',
1055
  'class' => '',
@@ -1096,8 +1099,8 @@ acf_add_local_field_group(array(
1096
  'ui_off_text' => '',
1097
  ),
1098
  array(
1099
- 'key' => 'field_acfe_dt_tab_labels',
1100
- 'label' => 'Labels',
1101
  'name' => '',
1102
  'type' => 'tab',
1103
  'instructions' => '',
@@ -1113,12 +1116,11 @@ acf_add_local_field_group(array(
1113
  'endpoint' => 0,
1114
  ),
1115
  array(
1116
- 'key' => 'field_acfe_dt_labels',
1117
- 'label' => 'Labels',
1118
- 'name' => 'labels',
1119
- 'type' => 'group',
1120
- 'instructions' => 'An array of labels for this taxonomy. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones.<br /><br />
1121
- Default: if empty, name is set to label value, and singular_name is set to name value.',
1122
  'required' => 0,
1123
  'conditional_logic' => 0,
1124
  'wrapper' => array(
@@ -1126,127 +1128,341 @@ Default: if empty, name is set to label value, and singular_name is set to name
1126
  'class' => '',
1127
  'id' => '',
1128
  ),
 
 
1129
  'acfe_permissions' => '',
1130
- 'layout' => 'row',
1131
- 'sub_fields' => array(
1132
- array(
1133
- 'key' => 'field_acfe_dt_singular_name',
1134
- 'label' => 'Singular name',
1135
- 'name' => 'singular_name',
1136
- 'type' => 'text',
1137
- 'instructions' => '',
1138
- 'required' => 0,
1139
- 'conditional_logic' => 0,
1140
- 'wrapper' => array(
1141
- 'width' => '',
1142
- 'class' => '',
1143
- 'id' => '',
1144
- ),
1145
- 'acfe_validate' => '',
1146
- 'acfe_update' => '',
1147
- 'acfe_permissions' => '',
1148
- 'default_value' => '',
1149
- 'placeholder' => '',
1150
- 'prepend' => '',
1151
- 'append' => '',
1152
- 'maxlength' => '',
1153
- ),
1154
- array(
1155
- 'key' => 'field_acfe_dt_menu_name',
1156
- 'label' => 'Menu name',
1157
- 'name' => 'menu_name',
1158
- 'type' => 'text',
1159
- 'instructions' => '',
1160
- 'required' => 0,
1161
- 'conditional_logic' => 0,
1162
- 'wrapper' => array(
1163
- 'width' => '',
1164
- 'class' => '',
1165
- 'id' => '',
1166
- ),
1167
- 'acfe_validate' => '',
1168
- 'acfe_update' => '',
1169
- 'acfe_permissions' => '',
1170
- 'default_value' => '',
1171
- 'placeholder' => '',
1172
- 'prepend' => '',
1173
- 'append' => '',
1174
- 'maxlength' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1175
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1176
  array(
1177
- 'key' => 'field_acfe_dt_all_items',
1178
- 'label' => 'All items',
1179
- 'name' => 'all_items',
1180
- 'type' => 'text',
1181
- 'instructions' => '',
1182
- 'required' => 0,
1183
- 'conditional_logic' => 0,
1184
- 'wrapper' => array(
1185
- 'width' => '',
1186
- 'class' => '',
1187
- 'id' => '',
1188
  ),
1189
- 'acfe_validate' => '',
1190
- 'acfe_update' => '',
1191
- 'acfe_permissions' => '',
1192
- 'default_value' => '',
1193
- 'placeholder' => '',
1194
- 'prepend' => '',
1195
- 'append' => '',
1196
- 'maxlength' => '',
1197
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1198
  array(
1199
- 'key' => 'field_acfe_dt_edit_item',
1200
- 'label' => 'Edit item',
1201
- 'name' => 'edit_item',
1202
- 'type' => 'text',
1203
- 'instructions' => '',
1204
- 'required' => 0,
1205
- 'conditional_logic' => 0,
1206
- 'wrapper' => array(
1207
- 'width' => '',
1208
- 'class' => '',
1209
- 'id' => '',
1210
  ),
1211
- 'acfe_validate' => '',
1212
- 'acfe_update' => '',
1213
- 'acfe_permissions' => '',
1214
- 'default_value' => '',
1215
- 'placeholder' => '',
1216
- 'prepend' => '',
1217
- 'append' => '',
1218
- 'maxlength' => '',
1219
- ),
1220
- array(
1221
- 'key' => 'field_acfe_dt_view_item',
1222
- 'label' => 'View item',
1223
- 'name' => 'view_item',
1224
- 'type' => 'text',
1225
- 'instructions' => '',
1226
- 'required' => 0,
1227
- 'conditional_logic' => 0,
1228
- 'wrapper' => array(
1229
- 'width' => '',
1230
- 'class' => '',
1231
- 'id' => '',
1232
  ),
1233
- 'acfe_validate' => '',
1234
- 'acfe_update' => '',
1235
- 'acfe_permissions' => '',
1236
- 'default_value' => '',
1237
- 'placeholder' => '',
1238
- 'prepend' => '',
1239
- 'append' => '',
1240
- 'maxlength' => '',
1241
  ),
 
 
 
 
 
 
 
 
 
1242
  array(
1243
- 'key' => 'field_acfe_dt_update_item',
1244
- 'label' => 'Update item',
1245
- 'name' => 'update_item',
1246
  'type' => 'text',
1247
- 'instructions' => '',
1248
  'required' => 0,
1249
- 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
1250
  'wrapper' => array(
1251
  'width' => '',
1252
  'class' => '',
@@ -1256,19 +1472,27 @@ Default: if empty, name is set to label value, and singular_name is set to name
1256
  'acfe_update' => '',
1257
  'acfe_permissions' => '',
1258
  'default_value' => '',
1259
- 'placeholder' => '',
1260
  'prepend' => '',
1261
  'append' => '',
1262
  'maxlength' => '',
1263
  ),
1264
  array(
1265
- 'key' => 'field_acfe_dt_add_new_item',
1266
- 'label' => 'Add new item',
1267
- 'name' => 'add_new_item',
1268
- 'type' => 'text',
1269
- 'instructions' => '',
1270
  'required' => 0,
1271
- 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
1272
  'wrapper' => array(
1273
  'width' => '',
1274
  'class' => '',
@@ -1277,20 +1501,28 @@ Default: if empty, name is set to label value, and singular_name is set to name
1277
  'acfe_validate' => '',
1278
  'acfe_update' => '',
1279
  'acfe_permissions' => '',
1280
- 'default_value' => '',
1281
- 'placeholder' => '',
1282
- 'prepend' => '',
1283
- 'append' => '',
1284
- 'maxlength' => '',
1285
  ),
1286
  array(
1287
- 'key' => 'field_acfe_dt_new_item_name',
1288
- 'label' => 'New item name',
1289
- 'name' => 'new_item_name',
1290
- 'type' => 'text',
1291
- 'instructions' => '',
1292
  'required' => 0,
1293
- 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
1294
  'wrapper' => array(
1295
  'width' => '',
1296
  'class' => '',
@@ -1299,16 +1531,149 @@ Default: if empty, name is set to label value, and singular_name is set to name
1299
  'acfe_validate' => '',
1300
  'acfe_update' => '',
1301
  'acfe_permissions' => '',
1302
- 'default_value' => '',
1303
- 'placeholder' => '',
1304
- 'prepend' => '',
1305
- 'append' => '',
1306
- 'maxlength' => '',
1307
- ),
1308
- array(
1309
- 'key' => 'field_acfe_dt_parent_item',
1310
- 'label' => 'Parent item',
1311
- 'name' => 'parent_item',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1312
  'type' => 'text',
1313
  'instructions' => '',
1314
  'required' => 0,
@@ -1328,9 +1693,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1328
  'maxlength' => '',
1329
  ),
1330
  array(
1331
- 'key' => 'field_acfe_dt_parent_item_colon',
1332
- 'label' => 'Parent item colon',
1333
- 'name' => 'parent_item_colon',
1334
  'type' => 'text',
1335
  'instructions' => '',
1336
  'required' => 0,
@@ -1350,9 +1715,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1350
  'maxlength' => '',
1351
  ),
1352
  array(
1353
- 'key' => 'field_acfe_dt_search_items',
1354
- 'label' => 'Search items',
1355
- 'name' => 'search_items',
1356
  'type' => 'text',
1357
  'instructions' => '',
1358
  'required' => 0,
@@ -1372,9 +1737,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1372
  'maxlength' => '',
1373
  ),
1374
  array(
1375
- 'key' => 'field_acfe_dt_popular_items',
1376
- 'label' => 'Popular items',
1377
- 'name' => 'popular_items',
1378
  'type' => 'text',
1379
  'instructions' => '',
1380
  'required' => 0,
@@ -1394,9 +1759,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1394
  'maxlength' => '',
1395
  ),
1396
  array(
1397
- 'key' => 'field_acfe_dt_separate_items_with_commas',
1398
- 'label' => 'Separate items with commas',
1399
- 'name' => 'separate_items_with_commas',
1400
  'type' => 'text',
1401
  'instructions' => '',
1402
  'required' => 0,
@@ -1416,9 +1781,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1416
  'maxlength' => '',
1417
  ),
1418
  array(
1419
- 'key' => 'field_acfe_dt_add_or_remove_items',
1420
- 'label' => 'Add or remove items',
1421
- 'name' => 'add_or_remove_items',
1422
  'type' => 'text',
1423
  'instructions' => '',
1424
  'required' => 0,
@@ -1438,9 +1803,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1438
  'maxlength' => '',
1439
  ),
1440
  array(
1441
- 'key' => 'field_acfe_dt_choose_from_most_used',
1442
- 'label' => 'Choose from most used',
1443
- 'name' => 'choose_from_most_used',
1444
  'type' => 'text',
1445
  'instructions' => '',
1446
  'required' => 0,
@@ -1460,9 +1825,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1460
  'maxlength' => '',
1461
  ),
1462
  array(
1463
- 'key' => 'field_acfe_dt_not_found',
1464
- 'label' => 'Not found',
1465
- 'name' => 'not_found',
1466
  'type' => 'text',
1467
  'instructions' => '',
1468
  'required' => 0,
@@ -1482,9 +1847,9 @@ Default: if empty, name is set to label value, and singular_name is set to name
1482
  'maxlength' => '',
1483
  ),
1484
  array(
1485
- 'key' => 'field_acfe_dt_back_to_items',
1486
- 'label' => 'Back to items',
1487
- 'name' => 'back_to_items',
1488
  'type' => 'text',
1489
  'instructions' => '',
1490
  'required' => 0,
@@ -1503,416 +1868,102 @@ Default: if empty, name is set to label value, and singular_name is set to name
1503
  'append' => '',
1504
  'maxlength' => '',
1505
  ),
1506
- ),
1507
- ),
1508
- array(
1509
- 'key' => 'field_acfe_dt_tab_menu',
1510
- 'label' => 'Menu',
1511
- 'name' => '',
1512
- 'type' => 'tab',
1513
- 'instructions' => '',
1514
- 'required' => 0,
1515
- 'conditional_logic' => 0,
1516
- 'wrapper' => array(
1517
- 'width' => '',
1518
- 'class' => '',
1519
- 'id' => '',
1520
- ),
1521
- 'acfe_permissions' => '',
1522
- 'placement' => 'top',
1523
- 'endpoint' => 0,
1524
- ),
1525
- array(
1526
- 'key' => 'field_acfe_dt_show_ui',
1527
- 'label' => 'Show UI',
1528
- 'name' => 'show_ui',
1529
- 'type' => 'true_false',
1530
- 'instructions' => 'Whether to generate a default UI for managing this post type in the admin',
1531
- 'required' => 0,
1532
- 'conditional_logic' => 0,
1533
- 'wrapper' => array(
1534
- 'width' => '',
1535
- 'class' => '',
1536
- 'id' => '',
1537
- ),
1538
- 'acfe_validate' => '',
1539
- 'acfe_update' => '',
1540
- 'acfe_permissions' => '',
1541
- 'message' => '',
1542
- 'default_value' => 1,
1543
- 'ui' => 1,
1544
- 'ui_on_text' => '',
1545
- 'ui_off_text' => '',
1546
- ),
1547
- array(
1548
- 'key' => 'field_acfe_dt_show_in_menu',
1549
- 'label' => 'Show in menu',
1550
- 'name' => 'show_in_menu',
1551
- 'type' => 'true_false',
1552
- 'instructions' => 'Where to show the taxonomy in the admin menu. show_ui must be true',
1553
- 'required' => 0,
1554
- 'conditional_logic' => 0,
1555
- 'wrapper' => array(
1556
- 'width' => '',
1557
- 'class' => '',
1558
- 'id' => '',
1559
- ),
1560
- 'acfe_validate' => '',
1561
- 'acfe_update' => '',
1562
- 'acfe_permissions' => '',
1563
- 'message' => '',
1564
- 'default_value' => 1,
1565
- 'ui' => 1,
1566
- 'ui_on_text' => '',
1567
- 'ui_off_text' => '',
1568
- ),
1569
- array(
1570
- 'key' => 'field_acfe_dt_show_in_nav_menus',
1571
- 'label' => 'Show in nav menus',
1572
- 'name' => 'show_in_nav_menus',
1573
- 'type' => 'true_false',
1574
- 'instructions' => 'true makes this taxonomy available for selection in navigation menus',
1575
- 'required' => 0,
1576
- 'conditional_logic' => 0,
1577
- 'wrapper' => array(
1578
- 'width' => '',
1579
- 'class' => '',
1580
- 'id' => '',
1581
- ),
1582
- 'acfe_validate' => '',
1583
- 'acfe_update' => '',
1584
- 'acfe_permissions' => '',
1585
- 'message' => '',
1586
- 'default_value' => 1,
1587
- 'ui' => 1,
1588
- 'ui_on_text' => '',
1589
- 'ui_off_text' => '',
1590
- ),
1591
- array(
1592
- 'key' => 'field_acfe_dt_show_tagcloud',
1593
- 'label' => 'Show tagcloud',
1594
- 'name' => 'show_tagcloud',
1595
- 'type' => 'true_false',
1596
- 'instructions' => 'Whether to allow the Tag Cloud widget to use this taxonomy',
1597
- 'required' => 0,
1598
- 'conditional_logic' => 0,
1599
- 'wrapper' => array(
1600
- 'width' => '',
1601
- 'class' => '',
1602
- 'id' => '',
1603
- ),
1604
- 'acfe_validate' => '',
1605
- 'acfe_update' => '',
1606
- 'acfe_permissions' => '',
1607
- 'message' => '',
1608
- 'default_value' => 1,
1609
- 'ui' => 1,
1610
- 'ui_on_text' => '',
1611
- 'ui_off_text' => '',
1612
- ),
1613
- array(
1614
- 'key' => 'field_acfe_dt_show_in_quick_edit',
1615
- 'label' => 'Show in quick edit',
1616
- 'name' => 'show_in_quick_edit',
1617
- 'type' => 'true_false',
1618
- 'instructions' => 'Whether to show the taxonomy in the quick/bulk edit panel',
1619
- 'required' => 0,
1620
- 'conditional_logic' => 0,
1621
- 'wrapper' => array(
1622
- 'width' => '',
1623
- 'class' => '',
1624
- 'id' => '',
1625
- ),
1626
- 'acfe_validate' => '',
1627
- 'acfe_update' => '',
1628
- 'acfe_permissions' => '',
1629
- 'message' => '',
1630
- 'default_value' => 1,
1631
- 'ui' => 1,
1632
- 'ui_on_text' => '',
1633
- 'ui_off_text' => '',
1634
- ),
1635
- array(
1636
- 'key' => 'field_acfe_dt_show_admin_column',
1637
- 'label' => 'Show admin column',
1638
- 'name' => 'show_admin_column',
1639
- 'type' => 'true_false',
1640
- 'instructions' => 'Whether to allow automatic creation of taxonomy columns on associated post-types table',
1641
- 'required' => 0,
1642
- 'conditional_logic' => 0,
1643
- 'wrapper' => array(
1644
- 'width' => '',
1645
- 'class' => '',
1646
- 'id' => '',
1647
- ),
1648
- 'acfe_validate' => '',
1649
- 'acfe_update' => '',
1650
- 'acfe_permissions' => '',
1651
- 'message' => '',
1652
- 'default_value' => 1,
1653
- 'ui' => 1,
1654
- 'ui_on_text' => '',
1655
- 'ui_off_text' => '',
1656
- ),
1657
- array(
1658
- 'key' => 'field_acfe_dt_tab_capability',
1659
- 'label' => 'Capability',
1660
- 'name' => '',
1661
- 'type' => 'tab',
1662
- 'instructions' => '',
1663
- 'required' => 0,
1664
- 'conditional_logic' => 0,
1665
- 'wrapper' => array(
1666
- 'width' => '',
1667
- 'class' => '',
1668
- 'id' => '',
1669
- ),
1670
- 'acfe_permissions' => '',
1671
- 'placement' => 'top',
1672
- 'endpoint' => 0,
1673
- ),
1674
- array(
1675
- 'key' => 'field_acfe_dt_capabilities',
1676
- 'label' => 'Capabilities',
1677
- 'name' => 'capabilities',
1678
- 'type' => 'textarea',
1679
- 'instructions' => 'An array of the capabilities for this taxonomy:<br /><br />
1680
- manage_terms : edit_posts<br />
1681
- edit_terms : edit_posts<br />
1682
- delete_terms : edit_posts<br />
1683
- assign_terms : edit_posts',
1684
- 'required' => 0,
1685
- 'conditional_logic' => 0,
1686
- 'wrapper' => array(
1687
- 'width' => '',
1688
- 'class' => '',
1689
- 'id' => '',
1690
- ),
1691
- 'acfe_validate' => '',
1692
- 'acfe_update' => '',
1693
- 'acfe_permissions' => '',
1694
- 'default_value' => '',
1695
- 'placeholder' => '',
1696
- 'maxlength' => '',
1697
- 'rows' => '',
1698
- 'new_lines' => '',
1699
- ),
1700
- array(
1701
- 'key' => 'field_acfe_dt_tab_single',
1702
- 'label' => 'Single',
1703
- 'name' => '',
1704
- 'type' => 'tab',
1705
- 'instructions' => '',
1706
- 'required' => 0,
1707
- 'conditional_logic' => 0,
1708
- 'wrapper' => array(
1709
- 'width' => '',
1710
- 'class' => '',
1711
- 'id' => '',
1712
- ),
1713
- 'acfe_permissions' => '',
1714
- 'placement' => 'top',
1715
- 'endpoint' => 0,
1716
- ),
1717
- array(
1718
- 'key' => 'field_acfe_dt_single_template',
1719
- 'label' => 'Template',
1720
- 'name' => 'acfe_dt_single_template',
1721
- 'type' => 'text',
1722
- 'instructions' => 'ACF Extended: Which template file to load for the term query. More informations on <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">Template hierarchy</a>',
1723
- 'required' => 0,
1724
- 'conditional_logic' => 0,
1725
- 'wrapper' => array(
1726
- 'width' => '',
1727
- 'class' => '',
1728
- 'id' => '',
1729
- ),
1730
- 'acfe_validate' => '',
1731
- 'acfe_update' => '',
1732
- 'acfe_permissions' => '',
1733
- 'default_value' => '',
1734
- 'placeholder' => 'my-template.php',
1735
- 'prepend' => trailingslashit(acfe_get_setting('theme_folder')),
1736
- 'append' => '',
1737
- 'maxlength' => '',
1738
- ),
1739
- array(
1740
- 'key' => 'field_acfe_dt_single_posts_per_page',
1741
- 'label' => 'Posts per page',
1742
- 'name' => 'acfe_dt_single_posts_per_page',
1743
- 'type' => 'number',
1744
- 'instructions' => 'ACF Extended: Number of posts to display on the admin list screen',
1745
- 'required' => 0,
1746
- 'conditional_logic' => 0,
1747
- 'wrapper' => array(
1748
- 'width' => '',
1749
- 'class' => '',
1750
- 'id' => '',
1751
- ),
1752
- 'acfe_validate' => '',
1753
- 'acfe_update' => '',
1754
- 'acfe_permissions' => '',
1755
- 'default_value' => 10,
1756
- 'placeholder' => '',
1757
- 'prepend' => '',
1758
- 'append' => '',
1759
- 'min' => -1,
1760
- 'max' => '',
1761
- 'step' => '',
1762
- ),
1763
- array(
1764
- 'key' => 'field_acfe_dt_single_orderby',
1765
- 'label' => 'Order by',
1766
- 'name' => 'acfe_dt_single_orderby',
1767
- 'type' => 'text',
1768
- 'instructions' => 'ACF Extended: Sort retrieved posts by parameter in the admin list screen. Defaults to \'date (post_date)\'.',
1769
- 'required' => 0,
1770
- 'conditional_logic' => 0,
1771
- 'wrapper' => array(
1772
- 'width' => '',
1773
- 'class' => '',
1774
- 'id' => '',
1775
- ),
1776
- 'acfe_validate' => '',
1777
- 'acfe_update' => array(
1778
- '5c9479dec93c4' => array(
1779
- 'acfe_update_function' => 'sanitize_title',
1780
  ),
1781
- ),
1782
- 'acfe_permissions' => '',
1783
- 'default_value' => 'date',
1784
- 'placeholder' => '',
1785
- 'prepend' => '',
1786
- 'append' => '',
1787
- 'maxlength' => '',
1788
- ),
1789
- array(
1790
- 'key' => 'field_acfe_dt_single_order',
1791
- 'label' => 'Order',
1792
- 'name' => 'acfe_dt_single_order',
1793
- 'type' => 'select',
1794
- 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the admin list screen. Defaults to \'DESC\'.',
1795
- 'required' => 0,
1796
- 'conditional_logic' => 0,
1797
- 'wrapper' => array(
1798
- 'width' => '',
1799
- 'class' => '',
1800
- 'id' => '',
1801
- ),
1802
- 'acfe_validate' => '',
1803
- 'acfe_update' => '',
1804
- 'acfe_permissions' => '',
1805
- 'choices' => array(
1806
- 'ASC' => 'ASC',
1807
- 'DESC' => 'DESC',
1808
- ),
1809
- 'default_value' => array(
1810
- 0 => 'DESC',
1811
- ),
1812
- 'allow_null' => 0,
1813
- 'multiple' => 0,
1814
- 'ui' => 0,
1815
- 'return_format' => 'value',
1816
- 'ajax' => 0,
1817
- 'placeholder' => '',
1818
- ),
1819
- array(
1820
- 'key' => 'field_acfe_dt_rewrite',
1821
- 'label' => 'Rewrite',
1822
- 'name' => 'rewrite',
1823
- 'type' => 'true_false',
1824
- 'instructions' => 'Set to false to prevent automatic URL rewriting a.k.a. "pretty permalinks". Pass an argument array to override default URL settings for permalinks',
1825
- 'required' => 0,
1826
- 'conditional_logic' => 0,
1827
- 'wrapper' => array(
1828
- 'width' => '',
1829
- 'class' => '',
1830
- 'id' => '',
1831
- ),
1832
- 'acfe_validate' => '',
1833
- 'acfe_update' => '',
1834
- 'acfe_permissions' => '',
1835
- 'message' => '',
1836
- 'default_value' => 1,
1837
- 'ui' => 1,
1838
- 'ui_on_text' => '',
1839
- 'ui_off_text' => '',
1840
- ),
1841
- array(
1842
- 'key' => 'field_acfe_dt_rewrite_args_select',
1843
- 'label' => 'Rewrite Arguments',
1844
- 'name' => 'rewrite_args_select',
1845
- 'type' => 'true_false',
1846
- 'instructions' => 'Use additional rewrite arguments',
1847
- 'required' => 0,
1848
- 'conditional_logic' => array(
1849
  array(
1850
- array(
1851
- 'field' => 'field_acfe_dt_rewrite',
1852
- 'operator' => '==',
1853
- 'value' => '1',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1854
  ),
 
 
 
 
 
 
 
 
1855
  ),
1856
- ),
1857
- 'wrapper' => array(
1858
- 'width' => '',
1859
- 'class' => '',
1860
- 'id' => '',
1861
- ),
1862
- 'acfe_validate' => '',
1863
- 'acfe_update' => '',
1864
- 'acfe_permissions' => '',
1865
- 'message' => '',
1866
- 'default_value' => 0,
1867
- 'ui' => 1,
1868
- 'ui_on_text' => '',
1869
- 'ui_off_text' => '',
1870
- ),
1871
- array(
1872
- 'key' => 'field_acfe_dt_rewrite_args',
1873
- 'label' => 'Rewrite Arguments',
1874
- 'name' => 'rewrite_args',
1875
- 'type' => 'group',
1876
- 'instructions' => 'Additional arguments',
1877
- 'required' => 0,
1878
- 'conditional_logic' => array(
1879
  array(
1880
- array(
1881
- 'field' => 'field_acfe_dt_rewrite',
1882
- 'operator' => '==',
1883
- 'value' => '1',
1884
- ),
1885
- array(
1886
- 'field' => 'field_acfe_dt_rewrite_args_select',
1887
- 'operator' => '==',
1888
- 'value' => '1',
 
 
1889
  ),
 
 
 
 
 
 
 
 
1890
  ),
1891
- ),
1892
- 'wrapper' => array(
1893
- 'width' => '',
1894
- 'class' => '',
1895
- 'id' => '',
1896
- ),
1897
- 'acfe_permissions' => '',
1898
- 'layout' => 'row',
1899
- 'sub_fields' => array(
1900
  array(
1901
- 'key' => 'field_acfe_dt_rewrite_slug',
1902
- 'label' => 'Slug',
1903
- 'name' => 'acfe_dt_rewrite_slug',
1904
  'type' => 'text',
1905
- 'instructions' => 'Used as pretty permalink text (i.e. /tag/) - defaults to $taxonomy (taxonomy\'s name slug)',
1906
  'required' => 0,
1907
- 'conditional_logic' => array(
1908
- array(
1909
- array(
1910
- 'field' => 'field_acfe_dt_rewrite_args_select',
1911
- 'operator' => '==',
1912
- 'value' => '1',
1913
- ),
1914
- ),
1915
- ),
1916
  'wrapper' => array(
1917
  'width' => '',
1918
  'class' => '',
@@ -1922,27 +1973,19 @@ assign_terms : edit_posts',
1922
  'acfe_update' => '',
1923
  'acfe_permissions' => '',
1924
  'default_value' => '',
1925
- 'placeholder' => 'Default',
1926
  'prepend' => '',
1927
  'append' => '',
1928
  'maxlength' => '',
1929
  ),
1930
  array(
1931
- 'key' => 'field_acfe_dt_rewrite_with_front',
1932
- 'label' => 'With front',
1933
- 'name' => 'acfe_dt_rewrite_with_front',
1934
- 'type' => 'true_false',
1935
- 'instructions' => 'Allowing permalinks to be prepended with front base',
1936
  'required' => 0,
1937
- 'conditional_logic' => array(
1938
- array(
1939
- array(
1940
- 'field' => 'field_acfe_dt_rewrite_args_select',
1941
- 'operator' => '==',
1942
- 'value' => '1',
1943
- ),
1944
- ),
1945
- ),
1946
  'wrapper' => array(
1947
  'width' => '',
1948
  'class' => '',
@@ -1951,28 +1994,42 @@ assign_terms : edit_posts',
1951
  'acfe_validate' => '',
1952
  'acfe_update' => '',
1953
  'acfe_permissions' => '',
1954
- 'message' => '',
1955
- 'default_value' => 1,
1956
- 'ui' => 1,
1957
- 'ui_on_text' => '',
1958
- 'ui_off_text' => '',
1959
  ),
1960
  array(
1961
- 'key' => 'field_acfe_dt_rewrite_hierarchical',
1962
- 'label' => 'Hierarchical',
1963
- 'name' => 'hierarchical',
1964
- 'type' => 'true_false',
1965
- 'instructions' => 'True or false allow hierarchical urls',
1966
  'required' => 0,
1967
- 'conditional_logic' => array(
1968
- array(
1969
- array(
1970
- 'field' => 'field_acfe_dt_rewrite_args_select',
1971
- 'operator' => '==',
1972
- 'value' => '1',
1973
- ),
1974
- ),
1975
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1976
  'wrapper' => array(
1977
  'width' => '',
1978
  'class' => '',
@@ -1981,17 +2038,17 @@ assign_terms : edit_posts',
1981
  'acfe_validate' => '',
1982
  'acfe_update' => '',
1983
  'acfe_permissions' => '',
1984
- 'message' => '',
1985
- 'default_value' => 0,
1986
- 'ui' => 1,
1987
- 'ui_on_text' => '',
1988
- 'ui_off_text' => '',
1989
  ),
1990
  ),
1991
  ),
1992
  array(
1993
- 'key' => 'field_acfe_dt_tab_admin',
1994
- 'label' => 'Admin',
1995
  'name' => '',
1996
  'type' => 'tab',
1997
  'instructions' => '',
@@ -2007,11 +2064,15 @@ assign_terms : edit_posts',
2007
  'endpoint' => 0,
2008
  ),
2009
  array(
2010
- 'key' => 'field_acfe_dt_admin_terms_per_page',
2011
- 'label' => 'Terms per page',
2012
- 'name' => 'acfe_dt_admin_terms_per_page',
2013
- 'type' => 'number',
2014
- 'instructions' => 'ACF Extended: Number of terms to display on the admin list screen',
 
 
 
 
2015
  'required' => 0,
2016
  'conditional_logic' => 0,
2017
  'wrapper' => array(
@@ -2022,69 +2083,11 @@ assign_terms : edit_posts',
2022
  'acfe_validate' => '',
2023
  'acfe_update' => '',
2024
  'acfe_permissions' => '',
2025
- 'default_value' => 10,
2026
- 'placeholder' => '',
2027
- 'prepend' => '',
2028
- 'append' => '',
2029
- 'min' => -1,
2030
- 'max' => '',
2031
- 'step' => '',
2032
- ),
2033
- array(
2034
- 'key' => 'field_acfe_dt_admin_orderby',
2035
- 'label' => 'Order by',
2036
- 'name' => 'acfe_dt_admin_orderby',
2037
- 'type' => 'text',
2038
- 'instructions' => 'ACF Extended: Sort retrieved terms by parameter in the admin list screen. Accepts term fields \'name\', \'slug\', \'term_group\', \'term_id\', \'id\', \'description\', \'parent\', \'count\' (for term taxonomy count), or \'none\' to omit the ORDER BY clause',
2039
- 'required' => 0,
2040
- 'conditional_logic' => 0,
2041
- 'wrapper' => array(
2042
- 'width' => '',
2043
- 'class' => '',
2044
- 'id' => '',
2045
- ),
2046
- 'acfe_validate' => '',
2047
- 'acfe_update' => array(
2048
- '5c9479dec93c4' => array(
2049
- 'acfe_update_function' => 'sanitize_title',
2050
- ),
2051
- ),
2052
- 'acfe_permissions' => '',
2053
- 'default_value' => 'name',
2054
  'placeholder' => '',
2055
- 'prepend' => '',
2056
- 'append' => '',
2057
  'maxlength' => '',
2058
- ),
2059
- array(
2060
- 'key' => 'field_acfe_dt_admin_order',
2061
- 'label' => 'Order',
2062
- 'name' => 'acfe_dt_admin_order',
2063
- 'type' => 'select',
2064
- 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the admin list screen. Defaults to \'ASC\'.',
2065
- 'required' => 0,
2066
- 'conditional_logic' => 0,
2067
- 'wrapper' => array(
2068
- 'width' => '',
2069
- 'class' => '',
2070
- 'id' => '',
2071
- ),
2072
- 'acfe_validate' => '',
2073
- 'acfe_update' => '',
2074
- 'acfe_permissions' => '',
2075
- 'choices' => array(
2076
- 'ASC' => 'ASC',
2077
- 'DESC' => 'DESC',
2078
- ),
2079
- 'default_value' => array(
2080
- 0 => 'ASC',
2081
- ),
2082
- 'allow_null' => 0,
2083
- 'multiple' => 0,
2084
- 'ui' => 0,
2085
- 'return_format' => 'value',
2086
- 'ajax' => 0,
2087
- 'placeholder' => '',
2088
  ),
2089
  array(
2090
  'key' => 'field_acfe_dt_tab_rest',
102
  }
103
 
104
  // Register: Execute
105
+ if(!empty($name)){
106
+
107
+ register_taxonomy($name, $post_types, $args);
108
+
109
+ // Filter Admin: Posts Per Page
110
+ add_filter('edit_' . $name . '_per_page', 'acfe_dt_filter_admin_ppp');
111
+
112
+ }
113
 
114
  }
115
 
1053
  'type' => 'text',
1054
  'instructions' => '',
1055
  'required' => 0,
 
1056
  'wrapper' => array(
1057
  'width' => '',
1058
  'class' => '',
1099
  'ui_off_text' => '',
1100
  ),
1101
  array(
1102
+ 'key' => 'field_acfe_dt_tab_menu',
1103
+ 'label' => 'Menu',
1104
  'name' => '',
1105
  'type' => 'tab',
1106
  'instructions' => '',
1116
  'endpoint' => 0,
1117
  ),
1118
  array(
1119
+ 'key' => 'field_acfe_dt_show_ui',
1120
+ 'label' => 'Show UI',
1121
+ 'name' => 'show_ui',
1122
+ 'type' => 'true_false',
1123
+ 'instructions' => 'Whether to generate a default UI for managing this post type in the admin',
 
1124
  'required' => 0,
1125
  'conditional_logic' => 0,
1126
  'wrapper' => array(
1128
  'class' => '',
1129
  'id' => '',
1130
  ),
1131
+ 'acfe_validate' => '',
1132
+ 'acfe_update' => '',
1133
  'acfe_permissions' => '',
1134
+ 'message' => '',
1135
+ 'default_value' => 1,
1136
+ 'ui' => 1,
1137
+ 'ui_on_text' => '',
1138
+ 'ui_off_text' => '',
1139
+ ),
1140
+ array(
1141
+ 'key' => 'field_acfe_dt_show_in_menu',
1142
+ 'label' => 'Show in menu',
1143
+ 'name' => 'show_in_menu',
1144
+ 'type' => 'true_false',
1145
+ 'instructions' => 'Where to show the taxonomy in the admin menu. show_ui must be true',
1146
+ 'required' => 0,
1147
+ 'conditional_logic' => 0,
1148
+ 'wrapper' => array(
1149
+ 'width' => '',
1150
+ 'class' => '',
1151
+ 'id' => '',
1152
+ ),
1153
+ 'acfe_validate' => '',
1154
+ 'acfe_update' => '',
1155
+ 'acfe_permissions' => '',
1156
+ 'message' => '',
1157
+ 'default_value' => 1,
1158
+ 'ui' => 1,
1159
+ 'ui_on_text' => '',
1160
+ 'ui_off_text' => '',
1161
+ ),
1162
+ array(
1163
+ 'key' => 'field_acfe_dt_show_in_nav_menus',
1164
+ 'label' => 'Show in nav menus',
1165
+ 'name' => 'show_in_nav_menus',
1166
+ 'type' => 'true_false',
1167
+ 'instructions' => 'true makes this taxonomy available for selection in navigation menus',
1168
+ 'required' => 0,
1169
+ 'conditional_logic' => 0,
1170
+ 'wrapper' => array(
1171
+ 'width' => '',
1172
+ 'class' => '',
1173
+ 'id' => '',
1174
+ ),
1175
+ 'acfe_validate' => '',
1176
+ 'acfe_update' => '',
1177
+ 'acfe_permissions' => '',
1178
+ 'message' => '',
1179
+ 'default_value' => 1,
1180
+ 'ui' => 1,
1181
+ 'ui_on_text' => '',
1182
+ 'ui_off_text' => '',
1183
+ ),
1184
+ array(
1185
+ 'key' => 'field_acfe_dt_show_tagcloud',
1186
+ 'label' => 'Show tagcloud',
1187
+ 'name' => 'show_tagcloud',
1188
+ 'type' => 'true_false',
1189
+ 'instructions' => 'Whether to allow the Tag Cloud widget to use this taxonomy',
1190
+ 'required' => 0,
1191
+ 'conditional_logic' => 0,
1192
+ 'wrapper' => array(
1193
+ 'width' => '',
1194
+ 'class' => '',
1195
+ 'id' => '',
1196
+ ),
1197
+ 'acfe_validate' => '',
1198
+ 'acfe_update' => '',
1199
+ 'acfe_permissions' => '',
1200
+ 'message' => '',
1201
+ 'default_value' => 1,
1202
+ 'ui' => 1,
1203
+ 'ui_on_text' => '',
1204
+ 'ui_off_text' => '',
1205
+ ),
1206
+ array(
1207
+ 'key' => 'field_acfe_dt_show_in_quick_edit',
1208
+ 'label' => 'Show in quick edit',
1209
+ 'name' => 'show_in_quick_edit',
1210
+ 'type' => 'true_false',
1211
+ 'instructions' => 'Whether to show the taxonomy in the quick/bulk edit panel',
1212
+ 'required' => 0,
1213
+ 'conditional_logic' => 0,
1214
+ 'wrapper' => array(
1215
+ 'width' => '',
1216
+ 'class' => '',
1217
+ 'id' => '',
1218
+ ),
1219
+ 'acfe_validate' => '',
1220
+ 'acfe_update' => '',
1221
+ 'acfe_permissions' => '',
1222
+ 'message' => '',
1223
+ 'default_value' => 1,
1224
+ 'ui' => 1,
1225
+ 'ui_on_text' => '',
1226
+ 'ui_off_text' => '',
1227
+ ),
1228
+ array(
1229
+ 'key' => 'field_acfe_dt_show_admin_column',
1230
+ 'label' => 'Show admin column',
1231
+ 'name' => 'show_admin_column',
1232
+ 'type' => 'true_false',
1233
+ 'instructions' => 'Whether to allow automatic creation of taxonomy columns on associated post-types table',
1234
+ 'required' => 0,
1235
+ 'conditional_logic' => 0,
1236
+ 'wrapper' => array(
1237
+ 'width' => '',
1238
+ 'class' => '',
1239
+ 'id' => '',
1240
+ ),
1241
+ 'acfe_validate' => '',
1242
+ 'acfe_update' => '',
1243
+ 'acfe_permissions' => '',
1244
+ 'message' => '',
1245
+ 'default_value' => 1,
1246
+ 'ui' => 1,
1247
+ 'ui_on_text' => '',
1248
+ 'ui_off_text' => '',
1249
+ ),
1250
+ array(
1251
+ 'key' => 'field_acfe_dt_tab_single',
1252
+ 'label' => 'Single',
1253
+ 'name' => '',
1254
+ 'type' => 'tab',
1255
+ 'instructions' => '',
1256
+ 'required' => 0,
1257
+ 'conditional_logic' => 0,
1258
+ 'wrapper' => array(
1259
+ 'width' => '',
1260
+ 'class' => '',
1261
+ 'id' => '',
1262
+ ),
1263
+ 'acfe_permissions' => '',
1264
+ 'placement' => 'top',
1265
+ 'endpoint' => 0,
1266
+ ),
1267
+ array(
1268
+ 'key' => 'field_acfe_dt_single_template',
1269
+ 'label' => 'Template',
1270
+ 'name' => 'acfe_dt_single_template',
1271
+ 'type' => 'text',
1272
+ 'instructions' => 'ACF Extended: Which template file to load for the term query. More informations on <a href="https://developer.wordpress.org/themes/basics/template-hierarchy/">Template hierarchy</a>',
1273
+ 'required' => 0,
1274
+ 'conditional_logic' => 0,
1275
+ 'wrapper' => array(
1276
+ 'width' => '',
1277
+ 'class' => '',
1278
+ 'id' => '',
1279
+ ),
1280
+ 'acfe_validate' => '',
1281
+ 'acfe_update' => '',
1282
+ 'acfe_permissions' => '',
1283
+ 'default_value' => '',
1284
+ 'placeholder' => 'my-template.php',
1285
+ 'prepend' => trailingslashit(acfe_get_setting('theme_folder')),
1286
+ 'append' => '',
1287
+ 'maxlength' => '',
1288
+ ),
1289
+ array(
1290
+ 'key' => 'field_acfe_dt_single_posts_per_page',
1291
+ 'label' => 'Posts per page',
1292
+ 'name' => 'acfe_dt_single_posts_per_page',
1293
+ 'type' => 'number',
1294
+ 'instructions' => 'ACF Extended: Number of posts to display on the admin list screen',
1295
+ 'required' => 0,
1296
+ 'conditional_logic' => 0,
1297
+ 'wrapper' => array(
1298
+ 'width' => '',
1299
+ 'class' => '',
1300
+ 'id' => '',
1301
+ ),
1302
+ 'acfe_validate' => '',
1303
+ 'acfe_update' => '',
1304
+ 'acfe_permissions' => '',
1305
+ 'default_value' => 10,
1306
+ 'placeholder' => '',
1307
+ 'prepend' => '',
1308
+ 'append' => '',
1309
+ 'min' => -1,
1310
+ 'max' => '',
1311
+ 'step' => '',
1312
+ ),
1313
+ array(
1314
+ 'key' => 'field_acfe_dt_single_orderby',
1315
+ 'label' => 'Order by',
1316
+ 'name' => 'acfe_dt_single_orderby',
1317
+ 'type' => 'text',
1318
+ 'instructions' => 'ACF Extended: Sort retrieved posts by parameter in the admin list screen. Defaults to \'date (post_date)\'.',
1319
+ 'required' => 0,
1320
+ 'conditional_logic' => 0,
1321
+ 'wrapper' => array(
1322
+ 'width' => '',
1323
+ 'class' => '',
1324
+ 'id' => '',
1325
+ ),
1326
+ 'acfe_validate' => '',
1327
+ 'acfe_update' => array(
1328
+ '5c9479dec93c4' => array(
1329
+ 'acfe_update_function' => 'sanitize_title',
1330
  ),
1331
+ ),
1332
+ 'acfe_permissions' => '',
1333
+ 'default_value' => 'date',
1334
+ 'placeholder' => '',
1335
+ 'prepend' => '',
1336
+ 'append' => '',
1337
+ 'maxlength' => '',
1338
+ ),
1339
+ array(
1340
+ 'key' => 'field_acfe_dt_single_order',
1341
+ 'label' => 'Order',
1342
+ 'name' => 'acfe_dt_single_order',
1343
+ 'type' => 'select',
1344
+ 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the admin list screen. Defaults to \'DESC\'.',
1345
+ 'required' => 0,
1346
+ 'conditional_logic' => 0,
1347
+ 'wrapper' => array(
1348
+ 'width' => '',
1349
+ 'class' => '',
1350
+ 'id' => '',
1351
+ ),
1352
+ 'acfe_validate' => '',
1353
+ 'acfe_update' => '',
1354
+ 'acfe_permissions' => '',
1355
+ 'choices' => array(
1356
+ 'ASC' => 'ASC',
1357
+ 'DESC' => 'DESC',
1358
+ ),
1359
+ 'default_value' => array(
1360
+ 0 => 'DESC',
1361
+ ),
1362
+ 'allow_null' => 0,
1363
+ 'multiple' => 0,
1364
+ 'ui' => 0,
1365
+ 'return_format' => 'value',
1366
+ 'ajax' => 0,
1367
+ 'placeholder' => '',
1368
+ ),
1369
+ array(
1370
+ 'key' => 'field_acfe_dt_rewrite',
1371
+ 'label' => 'Rewrite',
1372
+ 'name' => 'rewrite',
1373
+ 'type' => 'true_false',
1374
+ 'instructions' => 'Set to false to prevent automatic URL rewriting a.k.a. "pretty permalinks". Pass an argument array to override default URL settings for permalinks',
1375
+ 'required' => 0,
1376
+ 'conditional_logic' => 0,
1377
+ 'wrapper' => array(
1378
+ 'width' => '',
1379
+ 'class' => '',
1380
+ 'id' => '',
1381
+ ),
1382
+ 'acfe_validate' => '',
1383
+ 'acfe_update' => '',
1384
+ 'acfe_permissions' => '',
1385
+ 'message' => '',
1386
+ 'default_value' => 1,
1387
+ 'ui' => 1,
1388
+ 'ui_on_text' => '',
1389
+ 'ui_off_text' => '',
1390
+ ),
1391
+ array(
1392
+ 'key' => 'field_acfe_dt_rewrite_args_select',
1393
+ 'label' => 'Rewrite Arguments',
1394
+ 'name' => 'rewrite_args_select',
1395
+ 'type' => 'true_false',
1396
+ 'instructions' => 'Use additional rewrite arguments',
1397
+ 'required' => 0,
1398
+ 'conditional_logic' => array(
1399
  array(
1400
+ array(
1401
+ 'field' => 'field_acfe_dt_rewrite',
1402
+ 'operator' => '==',
1403
+ 'value' => '1',
 
 
 
 
 
 
 
1404
  ),
 
 
 
 
 
 
 
 
1405
  ),
1406
+ ),
1407
+ 'wrapper' => array(
1408
+ 'width' => '',
1409
+ 'class' => '',
1410
+ 'id' => '',
1411
+ ),
1412
+ 'acfe_validate' => '',
1413
+ 'acfe_update' => '',
1414
+ 'acfe_permissions' => '',
1415
+ 'message' => '',
1416
+ 'default_value' => 0,
1417
+ 'ui' => 1,
1418
+ 'ui_on_text' => '',
1419
+ 'ui_off_text' => '',
1420
+ ),
1421
+ array(
1422
+ 'key' => 'field_acfe_dt_rewrite_args',
1423
+ 'label' => 'Rewrite Arguments',
1424
+ 'name' => 'rewrite_args',
1425
+ 'type' => 'group',
1426
+ 'instructions' => 'Additional arguments',
1427
+ 'required' => 0,
1428
+ 'conditional_logic' => array(
1429
  array(
1430
+ array(
1431
+ 'field' => 'field_acfe_dt_rewrite',
1432
+ 'operator' => '==',
1433
+ 'value' => '1',
 
 
 
 
 
 
 
1434
  ),
1435
+ array(
1436
+ 'field' => 'field_acfe_dt_rewrite_args_select',
1437
+ 'operator' => '==',
1438
+ 'value' => '1',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1439
  ),
 
 
 
 
 
 
 
 
1440
  ),
1441
+ ),
1442
+ 'wrapper' => array(
1443
+ 'width' => '',
1444
+ 'class' => '',
1445
+ 'id' => '',
1446
+ ),
1447
+ 'acfe_permissions' => '',
1448
+ 'layout' => 'row',
1449
+ 'sub_fields' => array(
1450
  array(
1451
+ 'key' => 'field_acfe_dt_rewrite_slug',
1452
+ 'label' => 'Slug',
1453
+ 'name' => 'acfe_dt_rewrite_slug',
1454
  'type' => 'text',
1455
+ 'instructions' => 'Used as pretty permalink text (i.e. /tag/) - defaults to $taxonomy (taxonomy\'s name slug)',
1456
  'required' => 0,
1457
+ 'conditional_logic' => array(
1458
+ array(
1459
+ array(
1460
+ 'field' => 'field_acfe_dt_rewrite_args_select',
1461
+ 'operator' => '==',
1462
+ 'value' => '1',
1463
+ ),
1464
+ ),
1465
+ ),
1466
  'wrapper' => array(
1467
  'width' => '',
1468
  'class' => '',
1472
  'acfe_update' => '',
1473
  'acfe_permissions' => '',
1474
  'default_value' => '',
1475
+ 'placeholder' => 'Default',
1476
  'prepend' => '',
1477
  'append' => '',
1478
  'maxlength' => '',
1479
  ),
1480
  array(
1481
+ 'key' => 'field_acfe_dt_rewrite_with_front',
1482
+ 'label' => 'With front',
1483
+ 'name' => 'acfe_dt_rewrite_with_front',
1484
+ 'type' => 'true_false',
1485
+ 'instructions' => 'Allowing permalinks to be prepended with front base',
1486
  'required' => 0,
1487
+ 'conditional_logic' => array(
1488
+ array(
1489
+ array(
1490
+ 'field' => 'field_acfe_dt_rewrite_args_select',
1491
+ 'operator' => '==',
1492
+ 'value' => '1',
1493
+ ),
1494
+ ),
1495
+ ),
1496
  'wrapper' => array(
1497
  'width' => '',
1498
  'class' => '',
1501
  'acfe_validate' => '',
1502
  'acfe_update' => '',
1503
  'acfe_permissions' => '',
1504
+ 'message' => '',
1505
+ 'default_value' => 1,
1506
+ 'ui' => 1,
1507
+ 'ui_on_text' => '',
1508
+ 'ui_off_text' => '',
1509
  ),
1510
  array(
1511
+ 'key' => 'field_acfe_dt_rewrite_hierarchical',
1512
+ 'label' => 'Hierarchical',
1513
+ 'name' => 'hierarchical',
1514
+ 'type' => 'true_false',
1515
+ 'instructions' => 'True or false allow hierarchical urls',
1516
  'required' => 0,
1517
+ 'conditional_logic' => array(
1518
+ array(
1519
+ array(
1520
+ 'field' => 'field_acfe_dt_rewrite_args_select',
1521
+ 'operator' => '==',
1522
+ 'value' => '1',
1523
+ ),
1524
+ ),
1525
+ ),
1526
  'wrapper' => array(
1527
  'width' => '',
1528
  'class' => '',
1531
  'acfe_validate' => '',
1532
  'acfe_update' => '',
1533
  'acfe_permissions' => '',
1534
+ 'message' => '',
1535
+ 'default_value' => 0,
1536
+ 'ui' => 1,
1537
+ 'ui_on_text' => '',
1538
+ 'ui_off_text' => '',
1539
+ ),
1540
+ ),
1541
+ ),
1542
+ array(
1543
+ 'key' => 'field_acfe_dt_tab_admin',
1544
+ 'label' => 'Admin',
1545
+ 'name' => '',
1546
+ 'type' => 'tab',
1547
+ 'instructions' => '',
1548
+ 'required' => 0,
1549
+ 'conditional_logic' => 0,
1550
+ 'wrapper' => array(
1551
+ 'width' => '',
1552
+ 'class' => '',
1553
+ 'id' => '',
1554
+ ),
1555
+ 'acfe_permissions' => '',
1556
+ 'placement' => 'top',
1557
+ 'endpoint' => 0,
1558
+ ),
1559
+ array(
1560
+ 'key' => 'field_acfe_dt_admin_terms_per_page',
1561
+ 'label' => 'Terms per page',
1562
+ 'name' => 'acfe_dt_admin_terms_per_page',
1563
+ 'type' => 'number',
1564
+ 'instructions' => 'ACF Extended: Number of terms to display on the admin list screen',
1565
+ 'required' => 0,
1566
+ 'conditional_logic' => 0,
1567
+ 'wrapper' => array(
1568
+ 'width' => '',
1569
+ 'class' => '',
1570
+ 'id' => '',
1571
+ ),
1572
+ 'acfe_validate' => '',
1573
+ 'acfe_update' => '',
1574
+ 'acfe_permissions' => '',
1575
+ 'default_value' => 10,
1576
+ 'placeholder' => '',
1577
+ 'prepend' => '',
1578
+ 'append' => '',
1579
+ 'min' => -1,
1580
+ 'max' => '',
1581
+ 'step' => '',
1582
+ ),
1583
+ array(
1584
+ 'key' => 'field_acfe_dt_admin_orderby',
1585
+ 'label' => 'Order by',
1586
+ 'name' => 'acfe_dt_admin_orderby',
1587
+ 'type' => 'text',
1588
+ 'instructions' => 'ACF Extended: Sort retrieved terms by parameter in the admin list screen. Accepts term fields \'name\', \'slug\', \'term_group\', \'term_id\', \'id\', \'description\', \'parent\', \'count\' (for term taxonomy count), or \'none\' to omit the ORDER BY clause',
1589
+ 'required' => 0,
1590
+ 'conditional_logic' => 0,
1591
+ 'wrapper' => array(
1592
+ 'width' => '',
1593
+ 'class' => '',
1594
+ 'id' => '',
1595
+ ),
1596
+ 'acfe_validate' => '',
1597
+ 'acfe_update' => array(
1598
+ '5c9479dec93c4' => array(
1599
+ 'acfe_update_function' => 'sanitize_title',
1600
+ ),
1601
+ ),
1602
+ 'acfe_permissions' => '',
1603
+ 'default_value' => 'name',
1604
+ 'placeholder' => '',
1605
+ 'prepend' => '',
1606
+ 'append' => '',
1607
+ 'maxlength' => '',
1608
+ ),
1609
+ array(
1610
+ 'key' => 'field_acfe_dt_admin_order',
1611
+ 'label' => 'Order',
1612
+ 'name' => 'acfe_dt_admin_order',
1613
+ 'type' => 'select',
1614
+ 'instructions' => 'ACF Extended: Designates the ascending or descending order of the \'orderby\' parameter in the admin list screen. Defaults to \'ASC\'.',
1615
+ 'required' => 0,
1616
+ 'conditional_logic' => 0,
1617
+ 'wrapper' => array(
1618
+ 'width' => '',
1619
+ 'class' => '',
1620
+ 'id' => '',
1621
+ ),
1622
+ 'acfe_validate' => '',
1623
+ 'acfe_update' => '',
1624
+ 'acfe_permissions' => '',
1625
+ 'choices' => array(
1626
+ 'ASC' => 'ASC',
1627
+ 'DESC' => 'DESC',
1628
+ ),
1629
+ 'default_value' => array(
1630
+ 0 => 'ASC',
1631
+ ),
1632
+ 'allow_null' => 0,
1633
+ 'multiple' => 0,
1634
+ 'ui' => 0,
1635
+ 'return_format' => 'value',
1636
+ 'ajax' => 0,
1637
+ 'placeholder' => '',
1638
+ ),
1639
+ array(
1640
+ 'key' => 'field_acfe_dt_tab_labels',
1641
+ 'label' => 'Labels',
1642
+ 'name' => '',
1643
+ 'type' => 'tab',
1644
+ 'instructions' => '',
1645
+ 'required' => 0,
1646
+ 'conditional_logic' => 0,
1647
+ 'wrapper' => array(
1648
+ 'width' => '',
1649
+ 'class' => '',
1650
+ 'id' => '',
1651
+ ),
1652
+ 'acfe_permissions' => '',
1653
+ 'placement' => 'top',
1654
+ 'endpoint' => 0,
1655
+ ),
1656
+ array(
1657
+ 'key' => 'field_acfe_dt_labels',
1658
+ 'label' => 'Labels',
1659
+ 'name' => 'labels',
1660
+ 'type' => 'group',
1661
+ 'instructions' => 'An array of labels for this taxonomy. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones.<br /><br />
1662
+ Default: if empty, name is set to label value, and singular_name is set to name value.',
1663
+ 'required' => 0,
1664
+ 'conditional_logic' => 0,
1665
+ 'wrapper' => array(
1666
+ 'width' => '',
1667
+ 'class' => '',
1668
+ 'id' => '',
1669
+ ),
1670
+ 'acfe_permissions' => '',
1671
+ 'layout' => 'row',
1672
+ 'sub_fields' => array(
1673
+ array(
1674
+ 'key' => 'field_acfe_dt_singular_name',
1675
+ 'label' => 'Singular name',
1676
+ 'name' => 'singular_name',
1677
  'type' => 'text',
1678
  'instructions' => '',
1679
  'required' => 0,
1693
  'maxlength' => '',
1694
  ),
1695
  array(
1696
+ 'key' => 'field_acfe_dt_menu_name',
1697
+ 'label' => 'Menu name',
1698
+ 'name' => 'menu_name',
1699
  'type' => 'text',
1700
  'instructions' => '',
1701
  'required' => 0,
1715
  'maxlength' => '',
1716
  ),
1717
  array(
1718
+ 'key' => 'field_acfe_dt_all_items',
1719
+ 'label' => 'All items',
1720
+ 'name' => 'all_items',
1721
  'type' => 'text',
1722
  'instructions' => '',
1723
  'required' => 0,
1737
  'maxlength' => '',
1738
  ),
1739
  array(
1740
+ 'key' => 'field_acfe_dt_edit_item',
1741
+ 'label' => 'Edit item',
1742
+ 'name' => 'edit_item',
1743
  'type' => 'text',
1744
  'instructions' => '',
1745
  'required' => 0,
1759
  'maxlength' => '',
1760
  ),
1761
  array(
1762
+ 'key' => 'field_acfe_dt_view_item',
1763
+ 'label' => 'View item',
1764
+ 'name' => 'view_item',
1765
  'type' => 'text',
1766
  'instructions' => '',
1767
  'required' => 0,
1781
  'maxlength' => '',
1782
  ),
1783
  array(
1784
+ 'key' => 'field_acfe_dt_update_item',
1785
+ 'label' => 'Update item',
1786
+ 'name' => 'update_item',
1787
  'type' => 'text',
1788
  'instructions' => '',
1789
  'required' => 0,
1803
  'maxlength' => '',
1804
  ),
1805
  array(
1806
+ 'key' => 'field_acfe_dt_add_new_item',
1807
+ 'label' => 'Add new item',
1808
+ 'name' => 'add_new_item',
1809
  'type' => 'text',
1810
  'instructions' => '',
1811
  'required' => 0,
1825
  'maxlength' => '',
1826
  ),
1827
  array(
1828
+ 'key' => 'field_acfe_dt_new_item_name',
1829
+ 'label' => 'New item name',
1830
+ 'name' => 'new_item_name',
1831
  'type' => 'text',
1832
  'instructions' => '',
1833
  'required' => 0,
1847
  'maxlength' => '',
1848
  ),
1849
  array(
1850
+ 'key' => 'field_acfe_dt_parent_item',
1851
+ 'label' => 'Parent item',
1852
+ 'name' => 'parent_item',
1853
  'type' => 'text',
1854
  'instructions' => '',
1855
  'required' => 0,
1868
  'append' => '',
1869
  'maxlength' => '',
1870
  ),
1871
+ array(
1872
+ 'key' => 'field_acfe_dt_parent_item_colon',
1873
+ 'label' => 'Parent item colon',
1874
+ 'name' => 'parent_item_colon',
1875
+ 'type' => 'text',
1876
+ 'instructions' => '',
1877
+ 'required' => 0,
1878
+ 'conditional_logic' => 0,
1879
+ 'wrapper' => array(
1880
+ 'width' => '',
1881
+ 'class' => '',
1882
+ 'id' => '',
1883
+ ),
1884
+ 'acfe_validate' => '',
1885
+ 'acfe_update' => '',
1886
+ 'acfe_permissions' => '',
1887
+ 'default_value' => '',
1888
+ 'placeholder' => '',
1889
+ 'prepend' => '',
1890
+ 'append' => '',
1891
+ 'maxlength' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1892
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1893
  array(
1894
+ 'key' => 'field_acfe_dt_search_items',
1895
+ 'label' => 'Search items',
1896
+ 'name' => 'search_items',
1897
+ 'type' => 'text',
1898
+ 'instructions' => '',
1899
+ 'required' => 0,
1900
+ 'conditional_logic' => 0,
1901
+ 'wrapper' => array(
1902
+ 'width' => '',
1903
+ 'class' => '',
1904
+ 'id' => '',
1905
+ ),
1906
+ 'acfe_validate' => '',
1907
+ 'acfe_update' => '',
1908
+ 'acfe_permissions' => '',
1909
+ 'default_value' => '',
1910
+ 'placeholder' => '',
1911
+ 'prepend' => '',
1912
+ 'append' => '',
1913
+ 'maxlength' => '',
1914
+ ),
1915
+ array(
1916
+ 'key' => 'field_acfe_dt_popular_items',
1917
+ 'label' => 'Popular items',
1918
+ 'name' => 'popular_items',
1919
+ 'type' => 'text',
1920
+ 'instructions' => '',
1921
+ 'required' => 0,
1922
+ 'conditional_logic' => 0,
1923
+ 'wrapper' => array(
1924
+ 'width' => '',
1925
+ 'class' => '',
1926
+ 'id' => '',
1927
  ),
1928
+ 'acfe_validate' => '',
1929
+ 'acfe_update' => '',
1930
+ 'acfe_permissions' => '',
1931
+ 'default_value' => '',
1932
+ 'placeholder' => '',
1933
+ 'prepend' => '',
1934
+ 'append' => '',
1935
+ 'maxlength' => '',
1936
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1937
  array(
1938
+ 'key' => 'field_acfe_dt_separate_items_with_commas',
1939
+ 'label' => 'Separate items with commas',
1940
+ 'name' => 'separate_items_with_commas',
1941
+ 'type' => 'text',
1942
+ 'instructions' => '',
1943
+ 'required' => 0,
1944
+ 'conditional_logic' => 0,
1945
+ 'wrapper' => array(
1946
+ 'width' => '',
1947
+ 'class' => '',
1948
+ 'id' => '',
1949
  ),
1950
+ 'acfe_validate' => '',
1951
+ 'acfe_update' => '',
1952
+ 'acfe_permissions' => '',
1953
+ 'default_value' => '',
1954
+ 'placeholder' => '',
1955
+ 'prepend' => '',
1956
+ 'append' => '',
1957
+ 'maxlength' => '',
1958
  ),
 
 
 
 
 
 
 
 
 
1959
  array(
1960
+ 'key' => 'field_acfe_dt_add_or_remove_items',
1961
+ 'label' => 'Add or remove items',
1962
+ 'name' => 'add_or_remove_items',
1963
  'type' => 'text',
1964
+ 'instructions' => '',
1965
  'required' => 0,
1966
+ 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
1967
  'wrapper' => array(
1968
  'width' => '',
1969
  'class' => '',
1973
  'acfe_update' => '',
1974
  'acfe_permissions' => '',
1975
  'default_value' => '',
1976
+ 'placeholder' => '',
1977
  'prepend' => '',
1978
  'append' => '',
1979
  'maxlength' => '',
1980
  ),
1981
  array(
1982
+ 'key' => 'field_acfe_dt_choose_from_most_used',
1983
+ 'label' => 'Choose from most used',
1984
+ 'name' => 'choose_from_most_used',
1985
+ 'type' => 'text',
1986
+ 'instructions' => '',
1987
  'required' => 0,
1988
+ 'conditional_logic' => 0,
 
 
 
 
 
 
 
 
1989
  'wrapper' => array(
1990
  'width' => '',
1991
  'class' => '',
1994
  'acfe_validate' => '',
1995
  'acfe_update' => '',
1996
  'acfe_permissions' => '',
1997
+ 'default_value' => '',
1998
+ 'placeholder' => '',
1999
+ 'prepend' => '',
2000
+ 'append' => '',
2001
+ 'maxlength' => '',
2002
  ),
2003
  array(
2004
+ 'key' => 'field_acfe_dt_not_found',
2005
+ 'label' => 'Not found',
2006
+ 'name' => 'not_found',
2007
+ 'type' => 'text',
2008
+ 'instructions' => '',
2009
  'required' => 0,
2010
+ 'conditional_logic' => 0,
2011
+ 'wrapper' => array(
2012
+ 'width' => '',
2013
+ 'class' => '',
2014
+ 'id' => '',
 
 
 
2015
  ),
2016
+ 'acfe_validate' => '',
2017
+ 'acfe_update' => '',
2018
+ 'acfe_permissions' => '',
2019
+ 'default_value' => '',
2020
+ 'placeholder' => '',
2021
+ 'prepend' => '',
2022
+ 'append' => '',
2023
+ 'maxlength' => '',
2024
+ ),
2025
+ array(
2026
+ 'key' => 'field_acfe_dt_back_to_items',
2027
+ 'label' => 'Back to items',
2028
+ 'name' => 'back_to_items',
2029
+ 'type' => 'text',
2030
+ 'instructions' => '',
2031
+ 'required' => 0,
2032
+ 'conditional_logic' => 0,
2033
  'wrapper' => array(
2034
  'width' => '',
2035
  'class' => '',
2038
  'acfe_validate' => '',
2039
  'acfe_update' => '',
2040
  'acfe_permissions' => '',
2041
+ 'default_value' => '',
2042
+ 'placeholder' => '',
2043
+ 'prepend' => '',
2044
+ 'append' => '',
2045
+ 'maxlength' => '',
2046
  ),
2047
  ),
2048
  ),
2049
  array(
2050
+ 'key' => 'field_acfe_dt_tab_capability',
2051
+ 'label' => 'Capability',
2052
  'name' => '',
2053
  'type' => 'tab',
2054
  'instructions' => '',
2064
  'endpoint' => 0,
2065
  ),
2066
  array(
2067
+ 'key' => 'field_acfe_dt_capabilities',
2068
+ 'label' => 'Capabilities',
2069
+ 'name' => 'capabilities',
2070
+ 'type' => 'textarea',
2071
+ 'instructions' => 'An array of the capabilities for this taxonomy:<br /><br />
2072
+ manage_terms : edit_posts<br />
2073
+ edit_terms : edit_posts<br />
2074
+ delete_terms : edit_posts<br />
2075
+ assign_terms : edit_posts',
2076
  'required' => 0,
2077
  'conditional_logic' => 0,
2078
  'wrapper' => array(
2083
  'acfe_validate' => '',
2084
  'acfe_update' => '',
2085
  'acfe_permissions' => '',
2086
+ 'default_value' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2087
  'placeholder' => '',
 
 
2088
  'maxlength' => '',
2089
+ 'rows' => '',
2090
+ 'new_lines' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2091
  ),
2092
  array(
2093
  'key' => 'field_acfe_dt_tab_rest',
includes/modules/form/actions/email.php CHANGED
@@ -104,7 +104,7 @@ class acfe_form_email{
104
 
105
  if(!empty($reply_to)){
106
 
107
- $headers[] = 'Reply-To: ' . $cc;
108
 
109
  }
110
 
104
 
105
  if(!empty($reply_to)){
106
 
107
+ $headers[] = 'Reply-To: ' . $reply_to;
108
 
109
  }
110
 
includes/modules/form/admin.php CHANGED
@@ -3644,17 +3644,17 @@ function acfe_form_map_field($content){
3644
  }
3645
 
3646
  foreach($matches[1] as $i => $field_key){
3647
-
 
3648
  $format = true;
3649
 
3650
- if(strpos($field_key, ':') !== false){
3651
 
3652
- $explode = explode(':', $field_key);
3653
-
3654
- $field_key = $explode[0]; // field_123abc
3655
- $format = $explode[1]; // true / false
3656
 
3657
- if($format === 'false')
3658
  $format = false;
3659
 
3660
  }
@@ -3663,7 +3663,7 @@ function acfe_form_map_field($content){
3663
 
3664
  foreach($data as $field){
3665
 
3666
- if($field['name'] !== $field_key && $field['key'] !== $field_key)
3667
  continue;
3668
 
3669
  // Value
3644
  }
3645
 
3646
  foreach($matches[1] as $i => $field_key){
3647
+
3648
+ $key = $field_key;
3649
  $format = true;
3650
 
3651
+ if(strpos($key, ':') !== false){
3652
 
3653
+ $explode = explode(':', $key);
3654
+
3655
+ $key = $explode[0]; // field_123abc
 
3656
 
3657
+ if($explode[1] === 'false')
3658
  $format = false;
3659
 
3660
  }
3663
 
3664
  foreach($data as $field){
3665
 
3666
+ if($field['name'] !== $key && $field['key'] !== $key)
3667
  continue;
3668
 
3669
  // Value
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: hwk-fr
3
  Donate link: https://ko-fi.com/acfextended
4
  Tags: acf, custom fields, meta, admin, fields, form, repeater, content
5
  Requires at least: 4.9
6
- Tested up to: 5.4
7
  Requires PHP: 5.6
8
- Stable tag: 0.8.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -42,16 +42,21 @@ All-in-one enhancement suite that improves WordPress & Advanced Custom Fields.
42
 
43
  == 🛠️ Links ==
44
 
45
- * Join the [ACF Slack community](https://join.slack.com/t/wpacf/shared_invite/enQtODc2MjczMzM3NzQ1LTQxNmY2ZGY3OTU2NDkxNTliYmNhMmY1NDMwZGM4NmYxNzgwZTI5MDUzMDFlMGQ5YzcwNDc0ZWM0MDVmODI4NmI)
46
- * Check the [ACF Extended Trello board](https://trello.com/b/QEgpU7CL/acf-extended)
47
- * Visit our website [ACF-Extended.com](https://www.acf-extended.com) (WIP)
48
- * Have a question? [Check the FAQ](https://wordpress.org/plugins/acf-extended/#faq)
49
- * Found a bug? [Submit a ticket](https://wordpress.org/support/plugin/acf-extended)
50
- * A feature request? [Submit an idea](https://wordpress.org/support/plugin/acf-extended)
51
- * Want to fork me? [GitHub repository](https://github.com/acf-extended/ACF-Extended)
52
- * Enjoying this plugin? [Submit a review](https://wordpress.org/support/plugin/acf-extended/reviews/#new-post)
53
- * Want to keep me awake? [Buy me a coffee](https://ko-fi.com/acfextended)
54
- * Want to follow me? [Here is my Twitter](https://twitter.com/hwkfr)
 
 
 
 
 
55
 
56
  == 📺 Flexible Content Showcase ==
57
 
@@ -59,401 +64,199 @@ All-in-one enhancement suite that improves WordPress & Advanced Custom Fields.
59
 
60
  == 📝 Requirements ==
61
 
62
- **This plugin requires at least ACF Pro 5.7.10**
63
-
64
- If you don't already own [ACF Pro](https://www.advancedcustomfields.com/pro/), you should consider it. It's one of the most powerful WordPress plugin available.
65
 
66
- == 🏷️ Features ==
67
 
68
- == ACF: Field Groups Settings ==
 
69
 
70
- * **Auto Sync PHP**
71
  Automatically synchronize field groups with local PHP files upon field group updates. This feature will create, include and update a local PHP file for each field group (just like the native Json sync feature).
72
- Default folder: `/wp-content/themes/my-theme/acfe-php/`
73
 
74
- * **Auto Sync Json**
75
- Control which field groups you want to synchronize with local Json files. Display warnings if the Json file has been manually deleted. Manually synchronize Json from field group screen.
76
 
77
- * **Categories**
78
  Spice up your field groups with a custom taxonomy and filter field groups by terms.
79
 
80
- * **Permissions**
81
- Add permission layer to field groups. Choose which roles can view & edit field groups in the post edition screen.
82
-
83
- * **Alternative Title**
84
- Display an alternative field group title in post edition screen.
85
-
86
- * **Note**
87
- Add a personal note in the field group administration. Only visible to administrators
88
-
89
- * **Custom meta data**
90
- Add custom metas (key/value) in the field group administration. Data can be retrieved using `acf_get_field_group()`
91
-
92
- * **View raw data**
93
- Display raw field group data in a modal to check your configuration & settings
94
-
95
- * **Custom key**
96
- Set custom field group key. ie: `group_custom_name`
97
-
98
- * **Hide on Screen: Block Editor**
99
- Choose to disable Block Editor (Gutenberg) on the field group location
100
 
101
- * **Advanced settings**
102
- Enable advanced fields settings & validation based on screen (administration/front-end). See fields advanced settings/validation
103
 
104
- * **New field group instructions placement: Tooltip**
105
- Display instructions in a tooltip which is displayed when hovering an information icon
106
 
107
- * **New field group location: All post types**
108
- Display field group on all post types edition screen
109
 
110
- * **New field group location: Post type List**
111
- Display field group on post types admin list screen. Fields are saved in the option: `{post_type}_options`
112
 
113
- * **New field group location: Taxonomy List**
114
- Display field group on taxonomies admin list screen. Fields are saved in the option: `tax_{taxonomy}_options`
115
 
116
- * **New field group location: Post type Archive**
117
- Display field group on the post type archive (option page). The post type argument `acfe_admin_archive` must be set to `true`. This feature is also available in the Dynamic Post Type UI. Fields are saved in the option: `{post_type}_archive`
118
 
119
- == ACF: Field Groups List ==
 
120
 
121
- * **Column: Category**
122
- Display and filter field groups categories
123
 
124
- * **Column: Locations**
125
- Quick view of field groups locations information using icons & popover
126
 
127
- * **Column: Load**
128
- Quick view of field groups data load source (DB, PHP or Json)
129
 
130
- * **Column: Sync PHP / Json**
131
- Quick view of field groups synchronization status with warnings
132
 
133
- * **Row action: Export PHP / Json**
134
- One-click export for each field groups
135
 
136
- * **Row action: Field group key**
137
- Quick view of field groups keys
138
 
139
- == ACF: Field Groups - Local ==
 
140
 
141
- * **Local**
142
- Display local field groups that are loaded by ACF, but not available in the ACF field group administration. Example: a field group is registered locally in the `functions.php` file, but not in ACF
143
 
144
- * **Export**
145
- Export local field groups into PHP or Json
146
 
147
- * **Sync**
148
- Sync local field groups back to the database and edit their fields just like any other field group
149
 
150
- == ACF: Fields Settings ==
 
151
 
152
- * **Bidirectional fields**
153
- An advanced bidirectional setting (also called post-to-post) is available for the following fields: Relationship, Post object, User & Taxonomy terms.
154
- Fields will work bidirectionally and automatically update each others. Works in groups & clones (prefixed field names must be turned off).
155
 
156
- It is possible to link a field on itself, allowing self-bidirectional save.
157
- [Usage example is available in the FAQ](#faq)
158
 
159
- * **Advanced settings**
160
- A more sophisticated field settings based on specified location (administration/front-end). Example: Field is required only in front-end. The field group "Advanced settings" must be turned ON.
161
 
162
- * **Advanced validation**
163
- A more sophisticated validation conditions (AND/OR) with custom error messages based on specified location (administration/front-end). The field group "Advanced settings" must be turned ON.
164
 
165
- * **Permissions**
166
- Add permission layer to fields. Choose which roles can view & edit fields in the post edition screen. (can be combined with field groups permissions)
167
 
168
- * **Save as Meta**
169
- Exclude the field from the "Single Meta Save" compression feature. The global ACF setting "Single Meta Save" must be turned ON.
170
 
171
- * **View raw data**
172
- Display raw field data in a modal to check your configuration & settings
173
 
174
- == ACF: Fields ==
 
175
 
176
- * **Field Clone: Edit in modal**
177
- Allow users to edit clone fields in a modal. Choose the edit button text, display close button and the modal size
178
 
179
- * **Field Datepicker/Datetime picker/Timepicker: Improved UI**
180
- Fields interfaces have been improved to display a more modern version
181
 
182
- * **Field File: Uploader type**
183
- Choose the uploader type: Basic or native WP uploader
184
 
185
- * **Field Group: Edit in modal**
186
  Allow users to edit group fields in a modal Choose the edit button text, display close button and the modal size
187
 
188
- * **Field Image: Use as Featured Thumbnail**
189
- Choose if an image field should be considered as post featured thumbnail
190
 
191
- * **Field Image: Uploader type**
192
- Choose the uploader type: Basic or native WP uploader
193
 
194
- * **Field Post Object: Allow custom values**
195
  Allow user to enter custom value which will be saved as a new post
196
 
197
- * **Field Repeater: Stylised button**
198
- Add style to 'Add Row' button
199
-
200
- * **Field Repeater: Disable Sortable**
201
- Disable sortable rows using `filter('acfe/repeater/lock/name=my_repeater', true, $field)`
202
-
203
- * **Field Repeater: Remove Actions**
204
- Remove the actions buttons using `filter('acfe/repeater/remove_actions/name=my_repeater', true, $field)`
205
-
206
- * **Field Select: Placeholder**
207
- Change the default "Select" placeholder text and Search Input placeholder
208
-
209
- * **Field Select: Allow custom values**
210
- Allow user to enter custom value which will be saved
211
-
212
- * **Field Textarea: Code mode**
213
- Switch font family to monospace and allow tab indent
214
-
215
- == ACF: New Fields ==
216
-
217
- * **New Field: Advanced Link**
218
- Display a modern Link Selection in a modal. Posts, Post Types Archives & terms selection can be filtered in the field administration. Add custom sub fields using `filter('acfe/fields/advanced_link/sub_fields', $sub_fields, $field, $value)`
219
-
220
- * **New Field: Button**
221
- Display a custom submit or button. Built-in ajax call setting. Usage example available in the field administration
222
-
223
- * **New Field: Code Editor**
224
- Edit code using the native WP Core Codemirror library. Default languages: Text/HTML, Javascript, CSS, PHP mixed/plain.
225
-
226
- * **New Field: Columns**
227
- Re-arrange fields administration using columns
228
-
229
- * **New Field: Dynamic form**
230
- Select any dynamic form (format: checkbox, radio or select). See ACF: Dynamic Forms section
231
-
232
- * **New Field: Dynamic message**
233
- Display custom HTML/PHP content using `acf/render_field/name=my_field`. Example is available in the field administration
234
-
235
- * **New Field: Google reCaptcha**
236
- Display a reCaptcha field (compatible v2 & v3)
237
-
238
- * **New Field: Hidden input**
239
- Display a hidden input with custom name/value
240
-
241
- * **New Field: Post status selection**
242
  Select any post status (format: checkbox, radio or select)
243
 
244
- * **New Field: Post type selection**
245
  Select any post type (format: checkbox, radio or select)
246
 
247
- * **New Field: Slug**
248
- A slug text input (ie: `my-text-input`)
249
-
250
- * **New Field: Taxonomy selection**
251
- Select any taxonomy (format: checkbox, radio or select)
252
-
253
- * **New Field: Taxonomy Terms selection**
254
- Select any terms of any taxonomies, allow specific terms, level or childrens (format: checkbox or select). Terms can be loaded & saved for the current post (just like the native ACF Taxonomy field)
255
-
256
- * **New Field: User roles selection**
257
- Select any user role (format: checkbox, radio or select)
258
-
259
- == WordPress: Dynamic Post Types ==
260
-
261
- Create and manage post types from your WordPress administration (Tools > Post Types). All WordPress post types arguments can be set and managed. But also:
262
-
263
- * Manage Posts per page, order by and order for the post type archive
264
- * Manage Posts per page, order by and order for the post type administration screen
265
- * Set custom single template (ie: `my-single.php`) instead of the native `single-{post_type}.php`
266
- * Set custom archive template (ie: `my-archive.php`) instead of the native `archive-{post_type}.php`
267
- * Add an Archive Option Page under the post type menu and set your field groups
268
- * Manual PHP/Json Import & Export is available in the ACF > Tools page
269
-
270
- == WordPress: Dynamic Taxonomies ==
271
-
272
- Create and manage taxonomies from your WordPress administration (Tools > Taxonomies). All WordPress taxonomies arguments can be set and managed. But also:
273
 
274
- * Manage Posts per page, order by and order for the taxonomy term archive
275
- * Manage Posts per page, order by and order for the taxonomy administration screen
276
- * Set custom taxonomy template (ie: `my-taxonomy.php`) instead of the native `taxonomy-{taxonomy}.php`
277
- * Manual PHP/Json Import & Export is available in the ACF > Tools page
278
 
279
- == WordPress: Ajax Author Box ==
 
280
 
281
- The native WP Author Metabox has been replaced with a dynamic version allowing to manage thousands of users without slowing down the post administration.
 
282
 
283
- == WordPress: Enhanced UI ==
284
-
285
- Taxonomies list/edit, User edit/add and General Settings views have been enhanced for a more consistent administration experience, using CSS/JS only.
286
-
287
- == WordPress: Options ==
288
-
289
- Manage WordPress options from Settings > Options.
290
-
291
- * View, add, edit and delete options
292
- * Working with strings, serialized & Json values
293
-
294
- == ACF: Settings ==
295
-
296
- * **ACF: Settings page**
297
- Display all ACF settings in one page.
298
-
299
- * **ACF Extended: Settings page**
300
- Display all ACF Extended settings in one page.
301
-
302
- == ACF: Dev Mode ==
303
-
304
- View all custom Posts, Terms, Users & Options meta in a readable format
305
-
306
- * Print Arrays & Json values
307
- * Delete/Bulk delete any meta
308
- * ACF fields meta are grouped together
309
- * ACF field groups related to fields are displayed when available
310
- * Dev mode also enable `SCRIPT_DEBUG`
311
- * Activate using `acf_update_setting('acfe/dev', true)` or `define('ACFE_dev', true)`
312
-
313
- == ACF: Options Pages ==
314
-
315
- Manage ACF Options Pages from ACF > Options.
316
-
317
- * View, add, edit and delete options pages
318
- * All arguments are available
319
- * Manual PHP/Json Import & Export is available in the ACF > Tools page
320
-
321
- == ACF: Block Types (Gutenberg) ==
322
-
323
- Manage ACF Block Types from ACF > Block Types.
324
-
325
- * View, add, edit and delete Block Types
326
- * All arguments are available
327
- * Manual PHP/Json Import & Export is available in the ACF > Tools page
328
- * Requires ACF Pro 5.8
329
-
330
- == ACF: Flexible Content Enhancement ==
331
-
332
- * Controls: Inline Layout Title Edition
333
- * Controls: Copy, Paste & Duplicate Layouts on the fly
334
- * Controls: Copy & Paste all layouts on the fly
335
- * Stylised Button: Add style to 'Add Row' button
336
- * Hide Empty Message: Hide the native Flexible Content 'Empty' message
337
- * Empty Message: Change the native Flexible Content 'Click the Add Row button below...' message
338
- * Layouts Thumbnails: Add thumbnails for each layout in the layout selection
339
- * Layouts Settings: Choose a field group to clone and to be used as a layout configuration modal in the administration. Data can be retrieved using `while(have_settings()): the_setting(); get_sub_field('my_setting');`
340
- * Layouts Render: Add `template.php`, `style.css` & `script.js` files settings for each layout. Those settings can be then accessed in the front-end ([More information in the FAQ](#faq))
341
- * Layouts Dynamic Preview: Edit & Preview Layouts on-the-fly from your WordPress administration, just like in Gutenberg (Layouts Render must be turned ON)
342
- * Modal Edition: Edit layouts in a modal
343
- * Modal Selection: Change the layout selection into a modal
344
- * Modal Selection Title: Change the layout modal title
345
- * Modal Selection Columns: Change the layout modal columns grid. 1, 2, 3, 4, 5 or 6 columns available
346
- * Modal Selection Categories: Add category for each layout in the layout modal
347
- * Modal Settings: Clone field groups and display them as a layout settings modal
348
- * Layouts Toggle: Hide specific layouts from the front-end
349
- * Layouts State: Force layouts to be collapsed or opened by default
350
- * Layouts Collapse: Remove collapse action
351
- * Layouts: Hide "Add Layout" buttons
352
- * Layouts: Hide "Remove Layout" buttons. Can also be done using `filter('acfe/flexible/remove_actions/name=my_flexible', true, $field)`
353
- * Lock Layouts: Disable sortable Layouts. Can also be done using `filter('acfe/flexible/lock/name=my_flexible', true, $field)`
354
- * Button Label: Supports Dashicons icons elements `<span>`
355
- * One Click: the 'Add row' button will add a layout without the selection modal if there is only one layout available in the flexible content
356
- * Asynchronous Layouts: Add layouts using Ajax method. This setting increase performance on complex Flexible Content
357
- * Disable Legacy Layout Title Ajax: Disable the native ACF Layout Title Ajax call on `acf/fields/flexible_content/layout_title`.
358
-
359
- == ACF: Dynamic Forms ==
360
-
361
- Manage ACF Forms from your WordPress administration. All ACF Form settings are available. But also:
362
-
363
- * Render multiple field groups in one single form with custom HTML between them
364
- * Apply custom CSS class to all fields & wrappers
365
- * Apply custom CSS class to fields errors
366
- * Group errors above the form, display them above fields, below fields or hide them
367
- * Hide form on successful submission
368
- * Map fields and change their settings based on the location (front-end/back-end)
369
- * Add multiple actions on form submission:
370
- * Create or Update Posts
371
- * Create or Update Terms
372
- * Create Update, or Log Users
373
- * Send multiple e-mails
374
- * Trigger custom PHP actions
375
- * Integration, validation & custom submission examples in the administration
376
- * Display forms using `acfe_form('my_form_name')` or `acfe_form(188)` helpers
377
- * Display forms using shortcodes `[acfe_form name="my_form_name"]` or `[acfe_form ID="188"]`
378
- * The function `acf_form_head()` is not needed anymore
379
- * Manual Import & Export is available in the ACF > Tools page
380
-
381
- == WPML & Polylang Multilangual ==
382
-
383
- Advanced Custom Fields comes with a WPML compatibility module for Fields, Field Groups & Options Page ID. However, it will only take care of Options Pages with the default `options` post id. When WPML is enabled, ACF will translate the post id to `options_{lang}`. ie: `options_en`.
384
-
385
- ACF Extended adds a new layer of compatibility for both WPML & Polylang. Options Pages post ids and all ACF Extended Modules (Dynamic Post Type, Taxonomy, Options Pages, Block Type) are now compatible.
386
-
387
- = WPML =
388
- Options Pages with custom post id are automatically translated. ie: `my-theme` will become `my-theme_en` when switching language. If an Options Page was manually registered with a custom post id including a language code at the end, then the post id won't be translated.
389
-
390
- Dynamic Post Type, Taxonomy, Options Pages & Block Type items are automatically registered as WPML string, and can be translated using the WPML String Translation module.
391
-
392
- = Polylang =
393
- Options Pages with custom post id are automatically translated. ie: `my-theme` will become `my-theme_en_US` when switching language. If an Options Page was manually registered with a custom post id including a language code at the end, then the post id won't be translated. The module is also compatible with the [ACF Options for Polylang](https://wordpress.org/plugins/acf-options-for-polylang/) plugin.
394
-
395
- Dynamic Post Type, Taxonomy, Options Pages & Block Type items are automatically registered as Polylang strings, and can be translated using the Polylang String Translation module.
396
-
397
- == ACF: Single Meta Save (Beta) ==
398
 
399
- Compress all fields values from the current post, term, user or options into one single meta data. This process lighten the database load as values are saved and read from one single row. Once activated and after saving a post/term/user in the administration, all old meta data will be removed and packed together in a meta called `acf`.
 
400
 
401
- To monitor the process, it is possible to enable the "ACF Extended: Dev Mode" which will display all WP & ACF meta data on every Posts, Terms, Users & Options.
 
402
 
403
- This feature also enables a new setting available in every fields: "Save as individual meta". If this setting is turned ON on a specific field, then the value will be saved individually. `WP Queries` and `Meta Queries` can be used just like before.
 
404
 
405
- Single Meta Save is disabled by default. To enable it, add the following code in your `functions.php` file:
406
 
407
- `
408
- add_action('acf/init', 'my_acfe_modules');
409
- function my_acfe_modules(){
410
-
411
- // Enable Single Meta Save
412
- acfe_update_setting('modules/single_meta', true);
413
-
414
- }
415
 
416
- // Enable Single Meta Save on specific Post Types only (default: all)
417
- add_filter('acfe/modules/single_meta/post_types', 'my_acfe_single_meta_post_types');
418
- function my_acfe_single_meta_post_types($post_types){
419
 
420
- $post_types = array('page', 'my-post-type');
421
 
422
- // Disable all post types:
423
- // return false;
424
 
425
- return $post_types;
426
 
427
- }
 
428
 
429
- // Enable Single Meta Save on specific Taxonomies only (default: all)
430
- add_filter('acfe/modules/single_meta/taxonomies', 'my_acfe_single_meta_taxonomies');
431
- function my_acfe_single_meta_taxonomies($taxonomies){
432
 
433
- $taxonomies = array('category', 'my-taxonomy');
 
434
 
435
- // Disable all taxonomies:
436
- // return false;
437
 
438
- return $taxonomies;
 
439
 
440
- }
441
 
442
- // Enable Single Meta Save on specific Options ID (default: disabled)
443
- add_filter('acfe/modules/single_meta/options', 'my_acfe_single_meta_options');
444
- function my_acfe_single_meta_options($options_ids){
445
 
446
- $options_ids = array('options', 'my-option-id');
 
447
 
448
- // Disable all options id (default):
449
- // return false;
450
 
451
- return $options_ids;
452
 
453
- }
454
- `
455
 
456
- Note: It is possible to revert back to the native ACF save process. To do so, keep the feature enabled, get in the post administration you want to revert back. Disable the feature in your code, and save the post. All data will be saved back to individual meta data.
 
457
 
458
  == ❤️ Early Supporters ==
459
 
@@ -477,6 +280,9 @@ Note: It is possible to revert back to the native ACF save process. To do so, ke
477
  * Thanks to Anonymous
478
  * Thanks to Chris
479
  * Thanks to Dennis D.
 
 
 
480
 
481
  == Installation ==
482
 
@@ -855,17 +661,41 @@ function my_acfe_modules(){
855
 
856
  1. Flexible Content Preview
857
  2. Flexible Content Modal
858
- 3. Field Groups List
859
- 4. Field Group
860
- 5. Dynamic Post Type
861
- 6. Dynamic Taxonomy
862
- 7. Dynamic Options Pages
863
- 8. Dynamic Block Types
864
- 9. Field
865
- 10. ACF Settings
866
 
867
  == Changelog ==
868
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
869
  = 0.8.7 =
870
  * General: ACF 5.9 Compatibility - Modules - Added the ACF 5.9 Header menu
871
  * General: ACF 5.9 Compatibility - Field Groups - Removed ACFE "Locations" column
3
  Donate link: https://ko-fi.com/acfextended
4
  Tags: acf, custom fields, meta, admin, fields, form, repeater, content
5
  Requires at least: 4.9
6
+ Tested up to: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 0.8.7.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
42
 
43
  == 🛠️ Links ==
44
 
45
+ * [Website](https://www.acf-extended.com)
46
+ * [Documentation](https://www.acf-extended.com/features)
47
+ * [Roadmap](https://www.acf-extended.com/roadmap)
48
+ * [GitHub](https://github.com/acf-extended/ACF-Extended)
49
+ * [Twitter](https://twitter.com/ACFExtended)
50
+ * [Twitter](https://twitter.com/hwkfr) (Personal)
51
+ * [Slack](https://join.slack.com/t/wpacf/shared_invite/enQtODc2MjczMzM3NzQ1LTQxNmY2ZGY3OTU2NDkxNTliYmNhMmY1NDMwZGM4NmYxNzgwZTI5MDUzMDFlMGQ5YzcwNDc0ZWM0MDVmODI4NmI)
52
+
53
+ == 🧰 Tools ==
54
+
55
+ * [FAQ](https://wordpress.org/plugins/acf-extended/#faq)
56
+ * [Support](https://wordpress.org/support/plugin/acf-extended)
57
+ * [Feature Request](https://wordpress.org/support/plugin/acf-extended)
58
+ * [Reviews](https://wordpress.org/support/plugin/acf-extended/reviews/#new-post)
59
+ * [Donation](https://ko-fi.com/acfextended)
60
 
61
  == 📺 Flexible Content Showcase ==
62
 
64
 
65
  == 📝 Requirements ==
66
 
67
+ **This plugin requires at least ACF Pro 5.7.10.** If you don't already own [ACF Pro](https://www.advancedcustomfields.com/pro/), you should consider it. It's one of the most powerful WordPress plugin available.
 
 
68
 
69
+ == 📁 Field Groups ==
70
 
71
+ **[Alternative Title](https://www.acf-extended.com/features/field-groups/alternative-title)**
72
+ Display an alternative field group title in post edition screen.
73
 
74
+ **[Auto Sync PHP](https://www.acf-extended.com/features/field-groups/autosync)**
75
  Automatically synchronize field groups with local PHP files upon field group updates. This feature will create, include and update a local PHP file for each field group (just like the native Json sync feature).
 
76
 
77
+ **[Auto Sync Json](https://www.acf-extended.com/features/field-groups/autosync)**
78
+ Control which field groups you want to synchronize with local Json files. Display warnings if the Json file has been manually deleted.
79
 
80
+ **[Categories](https://www.acf-extended.com/features/field-groups/categories)**
81
  Spice up your field groups with a custom taxonomy and filter field groups by terms.
82
 
83
+ **[Custom Key](https://www.acf-extended.com/features/field-groups/custom-key)**
84
+ Set custom field group key. Example: group_custom_name.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
+ **[Custom Meta](https://www.acf-extended.com/features/field-groups/custom-meta)**
87
+ Add custom metas (key/value) in the field group administration.
88
 
89
+ **[Hide on Screen](https://www.acf-extended.com/features/field-groups/hide-on-screen)**
90
+ Choose to disable Block Editor (Gutenberg) on the field group location.
91
 
92
+ **[Instructions Tooltip](https://www.acf-extended.com/features/field-groups/instructions-tooltip)**
93
+ Display instructions in a tooltip which is displayed when hovering an information icon.
94
 
95
+ **[Location: All post types](https://www.acf-extended.com/features/field-groups/locations/post-type)**
96
+ Display field group on all post types edition screen.
97
 
98
+ **[Location: Post type Archive](https://www.acf-extended.com/features/field-groups/locations/post-type-archive)**
99
+ Add an Archive Option Page under the Post Type admin menu. Display and save any field groups within it.
100
 
101
+ **[Location: Post type List](https://www.acf-extended.com/features/field-groups/locations/post-type-list)**
102
+ Display field group on post types admin list screen.
103
 
104
+ **[Location: Taxonomy List](https://www.acf-extended.com/features/field-groups/locations/taxonomy-list)**
105
+ Display field group on taxonomies admin list screen.
106
 
107
+ **[Local Field Groups](https://www.acf-extended.com/features/)**
108
+ Display local field groups that are loaded by ACF, but not available in the ACF field group administration. Example: Field groups that are registered in the `functions.php` file, but not in the ACF UI.
109
 
110
+ **[Note](https://www.acf-extended.com/features/field-groups/note)**
111
+ Add a personal note in the field group administration. Only visible to administrators.
112
 
113
+ **[Permissions](https://www.acf-extended.com/features/field-groups/permissions)**
114
+ Add permission layer to field groups. Choose which roles can view & edit field groups in the post edition screen.
115
 
116
+ **[Raw Data](https://www.acf-extended.com/features/field-groups/raw-data)**
117
+ Display raw field group data in a modal to check your configuration & settings.
118
 
119
+ == ⚙️ Fields Settings ==
 
120
 
121
+ **[Advanced Settings](https://www.acf-extended.com/features/field-settings/advanced-settings)**
122
+ A more sophisticated field settings based on specified location (administration/front-end). Example: Field is required only in front-end.
123
 
124
+ **[Advanced Validation](https://www.acf-extended.com/features/field-settings/advanced-validation)**
125
+ A more sophisticated validation conditions (AND/OR) with custom error messages based on specified location (administration/front-end).
126
 
127
+ **[Self/Multi/Bidirectional fields](https://www.acf-extended.com/features/field-settings/bidirectional-fields)**
128
+ An advanced bidirectional setting (also called post-to-post) is available for the following fields: Relationship, Post object, User & Taxonomy terms. Fields will work bidirectionally and automatically update each others. Works in groups & clones.
129
 
130
+ **[Permissions](https://www.acf-extended.com/features/field-settings/field-permissions)**
131
+ Add permission layer to fields. Choose which roles can view & edit fields in the post edition screen. (can be combined with field groups permissions).
132
 
133
+ **[Save as Meta](https://www.acf-extended.com/features/field-settings/save-as-meta)**
134
+ Exclude the field from the "Single Meta Save" compression feature. The global ACF setting "Single Meta Save" must be turned ON.
135
 
136
+ **[Raw data](https://www.acf-extended.com/features/field-settings/field-raw-data)**
137
+ Display raw field data in a modal to check your configuration & settings.
138
 
139
+ == 🏷️ Fields ==
 
 
140
 
141
+ **[Advanced Link](https://www.acf-extended.com/features/fields/advanced-link)**
142
+ Display a modern Link Selection in a modal. Posts, Post Types Archives & terms selection can be filtered in the field administration.
143
 
144
+ **[Button](https://www.acf-extended.com/features/fields/button)**
145
+ Display a custom submit or button. Built-in ajax call setting. Usage example available in the field administration.
146
 
147
+ **[Clone](https://www.acf-extended.com/features/fields/clone)**
148
+ Allow users to edit clone fields in a modal. Choose the edit button text, display close button and the modal size.
149
 
150
+ **[Code Editor](https://www.acf-extended.com/features/fields/code-editor)**
151
+ Edit code using the native WP Core Codemirror library. Default languages: Text/HTML, Javascript, CSS, PHP mixed/plain.
152
 
153
+ **[Columns](https://www.acf-extended.com/features/fields/columns)**
154
+ Organize and re-arrange your fields using columns and line-breaks. The field acts like the ACF Accordion/Tab field and allow you to create virtually grouped fields which will be display inside columns.
155
 
156
+ **[Date/Timepicker](https://www.acf-extended.com/features/fields/datepicker)**
157
+ Display a modern UI of the ACF Datepicker field. CSS and icons have been enhanced to fit WordPress admin UI and colors.
158
 
159
+ **[Dynamic Message](https://www.acf-extended.com/features/fields/dynamic-message)**
160
+ Display custom HTML/PHP content using a simple named hook.
161
 
162
+ **[File](https://www.acf-extended.com/features/fields/file)**
163
+ Choose the uploader type: Basic or native WP uploader.
164
 
165
+ **[Flexible Content](https://www.acf-extended.com/features/fields/flexible-content)**
166
+ Displayed an enhanced version of the native Flexible Content field. Dozens of new settings and settings were added, allowing developers to create the most advanced page builder and fully control the field’s behavior.
167
 
168
+ **[Forms Selection](https://www.acf-extended.com/features/fields/forms)**
169
+ Select any dynamic form (format: checkbox, radio or select). See ACF: Dynamic Forms section.
170
 
171
+ **[Group](https://www.acf-extended.com/features/fields/group)**
172
  Allow users to edit group fields in a modal Choose the edit button text, display close button and the modal size
173
 
174
+ **[Hidden Input](https://www.acf-extended.com/features/fields/hidden-input)**
175
+ Display a hidden input with custom name/value
176
 
177
+ **[Image](https://www.acf-extended.com/features/fields/image)**
178
+ Choose the uploader type and set the image as post featured thumbnail
179
 
180
+ **[Post Object](https://www.acf-extended.com/features)**
181
  Allow user to enter custom value which will be saved as a new post
182
 
183
+ **[Post Status Selection](https://www.acf-extended.com/features/fields/post-statuses)**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  Select any post status (format: checkbox, radio or select)
185
 
186
+ **[Post Type Selection](https://www.acf-extended.com/features/fields/post-types)**
187
  Select any post type (format: checkbox, radio or select)
188
 
189
+ **[reCaptcha](https://www.acf-extended.com/features/fields/recaptcha)**
190
+ Display a reCaptcha field (compatible v2 & v3).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
+ **[Repeater](https://www.acf-extended.com/features)**
193
+ Add stylised to 'Add Row' button, disable sortable rows and remove repeater's actions.
 
 
194
 
195
+ **[Select](https://www.acf-extended.com/features/fields/select)**
196
+ Change the default "Select" placeholder text and Search Input placeholder and allow user to enter custom values.
197
 
198
+ **[Slug](https://www.acf-extended.com/features/fields/slug)**
199
+ A slug text input (ie: `my-text-input`).
200
 
201
+ **[Taxonomies Selection](https://www.acf-extended.com/features/fields/taxonomies)**
202
+ Select any taxonomy (format: checkbox, radio or select)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
 
204
+ **[Taxonomy Terms Selection](https://www.acf-extended.com/features/fields/taxonomy-terms)**
205
+ Select any terms of any taxonomies, allow specific terms, level or childrens (format: checkbox or select). Terms can be loaded & saved for the current post (just like the native ACF Taxonomy field)
206
 
207
+ **[Textarea](https://www.acf-extended.com/features/fields/textarea)**
208
+ Switch font family to monospace and allow tab indent.
209
 
210
+ **[User roles Selection](https://www.acf-extended.com/features/fields/user-roles)**
211
+ Select any user role (format: checkbox, radio or select)
212
 
213
+ == 🛠️ Modules ==
214
 
215
+ **[Forms](https://www.acf-extended.com/features/modules/dynamic-forms)**
216
+ Manage Advanced ACF Forms from the WordPress administration. This module is an enhanced version of the native ACF Form feature. While all native settings can used, Dynamic Forms adds many new settings and introduce “Actions” for a complete control over the form behavior.
 
 
 
 
 
 
217
 
218
+ **[Post Types](https://www.acf-extended.com/features/modules/dynamic-post-types)**
219
+ The Dynamic Post Types module allows you to register and manage custom post types from your WordPress admin, in Tools > Post Types menu.
 
220
 
221
+ All native post types settings can be set within the UI. ACF Extended also adds more advanced settings allowing to manage posts per page, order etc…
222
 
223
+ **[Taxonomies](https://www.acf-extended.com/features/modules/dynamic-taxonomies)**
224
+ The Dynamic Taxonomies module allows you to register and manage custom taxonomies from your WordPress admin, in Tools > Taxonomies menu.
225
 
226
+ All native taxonomies settings can be set within the UI. ACF Extended also adds more advanced settings allowing to manage posts per page, order etc…
227
 
228
+ **[Block Types](https://www.acf-extended.com/features/modules/dynamic-block-types)**
229
+ The Dynamic Block Types module allows you to register and manage ACF Block Types from your WordPress admin, in ACF > Block Types menu. All ACF settings can be set within the UI.
230
 
231
+ **[Options Pages](https://www.acf-extended.com/features/modules/dynamic-options-pages)**
232
+ The Dynamic Options Pages module allows you to register and manage ACF Options Pages from your WordPress admin, in ACF > Options Pages menu. All ACF settings can be set within the UI.
 
233
 
234
+ **[Single Meta Save](https://www.acf-extended.com/features/modules/single-meta-save)**
235
+ Compress all fields values from the current post, term, user or options into one single meta data. This process lighten the database load as values are saved and read from one single row.
236
 
237
+ Once activated and after saving a post/term/user in the administration, all old meta data will be removed and packed together in a meta called `acf`.
 
238
 
239
+ **[Developer Mode](https://www.acf-extended.com/features/modules/developer-mode)**
240
+ The Developer Mode allow you to view all Posts, Terms, Users & Options custom meta data in a readable format. This feature is very useful to check what is actually saved in any WordPress Object.
241
 
242
+ == 🖥️ WordPress ==
243
 
244
+ **[Ajax Author Box](https://www.acf-extended.com/features/wordpress/ajax-author-box)**
245
+ The native WP Author Metabox has been replaced with an Ajax version allowing to manage thousands of users without slowing down the post administration. The new Author box also include an inline search input.
 
246
 
247
+ **[Enhanced UI](https://www.acf-extended.com/features/wordpress/enhanced-ui)**
248
+ The Taxonomy, User profile & Settings views have been enhanced for a more consistent administration experience, using CSS/JS only.
249
 
250
+ **[WordPress Options](https://www.acf-extended.com/features/wordpress/options)**
251
+ Manage WordPress Options from the Settings > Options page. Options values (strings, serialized & Json) will be displayed in a readable form. Values can be edited or deleted.
252
 
253
+ == 🗺️ Multilangual ==
254
 
255
+ **[Polylang](https://www.acf-extended.com/features/multilangual/polylang)**
256
+ ACF Extended adds a new layer of compatibility for Polylang. ACF Options Pages and all ACF Extended Modules (Dynamic Post Type, Taxonomy, Options Pages, Block Type) are compatible.
257
 
258
+ **[WPML](https://www.acf-extended.com/features/multilangual/wpml)**
259
+ ACF Extended adds a new layer of compatibility for WPML. ACF Options Pages and all ACF Extended Modules (Dynamic Post Type, Taxonomy, Options Pages, Block Type) are compatible.
260
 
261
  == ❤️ Early Supporters ==
262
 
280
  * Thanks to Anonymous
281
  * Thanks to Chris
282
  * Thanks to Dennis D.
283
+ * Thanks to Cody R.
284
+ * Thanks to Jamie
285
+ * Thanks to Dave A.
286
 
287
  == Installation ==
288
 
661
 
662
  1. Flexible Content Preview
663
  2. Flexible Content Modal
664
+ 3. New Fields
665
+ 4. Post Type List Location
666
+ 5. Self/Multi/Bidirectional Fields
667
+ 6. Developer Mode
668
+ 7. Dynamic Post Types
669
+ 8. Enhanced WordPress UI
 
 
670
 
671
  == Changelog ==
672
 
673
+ = 0.8.7.1 =
674
+ * General: WordPress 5.5 Compatibility - Fixed the new "Postbox Order Icons" size & only display them on postbox hover
675
+ * General: ACF 5.9 Compatibility - Added missing legacy ACF 2 columns CSS
676
+ * General: ACF 5.9 Compatibility - Fixed Fields Groups UI `colspan` when empty
677
+ * General: Added `pre > code` CSS compatibility
678
+ * General: Added JS hooks for ACFE Modal: `acf.doAction('acfe/modal/open', $modal, args)` & `acf.doAction('acfe/modal/close', $modal, args)`
679
+ * Field Groups: Fixed "All Images Formats" location which triggered a PHP warning
680
+ * Field Groups: Added `acfe-postbox-top` CSS preload to avoid UI blink during admin page load
681
+ * Field Groups: Categories - Changed the `register_taxonomy()` to priority `9`
682
+ * Module: Multilang - Added `filter('acfe/modules/multilang/options', $options_pages_id)` allowing to allow/exclude specific Options Pages Post ID
683
+ * Module: Dynamic Forms - Email Action - Fixed 'Reply-to' headers which weren't correctly set
684
+ * Module: Dynamic Forms - Fixed `{field:my_field:false}` Template Tag to disable value format
685
+ * Module: Options - Fixed "Serialized" typo on edit screen
686
+ * Module: Dynamic Post Types - Added additional check before `register_post_type()`
687
+ * Module: Dynamic Post Types - Added "Show in menu (text)" to allow string value
688
+ * Module: Dynamic Post Types - Fixed "Archive Slug" incorrectly set when empty while using the Import Tool
689
+ * Module: Dynamic Block Types - Added additional check for Template, Script & Styles arguments before `register_block_type()`
690
+ * Module: Dynamic Taxonomies - Added additional check before `register_taxonomy()`
691
+ * Field: Button - Fixed typo in "Button Type" setting instructions
692
+ * Field: Button - Added default class value `button button-secondary`
693
+ * Field: Clone - Fixed "Edit in modal" setting to be available only when the "Display" setting is set to "Group"
694
+ * Field: Code Editor - Fixed "Editor Mode" setting instructions
695
+ * Field: Forms - Changed default order to Title ASC
696
+ * Field: reCaptcha - Fixed form submission when the field isn't required
697
+ * Field Settings: Bidirectional - Fixed potential PHP notice `Undefined index`
698
+
699
  = 0.8.7 =
700
  * General: ACF 5.9 Compatibility - Modules - Added the ACF 5.9 Header menu
701
  * General: ACF 5.9 Compatibility - Field Groups - Removed ACFE "Locations" column