Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Media RSS / MailChimp #62

Open
sun opened this issue Apr 23, 2020 · 0 comments
Open

Add support for Media RSS / MailChimp #62

sun opened this issue Apr 23, 2020 · 0 comments

Comments

@sun
Copy link
Member

sun commented Apr 23, 2020

core-standards currently uses the <enclosure> element, which is part of the RSS2 standard protocol:
https://validator.w3.org/feed/docs/rss2.html#ltenclosuregtSubelementOfLtitemgt

The <enclosure> tag is generated here:

?>
<enclosure url="<?= esc_url($url) ?>" length="<?= esc_attr($filesize) ?>" type="<?= esc_attr($mime_type) ?>" />
<?php

Example:

<enclosure url="https://example.com/wp-content/uploads/2020/03/KSC-860x573.jpg" length="54309" type="image/jpeg" />

As the RSS feed is often used in MailChimp for automated newsletters, we should output the information a second time and directly include the Media RSS tag as well:

Quick summary for using <media:content>: https://stackoverflow.com/a/48549541/811306
Spec: http://www.rssboard.org/media-rss#media-content
Long explanation: https://www.wired.com/2010/02/use_media_rss/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant