Skip to content

Oembed cache is broken if content is empty #210

@rasmusbe

Description

@rasmusbe

What I expected

Youtube-embed

What happened instead

Youtube link

Steps to reproduce

  1. Create a post with empty post content and a papi-field containing a Youtube link
  2. 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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions