/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'stepsbox2--' . $color_scheme; echo '<div class="elm-stepsbox2 stepbox2 row ' . implode(' ', $elm_classes) . '">'; if (!empty($options['stp_title'])) { echo '<div class="col-sm-12">'; echo '<h3 class="m_title m_title_ext text-custom stepbox2-el-title">' . $options['stp_title'] . '</h3>'; echo '</div>'; } if (!empty($options['steps_single2']) && is_array($options['steps_single2'])) { $i = 1; $count = count($options['steps_single2']); echo '<div class="col-sm-12">'; foreach ($options['steps_single2'] as $step) { if ($i % 3 == 1) { echo '<div class="row gutter-md">'; } $ok = ''; $image = ''; if ($step['stp_single_ok'] == 'yes') { $ok = 'ok'; $image = '<span class="stepbox2-okicon glyphicon glyphicon-ok-circle"></span>'; } $goboxfirst = ''; if ($i == 1) { $goboxfirst = 'gobox-first stepbox2-first'; } $goboxlast = ''; if ($i == $count) { $goboxlast = 'gobox-last stepbox2-last'; } echo '<div class="col-sm-4">'; echo '<div class="gobox stepbox2-box u-trans-all-2s stepbox2-box--' . $ok . ' ' . $goboxfirst . ' ' . $goboxlast . '">'; echo $image; echo '<div class="gobox-content stepbox2-content">'; if (!empty($step['stp_single_title'])) { echo '<h4 class="stepbox2-title">' . $step['stp_single_title'] . '</h4>'; } $stp_single_link = zn_extract_link($step['stp_single_link'], 'zn_step_link stepbox2-link'); echo $stp_single_link['start'] . $stp_single_link['end']; if (!empty($step['stp_single_desc'])) { echo '<div class="stepbox2-desc">' . $step['stp_single_desc'] . '</div>'; } echo '</div>'; echo '</div>'; echo '</div>'; if ($i % 3 == 0 || $i == $count) { echo '</div>'; } $i++; } echo '</div>'; } echo '</div>'; }
function get_all_options() { $options = zget_option(false, false, true); unset($options['general_options']['mailchimp_api']); unset($options['general_options']['google_analytics']); return $options; }
/** * This method is used to display the output of the element. * * @return void */ function element() { $options = $this->data['options']; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'kwd--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; $kbStyle = $this->opt('keywordbox_style', 'style1'); $cssRules = ''; $useBgImage = false; $useBgColor = false; if ('style2' == $kbStyle) { $elm_classes[] = 'keywordbox-2'; $useBgImage = true; } elseif ('style3' == $kbStyle) { $elm_classes[] = 'keywordbox-3'; $useBgImage = true; } elseif ('style4' == $kbStyle) { $elm_classes[] = 'keywordbox-4'; $useBgColor = true; } if ($useBgImage) { $cssRules .= "background-image: url({$options['kb_bg_image']});"; } if ($useBgColor) { $cssRules .= "background-color: {$options['kb_bg_color']};"; } if (!empty($options['kw_content'])) { echo '<div class="keywordbox ' . implode(' ', $elm_classes) . '" style="' . $cssRules . '">' . $options['kw_content'] . '</div>'; } }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; $stb_title_heading = $this->opt('stb_title_heading', 'h3'); if (empty($options)) { return; } $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'zn_text_box-' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; echo '<div class="zn_text_box ' . implode(' ', $elm_classes) . '">'; $style = !empty($options['stb_style']) ? $options['stb_style'] : ''; if (!empty($options['stb_title'])) { $text_custom = $style == 'style1' ? 'text-custom' : ''; echo '<' . $stb_title_heading . ' class="zn_text_box-title zn_text_box-title--' . $style . ' ' . $text_custom . '">' . $options['stb_title'] . '</' . $stb_title_heading . '>'; } $stb_content = $this->opt('stb_content', ''); $content = wpautop($stb_content); if (!empty($stb_content)) { echo $content; } echo '</div>'; }
function zn_mailchimp_subscribe() { $return = array(); if (isset($_POST['email']) && isset($_POST['mailchimp_list'])) { if ($mailchimp_api = zget_option('mailchimp_api', 'general_options')) { if (is_email($_POST['email'])) { require_once THEME_BASE . '/framework/classes/class-mailchimp.php'; $mailchimp = new ZnMailChimp($mailchimp_api); $email = $_POST['email']; $mailchimp_data = array('id' => $_POST['mailchimp_list'], 'email' => array('email' => $_POST['email'])); // NAME FIELD if (isset($_POST['name'])) { $mailchimp_data['merge_vars']['NAME'] = $_POST['name']; } // WEBSITE FIELD if (isset($_POST['website'])) { $mailchimp_data['merge_vars']['WEBSITE'] = $_POST['website']; } $message = $mailchimp->call('lists/subscribe', $mailchimp_data); if (!empty($message['error'])) { $return['error'] = true; $return['message'] = '<div class="alert alert-success alert-dismissable">' . $message['error'] . '</div>'; } else { //print_z($mailchimp_data); $return['message'] = '<div class="alert alert-success alert-dismissable">' . __('Thank you for subscribing !', 'zn_framework') . '</div>'; } } else { $return['error'] = true; $return['message'] = '<div class="alert alert-danger alert-dismissable">' . __('Please enter a valid email address !', 'zn_framework') . '</div>'; } } } wp_send_json($return); }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; $c_title = ''; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'circletitlebox--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; $elm_classes[] = $this->opt('cttb_style', 'style1'); echo '<div class="circle-text-box ' . implode(' ', $elm_classes) . '">'; echo '<div class="circle-headline">'; // TITLE 1 if (!empty($options['ctb_circle_title'])) { $c_title = '<span class="wpk-circle-span"><span>' . $options['ctb_circle_title'] . '</span></span> '; } // TITLE 2 if (!empty($options['ctb_main_title'])) { echo $c_title . '<h4 class="wpk-circle-title text-custom">' . $options['ctb_main_title'] . '</h4>'; } echo '</div>'; // CONTENT if (!empty($options['ctb_content'])) { echo wpautop(do_shortcode($options['ctb_content'])); } echo '</div>'; }
function znpb_add_kallyas_template($current_layout, $post, $post_id) { if (!is_page($post_id)) { return $current_layout; } $sidebar_pos = get_post_meta($post_id, 'zn_page_layout', true); $sidebar_to_use = get_post_meta($post_id, 'zn_sidebar_select', true); $subheader_style = get_post_meta($post_id, 'zn_subheader_style', true) !== '0' ? get_post_meta($post_id, 'zn_subheader_style', true) : 'zn_def_header_style'; $sidebar_saved_data = zget_option('page_sidebar', 'unlimited_sidebars', false, array('layout' => 'right_sidebar', 'sidebar' => 'defaultsidebar')); if ($sidebar_pos == 'default' || empty($sidebar_pos)) { $sidebar_pos = $sidebar_saved_data['layout']; } if ($sidebar_to_use == 'default' || empty($sidebar_to_use)) { $sidebar_to_use = $sidebar_saved_data['sidebar']; } // We will add the new elements here $sidebar = ZNPB()->add_module_to_layout('TH_Sidebar', array('sidebar_select' => $sidebar_to_use)); $sidebar_column = ZNPB()->add_module_to_layout('ZnColumn', array(), array($sidebar), 'col-sm-3'); $sections[] = ZNPB()->add_module_to_layout('TH_CustomSubHeaderLayout', array('hm_header_style' => $subheader_style)); // If the sidebar was saved as left sidebar if ($sidebar_pos == 'left_sidebar') { $columns[] = $sidebar_column; } // Add the main shop content $archive_columns = $sidebar_pos == 'no_sidebar' ? 4 : 3; $textbox = ZNPB()->add_module_to_layout('TH_TextBox', array('stb_title' => $post->post_title, 'stb_content' => $post->post_content)); $columns[] = ZNPB()->add_module_to_layout('ZnColumn', array(), array($textbox), 'col-sm-9'); // If the sidebar was saved as right sidebar if ($sidebar_pos == 'right_sidebar') { $columns[] = $sidebar_column; } $sections[] = ZNPB()->add_module_to_layout('ZnSection', array(), $columns, 'col-sm-12'); return $sections; }
function zn_check_updates() { $username = zget_option('zn_theme_username', $this->config['admin_parent'], false, null); $apikey = zget_option('zn_theme_api', $this->config['admin_parent'], false, null); if (!empty($username) && !empty($apikey) && !empty($this->config['author'])) { require_once FW_PATH . '/modules/envato_theme_updater/class-pixelentity-theme-update.php'; PixelentityThemeUpdate::init($username, $apikey, $this->config['author']); } }
function zn_get_fonts() { $fonts = array('arial' => 'Arial', 'verdana' => 'Verdana, Geneva', 'trebuchet' => 'Trebuchet', 'georgia' => 'Georgia', 'times' => 'Times New Roman', 'tahoma' => 'Tahoma, Geneva', 'palatino' => 'Palatino', 'helvetica' => 'Helvetica'); if ($google_fonts = zget_option('zn_google_fonts_setup', 'google_font_options')) { foreach ($google_fonts as $key => $font) { $fonts[$font['font_family']] = $font['font_family']; } } return $fonts; }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'stepsbox3--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; if (!empty($options['stp_title'])) { echo '<h3 class="m_title m_title_ext text-custom stepbox3-elm-title">' . $options['stp_title'] . '</h3>'; } echo '<div class="step-boxes-3 stepbox3 ' . implode(' ', $elm_classes) . '">'; if (!empty($options['steps_single3']) && is_array($options['steps_single3'])) { $i = 1; $all = count($options['steps_single3']); $cls = ''; foreach ($options['steps_single3'] as $step) { if ($i % 2 != 0) { $align = 'left'; } else { $align = 'right'; } if ($i == $all) { $cls = 'last'; } echo '<div class="process_box stepbox3-box u-trans-all-2s ' . $cls . '" data-align="' . $align . '">'; echo '<div class="number stepbox3-number kl-font-alt"><span class="stepbox3-number-sp">'; if ($i < 10) { echo '0' . $i; } else { echo $i; } echo '</span></div>'; echo '<div class="content stepbox3-content">'; if (!empty($step['stp_single_title'])) { echo '<h4 class="stp_title stepbox3-title">' . $step['stp_single_title'] . '</h4>'; } // STEP CONTENT if (!empty($step['stp_single_desc'])) { if (preg_match('%(<p[^>]*>.*?</p>)%i', $step['stp_single_desc'], $regs)) { echo $step['stp_single_desc']; } else { echo '<div class="stepbox3-desc">' . $step['stp_single_desc'] . '</div>'; } } echo '</div>'; echo '<div class="clearfix"></div>'; echo '</div>'; $i++; } } echo '</div>'; }
/** * This method is used to display the output of the element. * * @return void */ function element() { $options = $this->data['options']; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); // They were previously saved oddly $get_scheme = $this->opt('ib2_text_color', ''); if ($get_scheme == 'ib2-text-color-light-theme') { $get_scheme = 'light'; } elseif ($get_scheme == 'ib2-text-color-dark-theme') { $get_scheme = 'dark'; } $color_scheme = $get_scheme == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $get_scheme; $elm_classes[] = 'infobox2--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; $ib2_style = $this->opt('ib2_style', 'style1'); $elm_classes[] = 'ib2-' . $ib2_style; // Style 2 && style 3 if ('style2' == $ib2_style || 'style3' == $ib2_style) { ?> <div class="<?php echo implode(' ', $elm_classes); ?> ib2-custom infobox2-container"> <div class="ib2-inner infobox2-inner"> <?php if ($infoMessage = $this->opt('ib2_info_message', '')) { echo '<h4 class="ib2-info-message infobox2-message text-custom-before">' . $infoMessage . '</h4>'; } echo '<div class="ib2-content">'; if ($ibTitle = $this->opt('ib2_title_text', '')) { echo '<h3 class="ib2-content--title infobox2-title">' . $ibTitle . '</h3>'; } if ($ibText = $this->opt('ib2_title', '')) { echo '<div class="ib2-content--text infobox2-text">' . wpautop($ibText) . '</div>'; } echo '</div>'; ?> </div> </div> <?php } else { if ($ibText = $this->opt('ib2_title', '')) { // if no subtitle nor description use full 12 column echo '<div class="info-text infobox2-infotext ' . implode(' ', $elm_classes) . '">'; echo wpautop($ibText); echo '</div>'; } } }
/** * This method is used to display the output of the element. * * @return void */ function element() { $options = $this->data['options']; if (empty($options)) { return; } // Menu Style $cmstyle = $this->opt('cm_style', 'normal'); // Container $elm_classes = array(); // Basic $elm_classes[] = 'elm-custommenu'; $elm_classes[] = 'clearfix'; $elm_classes[] = $uid = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); // Elm. style $elm_classes[] = 'elm-custommenu--' . $cmstyle; // List Classes $list_classes = array(); $list_classes[] = 'elm-cmlist'; $list_classes[] = 'clearfix'; // Color Scheme $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $list_classes[] = 'elm-cmlist--skin-' . $color_scheme; $list_classes[] = 'element-scheme--' . $color_scheme; // Toggle Uppercase $list_classes[] = $this->opt('cm_ucase', ''); // Check Vertical Styles $vertical_styles = in_array($cmstyle, array('normal', 'v1', 'v2', 'v3', 'v3ext')); $list_classes[] = 'elm-cmlist--' . $cmstyle; // Add columns, but only for vertical styles $cmcols = $this->opt('cm_cols', 1); if ($vertical_styles && $cmcols != 1) { $list_classes[] = ' elm-cmlist-cols elm-cmlist--cols-' . $cmcols; } // Check if depth is supported $depth = $vertical_styles ? $this->opt('cm_depth', 1) : 1; // Whoa, no menus? $nav_menu = $this->opt('cm_menu', ''); if (!$nav_menu) { return; } echo '<div class="' . implode(' ', $elm_classes) . '">'; if ($cmstyle == 'dd') { echo '<div class="elm-custommenu-pick">' . $this->opt('cm_dd_text', '') . '</div>'; } // Make Menu wp_nav_menu(array('menu' => $nav_menu, 'depth' => $depth, 'menu_class' => implode(' ', $list_classes), 'menu_id' => $uid, 'link_before' => '<span>', 'link_after' => '</span>', 'container' => false)); echo '</div>'; }
function options() { global $zn_framework; $sidebars = array('default_sidebar' => 'Default Sidebar'); // Add the unlimited sidebars $unlimited_sidebars_op = zget_option('unlimited_sidebars', 'unlimited_sidebars'); if (is_array($unlimited_sidebars_op)) { foreach ($unlimited_sidebars_op as $key => $value) { $sidebars[zn_sanitize_widget_id($value['sidebar_name'])] = $value['sidebar_name']; } } $options = array(array('id' => 'sidebar', 'name' => 'Select sidebar', 'description' => 'Select which sidebar you wish to use', 'type' => 'select', 'std' => 'default_sidebar', 'options' => $sidebars)); return $options; }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; if (empty($options)) { return; } $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'actionbox--' . $color_scheme; $elm_classes[] = $this->opt('ac_style', 'style1'); echo '<div class="action_box ' . implode(' ', $elm_classes) . '" data-arrowpos="center">'; echo '<div class="action_box_inner action_box-inner">'; echo '<div class="action_box_content action_box-content">'; // Title $hasTitle = isset($options['page_ac_title']) && !empty($options['page_ac_title']); $hasSubtitle = isset($options['page_ac_subtitle']) && !empty($options['page_ac_subtitle']); if ($hasTitle || $hasSubtitle) { echo '<div class="ac-content-text action_box-text">'; } if ($hasTitle) { echo '<h4 class="text action_box-title">' . do_shortcode($options['page_ac_title']) . '</h4>'; } if ($hasSubtitle) { echo '<h5 class="ac-subtitle action_box-subtitle">' . do_shortcode($options['page_ac_subtitle']) . '</h5>'; } if ($hasTitle || $hasSubtitle) { echo '</div>'; } // LINKS $page_ac_b_link = zn_extract_link($this->opt('page_ac_b_link', ''), 'btn ac-btn action_box-button action_box-button-first ' . $this->opt('page_ac_b_link_style', 'btn-lined'), ''); $page_ac_b_link2 = zn_extract_link($this->opt('page_ac_b_link2', ''), 'btn ac-btn action_box-button action_box-button-second ' . $this->opt('page_ac_b_link2_style', 'btn-fullwhite'), ''); if (!empty($page_ac_b_link['start']) || !empty($page_ac_b_link2['start'])) { echo '<div class="ac-buttons action_box-buttons">'; } if (!empty($page_ac_b_link['start'])) { echo $page_ac_b_link['start'] . $options['page_ac_b_text'] . $page_ac_b_link['end']; } if (!empty($page_ac_b_link2['start'])) { echo $page_ac_b_link2['start'] . $options['page_ac_b_text2'] . $page_ac_b_link2['end']; } if (!empty($page_ac_b_link['start']) || !empty($page_ac_b_link2['start'])) { echo '</div>'; } echo '</div>'; echo '</div>'; echo '</div>'; }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; if (empty($options)) { return; } $button = false; $div_size = 'col-sm-12'; if (!empty($options['cab_button_text'])) { $button = true; $div_size = 'col-sm-10'; } $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'calloutbanner--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; echo '<div class="callout-banner clearfix ' . implode(' ', $elm_classes) . '">'; echo '<div class="row">'; if (!empty($options['cab_main_title']) || !empty($options['cab_sec_title'])) { echo '<div class="' . $div_size . '">'; if (!empty($options['cab_main_title'])) { echo '<h3 class="m_title m_title_ext text-custom callout-banner-title">' . $options['cab_main_title'] . '</h3>'; } if (!empty($options['cab_sec_title'])) { echo '<p>' . $options['cab_sec_title'] . '</p>'; } echo '</div>'; } if ($button) { $cab_button_link = zn_extract_link($this->opt('cab_button_link', ''), 'circlehover with-symbol kl-main-bgcolor kl-main-bgcolor-before ' . $this->opt('calloutbox_style', 'style1'), 'data-size="" data-position="top-left" data-align="right"'); echo '<div class="col-sm-2">'; echo $cab_button_link['start']; echo '<span class="text circlehover-text u-trans-all-2s">' . $options['cab_button_text'] . '</span>'; if (!empty($options['cab_button_image'])) { echo '<span class="symbol circlehover-symbol u-trans-all-2s"><img class="circlehover-symbol-img" src="' . $options['cab_button_image'] . '" alt=""></span>'; } else { echo '<span class="symbol u-trans-all-2s"><img class="circlehover-symbol-img" src="' . THEME_BASE_URI . '/images/ok.png" alt=""></span>'; } echo '<div class="triangle circlehover-symbol-trg"><span class="play-icon"></span></div>'; echo $cab_button_link['end']; echo '</div>'; } echo '</div>'; echo '</div>'; }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; if (empty($options)) { return; } $iconHolder = $this->opt('vts_tab_icon'); $tabIcon = !empty($iconHolder['family']) ? '<span class="kl-icon-dark statsboxes-elm-titleicon" ' . zn_generate_icon($this->opt('vts_tab_icon')) . '></span>' : ''; //$tabIcon = (isset($options['vts_tab_icon']) && !empty($options['vts_tab_icon']) ? $options['vts_tab_icon'] : ''); $tabTitle = isset($options['stb_title']) && !empty($options['stb_title']) ? $options['stb_title'] : ''; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'stsbx--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; echo '<div class="zn_stats_box statsboxes ' . implode(' ', $elm_classes) . '">'; if (!empty($tabTitle)) { echo '<h3 class="mb_title statsboxes-elm-title">' . $tabIcon . $tabTitle . '</h3>'; } if (!empty($options['single_stats']) && is_array($options['single_stats'])) { echo '<div class="row u-mb-0 statsboxes-row">'; foreach ($options['single_stats'] as $stat) { echo '<div class="col-sm-6 col-md-3">'; echo '<div class="statbox statsboxes-item clearfix">'; $sb_type = isset($stat['sb_type']) && !empty($stat['sb_type']) ? $stat['sb_type'] : 'img'; if (!empty($stat['sb_icon']) && $sb_type == 'img') { echo '<img class="statsboxes-img" src="' . $stat['sb_icon'] . '" alt="">'; } // Fonticon if (isset($stat['sb_iconfont']) && !empty($stat['sb_iconfont']) && $sb_type == 'icon') { $iconsize = isset($stat['sb_size']) && $stat['sb_size'] != 22 ? 'font-size:' . $stat['sb_size'] . 'px;' : ''; $sb_iconcolor = isset($stat['sb_iconcolor']) && $stat['sb_iconcolor'] != '#8f8f8f' ? 'color:' . $stat['sb_size'] . ';' : ''; echo '<span ' . zn_generate_icon($stat['sb_iconfont']) . ' style="' . $iconsize . $sb_iconcolor . '" class="statbox__fonticon statsboxes-icon"></span>'; } echo '<h4 class="statsboxes-title text-custom">' . $stat['sb_title'] . '</h4>'; echo '<h6 class="statsboxes-content">' . $stat['sb_content'] . '</h6>'; echo '</div>'; echo '</div>'; } echo '</div>'; } echo '</div>'; }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'tstsld--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; echo '<div class="testimonials-carousel tst-carousel ' . implode(' ', $elm_classes) . '">'; if (!empty($options['tf_title'])) { echo '<h3 class="m_title m_title_ext text-custom tst-carousel-elm-title">' . $options['tf_title'] . '</h3>'; } echo '<div class="controls tst-carousel-controls">'; echo '<a href="#" class="prev tst-carousel-controls-arr"><span class="glyphicon glyphicon-chevron-left"></span></a>'; echo '<a href="#" class="next tst-carousel-controls-arr"><span class="glyphicon glyphicon-chevron-right"></span></a>'; echo '</div>'; if (!empty($options['testimonials_slider_single']) && is_array($options['testimonials_slider_single'])) { // Speed $speed = 5000; if (!empty($options['tf_speed'])) { $speed = intval($options['tf_speed']); } echo '<ul class="zn_testimonials_carousel tst-carousel-list fixclear" data-speed="' . $speed . '" data-autoplay="' . $this->opt('tf_autoplay', 1) . '">'; foreach ($options['testimonials_slider_single'] as $test) { if (!empty($test['tf_single_test'])) { echo '<li class="tst-carousel-item">'; echo '<blockquote class="tst-carousel-bqt">' . do_shortcode($test['tf_single_test']) . '</blockquote>'; echo '<div class="testimonial-author tst-carousel-author">'; if (isset($test['ts_author_photo']) && !empty($test['ts_author_photo'])) { echo '<div class="testimonial-author--photo tst-carousel-photo">'; $image = vt_resize('', $test['ts_author_photo'], '40', '40', true); echo '<img class="tst-carousel-img" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="">'; echo '</div>'; } echo '<h5 class="tst-carousel-title">' . $test['tf_single_author'] . '</h5>'; echo '</div>'; echo '</li>'; } } echo '</ul>'; } echo '</div>'; }
function widget($args, $instance) { ob_start(); extract($args); $title = !empty($instance['title']) ? esc_attr($instance['title']) : ''; $title = apply_filters('widget_title', $title, $instance, $this->id_base); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } if (empty($instance['mailchimp_list'])) { echo '<div class="zn-pb-notification">It seems that you didn\'t selected any mailchimp list. Please go to the widget settings and select at least one mailchimp list.</div>'; echo $after_widget; return; } if (!empty($instance['mailchimp_list']) && zget_option('mailchimp_api', 'general_options')) { ?> <div class="cs_newsletter"> <?php if (!empty($instance['description_above'])) { echo '<div class="zn_mc_above">' . $instance['description_above'] . '</div>'; } ?> <form method="post" class="zn_newsletter newsletter-signup" name="newsletter_form"> <input type="text" name="zn_mc_email" class="nl-email" value="" placeholder="<?php _e('Enter your email address', 'zn_framework'); ?> " autocomplete="off"> <input type="hidden" name="zn_mailchimp_list_id" class="zn_mailchimp_list_id" value="<?php echo $instance['mailchimp_list']; ?> "> <input type="submit" name="submit" class="nl-submit arrowLink descriptionColor zn_icon" value=""> </form> <div class="zn_mailchimp_message"></div> </div> <?php } echo $after_widget; }
function element() { $data_clientid = zget_option('instagram_client_id', 'general_options'); if (empty($data_clientid)) { echo '<div class="zn-pb-notification">Please set your Instagram Client ID into the theme options.</div>'; return; } $title = $this->opt('title') ? $this->opt('title') : ''; $show_instagram_text = $this->opt('show_instagram_text') ? $this->opt('show_instagram_text') : true; $titleAlignment = $this->opt('title_alignment') ? $this->opt('title_alignment') : 'text-left'; $titleStyle = $this->opt('title_style') ? $this->opt('title_style') : ''; $data_get = $this->opt('data_get') ? $this->opt('data_get') : 'popular'; $data_tagname = $this->opt('data_tagname') ? $this->opt('data_tagname') : ''; $data_locationid = $this->opt('data_locationid') ? $this->opt('data_locationid') : ''; $data_userid = $this->opt('data_userid') ? $this->opt('data_userid') : ''; $data_accesstoken = $this->opt('data_accesstoken') ? $this->opt('data_accesstoken') : ''; $data_sortby = $this->opt('data_sortby') ? $this->opt('data_sortby') : 'most-recent'; $data_limit = $this->opt('data_limit') ? $this->opt('data_limit') : '6'; $size = $this->opt('img_size') ? $this->opt('img_size') : 150; $data_resolution = $size <= 150 ? 'thumbnail' : ($size <= 306 ? 'low_resolution' : 'standard_resolution'); //** Appear animation $appear = $this->opt('appear_animation') ? ' data-appear="fade-in" data-appear-direction="' . $this->opt('appear_animation') . '" data-appear-delay="' . ($this->opt('appear_delay') ? $this->opt('appear_delay') : '0') . '"' : ''; $atInstagram = ''; if ($show_instagram_text) { $atInstagram = '<span class="baseColor">@instagram</span>'; } echo '<div class="instagramFeed ' . $this->data['uid'] . '"' . $appear . '>'; echo ' <h2 class="zn_title ' . $titleStyle . ' ' . $titleAlignment . '">' . $title . $atInstagram . '</h2>'; echo ' <div id="' . $this->data['uid'] . '" class="instagramList" '; echo 'data-clientid="' . $data_clientid . '"'; echo !empty($data_limit) ? ' data-limit="' . $data_limit . '"' : ''; echo !empty($data_get) ? ' data-get="' . $data_get . '"' : ''; echo !empty($data_tagname) ? ' data-tagname="' . $data_tagname . '"' : ''; echo !empty($data_locationid) ? ' data-locationid="' . $data_locationid . '"' : ''; echo !empty($data_userid) ? ' data-userid="' . $data_userid . '"' : ''; echo !empty($data_accesstoken) ? ' data-accesstoken="' . $data_accesstoken . '"' : ''; echo !empty($data_sortby) ? ' data-sortby="' . $data_sortby . '"' : ''; echo !empty($size) ? ' data-imgsize="' . $size . '"' : ''; echo !empty($data_resolution) ? ' data-resolution="' . $data_resolution . '"' : ''; //echo ( !empty( $data_itemclass ) ? ' data-itemclass="'.$data_itemclass.'"' : ''); //** Removed the option for a custom class echo '></div>'; echo '</div>'; }
function widget($args, $instance) { wp_enqueue_script('instafeed'); extract($args); $title = !empty($instance['title']) ? esc_attr($instance['title']) : __('Instagram feed', 'zn_framework'); $title = apply_filters('widget_title', $title, $instance, $this->id_base); $data_clientid = esc_attr(zget_option('instagram_client_id', 'general_options')); $data_get = isset($instance['data_get']) ? esc_attr($instance['data_get']) : 'popular'; $data_tagname = isset($instance['data_tagname']) ? esc_attr($instance['data_tagname']) : ''; $data_locationid = isset($instance['data_locationid']) ? esc_attr($instance['data_locationid']) : ''; $data_userid = isset($instance['data_userid']) ? esc_attr($instance['data_userid']) : ''; $data_accesstoken = isset($instance['data_accesstoken']) ? esc_attr($instance['data_accesstoken']) : ''; $data_sortby = isset($instance['data_sortby']) ? esc_attr($instance['data_sortby']) : 'most-recent'; $data_limit = isset($instance['data_limit']) ? esc_attr($instance['data_limit']) : 6; echo $before_widget; if (empty($data_clientid)) { echo '<div class="zn-pb-notification">Please set your Instagram Client ID into the theme options.</div>'; } else { if ($title) { echo $before_title . $title . $after_title; } ?> <div class="instagramList" data-resolution='thumbnail' <?php echo 'id="' . zn_uid() . '"'; echo ' data-clientid="' . $data_clientid . '"'; echo !empty($data_limit) ? ' data-limit="' . $data_limit . '"' : ''; echo !empty($data_get) ? ' data-get="' . $data_get . '"' : ''; echo !empty($data_tagname) ? ' data-tagname="' . $data_tagname . '"' : ''; echo !empty($data_locationid) ? ' data-locationid="' . $data_locationid . '"' : ''; echo !empty($data_userid) ? ' data-userid="' . $data_accesstoken . '"' : ''; echo !empty($data_accesstoken) ? ' data-accesstoken="' . $data_accesstoken . '"' : ''; echo ' data-imgsize="150"'; echo !empty($data_sortby) ? ' data-sortby="' . $data_sortby . '"' : ''; ?> > </div> <?php } echo $after_widget; }
/** * This method is used to display the output of the element. * * @return void */ function element() { $options = $this->data['options']; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'kl-sidebar--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; $sidebar_select = $this->opt('sidebar_select', 'defaultsidebar'); $elm_classes[] = $this->opt('sidebar_bg', 'yes') == 'yes' ? '' : 'no_bg'; ?> <?php echo '<div id="sidebar-widget-' . $this->data['uid'] . '" class="sidebar zn_sidebar ' . implode(' ', $elm_classes) . '">'; if (!function_exists('dynamic_sidebar') || !dynamic_sidebar($sidebar_select)) { } echo '</div>'; ?> <?php }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; $placement = isset($options['lp_placement']) ? $options['lp_placement'] : 'normal'; $category = $this->opt('lp_blog_categories'); // required inside /inc/... global $post; $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'latestposts4--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; $elm_classes[] = $style = isset($options['lp_style_select']) ? $options['lp_style_select'] : 'default-style'; $postTitle = isset($options['lp_title']) ? $options['lp_title'] : ''; // HOW MANY POSTS $num_posts = 5; if ('default-style' == $style) { $num_posts = isset($options['lp_num_posts']) ? intval($options['lp_num_posts']) : $num_posts; } $GLOBALS['lp_info'] = array('options' => $options, 'post' => $post, 'blog_category' => $category, 'num_posts' => $num_posts, 'postTitle' => $postTitle, 'placement' => $placement); $styleClass = 'default-style'; if ('default-style' != $style) { $styleClass .= ' ' . $style; } ?> <div class="latest_posts latest_posts--style4 latest_posts--4 <?php echo implode(' ', $elm_classes); ?> "> <?php $path = dirname(__FILE__) . '/inc/' . $style . '.php'; if (is_file($path)) { include $path; } ?> </div> <!-- end // latest posts style 2 --> <?php }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; if (empty($options['historic_single'])) { return; } $start_text = $this->opt('he_start', ''); $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'historic--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; echo '<div class="timeline_bar timeline-bar ' . implode(' ', $elm_classes) . '">'; echo '<div class="row u-mb-0">'; echo '<div class="col-sm-12 timeline-edge"><span class="timeline-edge-text">' . $start_text . '</span></div>'; if (!empty($options['historic_single']) && is_array($options['historic_single'])) { $i = 1; foreach ($options['historic_single'] as $event) { $pos = '<div class="col-sm-6">'; if ($i % 2 != 0) { $pos = '<div class="col-sm-6 col-sm-offset-6 timeline-bar--right" data-align="right">'; } echo $pos; echo '<div class="timeline_box timeline-box u-trans-all-2s">'; echo '<div class="date timeline-box-date">' . $event['she_event_date'] . '</div>'; echo '<h4 class="htitle timeline-box-title">' . $event['she_event_name'] . '</h4>'; echo wpautop(do_shortcode($event['she_event_desc'])); echo '</div><!-- end timeline box -->'; echo '</div>'; $i++; } } echo '<div class="col-sm-12 timeline-edge">'; echo '<span class="timeline-edge-text">' . __("PRESENT", 'zn_framework') . '</span>'; echo '</div>'; echo '</div>'; echo '</div><!-- end timeline bar -->'; }
function zn_custom_fonts($css) { $custom_fonts = zget_option('zn_custom_fonts', 'google_font_options'); // Don't do anything if we don't need to if (empty($custom_fonts)) { return $css; } if (is_array($custom_fonts)) { foreach ($custom_fonts as $font) { if ($font_name = $font['cf_name']) { $font_src = ""; // .eot if ($cf_eot = $font['cf_eot']) { $font_src .= "src: url('{$cf_eot}');"; } // Rest of font files if (!empty($font['cf_woff']) || !empty($font['cf_ttf']) || !empty($font['cf_svg'])) { $font_src .= "src: "; if ($cf_eot = $font['cf_eot']) { $font_src .= "url('{$cf_eot}?#iefix') format('eot'),"; } if ($cf_woff = $font['cf_woff']) { $font_src .= "url('{$cf_woff}') format('woff'),"; } if ($cf_ttf = $font['cf_ttf']) { $font_src .= "url('{$cf_ttf}') format('truetype'),"; } if ($cf_svg = $font['cf_svg']) { $font_src .= "url('{$cf_svg}') format('svg'),"; } $font_src = rtrim($font_src, ","); $font_src .= ";"; } $css .= "\n\t\t\t\t\t\t@font-face {\n\t\t\t\t\t\t\tfont-family: {$font_name}; \n\t\t\t\t\t\t\t{$font_src}\n\t\t\t\t\t\t}\n\t\t\t\t\t"; } } } return $css; }
function generate_mailchimp_lists($option_id = 'mailchimp_api', $option_page = 'advanced', $refresh = false) { // delete_option('zn_mailchimp_lists'); $loaded_lists = get_option('zn_mailchimp_lists'); if ($loaded_lists && $refresh == false) { return $loaded_lists; } elseif ($mailchimp_api = zget_option($option_id, $option_page)) { require_once THEME_BASE . '/framework/classes/class-mailchimp.php'; $mailchimp = new ZnMailChimp($mailchimp_api); $lists = $mailchimp->call('lists/list'); $loaded_lists = array(); if (isset($lists['data']) && is_array($lists['data'])) { foreach ($lists['data'] as $key => $list) { $loaded_lists[$list['id']] = $list['name']; } } add_option('zn_mailchimp_lists', $loaded_lists, '', false); return $loaded_lists; } else { return array(); } }
function js() { $locations = $this->opt('locations') ? $this->opt('locations') : array(); $zoom = $this->opt('sc_map_zoom') ? $this->opt('sc_map_zoom') : '14'; $terrain = $this->opt('sc_map_type') ? $this->opt('sc_map_type') : 'ROADMAP'; $scroll = $this->opt('sc_map_zooming_mousewheel') ? $this->opt('sc_map_zooming_mousewheel') : 'false'; $routingColor = zget_option('primary_color', 'style_options'); $uid = $this->data['uid']; $mainOfficeLocation = '[0,0]'; $markers = ''; if (!empty($locations)) { $mainOfficeLocation = '[' . $locations[0]['sc_map_latitude'] . ', ' . $locations[0]['sc_map_longitude'] . ']'; //** Build the markers [[lat, long, tooltip, icon, size, animation, anchor],...] $markers = '['; foreach ($locations as $location) { $markers .= sprintf('[%1$s,%2$s,\'%3$s\',\'%4$s\',%5$s,\'%6$s\',%7$s],', $location['sc_map_latitude'], $location['sc_map_longitude'], preg_replace("/\r|\n/", "", wpautop(addslashes($location['tooltip']))), $location['sc_map_icon'], $location['icon_size'], $location['sc_map_icon_animation'], ''); } $markers .= ']'; $zn_g_map = array('gmap' . $this->data['uid'] => "\r\n\t\t\t\t\t\t\tvar zn_google_map_{$uid} = new Zn_google_map('zn_google_map_{$uid}', {$mainOfficeLocation}, '{$routingColor}', {$markers}, '{$terrain}', {$zoom}, {$scroll});\r\n\t\t\t\t\t\t\tzn_google_map_{$uid}.init_map();\r\n\r\n\t\t\t\t\t\t"); return $zn_g_map; } return false; }
$image = vt_resize('', $saved_image, $size['width'], '', true); } } // Check to see if we have video $portfolio_media = $port_media[0]['port_media_video_comb']; // Display the media if (!empty($saved_image) && $portfolio_media) { echo '<a href="' . $portfolio_media . '" data-mfp="iframe" data-lightbox="iframe" class="portfolio-item-link hoverLink"></a>'; echo '<img class="kl-ptf-catlist-img" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="' . $saved_alt . '" ' . $saved_title . ' />'; echo '<div class="portfolio-item-overlay">'; echo '<div class="portfolio-item-overlay-inner">'; echo '<span class="portfolio-item-overlay-icon glyphicon glyphicon-play"></span>'; echo '</div>'; echo '</div>'; } elseif (!empty($saved_image)) { if (zget_option('zn_link_portfolio', 'portfolio_options', false, 'no') == 'yes') { echo '<a href="' . get_permalink() . '" data-type="image" class="portfolio-item-link hoverLink"></a>'; echo '<img class="kl-ptf-catlist-img" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="' . $saved_alt . '" ' . $saved_title . ' />'; echo '<div class="portfolio-item-overlay">'; echo '<div class="portfolio-item-overlay-inner">'; echo '<span class="portfolio-item-overlay-icon glyphicon glyphicon-picture"></span>'; echo '</div>'; echo '</div>'; } else { echo '<a href="' . $saved_image . '" data-type="image" data-lightbox="image" class="portfolio-item-link hoverLink"></a>'; echo '<img class="kl-ptf-catlist-img" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="' . $saved_alt . '" ' . $saved_title . ' />'; echo '<div class="portfolio-item-overlay">'; echo '<div class="portfolio-item-overlay-inner">'; echo '<span class="portfolio-item-overlay-icon glyphicon glyphicon-picture"></span>'; echo '</div>'; echo '</div>';
function zn_get_content_class($type, $sidebar_pos = false) { if (!$sidebar_pos) { $sidebar_pos = get_post_meta(zn_get_the_id(), 'zn_page_sidebar_layout', true); } if ($sidebar_pos == 'default' || !$sidebar_pos) { $sidebar_data = zget_option($type, 'unlimited_sidebars', false, array('layout' => 'sidebar_right', 'sidebar' => 'default_sidebar')); $sidebar_pos = $sidebar_data['layout']; } if ($sidebar_pos != 'no_sidebar') { $sidebar_pos .= ' col-md-9 '; } else { $sidebar_pos = 'col-md-12'; } return $sidebar_pos; }
/** * This method is used to display the output of the element. * @return void */ function element() { $options = $this->data['options']; if (empty($options['testimonials_single'])) { return; } $elm_classes = array(); $elm_classes[] = $this->data['uid']; $elm_classes[] = $this->opt('css_class', ''); $color_scheme = $this->opt('element_scheme', '') == '' ? zget_option('zn_main_style', 'color_options', false, 'light') : $this->opt('element_scheme', ''); $elm_classes[] = 'tstfd--' . $color_scheme; $elm_classes[] = 'element-scheme--' . $color_scheme; $title_content = false; echo '<div class="row elm-testimonial-fader tst-fader ' . implode(' ', $elm_classes) . '">'; if (!empty($options['tf_title']) || !empty($options['tf_desc'])) { echo '<div class="col-sm-3">'; echo '<div class="testimonials_fader tst-fader-wrapper">'; if (!empty($options['tf_title'])) { echo '<h3 class="m_title m_title_ext text-custom tst-fader-title">' . $options['tf_title'] . '</h3>'; } if (!empty($options['tf_desc'])) { echo '<div class="tst-fader-desc">' . $options['tf_desc'] . '</div>'; } $show_controls = $this->opt('tf_controls', ''); if ($show_controls == '1') { echo '<div class="controls tst-fader-controls">'; echo '<a href="#" class="prev tst-fader-controls-arr"><span class="glyphicon glyphicon-chevron-left"></span></a>'; echo '<a href="#" class="next tst-fader-controls-arr"><span class="glyphicon glyphicon-chevron-right"></span></a>'; echo '</div>'; } echo '</div>'; echo '</div>'; $title_content = true; } // end if echo '<div class="col-sm-' . ($title_content ? 9 : 12) . '">'; // Speed $speed = 5000; if (!empty($options['tf_speed'])) { $speed = intval($options['tf_speed']); } echo '<ul class="fixclear testimonials_fader_trigger tst-fader-list ' . ($title_content ? 'has-left-border' : '') . '" data-speed="' . $speed . '" data-autoplay="' . $this->opt('tf_autoplay', 1) . '">'; foreach ($options['testimonials_single'] as $test) { echo '<li class="tst-fader-item">'; echo '<blockquote class="tst-fader-bqt">' . do_shortcode($test['tf_single_test']) . '</blockquote>'; echo '<div class="testimonial-author tst-fader-author clearfix">'; if (isset($test['tf_author_photo']) && !empty($test['tf_author_photo'])) { echo '<div class="testimonial-author--photo tst-fader-photo">'; $image = vt_resize('', $test['tf_author_photo'], '30', '30', true); echo '<img class="tst-fader-img" src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="">'; echo '</div>'; } echo '<h6 class="tst-fader-author-title">' . $test['tf_single_author'] . '</h6>'; echo '</div>'; echo '</li>'; } echo '</ul>'; echo '</div>'; echo '</div>'; // end .row }
<h2><?php _e('is loading...', 'zn_framework'); ?> </h2> </div> <?php } ?> <div id="page"> <!--Header--> <div class="header_spacing"></div> <header id="header" class="<?php echo zget_option('menu_style', 'general_options') . ' ' . $menu_style_color; ?> "> <div class="container clearfix"> <?php $logoString = zn_logo(); echo $logoString; ?> <div class="menu animate"> <?php echo "<h2" . substr($logoString, 3, strlen($logoString) - 6) . "h2>"; ?> <span class="zn_icon icon_close" id="menuClose"></span>