Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/wp-rocket-helpers.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified cache/wp-rocket-cache-feed/wp-rocket-cache-feed.zip
Binary file not shown.
12 changes: 12 additions & 0 deletions cache/wp-rocket-cache-feed/wp-rocket-cache-feed/inc/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ function wp_rocket_cache_feed_notice() {
unset( $_GET['activate'] );
}
}

/**
* Added feed urls to the preload.
*
* @param string[] $urls urls to add to the preload.
* @return string[]
*/
function wp_rocket_preload_feeds($urls) {
$feed_url = get_feed_link();
$urls []= $feed_url;
return $urls;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function wp_rocket_cache_feed_maybe_deactivate() {
}
add_action( 'admin_init', 'wp_rocket_cache_feed_maybe_deactivate' );



/**
* Run when plugin is activated
*
Expand All @@ -63,6 +65,8 @@ function wp_rocket_cache_feed_activate() {
}
register_activation_hook( __FILE__, 'wp_rocket_cache_feed_activate' );

add_filter( 'rocket_preload_load_custom_urls', 'wp_rocket_preload_feeds' );

/**
* Run when plugin is deactivated
*
Expand Down