Created
April 24, 2015 02:58
-
-
Save tychay/fa3490ba5eae5ec8df68 to your computer and use it in GitHub Desktop.
Attempted patch to https://github.com/kylereicks/picturefill.js.wp/issues/47 so that picturefill doesn't mess with rss feeds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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