acf_untrash_internal_post_type()ACF 6.1

Restores an ACF post from the trash.

No Hooks.

Returns

true|false. True if post was untrashed.

Usage

acf_untrash_internal_post_type( $id, $post_type_name );
$id(int|string)
The internal post type ID, key, or name.
$post_type_name(string)
The post type being untrashed.
Default: ''

Changelog

Since 6.1 Introduced.

acf_untrash_internal_post_type() code ACF 6.8.8

function acf_untrash_internal_post_type( $id = 0, $post_type_name = '' ) {
	$instance = acf_get_internal_post_type_instance( $post_type_name );

	if ( $instance ) {
		return $instance->untrash_post( $id );
	}

	return false;
}