Skip to content

Commit 16e79fa

Browse files
committed
Add filter for W3C to cache this feed type
1 parent c4cd6a5 commit 16e79fa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

jsonfeed-wp.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ function json_feed_content_type( $content_type, $type ) {
4343
return $content_type;
4444
}
4545

46+
47+
function json_feed_w3tc_is_cacheable_content_type( $types ) {
48+
$types[] = 'application/feed+json';
49+
return array_unique( $types );
50+
}
51+
52+
add_filter( 'w3tc_is_cacheable_content_type', 'json_feed_w3tc_is_cacheable_content_type' );
53+
4654
add_action( 'wp_head', 'json_feed_link' );
4755
function json_feed_link() {
4856
printf(

0 commit comments

Comments
 (0)