diff --git a/class/main.class.php b/class/main.class.php index 27d2750..3e982c5 100644 --- a/class/main.class.php +++ b/class/main.class.php @@ -22,11 +22,13 @@ class CWV3 { wp_enqueue_style( 'cwv3_css' ); wp_enqueue_script( 'cwv3_js' ); + $cookie_death = get_option( 'cwv3_death', 1 ); + wp_localize_script( 'cwv3_js', 'cwv3_params', array( 'opacity' => get_option( 'cwv3_bg_opacity', 0.85 ), 'cookie_path' => SITECOOKIEPATH, 'cookie_name' => $this->get_cookie_name(), - 'cookie_time' => $cookie_death, + 'cookie_time' => intval( $cookie_death ) > 365 ? 365 : intval( $cookie_death ), 'denial_enabled' => get_option( 'cwv3_denial', 'enabled' ), 'denial_method' => get_option( 'cwv3_method_show', 'redirect' ), 'redirect_url' => esc_js( get_option( 'cwv3_exit_link', '#' ) ), diff --git a/inc/api.php b/inc/api.php index 2a2c636..80c2791 100644 --- a/inc/api.php +++ b/inc/api.php @@ -63,8 +63,8 @@ function cwv3_get_js_dialog(){ ob_start(); ?> -
 
-
+ +