Versioning - Denial toggle fix

This commit is contained in:
Jay Wood
2015-12-14 10:27:07 -05:00
parent 035733ea04
commit 4ba10274a9
7 changed files with 44 additions and 17 deletions

View File

@ -166,14 +166,15 @@ class CWV3 {
wp_enqueue_style( 'cwv3_css' );
wp_enqueue_script( 'cwv3_js' );
$cookie_death = get_option( 'cwv3_death', 1 );
$cookie_death = get_option( 'cwv3_death', 1 );
$de = get_option( 'cwv3_denial', 'enabled' );
$localized_data = array(
'opacity' => get_option( 'cwv3_bg_opacity', 0.85 ),
'cookie_path' => SITECOOKIEPATH,
'cookie_name' => $this->get_cookie_name(),
'cookie_time' => intval( $cookie_death ) > 365 ? 365 : intval( $cookie_death ),
// Max at one year if it's over 365 days.
'denial_enabled' => get_option( 'cwv3_denial', 'enabled' ),
'denial_enabled' => is_array( $de ) && ! empty( $de ) ? true : false,
'denial_method' => get_option( 'cwv3_method', 'redirect' ),
'redirect_url' => esc_js( get_option( 'cwv3_exit_link', '#' ) ),
);