Make WordPress Core

Opened 21 months ago

#57733 new enhancement

wp-includes/functions.php::do_enclose() should handle post content differently

Reported by: avibrazil's profile avibrazil Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.1.1
Component: Media Keywords:
Focuses: Cc:

Description

This method removes enclosures if get_post()->post_content doesn't contain the enclosure URL.

What if the post will contain the URL after it is being rendered with, say, a shortcodes? For example, I may use shortcodes to form the media URL in the post content as <a href="[base_site_url]/media/podcast001.m4a">media file</a> as the string that will be rendered (and then match) the URL found in enclosure. And by the way, on the enclosure I would also like to use shortcodes, but this is yet to be tested and not relevant to this bug report.

URL comparisons should happen with both post content and enclosure content transformed to their final forms, not its raw version.

Thank you in advance.

Change History (0)

Note: See TracTickets for help on using tickets.