ACF_Admin_Field_Groups::deleted_postpublicACF 5.0.0

Fires when deleting a field group.

Method of the class: ACF_Admin_Field_Groups{}

No Hooks.

Returns

void. 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.8.8

public function deleted_post( $post_id ) {
	if ( get_post_type( $post_id ) === $this->post_type ) {
		acf_delete_field_group( $post_id );
	}
}