From 229e42002cec9568f64332e8f9e58051e34a8d3e Mon Sep 17 00:00:00 2001 From: Jay Wood Date: Sat, 5 Sep 2015 21:13:51 -0400 Subject: [PATCH] Add filter for display conditions - Fixes #26 --- class/main.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/class/main.class.php b/class/main.class.php index 190ea19..3c2dc10 100644 --- a/class/main.class.php +++ b/class/main.class.php @@ -18,6 +18,11 @@ class CWV3 { $homepage = get_option( 'cwv3_homepage' ); $misc = get_option( 'cwv3_misc' ); + $should_gate = apply_filters( 'cwv3_should_gate', true, $post ); + if ( false === $should_gate ) { + return false; + } + if ( 'enabled' == ! empty( $site_wide ) ) { return 'sitewide'; }