acf/delete_value

Delete_field().

Description

do_action( 'acf/delete_value', (unknown) $post_id, (string) $field_name ); 

This function will remove a value from the database

Parameters (2)

0. $post_id (unknown)
The post id.
1. $field_name (string)
The field name.

Usage

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

Defined (1)

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

/core/api.php  
  1. do_action('acf/delete_value', $post_id, $field_name );