Advanced Custom Fields: Extended - Version 0.5.2.3

Version Description

  • Field Groups: Fixed unused category column on Field Groups Sync page
  • Fields: Fixed subfields 'ghost' acfcloneindex saved when duplicating flexible content (thanks to @AsmussenBrandon)
Download this release

Release Info

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

Code changes from version 0.5.2.1 to 0.5.2.3

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.5.2.1
6
  * Author: hwk-fr
7
  * Author URI: https://hwk.fr
8
  * Text Domain: acfe
2
  /**
3
  * Plugin Name: Advanced Custom Fields: Extended
4
  * Description: Enhancement Suite which improves Advanced Custom Fields administration
5
+ * Version: 0.5.2.3
6
  * Author: hwk-fr
7
  * Author URI: https://hwk.fr
8
  * Text Domain: acfe
includes/field-groups/field-groups.php CHANGED
@@ -31,7 +31,7 @@ function acfe_field_groups_column($columns){
31
 
32
  // Fix 'Sync' screen columns
33
  if(acf_maybe_get_GET('post_status') === 'sync'){
34
- unset($columns['acf-field-group-type']);
35
  return $columns;
36
  }
37
 
@@ -284,7 +284,7 @@ add_action('current_screen', function(){
284
  <!-- ACFE: Debug -->
285
  <script type="text/html" id="tmpl-acfe-debug">
286
  <div class="acf-box">
287
- <?php _print_r(acf_get_local_field_groups()); ?>
288
  </div>
289
  </script>
290
 
31
 
32
  // Fix 'Sync' screen columns
33
  if(acf_maybe_get_GET('post_status') === 'sync'){
34
+ unset($columns['acf-field-group-category']);
35
  return $columns;
36
  }
37
 
284
  <!-- ACFE: Debug -->
285
  <script type="text/html" id="tmpl-acfe-debug">
286
  <div class="acf-box">
287
+ <?php //_print_r(acf_get_local_field_groups()); ?>
288
  </div>
289
  </script>
290
 
includes/fields/settings-update.php CHANGED
@@ -3,6 +3,9 @@
3
  if(!defined('ABSPATH'))
4
  exit;
5
 
 
 
 
6
  add_filter('acfe/update/functions', 'acfe_update_functions', 0);
7
  function acfe_update_functions($choices){
8
  return array(
@@ -21,6 +24,9 @@ function acfe_update_functions($choices){
21
  );
22
  }
23
 
 
 
 
24
  add_action('acf/render_field_settings', 'acfe_update_settings', 991);
25
  function acfe_update_settings($field){
26
 
@@ -64,6 +70,9 @@ function acfe_update_settings($field){
64
 
65
  }
66
 
 
 
 
67
  add_filter('acf/update_value', 'acfe_update_value', 99, 3);
68
  function acfe_update_value($value, $post_id, $field){
69
 
@@ -76,6 +85,10 @@ function acfe_update_value($value, $post_id, $field){
76
 
77
  foreach($field['acfe_update'] as $vkey => $function){
78
 
 
 
 
 
79
  // Check filters
80
  $filters = array(
81
  'acfe/update/function/' . $rule['acfe_update_function'] . '/key=' . $field['key'],
@@ -106,4 +119,18 @@ function acfe_update_value($value, $post_id, $field){
106
  return $value;
107
  }
108
 
109
- acf_add_filter_variations('acfe/update/exclude', array('type', 'name', 'key'), 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  if(!defined('ABSPATH'))
4
  exit;
5
 
6
+ /**
7
+ * Setting: Native functions
8
+ */
9
  add_filter('acfe/update/functions', 'acfe_update_functions', 0);
10
  function acfe_update_functions($choices){
11
  return array(
24
  );
25
  }
26
 
27
+ /**
28
+ * Add Setting
29
+ */
30
  add_action('acf/render_field_settings', 'acfe_update_settings', 991);
31
  function acfe_update_settings($field){
32
 
70
 
71
  }
72
 
73
+ /**
74
+ * Process Setting
75
+ */
76
  add_filter('acf/update_value', 'acfe_update_value', 99, 3);
