diff --git a/CHANGELOG.md b/CHANGELOG.md index 18c4f45..053e5df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to Cache Collector will be documented in this file. +## 0.1.1 - 2022-12-07 + +- Fix bug with post type registration being called before `init`. + ## 0.1.0 - 2022-12-02 - Initial release of the plugin. diff --git a/plugin.php b/plugin.php index f1305b9..31baf4d 100644 --- a/plugin.php +++ b/plugin.php @@ -24,7 +24,7 @@ * Instantiate the plugin. */ function cache_collector_setup() { - Cache_Collector::register_post_type(); + add_action( 'init', [ Cache_Collector::class, 'register_post_type' ] ); // Register the post/term purge actions. add_action( 'clean_post_cache', [ Cache_Collector::class, 'on_post_update' ] );