acf/delete_(hook_name) action-hookACF 5.0.0

Fires immediately after an ACF post has been deleted.

Usage

add_action( 'acf/delete_(hook_name)', 'wp_kama_acf_delete_hook_name_action' );

/**
 * Function for `acf/delete_(hook_name)` action-hook.
 * 
 * @param array $post The ACF post array.
 *
 * @return void
 */
function wp_kama_acf_delete_hook_name_action( $post ){
	// action...
}
$post(array)
The ACF post array.

Changelog

Since 5.0.0 Introduced.

Where the hook is called

ACF_Internal_Post_Type::delete_post()
acf/delete_(hook_name)
ACF_Field_Group::delete_post()
acf/delete_(hook_name)
acf/includes/class-acf-internal-post-type.php 611
do_action( "acf/delete_{$this->hook_name}", $post );
acf/includes/post-types/class-acf-field-group.php 244
do_action( "acf/delete_{$this->hook_name}", $post );

Where the hook is used in Advanced Custom Fields PRO

acf/includes/local-json.php 54
add_action( 'acf/delete_field_group', array( $this, 'delete_field_group' ) );
acf/includes/local-json.php 58
add_action( 'acf/delete_post_type', array( $this, 'delete_internal_post_type' ) );
acf/includes/local-json.php 62
add_action( 'acf/delete_taxonomy', array( $this, 'delete_internal_post_type' ) );
acf/pro/post-types/acf-ui-options-page.php 290
add_action( 'acf/delete_ui_options_page', array( $local_json, 'delete_internal_post_type' ) );