Skip to content

Commit

Permalink
Add a filter to disable Homepage cache clearing in function rocket_cl…
Browse files Browse the repository at this point in the history
…ean_post
  • Loading branch information
emiel9d committed Feb 5, 2025
1 parent ae926b0 commit a84a0fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/common/purge.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ function rocket_clean_post( $post_id, $post = null ) {
rocket_clean_files( $purge_urls );

// Never forget to purge homepage and their pagination.
rocket_clean_home( $lang );
if(apply_filters( 'rocket_clean_home_after_clean_post', true, $post_id ) === true ) {

Check notice on line 252 in inc/common/purge.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

inc/common/purge.php#L252

Expected 1 space after IF keyword; 0 found

Check notice on line 252 in inc/common/purge.php

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

inc/common/purge.php#L252

Space after opening control structure is required
rocket_clean_home( $lang );
}

// Purge home feeds (blog & comments).
if ( has_filter( 'rocket_cache_reject_uri', 'wp_rocket_cache_feed' ) !== false ) {
Expand Down

0 comments on commit a84a0fd

Please sign in to comment.