ID ); update_option( 'show_on_front', 'page' ); } } add_action ('init', 'bnd_set_front_page'); add_filter('cron_schedules', 'add_custom_cron_intervals'); function add_custom_cron_intervals( $schedules ) { // $schedules stores all recurrence schedules within WordPress $schedules['five_minutes'] = array( 'interval' => 300, // Number of seconds, 600 in 10 minutes 'display' => 'Once Every 5 Minutes' ); $schedules['one_day'] = array( 'interval' => 86400, // Number of seconds, 600 in 10 minutes 'display' => 'Once Every Day' ); // Return our newly added schedule to be merged into the others return (array)$schedules; } add_action( 'template_redirect', 'check_logged_in_user' ); function check_logged_in_user() { global $wp; $current_slug = add_query_arg( array(), $wp->request ); if ($current_slug!='' && $current_slug!=null) { $pageattr = Bnd_Flex_Order_Delivery_Container::instance()->get_page_list()[$current_slug]; if (!$pageattr[3] && !is_user_logged_in() ) { wp_redirect(buynowdepot_get_page_url("bnd-login")); exit(); } } } ?>