acf/create_field
The Advanced Custom Fields: Font Awesome acf create field hook.
Description
Parameters (1)
- 0. $array — Optional. (callback) =>
array( 'type' => 'select', 'name' => 'fields[' . $key . '][default_value]', 'value' => $field['default_value'], 'class' => 'fontawesome', 'choices' => array_merge( array( 'null' => __("Select", 'acf') ), $field['choices'] ) )
- The array.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'acf/create_field', $array );
- The following example is for adding a hook callback.
- // define the acf/create_field callback
- function action_acf_create_field( $array ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'acf/create_field', 'action_acf_create_field', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'acf/create_field', 'action_acf_create_field', 10, 1 );
Defined (4)
The action is defined in the following location(s).
- /acf-font-awesome-v4.php
- do_action('acf/create_field', array(
- do_action('acf/create_field', array(
- do_action('acf/create_field', array(
- do_action('acf/create_field', array(