Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Attempted patch to https://github.com/kylereicks/picturefill.js.wp/issues/47 so that picturefill doesn't mess with rss feeds.
<?php
function apply_picturefill_to_content_not_feed($html, $cache = null) {
if ( is_feed() ) { return $html; }
return Picturefill_WP::get_instance()->picturefill_wp_apply_to_html($html, $cache);
}
remove_filter( 'the_content', array( Picturefill_WP::get_instance(), 'picturefill_wp_apply_to_html' ), apply_filters('picturefill_wp_the_content_filter_priority', 11) );
add_filter ( 'the_content, 'apply_picturefill_to_content_not_feed', apply_filters('picturefill_wp_the_content_filter_priority', 11) );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.