100, 'width' => 400, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ); add_theme_support( 'custom-logo', $defaults ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); $args = array( 'default-image' => get_template_directory_uri() . '/inc/img/wedding_theme_wordpress_couple_standing_in_a_dessert.jpg', 'width' => 1920, 'height' => 800, 'flex-width' => true, 'flex-height' => true, 'header-text' => false ); add_theme_support( 'custom-header', $args ); } add_action( 'after_setup_theme', 'sbwhea_theme_support_setup' ); add_action( 'widgets_init', 'sbwhea_widgets_init' ); function sbwhea_widgets_init() { register_sidebar( array( 'name' => __( 'Page Sidebar', 'sbw-wedding' ), 'id' => 'page-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } function sbwhea_excerpt_more( $more ) { return sprintf( '%2$s', esc_url( get_permalink( get_the_ID() ) ), sprintf( __( 'Continue reading %s ', 'sbw-wedding' ), '' . get_the_title( get_the_ID() ) . '' ) ); } add_filter( 'excerpt_more', 'sbwhea_excerpt_more' ); //Add an admin notice if SBW Timeline plugin is not installed function sbwhea_admin_notices() { global $pagenow; print_r( $pagenow ); if ( $pagenow == 'index.php' || $pagenow == 'plugins.php' ) { //if( ! function_exists( 'sbwhea_get_timeline' ) && empty( get_option( 'timeline_plugin_notice_dismissed' ) ) ) { $plugin_url = network_admin_url( 'plugin-install.php?s=SBW+Timeline&tab=search&type=term' ); $message = sprintf( wp_kses( __( 'To add a timeline section to your website, please install the SBW Timeline plugin.', 'sbw-wedding' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $plugin_url ) ); ?>

$countdown_time ) { $msg = __( 'Missed it!', 'sbw-wedding' ); // Check if current date time is same day as specific and display 'Todays the day!!' } elseif ( date('d-m-Y', $current_time ) == date('d-m-Y', $countdown_time ) ) { $msg = __( 'Today\'s the day!!', 'sbw-wedding' ); // Check if specific date is tomorrow and display 'Its tomorrow!' } elseif ( date('d-m-Y', $current_time ) == date('d-m-Y', ( $countdown_time - ( 24 * 60 * 60 ) ) ) ) { // 24 * 60 * 60 = a day in seconds $msg = __( 'It\'s tomorrow!', 'sbw-wedding' ); // Calculate the difference and display time left } else { $difference_in_time = ( $countdown_time - $current_time ); // work out days, minutes, hours, seconds $days = max( floor( $difference_in_time / ( 24 * 60 * 60 ) ), 0 ); $difference_in_time -= $days * 24 * 60 * 60; $hours = max( floor( $difference_in_time / ( 60 * 60 ) ), 0 ); $difference_in_time -= $hours * 60 * 60; $minutes = max( floor( $difference_in_time / 60 ), 0 ); $seconds = max( $difference_in_time - ( $minutes * 60 ), 0 ); $msg = sprintf('
%ddays
%dhours
%dminutes
', $days, $hours, $minutes/*, $seconds*/ ); wp_register_script( 'timer-js', get_template_directory_uri() .'/assets/js/timer.js' ); $timer_data = array( 'jsDateString' => $js_date_string ); wp_localize_script( 'timer-js', 'timer_data', $timer_data ); wp_enqueue_script( 'timer-js' ); // Add JS script to count down ?>