コード例 #1
0
 /**
  * @param $countdown_date
  * @return array
  */
 function yith_get_countdown($countdown_date)
 {
     return array('enabled' => get_option('yith_tcountdown_enable'), 'to' => $countdown_date - time(), 'days' => yith_countdown_days($countdown_date), 'hours' => yith_countdown_hours($countdown_date) - yith_countdown_days($countdown_date) * 24, 'minutes' => yith_countdown_minutes($countdown_date) - yith_countdown_hours($countdown_date) * 60, 'seconds' => yith_countdown_seconds($countdown_date) - yith_countdown_minutes($countdown_date) * 60);
 }
コード例 #2
0
 /**
  * Generate template vars
  *
  * @return array
  * @since 1.0.0
  * @access protected
  */
 protected function _vars()
 {
     $countdown_date = yith_prelaunch_unixstamp(get_option('yith_prelaunch_to_date'));
     $vars = array('background' => array('color' => get_option('yith_prelaunch_background_color'), 'image' => get_option('yith_prelaunch_background_image'), 'repeat' => get_option('yith_prelaunch_background_repeat'), 'position' => get_option('yith_prelaunch_background_position'), 'attachment' => get_option('yith_prelaunch_background_attachment')), 'color' => array('border_top' => get_option('yith_prelaunch_border_top')), 'logo' => array('image' => get_option('yith_prelaunch_logo_image'), 'tagline' => get_option('yith_prelaunch_logo_tagline'), 'tagline_font' => yit_typo_option_to_css(get_option('yith_prelaunch_logo_tagline_font'))), 'mascotte' => get_option('yith_prelaunch_mascotte'), 'message' => get_option('yith_prelaunch_message'), 'title_font' => yit_typo_option_to_css(get_option('yith_prelaunch_title_font')), 'p_font' => yit_typo_option_to_css(get_option('yith_prelaunch_paragraph_font')), 'newsletter' => array('enabled' => get_option('yith_prelaunch_enable_newsletter_form') == 1, 'submit' => array('color' => get_option('yith_prelaunch_newsletter_submit_background'), 'hover' => get_option('yith_prelaunch_newsletter_submit_background_hover'), 'label' => get_option('yith_prelaunch_newsletter_submit_label'), 'font' => yit_typo_option_to_css(get_option('yith_prelaunch_newsletter_submit_font'))), 'form_action' => get_option('yith_prelaunch_newsletter_action'), 'form_method' => get_option('yith_prelaunch_newsletter_method'), 'email_label' => get_option('yith_prelaunch_newsletter_email_label'), 'email_name' => get_option('yith_prelaunch_newsletter_email_name'), 'email_font' => yit_typo_option_to_css(get_option('yith_prelaunch_newsletter_email_font')), 'hidden_fields' => array()), 'custom' => get_option('yith_prelaunch_custom_style'), 'title' => get_option('yith_prelaunch_newsletter_title'), 'socials' => array('facebook' => get_option('yith_prelaunch_socials_facebook'), 'twitter' => get_option('yith_prelaunch_socials_twitter'), 'gplus' => get_option('yith_prelaunch_socials_gplus'), 'youtube' => get_option('yith_prelaunch_socials_youtube'), 'rss' => get_option('yith_prelaunch_socials_rss'), 'behance' => get_option('yith_prelaunch_socials_behance'), 'dribble' => get_option('yith_prelaunch_socials_dribble'), 'email' => get_option('yith_prelaunch_socials_email'), 'flickr' => get_option('yith_prelaunch_socials_flickr'), 'instagram' => get_option('yith_prelaunch_socials_instagram'), 'linkedin' => get_option('yith_prelaunch_socials_linkedin'), 'pinterest' => get_option('yith_prelaunch_socials_pinterest'), 'skype' => get_option('yith_prelaunch_socials_skype'), 'tumblr' => get_option('yith_prelaunch_socials_tumblr')), 'countdown' => array('enabled' => get_option('yith_prelaunch_countdown_enable'), 'to' => $countdown_date - time(), 'days' => yith_countdown_days($countdown_date), 'hours' => yith_countdown_hours($countdown_date) - yith_countdown_days($countdown_date) * 24, 'minutes' => yith_countdown_minutes($countdown_date) - yith_countdown_hours($countdown_date) * 60, 'seconds' => yith_countdown_seconds($countdown_date) - yith_countdown_minutes($countdown_date) * 60, 'num_font' => yit_typo_option_to_css(get_option('yith_prelaunch_numbers_font')), 'label_font' => yit_typo_option_to_css(get_option('yith_prelaunch_labels_font'))));
     $hidden = get_option('yith_prelaunch_newsletter_hidden_fields');
     $hidden_fields = explode('&', $hidden);
     foreach ($hidden_fields as $field) {
         list($key, $val) = explode('=', $field);
         $vars['newsletter']['hidden_fields'][$key] = $val;
     }
     return $vars;
 }