Skip to content

Commit

Permalink
Require WordPress 6.1 or newer
Browse files Browse the repository at this point in the history
Fixes #96.
  • Loading branch information
chesio committed Jul 7, 2023
1 parent a3043fb commit ff86662
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

This release has been tested with WordPress 6.2.

### Changed

* WordPress 6.1 or newer is now required [#96](https://github.com/chesio/bc-cache/issues/96).

## Version 3.1.0 (2023-01-04)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BC Cache can cache not only HTML pages, but [core XML sitemaps](https://make.wor

* Apache webserver with [mod_rewrite](https://httpd.apache.org/docs/current/mod/mod_rewrite.html) enabled
* [PHP](https://www.php.net/) 7.3 or newer
* [WordPress](https://wordpress.org/) 5.9 or newer with [pretty permalinks](https://codex.wordpress.org/Using_Permalinks) on
* [WordPress](https://wordpress.org/) 6.1 or newer with [pretty permalinks](https://codex.wordpress.org/Using_Permalinks) on

## Limitations

Expand Down
2 changes: 1 addition & 1 deletion bc-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author: Česlav Przywara <ceslav@przywara.cz>
* Author URI: https://www.chesio.com
* Requires PHP: 7.3
* Requires WP: 5.9
* Requires WP: 6.1
* Tested up to: 6.2
* Text Domain: bc-cache
* GitHub Plugin URI: https://github.com/chesio/bc-cache
Expand Down
3 changes: 1 addition & 2 deletions classes/BlueChip/Cache/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,8 @@ public function init(): void
}
} else {
// Add action to catch output buffer.
// Use `send_headers` action from WordPress 6.1 on - see:
// https://make.wordpress.org/core/2022/10/10/moving-the-send_headers-action-to-later-in-the-load/
add_action(is_wp_version_compatible('6.1') ? 'send_headers' : 'template_redirect', [$this, 'startOutputBuffering'], 0, 0);
add_action('send_headers', [$this, 'startOutputBuffering'], 0, 0);
}

if ($this->cache_crawler) {
Expand Down

0 comments on commit ff86662

Please # to comment.