} else {
$imageUrl = '<div class="featured-container"><div class="featured-image" style="background: url(\''.get_template_directory_uri().'/assets/things-to-do.jpg\') no-repeat scroll 0px 0px / cover;;"></div></div>';
}
- return $imageUrl;
+ return $imageUrl;
}
add_action('wp_enqueue_scripts', 'glm_site_scripts');
add_image_size('glm_blocks', '570', '590', true);
add_image_size('glm_blocks_small', '570', '280', true);
+add_action( 'wp', 'post_pw_sess_expire' );
+function post_pw_sess_expire() {
+ global $post;
+ //echo '<pre>' . print_r( $post, true ) . '</pre>';
+ if ($post->ID == 5822 ) {
+ if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] )
+ && isset( $_COOKIE['glm-test_' . COOKIEHASH] )
+ ) {
+ // Setting a time of 0 in setcookie() forces the cookie to expire with the session
+ setcookie('wp-postpass_' . COOKIEHASH, '', 0, COOKIEPATH);
+ setcookie('glm-test_' . COOKIEHASH, '', 0, COOKIEPATH);
+ }
+ if ( isset( $_COOKIE['wp-postpass_' . COOKIEHASH] ) ) {
+ //die('here');
+ setcookie('glm-test_' . COOKIEHASH, COOKIEHASH, time() + 3600, COOKIEPATH);
+ }
+ }
+}
?>