From dcac6b7babdef4454782faf6f9c076699cb11944 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Fri, 17 Apr 2020 18:43:56 +0200 Subject: [PATCH] remove evaluation of POST value on how to flush the cache after publish --- CHANGELOG.md | 3 +++ inc/cachify.class.php | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15cf712a..06cce4e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.3.1] +* Fix: clean up unused parameter evaluation after publishing a post to prevent PHP notice + ## [2.3.0] * New: WP-CLI integration, see #165, props derweili * New: `cachify_flush_cache_hooks` filter added to modify all hooks that flush the cache diff --git a/inc/cachify.class.php b/inc/cachify.class.php index 290a7eb8..a8a2d41f 100644 --- a/inc/cachify.class.php +++ b/inc/cachify.class.php @@ -912,16 +912,6 @@ public static function publish_post_types( $post_id, $post ) { return; } - /* Save as var */ - $remove_post_type_cache = (int) $_POST['_cachify_remove_post_type_cache_on_update']; - - /* Save as user meta */ - update_user_meta( - get_current_user_id(), - '_cachify_remove_post_type_cache_on_update', - $remove_post_type_cache - ); - /* Remove cache OR flush */ if ( 1 !== self::$options['reset_on_post'] ) { self::remove_page_cache_by_post_id( $post_id );