PluginProbe ʕ •ᴥ•ʔ
Advanced Custom Fields: Extended / trunk
Advanced Custom Fields: Extended vtrunk
0.9.2.6 0.9.2.5 0.8.6 0.8.6.1 0.8.6.3 0.8.6.5 0.8.6.6 0.8.6.7 0.8.6.8 0.8.6.9 0.8.7 0.8.7.1 0.8.7.2 0.8.7.3 0.8.7.4 0.8.7.5 0.8.7.6 0.8.8 0.8.8.1 0.8.8.10 0.8.8.11 0.8.8.2 0.8.8.3 0.8.8.4 0.8.8.5 0.8.8.6 0.8.8.7 0.8.8.8 0.8.8.9 0.8.9 0.8.9.1 0.8.9.2 0.8.9.3 0.8.9.4 0.8.9.5 0.9 0.9.0.1 0.9.0.2 0.9.0.3 0.9.0.4 0.9.0.5 0.9.0.6 0.9.0.7 0.9.0.8 0.9.0.9 0.9.1 0.9.1.1 0.9.2 0.9.2.1 0.9.2.2 0.9.2.3 0.9.2.4 trunk 0.5 0.5.1 0.5.2 0.5.2.1 0.5.2.3 0.5.5 0.5.5.1 0.5.8 0.5.8.1 0.6 0.6.0.1 0.6.0.2 0.6.1 0.6.3 0.6.5 0.6.7 0.6.7.2 0.7 0.7.0.3 0.7.5 0.7.5.5 0.7.8 0.7.9 0.7.9.3 0.7.9.4 0.7.9.9.8 0.7.9.9.9 0.8 0.8.1 0.8.2 0.8.3 0.8.3.1 0.8.4 0.8.4.1 0.8.4.5 0.8.4.6 0.8.5 0.8.5.5
acf-extended / includes / field.php
acf-extended / includes Last commit date
admin 1 month ago field-groups 1 month ago fields 1 month ago fields-settings 1 month ago forms 1 month ago locations 1 month ago modules 1 month ago screens 1 month ago acfe-deprecated-functions.php 2 years ago acfe-field-functions.php 1 month ago acfe-field-group-functions.php 1 month ago acfe-file-functions.php 1 year ago acfe-form-functions.php 1 month ago acfe-helper-array-functions.php 1 month ago acfe-helper-functions.php 1 month ago acfe-helper-multi-functions.php 1 month ago acfe-helper-string-functions.php 1 month ago acfe-meta-functions.php 1 month ago acfe-post-functions.php 1 month ago acfe-screen-functions.php 1 month ago acfe-template-functions.php 1 month ago acfe-term-functions.php 1 month ago acfe-user-functions.php 1 month ago acfe-wp-functions.php 3 years ago assets.php 1 month ago compatibility-acf-5.8.php 2 months ago compatibility-acf-5.9.php 1 month ago compatibility-acf-6.5.php 1 month ago compatibility.php 1 month ago field-extend.php 2 months ago field.php 2 months ago hooks.php 1 month ago init.php 1 month ago local-meta.php 3 years ago media.php 1 month ago module-acf.php 1 month ago module-db.php 1 month ago module-l10n.php 1 month ago module-legacy.php 3 years ago module-manager.php 2 months ago module-post.php 1 month ago module-posts.php 2 months ago module-upgrades.php 3 years ago module.php 1 month ago multilang.php 1 month ago revisions.php 2 months ago screen.php 1 month ago settings.php 1 month ago template-tags.php 1 month ago third-party.php 3 years ago upgrades.php 1 month ago
field.php
66 lines
1 <?php
2
3 if(!defined('ABSPATH')){
4 exit;
5 }
6
7 if(!class_exists('acfe_field')):
8
9 class acfe_field extends acf_field{
10
11 /**
12 * construct
13 */
14 function __construct(){
15
16 // parent construct
17 parent::__construct();
18
19 // custom filters
20 $this->add_field_filter('acfe/form/format_value', array($this, 'format_front_value'), 10, 5);
21 $this->add_field_filter('acfe/form/validate_value', array($this, 'validate_front_value'), 10, 5);
22 $this->add_field_filter('acfe/field_wrapper_attributes', array($this, 'field_wrapper_attributes'), 10, 2);
23 $this->add_field_filter('acfe/load_fields', array($this, 'load_fields'), 10, 2);
24
25 }
26
27
28 /**
29 * pre_validate_front_value
30 *
31 * @param $valid
32 * @param $value
33 * @param $field
34 * @param $form
35 *
36 * @return mixed|null
37 */
38 function pre_validate_front_value($valid, $value, $field, $form){
39
40 // already invalid
41 if(!$valid || (is_string($valid) && !empty($valid))){
42 return false;
43 }
44
45 // empty value
46 if(empty($value)){
47 return false;
48 }
49
50 // default validation
51 $validate = true;
52
53 // variations
54 $validate = apply_filters("acfe/form/pre_validate_value/form={$form['name']}", $validate, $field, $form);
55 $validate = apply_filters("acfe/form/pre_validate_value/type={$field['type']}", $validate, $field, $form);
56 $validate = apply_filters("acfe/form/pre_validate_value/name={$field['_name']}", $validate, $field, $form);
57 $validate = apply_filters("acfe/form/pre_validate_value/key={$field['key']}", $validate, $field, $form);
58
59 // return
60 return $validate;
61
62 }
63
64 }
65
66 endif;