diff --git a/includes/helpers.php b/includes/helpers.php index 41148bb..f1b2467 100644 --- a/includes/helpers.php +++ b/includes/helpers.php @@ -141,7 +141,7 @@ function tni_core_get_unauthorized_posts() { $posts = array_values( array_filter( $post_query, 'tni_is_subscription_only' ) ); } - set_transient( 'tni_unauthorized_posts', $posts, HOURS_IN_SECONDS * 12 ); + set_transient( 'tni_unauthorized_posts', $posts, MINUTE_IN_SECONDS * 5); } @@ -166,4 +166,4 @@ function tni_core_purge_transients( $ID, $post ) { delete_transient( 'tni_unauthorized_posts' ); } } -//add_action( 'publish_post', 'tni_core_purge_transients' ); +add_action( 'publish_post', 'tni_core_purge_transients' ); diff --git a/readme.txt b/readme.txt index fa4d936..86f8c7c 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: misfist Tags: custom Requires at least: 4.7 Tested up to: 4.8 -Version: 1.2.9 +Version: 1.2.10 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -22,6 +22,10 @@ This section describes how to install the plugin and get it working. == Changelog == += 1.2.10 Sept 15, 2017 = +* Reduced unauthorized post transient cache time +* Enabled unauthorized post transient clearing on post publish + = 1.2.9 Aug 18, 2017 = * Added function return array of unauthorized post IDs diff --git a/tni-core-functionality.php b/tni-core-functionality.php index f96a6f5..d1e9687 100644 --- a/tni-core-functionality.php +++ b/tni-core-functionality.php @@ -10,7 +10,7 @@ * Text Domain: tni-core * Domain Path: /languages * - * Version: 1.2.9 + * Version: 1.2.10 * * @package Tni_Core_Functionality */