Field Wrapper Attributes

This filter is an enchanced version of the native acf/field_wrapper_attributes hook allowing to target specific field type, name or key.

/*
 * ACFE Field Wrapper Attributes
 * 
 * @array  $wrapper  Wrapper Attributes
 * @array  $field    Field Array
 */
 
filter('acfe/field_wrapper_attributes',                         $wrapper, $field);
filter('acfe/field_wrapper_attributes/type=select',             $wrapper, $field);
filter('acfe/field_wrapper_attributes/name=my_field',           $wrapper, $field);
filter('acfe/field_wrapper_attributes/key=field_5f39c8c5f3718', $wrapper, $field);

Load Field

This filter is an enchanced version of the native acf/load_field hook. Unlike the original version, this hook is not executed in the ACF Field Groups UI and ACF Tools pages.

/*
 * ACFE Load Field
 * 
 * @array  $field    Field Array
 */
 
filter('acfe/load_field',                         $field);
filter('acfe/load_field/type=select',             $field);
filter('acfe/load_field/name=my_field',           $field);
filter('acfe/load_field/key=field_5f39c8c5f3718', $field);

Upload Directory

Change the upload directory of any ACF field which upload a file (Image, File, Gallery…). The $uploads array is based on the argument from the upload_dir WP filter. See documentation.

/*
 * Upload Directory
 * 
 * @array  $uploads  Uploads Directory Array
 * @array  $field    Field Array
 */
 
filter('acfe/upload_dir',                         $uploads, $field);
filter('acfe/upload_dir/type=image',              $uploads, $field);
filter('acfe/upload_dir/name=my_image',           $uploads, $field);
filter('acfe/upload_dir/key=field_5f39c8c5f3718', $uploads, $field);

Upload Filename

Change the filename of any ACF Field which upload a file (Image, File, Gallery…). The $file array is based on the argument from the wp_handle_upload_prefilter WP filter. See documentation.

/*
 * Upload Filename
 * 
 * @array  $file   File Data Array
 * @array  $field  Field Array
 */
 
filter('acfe/upload_file',                         $file, $field);
filter('acfe/upload_file/type=image',              $file, $field);
filter('acfe/upload_file/name=my_image',           $file, $field);
filter('acfe/upload_file/key=field_5f39c8c5f3718', $file, $field);