acf/create_fields

The Advanced Custom Fields acf create fields hook.

Description

do_action( 'acf/create_fields', (unknown) $fields, (unknown) $args_post_id ); 

Parameters (2)

0. $fields (unknown)
The fields.
1. $args_post_id (unknown)
The args post id.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'acf/create_fields', $fields, $args_post_id ); 
The following example is for adding a hook callback.
  1. // define the acf/create_fields callback 
  2. function action_acf_create_fields( $fields, $args_post_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'acf/create_fields', 'action_acf_create_fields', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'acf/create_fields', 'action_acf_create_fields', 10, 2 ); 

Defined (3)

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

/core/controllers/post.php  
  1. do_action('acf/create_fields', $fields, $args['post_id']); 
  1. do_action('acf/create_fields', $fields, $options['post_id']); 
/core/api.php  
  1. do_action('acf/create_fields', $fields, $options['post_id']);