function widget($args, $instance) { extract($args); $title = empty($instance['title']) ? '' : strip_tags($instance['title']); echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } if (dt_theme_option('general', 'show-sociables')) { ?> <ul class="dt-sc-social-icons"><?php $socials = dt_theme_option('social'); if ($socials != null) { foreach ($socials as $social) { $link = esc_url($social['link']); $icon = esc_attr($social['icon']); echo "<li class='" . substr($icon, 3) . "'>"; echo "<a class='fa {$icon}' href='{$link}'></a>"; echo "</li>"; } } else { echo "<div class='error message'><span class='icon'></span>" . __('Please add social icons in general settings.', 'iamd_text_domain') . "</div>"; } ?> </ul><?php } else { echo "<div class='error message'><span class='icon'></span>" . __('Please enable social icons in general settings.', 'iamd_text_domain') . "</div>"; } echo $after_widget; }
$v = dt_theme_option('woo', "product-tag-layout"); $v = !empty($v) ? $v : "content-full-width"; foreach ($layout as $key => $value) { $class = $key == $v ? " class='selected' " : ""; echo "<li><a href='#' rel='{$key}' {$class}><img src='" . IAMD_FW_URL . "theme_options/images/columns/{$value}.png' /></a></li>"; } ?> </ul> <input name="mytheme[woo][product-tag-layout]" type="hidden" value="<?php echo $v; ?> "/> </div><!-- Product Detail Page Layout End--> <?php $sb_layout = dt_theme_option('woo', "product-tag-layout"); $sidebar_both = $sidebar_left = $sidebar_right = ''; if ($sb_layout == 'content-full-width') { $sidebar_both = 'style="display:none;"'; } elseif ($sb_layout == 'with-left-sidebar') { $sidebar_right = 'style="display:none;"'; } elseif ($sb_layout == 'with-right-sidebar') { $sidebar_left = 'style="display:none;"'; } ?> <div id="bpanel-widget-area-options" <?php echo 'class="woocommerce-product-tag" ' . $sidebar_both; ?> > <div id="left-sidebar-container" class="bpanel-page-left-sidebar" <?php
<?php checked(dt_theme_option('pagebuilder', $post_type_key), $post_type_key); ?> /> </div> <?php } ?> <div class="hr"></div> </div><!-- .bpanel-option-set --> <div class="bpanel-option-set"> <?php $checked = true == dt_theme_option('pagebuilder', 'enable-pagebuilder') ? ' checked="checked"' : ''; $pb_switchclass = true == dt_theme_option('pagebuilder', 'enable-pagebuilder') ? 'checkbox-switch-on' : 'checkbox-switch-off'; ?> <h6><?php _e('Keep page builder active in above selected post types', 'iamd_text_domain'); ?> </h6> <div data-for="mytheme-enable-pagebuilder" class="checkbox-switch <?php echo $pb_switchclass; ?> "></div> <input class="hidden" id="mytheme-enable-pagebuilder" name="mytheme[pagebuilder][enable-pagebuilder]" type="checkbox" value="true" <?php $checked; ?> /> <div class="hr"></div>
while ($the_query->have_posts()) { $the_query->the_post(); $temp_class = ""; if ($i == 1) { $temp_class = $article_class . " first"; } else { $temp_class = $article_class; } if ($i == $column) { $i = 1; } else { $i = $i + 1; } $format = get_post_format(); $format = !empty($format) ? $format : 'standard'; $pholder = dt_theme_option('general', 'enable-placeholder-images'); ?> <div class="<?php echo esc_attr($temp_class); ?> "> <article id="post-<?php the_ID(); ?> " <?php post_class('blog-entry'); ?> > <div class="blog-entry-inner"> <div class="entry-title">
?> <div style="background-repeat:no-repeat;background-position:left top;" class="fullwidth-section"> <div class="container"><?php edit_post_link(__('Edit', 'iamd_text_domain'), '<span class="edit-link">', '</span>'); echo '<div class="social-bookmark">'; show_fblike('page'); show_googleplus('page'); show_twitter('page'); show_stumbleupon('page'); show_linkedin('page'); show_delicious('page'); show_pintrest('page'); show_digg('page'); echo '</div>'; dt_theme_social_bookmarks('sb-page'); if (dt_theme_option('integration', 'enable-single-page-bottom-code') != '') { echo wp_kses(stripslashes(dt_theme_option('integration', 'single-page-bottom-code')), $dt_allowed_html_tags); } if (dt_theme_option('general', 'disable-page-comment') != true && isset($meta_set['comment']) != "") { comments_template('', true); } ?> </div> </div> </article> </section> </div> </div><?php } get_footer();
function dt_theme_breadcrumb() { $delimiter = ""; if (dt_theme_option('general', 'breadcrumb-delimiter') == 'default') { $delimiter = 'class="' . dt_theme_option('general', 'breadcrumb-delimiter') . '"'; } else { $delimiter = 'class="fa ' . dt_theme_option('general', 'breadcrumb-delimiter') . '"'; } $this->options = array('before' => "<span {$delimiter} > ", 'after' => ' </span>'); $markup = $this->options['before'] . $this->options['after']; global $post; echo '<div class="breadcrumb"><a href="' . home_url() . '">' . __('Home', 'iamd_text_domain') . '</a>'; if (!is_front_page() && !is_home()) { echo $markup; } $output = $this->simple_breadcrumb_case($post); if (is_page() || is_single() && !is_singular('tribe_events')) { echo "<h4>"; the_title(); echo "</h4>"; } else { if (in_array('events-single', get_body_class())) { echo '<h4>' . single_post_title() . '</h4>'; } else { if ($output != NULL) { echo "<h4>" . $output . "</h4>"; } else { $title = get_option('page_for_posts') > 0 ? get_the_title(get_option('page_for_posts')) : NULL; echo $markup; echo "<h4>" . $title . "</h4>"; } } } echo "</div>"; }
function widget($args, $instance) { extract($args); echo $before_widget; $title = empty($instance['title']) ? '' : strip_tags($instance['title']); $title = apply_filters('widget_title', $title); $list_id = $instance['list_id']; if (!empty($title)) { echo $before_title . $title . $after_title; } if (isset($_REQUEST['mythem_mc_emailid'])) { require_once IAMD_FW . "theme_widgets/mailchimp/MCAPI.class.php"; $mcapi = new MCAPI(dt_theme_option('general', 'mailchimp-key')); $merge_vars = array('EMAIL' => $_REQUEST['mythem_mc_emailid']); $list_id = $instance['list_id']; if ($mcapi->listSubscribe($list_id, $_REQUEST['mythem_mc_emailid'], $merge_vars)) { // It worked! $msg = '<span style="color:green;">' . __('Success! Check your inbox or spam folder for a message containing a confirmation link.', 'iamd_text_domain') . '</span>'; } else { // An error ocurred, return error message $msg = '<span style="color:red;"><b>' . __('Error:', 'iamd_text_domain') . '</b> ' . $mcapi->errorMessage . '</span>'; } } echo '<p>' . __('Subscribe to your newsletter for latest offers and discounts. We will not spam you.', 'iamd_text_domain') . '</p>'; echo '<form name="frmsubscribe" method="post" class="subscribe-frm">'; echo '<input type="email" name="mythem_mc_emailid" required="" placeholder="' . __('Enter Email', 'iamd_text_domain') . '" />'; echo "<input type='hidden' name='mythem_mc_listid' value='{$list_id}' />"; echo '<input type="submit" name="submit" class="dt-sc-button small" value="' . __('Subscribe', 'iamd_text_domain') . '" />'; echo '</form>'; if (isset($msg)) { echo '<span class="zn_mailchimp_result">' . $msg . '</span>'; } echo $after_widget; }
<p class="note"><?php _e('Please set default currency symbol which will be used in front end display', 'iamd_text_domain'); ?> </p> </div> <div class="hr_invisible"> </div> <div class="column one-third"><label><?php _e('Currency', 'iamd_text_domain'); ?> </label></div> <div class="column two-third last"> <?php $currency_options = array('ADF', 'ADP', 'AED', 'AFA', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'AON', 'ARS', 'ATS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BEF', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CAD', 'CDF', 'CFP', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CSK', 'CUC', 'CUP', 'CVE', 'CYP', 'CZK', 'DEM', 'DJF', 'DKK', 'DOP', 'DZD', 'ECS', 'EEK', 'EGP', 'ESP', 'ETB', 'EUR', 'FIM', 'FJD', 'FKP', 'FRF', 'GBP', 'GEL', 'GHC', 'GHS', 'GIP', 'GMD', 'GNF', 'GRD', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'IEP', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'ITL', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', 'LUF', 'LVL', 'LYD', 'MAD', 'MDL', 'MGF', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MTL', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZM', 'MZN', 'NAD', 'NGN', 'NIO', 'NLG', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PTE', 'PYG', 'QAR', 'ROL', 'RON', 'RSD', 'RUB', 'SAR', 'SBD', 'SCR', 'SDD', 'SDG', 'SDP', 'SEK', 'SGD', 'SHP', 'SIT', 'SKK', 'SLL', 'SOS', 'SRD', 'SRG', 'STD', 'SVC', 'SYP', 'SZL', 'THB', 'TMM', 'TND', 'TOP', 'TRL', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGS', 'USD', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'YUN', 'ZAR', 'ZMK', 'ZWD'); $currency_membership = dt_theme_option('general', 'currency-membership') != '' ? dt_theme_option('general', 'currency-membership') : 'USD'; ?> <select id="mytheme-currency-membership" name="mytheme[general][currency-membership]"><?php foreach ($currency_options as $value) { $selected = $value == $currency_membership ? ' selected="selected" ' : ''; echo "<option {$selected} value='{$value}'>{$value}</option>"; } ?> </select> <p class="note"><?php _e('Please select your curreny symbol which will be used in s2member for payment.', 'iamd_text_domain'); ?> </p> </div> </div>
function dt_woocommerce_output_upsells() { $page_layout = dt_theme_option('woo', "product-layout"); $page_layout = !empty($page_layout) ? $page_layout : "content-full-width"; $upsell_products = $page_layout === "content-full-width" ? 4 : 3; $output = ""; ob_start(); woocommerce_upsell_display($upsell_products, $upsell_products); // X products, X columns $content = ob_get_clean(); if ($content) { $content = str_replace('<h2>', '<h2 class="border-title"><span>', $content); $output .= "<div class='upsell-products-container'>{$content}</div>"; } echo $output; }
echo $switchclass; ?> "></div> <input id="<?php echo "sb-gallery-" . $social_bookmark['id']; ?> " type="checkbox" value="<?php echo $social_bookmark['id']; ?> " name="mytheme[integration][<?php echo "sb-gallery-" . $social_bookmark['id']; ?> ]" <?php checked($social_bookmark['id'], dt_theme_option('integration', "sb-gallery-" . $social_bookmark['id'])); ?> class="hidden"/> </div> </div> <?php $count++; } ?> </div> </div><!-- Social Bookmark module end--> </div> </div><!-- .bpanel-main-content end--> </div><!-- #integration end-->
<?php get_header(); #Getting meta values... $page_layout = dt_theme_option('events', 'tt-event-detail-layout'); get_template_part('includes/breadcrumb_section'); ?> <div id="main"> <!-- main-content starts here --> <div id="main-content"> <div class="container"> <div class="dt-sc-hr-invisible"></div> <div class="dt-sc-hr-invisible"></div> <?php if ($page_layout == 'with-left-sidebar') { ?> <section class="secondary-sidebar secondary-has-left-sidebar" id="secondary-left"><?php get_sidebar('left'); ?> </section> <?php } elseif ($page_layout == 'with-both-sidebar') { ?> <section class="secondary-sidebar secondary-has-both-sidebar" id="secondary-left"><?php get_sidebar('left'); ?> </section> <?php }
</div> <div class="copyright"> <div class="container"><?php #Footer Menu... wp_nav_menu(array('theme_location' => 'secondary-menu', 'container' => false, 'menu_class' => 'footer-links', 'fallback_cb' => 'dt_theme_footer_navigation')); ?> <?php if (dt_theme_option('general', 'show-copyrighttext') != '') { ?> <p><?php echo wp_kses(stripslashes(dt_theme_option('general', 'copyright-text')), $dt_allowed_html_tags); ?> </p> <?php } ?> </div> </div> </footer><!-- footer ends here --> </div><!-- **Inner Wrapper - End** --> </div><!-- **Wrapper - End** --> <?php if (dt_theme_option('integration', 'enable-body-code') != '') { echo '<script type="text/javascript">' . wp_kses(stripslashes(dt_theme_option('integration', 'body-code')), $dt_allowed_html_tags) . '</script>'; } wp_footer(); ?> </body> </html>
function dt_theme_custom_widgetarea_list($id, $selected = "", $class = "mytheme_select") { $name = explode(",", $id); if (count($name) > 1) { $name = "[{$name[0]}][{$name[1]}]"; } else { $name = "[{$name[0]}]"; } $name = $class == "multidropdown" ? "mytheme{$name}[]" : "mytheme{$name}"; $widgets = dt_theme_option('widgetarea', 'custom'); $widgets = is_array($widgets) ? array_unique($widgets) : array(); $widgets = array_filter($widgets); $output = "<select name='{$name}' class='{$class}'>"; $output .= "<option value=''>" . __('Select Widget Area', 'iamd_text_domain') . "</option>"; foreach ($widgets as $widget) { $id = mb_convert_case($widget, MB_CASE_LOWER, "UTF-8"); $id = str_replace(" ", "-", $id); $output .= "<option value='{$id}' " . selected($selected, $id, false) . ">{$widget}</option>"; } $output .= "</select>\n"; return $output; }
function dt_theme_enqueue_styles() { $dt_theme_options = get_option(IAMD_THEME_SETTINGS); $dt_theme_general = $dt_theme_options['general']; $template_uri = get_template_directory_uri(); if (isset($dt_theme_general['enable-favicon'])) { $url = !empty($dt_theme_general['favicon-url']) ? $dt_theme_general['favicon-url'] : $template_uri . "/images/favicon.png"; echo "<link href='{$url}' rel='shortcut icon' type='image/x-icon' />\n"; $phone_url = !empty($dt_theme_general['apple-favicon']) ? $dt_theme_general['apple-favicon'] : $template_uri . "/images/apple-touch-icon.png"; echo "<link href='{$phone_url}' rel='apple-touch-icon-precomposed'/>\n"; $phone_retina_url = !empty($dt_theme_general['apple-retina-favicon']) ? $dt_theme_general['apple-retina-favicon'] : $template_uri . "/images/apple-touch-icon-114x114.png"; echo "<link href='{$phone_retina_url}' sizes='114x114' rel='apple-touch-icon-precomposed'/>\n"; $ipad_url = !empty($dt_theme_general['apple-ipad-favicon']) ? $dt_theme_general['apple-ipad-favicon'] : $template_uri . "/images/apple-touch-icon-72x72.png"; echo "<link href='{$ipad_url}' sizes='72x72' rel='apple-touch-icon-precomposed'/>\n"; $ipad_retina_url = !empty($dt_theme_general['apple-ipad-retina-favicon']) ? $dt_theme_general['apple-ipad-retina-favicon'] : $template_uri . "/images/apple-touch-icon-144x144.png"; echo "<link href='{$ipad_retina_url}' sizes='144x144' rel='apple-touch-icon-precomposed'/>\n"; } if (dt_theme_is_plugin_active('timetable/timetable.php')) { wp_dequeue_style(array('timetable_sf_style', 'timetable_style', 'timetable_event_template', 'timetable_responsive_style', 'timetable_font_lato')); wp_register_style('tt-sf-style', $template_uri . '/css/timetable/superfish.css'); wp_register_style('tt-main-style', $template_uri . '/css/timetable/style.css'); wp_register_style('tt-template-style', $template_uri . '/css/timetable/event_template.css'); wp_register_style('tt-responsive-style', $template_uri . '/css/timetable/responsive.css'); wp_enqueue_style(array('tt-sf-style', 'tt-main-style', 'tt-template-style', 'tt-responsive-style')); } #Main Style... wp_enqueue_style('default', get_stylesheet_uri()); wp_enqueue_style("css-tooltips", $template_uri . "/css/tooltips.css"); #Dark Skin... if (dt_theme_option('appearance', 'dark-skin')) { wp_enqueue_style("light-dark", $template_uri . "/dark/dark-skin.css"); } #Skin... if ($theme = dt_theme_option('appearance', 'skin')) { wp_enqueue_style("skin", $template_uri . "/skins/{$theme}/style.css"); } else { wp_enqueue_style("skin", $template_uri . "/skins/blue/style.css"); } #Disable Slider for Mobile Devices... $dt_theme_mobile = !empty($dt_theme_options['mobile']) ? $dt_theme_options['mobile'] : ""; if (isset($dt_theme_mobile['is-slider-disabled'])) { $out = '<style type="text/css">'; $out .= '@media only screen and (max-width:320px), (max-width: 479px), (min-width: 480px) and (max-width: 767px), (min-width: 768px) and (max-width: 959px), (max-width:1200px) { #slider { display:none !important; } }'; $out .= '</style>'; echo $out; } #Loader Css... if (dt_theme_option('general', 'loading-bar') != "true") { wp_enqueue_style("pace-load", $template_uri . "/css/pace-theme-loading-bar.css"); } wp_enqueue_style('font-awesome', $template_uri . '/css/font-awesome.min.css'); wp_enqueue_style('fancybox', $template_uri . '/css/jquery.fancybox.css'); if (!is_singular('product')) { wp_enqueue_style('prettyphoto', $template_uri . '/css/prettyPhoto.css'); } #WooCommerce... if (dt_theme_is_plugin_active('woocommerce/woocommerce.php')) { wp_enqueue_style('woocommerce', $template_uri . '/framework/woocommerce/css/style.css'); } #RTL... if (is_rtl()) { wp_enqueue_style('rtl', $template_uri . '/rtl.css'); } #Media Styles... if (dt_theme_option('mobile', 'is-theme-responsive')) { wp_enqueue_style("responsive", $template_uri . "/css/responsive.css"); } #jQuery Scripts... wp_enqueue_script('modernizr-custom', $template_uri . '/framework/js/public/modernizr.custom.js', array('jquery')); wp_enqueue_script('jquery'); if (dt_theme_option('general', 'loading-bar') != "true") { wp_enqueue_script('jq.pacemin', $template_uri . '/framework/js/public/pace.min.js'); wp_localize_script('jq.pacemin', 'paceOptions', array('restartOnRequestAfter' => 'false', 'restartOnPushState' => 'false')); } }
$name = "mytheme[specialty][message-font-color]"; $value = dt_theme_option('specialty', 'message-font-color') != NULL ? dt_theme_option('specialty', 'message-font-color') : "#"; $tooltip = __("Pick a custom color for 404 message font color of the theme e.g. #a314a3", 'iamd_text_domain'); ?> <h6> <?php echo $label; ?> </h6> <?php dt_theme_admin_color_picker("", $name, $value, ''); ?> </div><!-- Font Color Section --> <div class="column one-half last"> <?php dt_theme_admin_jqueryuislider(__('Message Font Size', 'iamd_text_domain'), "mytheme[specialty][message-font-size]", dt_theme_option('specialty', "message-font-size")); ?> </div> </div> <?php } ?> <!-- 404 Content End--> </div><!-- .bpanel-box end --> </div><!-- .tab-content end --> <?php } ?> </div>
echo $switchclass; ?> "></div> <input class="hidden" id="mytheme-show-copyrighttext" name="mytheme[general][show-copyrighttext]" type="checkbox" <?php checked(dt_theme_option('general', 'show-copyrighttext'), 'on'); ?> /> <div class="hr_invisible"></div> <h6><?php _e('Copyright Text', 'iamd_text_domain'); ?> </h6> <textarea id="mytheme-copyright-text" name="mytheme[general][copyright-text]" rows="" cols="" style="height:90px;"><?php echo htmlspecialchars(stripslashes(dt_theme_option('general', 'copyright-text'))); ?> </textarea> <p class="note"> <?php _e('You can paste your copyright text in this box. This will be automatically added to the footer.', 'iamd_text_domain'); ?> </p> </div><!-- .bpanel-option-set --> </div><!-- .box-content --> </div><!-- .bpanel-box end --> </div><!--#my-footer end--> </div><!-- .bpanel-main-content end--> </div><!-- #general end-->
<?php get_header(); #Getting meta values... $page_layout = dt_theme_option('specialty', 'search-layout'); ?> <div class="breadcrumb-wrapper"> <div class="container"> <h1><?php printf(__('Search Results for : %s', 'iamd_text_domain'), get_search_query()); ?> </h1> <?php new dt_theme_breadcrumb(); ?> </div> </div> <div id="main"> <!-- main-content starts here --> <div id="main-content"> <div class="container"> <div class="dt-sc-hr-invisible"></div> <div class="dt-sc-hr-invisible"></div> <?php if ($page_layout == 'with-left-sidebar') { ?> <section class="secondary-sidebar secondary-has-left-sidebar" id="secondary-left"><?php get_sidebar('left');
echo esc_attr('notop'); } ?> "> <div class="container"> <h1><?php global $wp_query; if (in_array('events-archive', get_body_class())) { echo __('Events', 'iamd_text_domain'); } elseif (in_array('events-single', get_body_class())) { echo single_post_title(); } ?> </h1><?php #Check Breadcrump Enable... if (dt_theme_option('general', 'disable-breadcrumb') != "on") { new dt_theme_breadcrumb(); } ?> </div> </div><?php } ?> <div id="main"> <!-- main-content starts here --> <div id="main-content"> <div class="container"> <div class="dt-sc-hr-invisible"></div> <div class="dt-sc-hr-invisible"></div>
_e('Widget Areas For Mega Menu', 'iamd_text_domain'); ?> </h3></div> <div class="box-content"> <p class="note"><?php _e("You can create widget areas here, and assign them in mega menu", 'iamd_text_domain'); ?> </p> <div class="bpanel-option-set"> <input type="button" data-for="megamenu" value="<?php _e('Add New Widget Area', 'iamd_text_domain'); ?> " class="black mytheme_add_widgetarea" /> <div class="hr_invisible"></div><?php $widgets = dt_theme_option('widgetarea', 'megamenu'); $widgets = is_array($widgets) ? array_unique($widgets) : array(); $widgets = array_filter($widgets); ?> </div> <div class="bpanel-option-set"> <ul class="added-menu"><?php foreach ($widgets as $k => $v) { ?> <li> <div class="item-bar"> <span class="item-title"><?php _e('Widget Area:', 'iamd_text_domain'); echo " {$v}"; ?> </span>
/** dt_theme_options_page() * Objective: * To create thme option page at back end. **/ function dt_theme_options_page() { ?> <!-- wrapper --> <div id="wrapper"> <!-- Result --> <div id="bpanel-message" style="display:none;"></div> <div id="ajax-feedback" style="display:none;"><img src="<?php echo IAMD_FW_URL . 'theme_options/images/loading.png'; ?> " alt="" title=""/> </div> <!-- Result --> <!-- panel-wrap --> <div id="panel-wrap"> <!-- bpanel-wrapper --> <div id="bpanel-wrapper"> <!-- bpanel --> <div id="bpanel"> <!-- bpanel-left --> <div id="bpanel-left"> <div id="logo"> <?php $logo = IAMD_FW_URL . 'theme_options/images/logo.png'; $advance = dt_theme_option('advance'); if (isset($advance['buddhapanel-logo-url']) && isset($advance['enable-buddhapanel-logo-url'])) { $logo = $advance['buddhapanel-logo-url']; } ?> <img src="<?php echo $logo; ?> " width="186" height="101" alt="" title="" /> </div> <?php $status = dt_theme_is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php') || dt_theme_is_plugin_active('wordpress-seo/wp-seo.php'); $tabs = NULL; if (!$status) { $tabs = array(array('id' => 'general', 'name' => __('General', 'iamd_text_domain')), array('id' => 'appearance', 'name' => __('Appearance', 'iamd_text_domain')), array('id' => 'skin', 'name' => __('Skins', 'iamd_text_domain')), array('id' => 'integration', 'name' => __('Integration', 'iamd_text_domain')), array('id' => 'seo', 'name' => __('SEO', 'iamd_text_domain')), array('id' => 'specialty-pages', 'name' => __('Speciality Pages', 'iamd_text_domain')), array('id' => 'theme-footer', 'name' => __('Footer', 'iamd_text_domain')), array('id' => 'widgetarea', 'name' => __('Widget Area', 'iamd_text_domain')), array('id' => 'woocommerce', 'name' => __('WooCommerce', 'iamd_text_domain')), array('id' => 'pagebuilder', 'name' => __('Page Builder', 'iamd_text_domain')), array('id' => 'events', 'name' => __('Events', 'iamd_text_domain')), array('id' => 'mobile', 'name' => __('Responsive & Mobile', 'iamd_text_domain')), array('id' => 'branding', 'name' => __('Branding', 'iamd_text_domain')), array('id' => 'backup', 'name' => __('Backup', 'iamd_text_domain'))); } else { $tabs = array(array('id' => 'general', 'name' => __('General', 'iamd_text_domain')), array('id' => 'appearance', 'name' => __('Appearance', 'iamd_text_domain')), array('id' => 'skin', 'name' => __('Skins', 'iamd_text_domain')), array('id' => 'integration', 'name' => __('Integration', 'iamd_text_domain')), array('id' => 'specialty-pages', 'name' => __('Speciality Pages', 'iamd_text_domain')), array('id' => 'theme-footer', 'name' => __('Footer', 'iamd_text_domain')), array('id' => 'widgetarea', 'name' => __('Widget Area', 'iamd_text_domain')), array('id' => 'woocommerce', 'name' => __('WooCommerce', 'iamd_text_domain')), array('id' => 'pagebuilder', 'name' => __('Page Builder', 'iamd_text_domain')), array('id' => 'events', 'name' => __('Events', 'iamd_text_domain')), array('id' => 'mobile', 'name' => __('Responsive & Mobile', 'iamd_text_domain')), array('id' => 'branding', 'name' => __('Branding', 'iamd_text_domain')), array('id' => 'backup', 'name' => __('Backup', 'iamd_text_domain'))); } $output = "<!-- bpanel-mainmenu -->\n\t\t\t\t\t\t<ul id='bpanel-mainmenu'>\n"; foreach ($tabs as $tab) { $output .= "\t\t\t\t\t\t\t\t<li><a href='#{$tab['id']}' title='{$tab['name']}'><span class='{$tab['id']}'></span>{$tab['name']}</a></li>\n"; } $output .= "\t\t\t\t\t\t</ul><!-- #bpanel-mainmenu -->\n"; echo $output; ?> </div><!-- #bpanel-left end--> <form id="mytheme_options_form" name="mytheme_options_form" method="post" action="options.php"> <?php settings_fields(IAMD_THEME_SETTINGS); ?> <input type="hidden" id="mytheme-full-submit" name="mytheme-full-submit" value="0" /> <input type="hidden" name="dt_theme_admin_wpnonce" value="<?php echo wp_create_nonce(IAMD_THEME_SETTINGS . '_wpnonce'); ?> " /> <div class="top-links"> <?php $import_disable = dt_theme_option('general', 'disable-import') == "on" ? "import-disabled" : ""; ?> <a class="mytheme-import-button bpanel-button blue-btn <?php echo $import_disable; ?> "><?php _e('Import Dummy Data', 'iamd_text_domain'); ?> </a> </div> <?php $template_uri = get_template_directory() . '/framework'; ?> <?php require_once $template_uri . '/theme_options/general.php'; ?> <?php require_once $template_uri . '/theme_options/appearance.php'; ?> <?php require_once $template_uri . '/theme_options/integration.php'; ?> <?php require_once $template_uri . '/theme_options/specialty-pages.php'; ?> <?php require_once $template_uri . '/theme_options/footer.php'; ?> <?php require_once $template_uri . '/theme_options/widgetarea.php'; ?> <?php require_once $template_uri . '/theme_options/woocommerce.php'; ?> <?php require_once $template_uri . '/theme_options/pagebuilder.php'; ?> <?php require_once $template_uri . '/theme_options/events.php'; ?> <?php require_once $template_uri . '/theme_options/responsive.php'; ?> <?php require_once $template_uri . '/theme_options/branding.php'; ?> <?php require_once $template_uri . '/theme_options/skins.php'; ?> <?php $status = dt_theme_is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php') || dt_theme_is_plugin_active('wordpress-seo/wp-seo.php'); if (!$status) { require_once $template_uri . '/theme_options/seo.php'; } ?> <?php require_once $template_uri . '/theme_options/backup.php'; ?> <!-- #bpanel-bottom --> <div id="bpanel-bottom"> <input type="submit" value="<?php _e('Reset All', 'iamd_text_domain'); ?> " class="save-reset mytheme-reset-button bpanel-button white-btn" name="mytheme[reset]" /> <input type="submit" value="<?php _e('Save All', 'iamd_text_domain'); ?> " name="submit" class="save-reset mytheme-footer-submit bpanel-button white-btn" /> </div><!-- #bpanel-bottom end--> </form> </div><!-- #bpanel --> </div><!-- #bpanel-wrapper --> </div><!-- #panel-wrap end --> </div><!-- #wrapper end--> <?php }
$v = dt_theme_option('events', "tt-event-detail-layout"); $v = !empty($v) ? $v : "content-full-width"; foreach ($layout as $key => $value) { $class = $key == $v ? " class='selected' " : ""; echo "<li><a href='#' rel='{$key}' {$class}><img src='" . IAMD_FW_URL . "theme_options/images/columns/{$value}.png' /></a></li>"; } ?> </ul> <input name="mytheme[events][tt-event-detail-layout]" type="hidden" value="<?php echo $v; ?> "/> </div><!-- TT Event Detail Page Layout End--> <?php $sb_layout = dt_theme_option('events', "tt-event-detail-layout"); $sidebar_both = $sidebar_left = $detail = ''; if ($sb_layout == 'content-full-width') { $sidebar_both = 'style="display:none;"'; } elseif ($sb_layout == 'with-left-sidebar') { $sidebar_right = 'style="display:none;"'; } elseif ($sb_layout == 'with-right-sidebar') { $sidebar_left = 'style="display:none;"'; } ?> <div id="bpanel-widget-area-options" <?php echo 'class="event-detail-layout" ' . $sidebar_both; ?> > <div id="left-sidebar-container" class="bpanel-page-left-sidebar" <?php
$disable = dt_theme_option('specialty', "disable-everywhere-right-sidebar-for-post-archives"); if (is_null($disable)) { if (function_exists('dynamic_sidebar') && dynamic_sidebar('display-everywhere-sidebar-right')) { } } } elseif (is_search()) { if (function_exists('dynamic_sidebar') && dynamic_sidebar('search-sidebar-right')) { } $disable = dt_theme_option('specialty', "disable-everywhere-right-sidebar-for-search"); if (is_null($disable)) { if (function_exists('dynamic_sidebar') && dynamic_sidebar('display-everywhere-sidebar-right')) { } } } elseif (is_404()) { if (function_exists('dynamic_sidebar') && dynamic_sidebar('not-found-404-sidebar-right')) { } $disable = dt_theme_option('specialty', "disable-everywhere-right-sidebar-for-not-found-404"); if (is_null($disable)) { if (function_exists('dynamic_sidebar') && dynamic_sidebar('display-everywhere-sidebar-right')) { } } } elseif (is_singular('events')) { $disable = dt_theme_option('events', "disable-tt-event-right-sidebar-for-event-detail-layout"); if (is_null($disable)) { if (function_exists('dynamic_sidebar') && dynamic_sidebar('tt-event-sidebar-right')) { } } } else { if (function_exists('dynamic_sidebar') && dynamic_sidebar('display-everywhere-sidebar-right')) { } }
function dt_theme_backup_and_restore_action() { $save_type = $_POST['type']; if ($save_type == 'backup_options') { $data = array('general' => dt_theme_option('general'), 'appearance' => dt_theme_option('appearance'), 'integration' => dt_theme_option('integration'), 'seo' => dt_theme_option('seo'), 'specialty' => dt_theme_option('specialty'), 'widgetarea' => dt_theme_option("widgetarea"), 'mobile' => dt_theme_option('mobile'), 'advance' => dt_theme_option('advance'), 'bbar' => dt_theme_option('bbar'), 'backup' => date('r')); update_option("dt_theme_backup", $data); die('1'); } elseif ($save_type == 'restore_options') { $data = get_option("dt_theme_backup"); update_option(IAMD_THEME_SETTINGS, $data); die('1'); } elseif ($save_type == "import_options") { $data = $_POST['data']; $data = unserialize(base64_decode($data)); //100% safe - ignore theme check nag update_option(IAMD_THEME_SETTINGS, $data); die('1'); } elseif ($save_type == "reset_options") { delete_option(IAMD_THEME_SETTINGS); update_option(IAMD_THEME_SETTINGS, dt_theme_default_option()); # To set Default options die('1'); } }
<?php get_header(); #Getting meta values... $page_layout = dt_theme_option('specialty', 'post-archives-layout'); #Breadcrump section... if (!is_front_page() and !is_home()) { get_template_part('includes/breadcrumb_section'); } ?> <div id="main"> <!-- main-content starts here --> <div id="main-content"> <div class="container"> <div class="dt-sc-hr-invisible"></div> <div class="dt-sc-hr-invisible"></div> <?php if ($page_layout == 'with-left-sidebar') { ?> <section class="secondary-sidebar secondary-has-left-sidebar" id="secondary-left"><?php get_sidebar('left'); ?> </section> <?php } elseif ($page_layout == 'with-both-sidebar') { ?> <section class="secondary-sidebar secondary-has-both-sidebar" id="secondary-left"><?php get_sidebar('left'); ?>
</div> </div> <!-- Top bar ends here --> <?php } ?> <div id="logo"><?php if (dt_theme_option('general', 'logo')) { $template_uri = get_template_directory_uri(); $url = dt_theme_option('general', 'logo-url'); $url = !empty($url) ? $url : $template_uri . "/images/logo.png"; $retina_url = dt_theme_option('general', 'retina-logo-url'); $retina_url = !empty($retina_url) ? $retina_url : $template_uri . "/images/logo@2x.png"; $width = dt_theme_option('general', 'retina-logo-width'); $width = !empty($width) ? $width . "px;" : "187px"; $height = dt_theme_option('general', 'retina-logo-height'); $height = !empty($height) ? $height . "px;" : "49px"; ?> <a href="<?php echo esc_url(home_url()); ?> " title="<?php bloginfo('title'); ?> "> <img class="normal_logo" src="<?php echo esc_url($url); ?> " alt="<?php bloginfo('title'); ?>
</h6> <?php dt_theme_admin_color_picker("", $name, $value, ''); ?> <p class="note"><?php echo $tooltip; ?> </p> </div> <div class="column one-half last"> <?php $label = __("Sub-Footer Text Color", 'iamd_text_domain'); $name = "mytheme[appearance][styling-sub-footer-text-color]"; $value = dt_theme_option('appearance', 'styling-sub-footer-text-color') != NULL ? dt_theme_option('appearance', 'styling-sub-footer-text-color') : "#"; $tooltip = __("Pick a custom color for sub-footer text & links e.g. #564912", 'iamd_text_domain'); ?> <h6><?php echo $label; ?> </h6> <?php dt_theme_admin_color_picker("", $name, $value, ''); ?> <p class="note"><?php echo $tooltip; ?> </p> </div>
</div> <div class="box-title"><h3><?php _e('Transfer Theme Options Data', 'iamd_text_domain'); ?> </h3></div> <div class="box-content"> <div><?php _e("You can tranfer the saved options data between different installs by copying the text inside the text box. To import data from another install, replace the data in the text box with the one from another install and click 'Import Options'", 'iamd_text_domain'); ?> </div> <div class="clar"></div> <div class="hr_invisible"></div> <?php $data = array('onepage' => dt_theme_option('onepage'), 'general' => dt_theme_option('general'), 'appearance' => dt_theme_option('appearance'), 'integration' => dt_theme_option('integration'), 'seo' => dt_theme_option('seo'), 'specialty' => dt_theme_option('specialty'), 'widgetarea' => dt_theme_option("widgetarea"), 'mobile' => dt_theme_option('mobile'), 'advance' => dt_theme_option('advance'), 'bbar' => dt_theme_option('bbar')); ?> <textarea id="export_data" rows="13" cols="15"><?php echo base64_encode(serialize($data)); ?> </textarea> <div class="clear"></div> <div class="hr_invisible"></div> <a href="#" id="mytheme_import_button" class="bpanel-button black-btn" title="Restore Options"><?php _e('Import Options', 'iamd_text_domain'); ?> </a> </div> </div>
?> "> <div class="bpanel-option-set"> <label> <input id="mytheme[seo][<?php echo $option['id']; ?> ]" type="checkbox" name="mytheme[seo][<?php echo $option['id']; ?> ]" value="<?php echo $option['id']; ?> " <?php checked($option['id'], dt_theme_option('seo', $option['id'])); ?> /> <?php echo $option['label']; ?> </label> <p class="note"><?php echo $option["tooltip"]; ?> </p> </div> </div> <?php } ?> </div>
$slug = $wpdb->get_var($wpdb->prepare("SELECT slug FROM {$wpdb->terms} WHERE term_id = %s", $id)); register_sidebar(array('name' => "Product Category: {$title} - Left ", 'id' => "left-product-category-{$slug}-sidebar", 'description' => __("Individual product category sidebar that appears on the left.", "iamd_text_domain"), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<div class="widgettitle"><h3>', 'after_title' => '</h3></div>')); } #Custom Right Sidebars for Product Category $product_categories = dt_theme_option("widgetarea", "right-product-category"); $product_categories = !empty($product_categories) ? $product_categories : array(); $widget_areas_for_product_categories = array_filter(array_unique($product_categories)); foreach ($widget_areas_for_product_categories as $id) { $title = $wpdb->get_var($wpdb->prepare("SELECT name FROM {$wpdb->terms} WHERE term_id = %s", $id)); $slug = $wpdb->get_var($wpdb->prepare("SELECT slug FROM {$wpdb->terms} WHERE term_id = %s", $id)); register_sidebar(array('name' => "Product Category: {$title} - Right ", 'id' => "right-product-category-{$slug}-sidebar", 'description' => __("Individual product category sidebar that appears on the right.", "iamd_text_domain"), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<div class="widgettitle"><h3>', 'after_title' => '</h3></div>')); } #Custom Left Sidebars for Product Tag $product_tags = dt_theme_option("widgetarea", "left-product-tag"); $product_tags = !empty($product_tags) ? $product_tags : array(); $widget_areas_for_product_tags = array_filter(array_unique($product_tags)); foreach ($widget_areas_for_product_tags as $id) { $title = $wpdb->get_var($wpdb->prepare("SELECT name FROM {$wpdb->terms} WHERE term_id = %s", $id)); $slug = $wpdb->get_var($wpdb->prepare("SELECT slug FROM {$wpdb->terms} WHERE term_id = %s", $id)); register_sidebar(array('name' => "Product Tag: {$title} - Left", 'id' => "left-product-tag-{$slug}-sidebar", 'description' => __("Individual product tag sidebar that appears on the left.", "iamd_text_domain"), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<div class="widgettitle"><h3>', 'after_title' => '</h3></div>')); } #Custom Right Sidebars for Product Tag $product_tags = dt_theme_option("widgetarea", "right-product-tag"); $product_tags = !empty($product_tags) ? $product_tags : array(); $widget_areas_for_product_tags = array_filter(array_unique($product_tags)); foreach ($widget_areas_for_product_tags as $id) { $title = $wpdb->get_var($wpdb->prepare("SELECT name FROM {$wpdb->terms} WHERE term_id = %s", $id)); $slug = $wpdb->get_var($wpdb->prepare("SELECT slug FROM {$wpdb->terms} WHERE term_id = %s", $id)); register_sidebar(array('name' => "Product Tag: {$title} - Right", 'id' => "right-product-tag-{$slug}-sidebar", 'description' => __("Individual product tag sidebar that appears on the right.", "iamd_text_domain"), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<div class="widgettitle"><h3>', 'after_title' => '</h3></div>')); } }
</a></li> <?php } ?> </ul> <!--Skins Section --> <div id="appearance-skins" class="tab-content"> <div class="bpanel-box"> <div class="box-title"><h3><?php _e('Current Skin', 'iamd_text_domain'); ?> </h3></div> <div class="box-content"> <?php $theme = dt_theme_option('appearance', 'skin'); ?> <ul id="j-current-theme-container" class="skins-list" dummy-content="<?php echo $theme . '-dummy'; ?> "> <li data-attachment-theme="<?php echo $theme; ?> "> <img src="<?php echo IAMD_BASE_URL . "skins/{$theme}/screenshot.png"; ?> " alt='' width='250' height='180' /> <input type="hidden" name="mytheme[appearance][skin]" value="<?php echo $theme;