cf_edd_pro_autopopulate_options

Set arguments for EDD auto-populate field.

Description

apply_filters( 'cf_edd_pro_autopopulate_options', (array) $post_type_download, (array) $field, (array) $form ); 

Parameters (3)

0. $post_type_download — Optional. (array) => [ 'post_type' => 'download' ]
The post type download.
1. $field (array)
Config for the field.
2. $form (array)
Config for the form.

Usage

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

Defined (1)

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

/vendor/calderawp/cf-edd-fields/src/fields/populate/query.php  
  1. $args = apply_filters( 'cf_edd_pro_autopopulate_options', [