77
  function acfe_update_value($value, $post_id, $field){
78
 
85
 
86
  foreach($field['acfe_update'] as $vkey => $function){
87
 
88
+ // Fix possible ACF Clone Index
89
+ if($vkey == 'acfcloneindex')
90
+ continue;
91
+
92
  // Check filters
93
  $filters = array(
94
  'acfe/update/function/' . $rule['acfe_update_function'] . '/key=' . $field['key'],
119
  return $value;
120
  }
121
 
122
+ /**
123
+ * Process Setting: Variations
124
+ */
125
+ acf_add_filter_variations('acfe/update/exclude', array('type', 'name', 'key'), 1);
126
+
127
+ /**
128
+ * Setting: ACF Clone Index fix for flexible duplicate
129
+ */
130
+ add_filter('acf/update_field', 'acfe_update_value_clone_index');
131
+ function acfe_update_value_clone_index($field){
132
+ if(isset($field['acfe_update']['acfcloneindex']))
133
+ $field['acfe_update'] = false;
134
+
135
+ return $field;
136
+ }
includes/fields/settings-validation.php CHANGED
@@ -3,6 +3,9 @@
3
  if(!defined('ABSPATH'))
4
  exit;
5
 
 
 
 
6
  add_filter('acfe/validate/function/acfe_get_user_by_id', 'acfe_get_user_by_id', 10, 3);
7
  function acfe_get_user_by_id($result, $value, $field){
8
  return get_user_by('id', $value);
@@ -28,6 +31,9 @@ function acfe_value($result, $value, $field){
28
  return $value;
29
  }
30
 
 
 
 
31
  add_filter('acfe/validate/functions', 'acfe_validate_functions', 0);
32
  function acfe_validate_functions($choices){
33
  return array(
@@ -70,6 +76,9 @@ function acfe_validate_functions($choices){
70
  );
71
  }
72
 
 
 
 
73
  add_action('acf/render_field_settings', 'acfe_validation_settings', 990);
74
  function acfe_validation_settings($field){
75
 
@@ -183,6 +192,9 @@ function acfe_validation_settings($field){
183
 
184
  }
185
 
 
 
 
186
  add_filter('acf/validate_value', 'acfe_validate_value', 99, 4);
187
  function acfe_validate_value($valid, $value, $field, $input){
188
  if(!$valid)
@@ -197,6 +209,10 @@ function acfe_validate_value($valid, $value, $field, $input){
197
 
198
  foreach($field['acfe_validate'] as $orkey => $rules){
199
 
 
 
 
 
200
  $acfe_validate_rules_and = isset($rules['acfe_validate_rules_and']) && !empty($rules['acfe_validate_rules_and']);
201
  if(!$acfe_validate_rules_and)
202
  continue;
@@ -265,4 +281,18 @@ function acfe_validate_value($valid, $value, $field, $input){
265
  return $valid;
266
  }
267
 
268
- acf_add_filter_variations('acfe/validate/exclude', array('type', 'name', 'key'), 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  if(!defined('ABSPATH'))
4
  exit;
5
 
6
+ /**
7
+ * Setting: ACFE addon functions
8
+ */
9
  add_filter('acfe/validate/function/acfe_get_user_by_id', 'acfe_get_user_by_id', 10, 3);
10
  function acfe_get_user_by_id($result, $value, $field){
11
  return get_user_by('id', $value);
31
  return $value;
32
  }
33
 
34
+ /**
35
+ * Setting: Native functions
36
+ */
37
  add_filter('acfe/validate/functions', 'acfe_validate_functions', 0);
38
  function acfe_validate_functions($choices){
39
  return array(
76
  );
77
  }
78
 
79
+ /**
80
+ * Add Setting
81
+ */
82
  add_action('acf/render_field_settings', 'acfe_validation_settings', 990);
83
  function acfe_validation_settings($field){
84
 
192
 
193
  }
194
 
195
+ /**
196
+ * Process Setting
197
+ */
198
  add_filter('acf/validate_value', 'acfe_validate_value', 99, 4);
199
  function acfe_validate_value($valid, $value, $field, $input){
200
  if(!$valid)
209
 
210
  foreach($field['acfe_validate'] as $orkey => $rules){
211
 
212
+ // Fix possible ACF Clone Index
213
+ if($orkey == 'acfcloneindex')
214
+ continue;
215
+
216
  $acfe_validate_rules_and = isset($rules['acfe_validate_rules_and']) && !empty($rules['acfe_validate_rules_and']);
217
  if(!$acfe_validate_rules_and)
218
  continue;
281
  return $valid;
282
  }
283
 
284
+ /**
285
+ * Process Setting: Variations
286
+ */
287
+ acf_add_filter_variations('acfe/validate/exclude', array('type', 'name', 'key'), 1);
288
+
289
+ /**
290
+ * Setting: ACF Clone Index fix for flexible duplicate
291
+ */
292
+ add_filter('acf/update_field', 'acfe_validate_value_clone_index');
293
+ function acfe_validate_value_clone_index($field){
294
+ if(isset($field['acfe_validate']['acfcloneindex']))
295
+ $field['acfe_validate'] = false;
296
+
297
+ return $field;
298
+ }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: acf, custom fields, meta, admin, fields, form, repeater, content
5
  Requires at least: 4.9
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.6
8
- Stable tag: 0.5.2.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -122,6 +122,10 @@ Create a folder `/acfe-php/` in your theme. Go to your field group administratio
122
 
123
  == Changelog ==
124
 
 
 
 
 
125
  = 0.5.2.1 =
126
  * Field Group: Fixed Left Label Placement overwriting existing field groups (thanks to @AsmussenBrandon)
127
 
5
  Requires at least: 4.9
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.6
8
+ Stable tag: 0.5.2.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
122
 
123
  == Changelog ==
124
 
125
+ = 0.5.2.3 =
126
+ * Field Groups: Fixed unused category column on Field Groups Sync page
127
+ * Fields: Fixed subfields 'ghost' acfcloneindex saved when duplicating flexible content (thanks to @AsmussenBrandon)
128
+
129
  = 0.5.2.1 =
130
  * Field Group: Fixed Left Label Placement overwriting existing field groups (thanks to @AsmussenBrandon)
131