Version Description
- Plugin: Added screenshots
- Field Group: Moved Auto Sync Warnings below Auto Sync instructions
- Field: Added filters variation to
acfe/validate
&acfe/update
Download this release
Release Info
Developer | hwk-fr |
Plugin | Advanced Custom Fields: Extended |
Version | 0.5.1 |
Comparing to | |
See all releases |
Code changes from version 0.5 to 0.5.1
- acf-extended.php +1 -1
- includes/field-groups/field-group.php +4 -1
- includes/fields/settings-update.php +5 -11
- includes/fields/settings-validation.php +8 -14
- readme.txt +14 -2
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
|
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.1
|
6 |
* Author: hwk-fr
|
7 |
* Author URI: https://hwk.fr
|
8 |
* Text Domain: acfe
|
includes/field-groups/field-group.php
CHANGED
@@ -245,8 +245,11 @@ function acfe_render_field_sync_available($field){
|
|
245 |
/**
|
246 |
* Render: Sync Warnings
|
247 |
*/
|
248 |
-
add_action('acf/render_field
|
249 |
function acfe_render_field_acfe_sync_warnings($field){
|
|
|
|
|
|
|
250 |
global $field_group;
|
251 |
|
252 |
// PHP
|
245 |
/**
|
246 |
* Render: Sync Warnings
|
247 |
*/
|
248 |
+
add_action('acf/render_field', 'acfe_render_field_acfe_sync_warnings', 5);
|
249 |
function acfe_render_field_acfe_sync_warnings($field){
|
250 |
+
if($field['_name'] != 'acfe_autosync')
|
251 |
+
return;
|
252 |
+
|
253 |
global $field_group;
|
254 |
|
255 |
// PHP
|
includes/fields/settings-update.php
CHANGED
@@ -24,11 +24,7 @@ function acfe_update_functions($choices){
|
|
24 |
add_action('acf/render_field_settings', 'acfe_update_settings', 991);
|
25 |
function acfe_update_settings($field){
|
26 |
|
27 |
-
$exclude = false;
|
28 |
-
$exclude = apply_filters('acfe/update/exclude/key=' . $field['key'], $exclude, $field);
|
29 |
-
$exclude = apply_filters('acfe/update/exclude/name=' . $field['name'], $exclude, $field);
|
30 |
-
$exclude = apply_filters('acfe/update/exclude/type=' . $field['type'], $exclude, $field);
|
31 |
-
|
32 |
if($exclude)
|
33 |
return;
|
34 |
|
@@ -74,11 +70,7 @@ function acfe_update_value($value, $post_id, $field){
|
|
74 |
if(!isset($field['acfe_update']) || empty($field['acfe_update']))
|
75 |
return $value;
|
76 |
|
77 |
-
$exclude = false;
|
78 |
-
$exclude = apply_filters('acfe/update/exclude/key=' . $field['key'], $exclude, $field);
|
79 |
-
$exclude = apply_filters('acfe/update/exclude/name=' . $field['name'], $exclude, $field);
|
80 |
-
$exclude = apply_filters('acfe/update/exclude/type=' . $field['type'], $exclude, $field);
|
81 |
-
|
82 |
if($exclude)
|
83 |
return $value;
|
84 |
|
@@ -112,4 +104,6 @@ function acfe_update_value($value, $post_id, $field){
|
|
112 |
}
|
113 |
|
114 |
return $value;
|
115 |
-
}
|
|
|
|
24 |
add_action('acf/render_field_settings', 'acfe_update_settings', 991);
|
25 |
function acfe_update_settings($field){
|
26 |
|
27 |
+
$exclude = apply_filters('acfe/update/exclude/', false, $field);
|
|
|
|
|
|
|
|
|
28 |
if($exclude)
|
29 |
return;
|
30 |
|
70 |
if(!isset($field['acfe_update']) || empty($field['acfe_update']))
|
71 |
return $value;
|
72 |
|
73 |
+
$exclude = apply_filters('acfe/update/exclude/', false, $field);
|
|
|
|
|
|
|
|
|
74 |
if($exclude)
|
75 |
return $value;
|
76 |
|
104 |
}
|
105 |
|
106 |
return $value;
|
107 |
+
}
|
108 |
+
|
109 |
+
acf_add_filter_variations('acfe/update/exclude', array('type', 'name', 'key'), 1);
|
includes/fields/settings-validation.php
CHANGED
@@ -73,11 +73,7 @@ function acfe_validate_functions($choices){
|
|
73 |
add_action('acf/render_field_settings', 'acfe_validation_settings', 990);
|
74 |
function acfe_validation_settings($field){
|
75 |
|
76 |
-
$exclude = false;
|
77 |
-
$exclude = apply_filters('acfe/validate/exclude/key=' . $field['key'], $exclude, $field);
|
78 |
-
$exclude = apply_filters('acfe/validate/exclude/name=' . $field['name'], $exclude, $field);
|
79 |
-
$exclude = apply_filters('acfe/validate/exclude/type=' . $field['type'], $exclude, $field);
|
80 |
-
|
81 |
if($exclude)
|
82 |
return;
|
83 |
|
@@ -195,11 +191,7 @@ function acfe_validate_value($valid, $value, $field, $input){
|
|
195 |
if(!isset($field['acfe_validate']) || empty($field['acfe_validate']))
|
196 |
return $valid;
|
197 |
|
198 |
-
$exclude = false;
|
199 |
-
$exclude = apply_filters('acfe/validate/exclude/key=' . $field['key'], $exclude, $field);
|
200 |
-
$exclude = apply_filters('acfe/validate/exclude/name=' . $field['name'], $exclude, $field);
|
201 |
-
$exclude = apply_filters('acfe/validate/exclude/type=' . $field['type'], $exclude, $field);
|
202 |
-
|
203 |
if($exclude)
|
204 |
return $valid;
|
205 |
|
@@ -220,10 +212,10 @@ function acfe_validate_value($valid, $value, $field, $input){
|
|
220 |
|
221 |
// Check filters
|
222 |
$filters = array(
|
223 |
-
'acfe/validate/function/' . $rule['acfe_validate_function'] . '/key=' . $field['key'],
|
224 |
-
'acfe/validate/function/' . $rule['acfe_validate_function'] . '/name=' . $field['name'],
|
225 |
-
'acfe/validate/function/' . $rule['acfe_validate_function'] . '/type=' . $field['type'],
|
226 |
'acfe/validate/function/' . $rule['acfe_validate_function'],
|
|
|
|
|
|
|
227 |
);
|
228 |
|
229 |
$filter_call = false;
|
@@ -271,4 +263,6 @@ function acfe_validate_value($valid, $value, $field, $input){
|
|
271 |
}
|
272 |
|
273 |
return $valid;
|
274 |
-
}
|
|
|
|
73 |
add_action('acf/render_field_settings', 'acfe_validation_settings', 990);
|
74 |
function acfe_validation_settings($field){
|
75 |
|
76 |
+
$exclude = apply_filters('acfe/validate/exclude', false, $field);
|
|
|
|
|
|
|
|
|
77 |
if($exclude)
|
78 |
return;
|
79 |
|
191 |
if(!isset($field['acfe_validate']) || empty($field['acfe_validate']))
|
192 |
return $valid;
|
193 |
|
194 |
+
$exclude = apply_filters('acfe/validate/exclude', false, $field);
|
|
|
|
|
|
|
|
|
195 |
if($exclude)
|
196 |
return $valid;
|
197 |
|
212 |
|
213 |
// Check filters
|
214 |
$filters = array(
|
|
|
|
|
|
|
215 |
'acfe/validate/function/' . $rule['acfe_validate_function'],
|
216 |
+
'acfe/validate/function/' . $rule['acfe_validate_function'] . '/type=' . $field['type'],
|
217 |
+
'acfe/validate/function/' . $rule['acfe_validate_function'] . '/name=' . $field['name'],
|
218 |
+
'acfe/validate/function/' . $rule['acfe_validate_function'] . '/key=' . $field['key'],
|
219 |
);
|
220 |
|
221 |
$filter_call = false;
|
263 |
}
|
264 |
|
265 |
return $valid;
|
266 |
+
}
|
267 |
+
|
268 |
+
acf_add_filter_variations('acfe/validate/exclude', array('type', 'name', 'key'), 1);
|
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
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -102,10 +102,22 @@ Create a folder `/acfe-php/` in your theme. Go to your field group administratio
|
|
102 |
|
103 |
== Screenshots ==
|
104 |
|
105 |
-
1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
== Changelog ==
|
108 |
|
|
|
|
|
|
|
|
|
|
|
109 |
= 0.5 =
|
110 |
* Initial release
|
111 |
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.1.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 0.5.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
102 |
|
103 |
== Screenshots ==
|
104 |
|
105 |
+
1. Field Groups List
|
106 |
+
2. Field Groups List (Labeled)
|
107 |
+
3. Field Group
|
108 |
+
4. Field Group (Labeled)
|
109 |
+
5. Field Group: Raw Data (Modal)
|
110 |
+
6. Field
|
111 |
+
7. Field: Raw Data (Modal)
|
112 |
+
8. ACF Settings
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 0.5.1 =
|
117 |
+
* Plugin: Added screenshots
|
118 |
+
* Field Group: Moved Auto Sync Warnings below Auto Sync instructions
|
119 |
+
* Field: Added filters variation to `acfe/validate` & `acfe/update`
|
120 |
+
|
121 |
= 0.5 =
|
122 |
* Initial release
|
123 |
|