acf/export/clean_fields
The Advanced Custom Fields acf export clean fields hook.
Description
Parameters (1)
- 0. $var_fields (unknown)
- The var fields.
Usage
- To run the hook, copy the example below.
- $var_fields = apply_filters( 'acf/export/clean_fields', $var_fields );
- if ( !empty( $var_fields ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the acf/export/clean_fields callback
- function filter_acf_export_clean_fields( $var_fields ) {
- // make filter magic happen here...
- return $var_fields;
- };
- // add the filter
- add_filter( 'acf/export/clean_fields', 'filter_acf_export_clean_fields', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- 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
- $var['fields'] = apply_filters('acf/export/clean_fields', $var['fields']);
- $field['sub_fields'] = apply_filters('acf/export/clean_fields', $field['sub_fields']);
- $field['layouts'][ $l ]['sub_fields'] = apply_filters('acf/export/clean_fields', $layout['sub_fields']);