Oembed cache is broken if content is empty
rasmusbe opened this issue · 0 comments
rasmusbe commented
What I expected
Youtube-embed
What happened instead
Youtube link
Steps to reproduce
- Create a post with empty post content and a papi-field containing a Youtube link
- Run apply_filters('the_content', $meta_field_content);
How to fix
Flush oembed cache when updating the post meta (WP only does this when post content is updated)
See https://developer.wordpress.org/reference/classes/wp_embed/delete_oembed_caches/