Almost finished with js cookie logic

This commit is contained in:
Jay Wood
2014-11-24 10:44:34 -05:00
parent 6b1c8264a3
commit 48ed975012
4 changed files with 56 additions and 21 deletions

View File

@ -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', '#' ) ),