From 910158742472d992df7bbf13ec0792a9fc99efcc Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 7 Dec 2022 12:19:51 -0500 Subject: [PATCH 1/2] Register post type on init --- plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' ] ); From da1a1ea71e9c831309651623ce3e968151e6baa8 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Wed, 7 Dec 2022 12:20:49 -0500 Subject: [PATCH 2/2] CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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.