Skip to content

Commit

Permalink
supercache: update homepage etc on post un-publish (#40879)
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Lade <[email protected]>
Co-authored-by: Jeremy Herve <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12658635745

Upstream-Ref: Automattic/jetpack@0b67cfe
  • Loading branch information
kraftbj authored and matticbot committed Jan 7, 2025
1 parent 4fa6a9d commit 0e83a64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ This is an alpha version! The changes listed here are not final.

### Fixed
- Caching: make sure there is cache content to serve, even if the cache file was found
- Ensure homepage cache gets flushed when a post is unpublished.
- Lossless image optimization for images (should improve performance with no visible changes).
- Move trailing space out of i18n message.
- Revert recent SVG image optimizations.
Expand Down
1 change: 1 addition & 0 deletions wp-cache-phase2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3192,6 +3192,7 @@ function wpsc_post_transition( $new_status, $old_status, $post ) {
}
list( $permalink, $post_name ) = get_sample_permalink( $post );
$post_url = str_replace( array( '%postname%', '%pagename%' ), $post->post_name, $permalink );
wp_cache_post_edit( $post->ID );
} elseif ( $old_status !== 'publish' && $new_status === 'publish' ) { // post published
wp_cache_post_edit( $post->ID );
return;
Expand Down

0 comments on commit 0e83a64

Please sign in to comment.