do_all_enclosures() WordPress Function
The do_all_enclosures() function is used to process all enclosures for a post. This function can be used to add custom fields to attachment posts, add new enclosures, or update existing enclosures.
do_all_enclosures() #
Performs all enclosures.
Source
File: wp-includes/comment.php
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 ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.6.0 | Introduced. |