ACF_Admin_Field_Groups::deleted_postpublicACF 5.0.0

Fires when deleting a field group post.

Method of the class: ACF_Admin_Field_Groups{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ACF_Admin_Field_Groups = new ACF_Admin_Field_Groups();
$ACF_Admin_Field_Groups->deleted_post( $post_id );
$post_id(int) (required)
The post ID.

Changelog

Since 5.0.0 Introduced.

ACF_Admin_Field_Groups::deleted_post() code ACF 6.0.4

public function deleted_post( $post_id ) {
	if ( get_post_type( $post_id ) === 'acf-field-group' ) {
		acf_delete_field_group( $post_id );
	}
}