[wp-trac] [WordPress Trac] #19890: Filter auto enclosure links before processing
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 24 21:37:48 UTC 2012
#19890: Filter auto enclosure links before processing
--------------------------+-----------------------------
Reporter: niallkennedy | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Feeds | Version:
Severity: minor | Keywords: has-patch
--------------------------+-----------------------------
[http://core.trac.wordpress.org/browser/tags/3.3.1/wp-
includes/functions.php#L1182 The do_enclose() function] looks through post
content for enclosure-worthy URLs, requests the URLs it finds, and stores
in post meta.
I use sample code and dummy URLs in my posts: e.g.
!http://example.com/song.mp3. Right now `do_enclose()` finds the mention
of the MP3, adds it to post meta, which later outputs in `rss_enclosure()`
or `atom_enclosure()`. If I want to remove the enclosure from final markup
I can attach to the `added_postmeta` action to remove a value after it was
requested and inserted or act on the markup generated by `rss_enclosure()`
or `atom_enclosure()` by emptying the string.
I would like to filter out the auto-discovered enclosure link before it is
processed by !WordPress, looked up in the database, and HEAD requested. If
a filter existed on the parsed enclosure links I could remove links from
dummy domains such as "example.com."
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19890>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list