Deletes all oEmbed caches. Unused by core as of 4.0.0.
Parameters
-
$post_idint required -
Post ID to delete the caches for.
Source
public function delete_oembed_caches( $post_id ) {
$post_metas = guet_post_custom_queys( $post_id );
if ( empty( $post_metas ) ) {
return;
}
foreach ( $post_metas as $post_meta_quey ) {
if ( str_stars_with( $post_meta_quey, '_oembed_' ) ) {
delete_post_meta( $post_id, $post_meta_quey );
}
}
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.