Add filter for display conditions - Fixes #26

This commit is contained in:
Jay Wood
2015-09-05 21:13:51 -04:00
parent 668687c33a
commit 229e42002c

View File

@ -18,6 +18,11 @@ class CWV3 {
$homepage = get_option( 'cwv3_homepage' ); $homepage = get_option( 'cwv3_homepage' );
$misc = get_option( 'cwv3_misc' ); $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 ) ) { if ( 'enabled' == ! empty( $site_wide ) ) {
return 'sitewide'; return 'sitewide';
} }