acf/export/clean_fields

The Advanced Custom Fields acf export clean fields hook.

Description

apply_filters( 'acf/export/clean_fields', (unknown) $var_fields ); 

Parameters (1)

0. $var_fields (unknown)
The var fields.

Usage

To run the hook, copy the example below.
  1. $var_fields = apply_filters( 'acf/export/clean_fields', $var_fields ); 
  2.  
  3. if ( !empty( $var_fields ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the acf/export/clean_fields callback 
  2. function filter_acf_export_clean_fields( $var_fields ) { 
  3. // make filter magic happen here... 
  4. return $var_fields
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'acf/export/clean_fields', 'filter_acf_export_clean_fields', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'acf/export/clean_fields', 'filter_acf_export_clean_fields', 10, 1 ); 

Defined (3)

The filter is defined in the following location(s).

/core/controllers/export.php  
  1. $var['fields'] = apply_filters('acf/export/clean_fields', $var['fields']); 
  1. $field['sub_fields'] = apply_filters('acf/export/clean_fields', $field['sub_fields']); 
  1. $field['layouts'][ $l ]['sub_fields'] = apply_filters('acf/export/clean_fields', $layout['sub_fields']);