acf/update_field
The Advanced Custom Fields acf update field hook.
Description
Parameters (2)
- 0. $field (unknown)
- The field.
- 1. $field_field_group (unknown)
- The field field group.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'acf/update_field', $field, $field_field_group );
- The following example is for adding a hook callback.
- // define the acf/update_field callback
- function action_acf_update_field( $field, $field_field_group ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'acf/update_field', 'action_acf_update_field', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'acf/update_field', 'action_acf_update_field', 10, 2 );
Defined (2)
The action is defined in the following location(s).
- /core/fields/radio.php
- do_action('acf/update_field', $field, $field['field_group']);
- /core/controllers/field_group.php
- do_action('acf/update_field', $field, $post_id );