do_all_enclosures()WP 5.6.0

Performs all enclosures.

No Hooks.

Return

null. Nothing.

Usage

do_all_enclosures();

Changelog

Since 5.6.0 Introduced.

do_all_enclosures() code WP 6.1.1

function do_all_enclosures() {
	$enclosures = get_posts(
		array(
			'post_type'        => get_post_types(),
			'suppress_filters' => false,
			'nopaging'         => true,
			'meta_key'         => '_encloseme',
			'fields'           => 'ids',
		)
	);

	foreach ( $enclosures as $enclosure ) {
		delete_post_meta( $enclosure, '_encloseme' );
		do_enclose( null, $enclosure );
	}
}