</h6> <?php mytheme_admin_color_picker('', $name, $value, ''); ?> <p class="note"><?php echo $tooltip; ?> </p> </div> <div class="column one-third last"> <?php $label = __("Link hover Color", 'dt_delicate'); $name = "mytheme[bbar][link-hover-color]"; $value = mytheme_option('bbar', 'link-hover-color') != NULL ? mytheme_option('bbar', 'link-hover-color') : "#"; $tooltip = __("Pick a custom hover state color for the links in buddha bar e.g. #564912 ", 'dt_delicate'); ?> <h6><?php echo $label; ?> </h6> <?php mytheme_admin_color_picker('', $name, $value, ''); ?> <p class="note"><?php echo $tooltip; ?> </p> </div>
<!-- **Header** --> <header id="header"> <!-- **Header Container** --> <div class="container"> <!-- **Logo - End** --> <div id="logo"> <?php if (mytheme_option('general', 'logo')) { $url = mytheme_option('general', 'logo-url'); $url = !empty($url) ? $url : IAMD_BASE_URL . "/images/logo.png"; ?> <a href="<?php echo home_url(); ?> " title="<?php echo mytheme_blog_title(); ?> "> <img src="<?php echo $url; ?> " alt="<?php echo mytheme_blog_title(); ?> " title="<?php echo mytheme_blog_title(); ?> " /> </a> <?php
<div class="bpanel-box"> <div class="box-title"> <h3><?php _e('Add new widget area for product', 'dt_delicate'); ?> </h3> </div> <!-- .box-content --> <div class="box-content"> <p class="note"><?php _e("Select a PRODUCT that should receive a new widget area:", 'dt_delicate'); ?> </p> <?php if (is_array(mytheme_option("widgetarea", "product-tag"))) { $products = array_unique(mytheme_option("widgetarea", "product-tag")); foreach ($products as $product) { echo "<!-- Product Drop Down Container -->"; echo "<div class='multidropdown'>"; echo mytheme_product_taxonomy_list("widgetarea,product-tag", $product, "multidropdown", "product_tag"); echo "</div><!-- Product Drop Down Container end-->"; } } else { echo "<!-- Product Drop Down Container -->"; echo "<div class='multidropdown'>"; echo mytheme_product_taxonomy_list("widgetarea,product-tag", "", "multidropdown", "product_tag"); echo "</div><!-- Product Drop Down Container end-->"; } ?> </div><!-- .box-content End--> </div><!-- .bpanel-box -->
?> "> <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'], mytheme_option('seo', $option['id'])); ?> /> <?php echo $option['label']; ?> </label> <p class="note"><?php echo $option["tooltip"]; ?> </p> </div> </div> <?php } ?> </div>
?> "></div> <input class="hidden" id="mytheme-show-copyrighttext" name="mytheme[general][show-copyrighttext]" type="checkbox" <?php checked(mytheme_option('general', 'show-copyrighttext'), 'on'); ?> /> <div class="hr_invisible"></div> <h6><?php _e('Copyright Text', 'dt_delicate'); ?> </h6> <textarea id="mytheme-copyright-text" name="mytheme[general][copyright-text]" rows="" cols=""><?php echo htmlspecialchars(stripslashes(mytheme_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.', 'dt_delicate'); ?> </p> </div><!-- .bpanel-option-set --> </div> <!-- .box-content --> </div><!-- .bpanel-box end --> </div><!--#my-footer end--> </div><!-- .bpanel-main-content end--> </div><!-- #general end-->
$photos = get_field('sidebar_photos'); ?> <?php if ($photos) { while (has_sub_field('sidebar_photos')) { ?> <img src="<?php the_sub_field('sidebar_photo'); ?> " alt=""> <?php } } ?> <?php $flickr = mytheme_option('flickr'); ?> <?php if ($flickr) { ?> <a href="<?php echo $flickr; ?> " class="btn">View more photos</a> <?php } ?> </div> </div> <?php if (!empty($section2_content) || !empty($section2_image)) {
function mytheme_backup_and_restore_action() { $save_type = $_POST['type']; if ($save_type == 'backup_options') { $data = array('general' => mytheme_option('general'), 'appearance' => mytheme_option('appearance'), 'integration' => mytheme_option('integration'), 'seo' => mytheme_option('seo'), 'specialty' => mytheme_option('specialty'), 'widgetarea' => mytheme_option("widgetarea"), 'mobile' => mytheme_option('mobile'), 'advance' => mytheme_option('advance'), 'bbar' => mytheme_option('bbar'), 'backup' => date('r')); update_option("mytheme_backup", $data); die('1'); } elseif ($save_type == 'restore_options') { $data = get_option("mytheme_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, mytheme_default_option()); # To set Default options die('1'); } }
<?php get_header(); $page_layout = mytheme_option('specialty', 'archives-layout'); $page_layout = !empty($page_layout) ? $page_layout : "content-full-width"; $post_layout = mytheme_option('specialty', 'archives-post-layout'); $post_layout = !empty($post_layout) ? $post_layout : "one-column"; $post_image = "blog-column"; $show_sidebar = false; $sidebar_class = ""; $post_class = ""; $last = NULL; #TO SET PAGE LAYOUT switch ($page_layout) { case 'with-left-sidebar': $page_class = $page_layout; $show_sidebar = true; $sidebar_class = "left-sidebar"; break; case 'with-right-sidebar': $show_sidebar = true; break; } #TO SET POST LAYOUT switch ($post_layout) { case 'one-column': $post_class = $show_sidebar ? " column one-column with-sidebar blog-fullwidth" : " column one-column blog-fullwidth"; $post_image = "blog-full-width"; break; case 'one-half-column': $post_class = $show_sidebar ? " column one-half with-sidebar" : " column one-half";
</div> <div class="box-title"><h3><?php _e('Transfer Theme Options Data', 'dt_delicate'); ?> </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'", 'dt_delicate'); ?> </div> <div class="clar"></div> <div class="hr_invisible"></div> <?php $data = array('onepage' => mytheme_option('onepage'), 'general' => mytheme_option('general'), 'appearance' => mytheme_option('appearance'), 'integration' => mytheme_option('integration'), 'seo' => mytheme_option('seo'), 'specialty' => mytheme_option('specialty'), 'widgetarea' => mytheme_option("widgetarea"), 'mobile' => mytheme_option('mobile'), 'advance' => mytheme_option('advance'), 'bbar' => mytheme_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', 'dt_delicate'); ?> </a> </div> </div>
echo $switchclass; ?> "></div> <input id="<?php echo "sb-portfolio-" . $social_bookmark['id']; ?> " type="checkbox" value="<?php echo $social_bookmark['id']; ?> " name="mytheme[integration][<?php echo "sb-portfolio-" . $social_bookmark['id']; ?> ]" <?php checked($social_bookmark['id'], mytheme_option('integration', "sb-portfolio-" . $social_bookmark['id'])); ?> class="hidden"/> </div> </div> <?php $count++; } ?> </div> </div><!-- Social Bookmark module end--> </div> </div><!-- .bpanel-main-content end--> </div><!-- #integration end-->
" class="black mytheme_add_item" /> <div class="column four-fifth last"> <p class="note"> <?php _e('Manage Social Network icons list to display', 'dt_delicate'); ?> </p> </div> <div class="hr_invisible"></div> </div> <div class="bpanel-option-set"> <ul class="menu-to-edit"> <?php $socials = mytheme_option('social'); if (is_array($socials)) { $keys = array_keys($socials); $i = 0; foreach ($socials as $s) { ?> <li id="<?php echo $keys[$i]; ?> "> <div class="item-bar"> <span class="item-title"><?php $n = $s['icon']; $n = explode('.', $n); $n = ucwords($n[count($n) - 2]); echo $n;
function dt_woocommerce_output_upsells() { $page_layout = mytheme_option('woo', "product-layout"); $page_layout = !empty($page_layout) ? $page_layout : "content-full-width"; $upsell_products = $page_layout === "content-full-width" ? 3 : 2; $output = ""; ob_start(); woocommerce_upsell_display($upsell_products, $upsell_products); // X products, X columns $content = ob_get_clean(); if ($content) { $content = str_replace('<h2>', '<div class="border-title"><h2>', $content); $content = str_replace('</h2>', '<span></span></h2></div>', $content); $output .= "<div class='upsell-products-container'>{$content}</div>"; } echo $output; }
<div class="box-content"> <!-- Product Detail Page Layout --> <h6><?php _e('Layout', 'dt_delicate'); ?> </h6> <p class="note no-margin"> <?php _e("Choose the Product tag page layout Style", "dt_delicate"); ?> </p> <div class="hr_invisible"> </div> <div class="bpanel-option-set"> <ul class="bpanel-layout-set"> <?php $layout = array('content-full-width' => 'without-sidebar', 'with-left-sidebar' => 'left-sidebar', 'with-right-sidebar' => 'right-sidebar'); $v = mytheme_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--> </div><!-- Product Tag Page --> <?php
<?php get_header(); $page_layout = mytheme_option('specialty', 'search-layout'); $page_layout = !empty($page_layout) ? $page_layout : "content-full-width"; $post_layout = mytheme_option('specialty', 'search-post-layout'); $post_layout = !empty($post_layout) ? $post_layout : "one-column"; $post_image = "blog-column"; $show_sidebar = false; $sidebar_class = ""; $post_class = ""; $last = NULL; #TO SET PAGE LAYOUT switch ($page_layout) { case 'with-left-sidebar': $page_class = $page_layout; $show_sidebar = true; $sidebar_class = "left-sidebar"; break; case 'with-right-sidebar': $show_sidebar = true; break; } #TO SET POST LAYOUT switch ($post_layout) { case 'one-column': $post_class = $show_sidebar ? " column one-column with-sidebar blog-fullwidth" : " column one-column blog-fullwidth"; $post_image = "blog-full-width"; break; case 'one-half-column': $post_class = $show_sidebar ? " column one-half with-sidebar" : " column one-half";
/** mytheme_options_page() * Objective: * To create thme option page at back end. **/ function mytheme_options_page() { ?> <!-- wrapper --> <div id="wrapper"> <!-- Result --> <div id="bpanel-message" style="display:none;"></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 = mytheme_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 = mytheme_is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php') || mytheme_is_plugin_active('wordpress-seo/wp-seo.php'); $tabs = NULL; if (!$status) { $tabs = array(array('id' => 'general', 'name' => __('General', 'dt_delicate')), array('id' => 'appearance', 'name' => __('Appearance', 'dt_delicate')), array('id' => 'skin', 'name' => __('Skins', 'dt_delicate')), array('id' => 'integration', 'name' => __('Integration', 'dt_delicate')), array('id' => 'seo', 'name' => __('SEO', 'dt_delicate')), array('id' => 'specialty-pages', 'name' => __('Speciality Pages', 'dt_delicate')), array('id' => 'theme-footer', 'name' => __('Footer', 'dt_delicate')), array('id' => 'widgetarea', 'name' => __('Widget Area', 'dt_delicate')), array('id' => 'woocommerce', 'name' => __('WooCommerce', 'dt_delicate')), array('id' => 'mobile', 'name' => __('Responsive & Mobile', 'dt_delicate')), array('id' => 'branding', 'name' => __('Branding', 'dt_delicate')), array('id' => 'bbar', 'name' => __('Buddha Bar', 'dt_delicate')), array('id' => 'backup', 'name' => __('Backup', 'dt_delicate'))); } else { $tabs = array(array('id' => 'general', 'name' => __('General', 'dt_delicate')), array('id' => 'appearance', 'name' => __('Appearance', 'dt_delicate')), array('id' => 'skin', 'name' => __('Skins', 'dt_delicate')), array('id' => 'integration', 'name' => __('Integration', 'dt_delicate')), array('id' => 'specialty-pages', 'name' => __('Speciality Pages', 'dt_delicate')), array('id' => 'theme-footer', 'name' => __('Footer', 'dt_delicate')), array('id' => 'widgetarea', 'name' => __('Widget Area', 'dt_delicate')), array('id' => 'woocommerce', 'name' => __('WooCommerce', 'dt_delicate')), array('id' => 'mobile', 'name' => __('Responsive & Mobile', 'dt_delicate')), array('id' => 'branding', 'name' => __('Branding', 'dt_delicate')), array('id' => 'bbar', 'name' => __('Buddha Bar', 'dt_delicate')), array('id' => 'backup', 'name' => __('Backup', 'dt_delicate'))); } $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="mytheme_admin_wpnonce" value="<?php echo wp_create_nonce(IAMD_THEME_SETTINGS . '_wpnonce'); ?> " /> <div class="top-links"> <?php $import_disable = mytheme_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', 'dt_delicate'); ?> </a> </div> <?php require_once TEMPLATEPATH . '/framework/theme_options/general.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/appearance.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/integration.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/specialty-pages.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/footer.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/widgetarea.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/woocommerce.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/responsive.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/branding.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/skins.php'; ?> <?php $status = mytheme_is_plugin_active('all-in-one-seo-pack/all_in_one_seo_pack.php') || mytheme_is_plugin_active('wordpress-seo/wp-seo.php'); if (!$status) { require_once TEMPLATEPATH . '/framework/theme_options/seo.php'; } ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/bbar.php'; ?> <?php require_once TEMPLATEPATH . '/framework/theme_options/backup.php'; ?> <!-- #bpanel-bottom --> <div id="bpanel-bottom"> <input type="submit" value="<?php _e('Reset All', 'dt_delicate'); ?> " class="save-reset mytheme-reset-button bpanel-button white-btn" name="mytheme[reset]" /> <input type="submit" value="<?php _e('Save All', 'dt_delicate'); ?> " 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 }
show_footer_widgetarea($mytheme_general['footer-columns']); ?> </div> <?php } if (!empty($mytheme_general['show-copyrighttext'])) { ?> <div class="copyright"> <div class="container"><?php echo stripslashes($mytheme_general['copyright-text']); ?> </div> </div> <?php } ?> </footer><!-- **Footer - End** --> </div><!-- **Wrapper - End** --> <?php if (is_singular() and comments_open()) { wp_enqueue_script('comment-reply'); } if (mytheme_option('integration', 'enable-body-code') != '') { echo stripslashes(mytheme_option('integration', 'body-code')); } wp_footer(); ?> </body> </html>
</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', 'dt_delicate'); ?> </h3></div> <div class="box-content"> <?php $theme = mytheme_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;
</div><!-- Header Wrapper --> <!-- **Main** --> <div id="main"> <?php if (is_page()) { global $post; mytheme_slider_section($post->ID); } elseif (is_post_type_archive('product')) { mytheme_slider_section(get_option('woocommerce_shop_page_id')); } ?> <?php $disable_breadcrumb = mytheme_option('general', 'disable-breadcrumb'); if (empty($disable_breadcrumb) and !is_front_page()) { if (!is_page_template('tpl-home.php')) { echo '<!-- **Breadcrumb** -->'; echo '<section class="breadcrumb-section">'; new my_breadcrumb(); echo '</section><!-- **Breadcrumb** -->'; } } if (is_page_template('tpl-contact.php')) { global $post; $tpl_default_settings = get_post_meta($post->ID, '_tpl_default_settings', TRUE); $tpl_default_settings = is_array($tpl_default_settings) ? $tpl_default_settings : array(); if (array_key_exists("full-width-section", $tpl_default_settings)) { echo '<div class="fullwidth-map">'; echo do_shortcode($tpl_default_settings['full-width-section']);
?> </p> </div> </div> <div class="one-half-content last"> <div class="bpanel-option-set"> <h6><?php _e('Disable Slider for Mobile Devices', 'dt_delicate'); ?> </h6> <?php $checked = "true" == mytheme_option('mobile', 'is-slider-disabled') ? ' checked="checked"' : ''; ?> <?php $switchclass = "true" == mytheme_option('mobile', 'is-slider-disabled') ? 'checkbox-switch-on' : 'checkbox-switch-off'; ?> <div data-for="is-slider-disabled" class="checkbox-switch <?php echo $switchclass; ?> "></div> <input class="hidden" id="is-slider-disabled" name="mytheme[mobile][is-slider-disabled]" type="checkbox" value="true" <?php echo $checked; ?> /> <p class="note"><?php _e('Choose whether you wish to hide / display the slider area of your website on mobile devices', 'dt_delicate'); ?> </p> </div> </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(mytheme_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.', THEMENAME) . '</span>'; } else { // An error ocurred, return error message $msg = '<span style="color:red;"><b>' . __('Error:', THEMENAME) . '</b> ' . $mcapi->errorMessage . '</span>'; } } echo '<form method="post">'; echo ' <p><input type="text" name="mythem_mc_emailid" value="" /></p>'; echo "\t<p><input type='hidden' name='mythem_mc_listid' value='{$list_id}' /></p>"; echo ' <p><input type="submit" name="submit" class="nl-submit" value="JOIN US" /></p>'; echo '</form>'; if (isset($msg)) { echo '<span class="zn_mailchimp_result">' . $msg . '</span>'; } echo $after_widget; }
function my_breadcrumb() { $delimiter = ' class = ' . mytheme_option('general', 'breadcrumb-delimiter'); $this->options = array('before' => "<span {$delimiter} > ", 'after' => ' </span>'); $markup = $this->options['before'] . $this->options['after']; global $post; echo '<div class="container"> <div class="breadcrumb"> <a href="' . home_url() . '">' . __('Home', 'dt_delicate') . '</a>'; if (!is_front_page() && !is_home()) { echo $markup; } $output = $this->simple_breadcrumb_case($post); if (is_page() || is_single()) { echo "<h1 class='adjust_breadcrumb'>"; the_title(); echo "</h1>"; } else { if ($output != NULL) { echo "<h1 class='adjust_breadcrumb'>" . $output . "</h1>"; } else { $title = get_option('page_for_posts') > 0 ? get_the_title(get_option('page_for_posts')) : NULL; echo $markup; echo "<h1 class='adjust_breadcrumb'>" . $title . "</h1>"; } } echo "</div>\n\t\t</div> <!-- ** container - End -->"; }
$name = "mytheme[specialty][message-font-color]"; $value = mytheme_option('specialty', 'message-font-color') != NULL ? mytheme_option('specialty', 'message-font-color') : "#"; $tooltip = __("Pick a custom color for 404 message font color of the theme e.g. #a314a3", 'dt_delicate'); ?> <h6> <?php echo $label; ?> </h6> <?php mytheme_admin_color_picker("", $name, $value, ''); ?> </div><!-- Font Color Section --> <div class="column one-half last"> <?php mytheme_admin_jqueryuislider(__('Message Font Size', 'dt_delicate'), "mytheme[specialty][message-font-size]", mytheme_option('specialty', "message-font-size")); ?> </div> </div> <?php } ?> <!-- 404 Content End--> </div><!-- .bpanel-box end --> </div><!-- .tab-content end --> <?php } ?> </div>
function my_theme_front_bbar() { if (mytheme_option('bbar', 'show-bbar')) { $staus = mytheme_option('bbar', 'status-bbar'); $bbar_body = "style='display:block;'"; $bbar_open = "style='display:none;'"; if (isset($staus)) { $bbar_body = "style='display:none;'"; $bbar_open = "style='display:block;'"; } $bgcolor = mytheme_option('bbar', 'bar-bg-color'); $bgcolor = $bgcolor != "#" && !empty($bgcolor) ? $bgcolor : NULL; $bgcolor = mytheme_option('bbar', 'disable-bg-color') ? $bgcolor : NULL; $bgcolor = !empty($bgcolor) ? "background:{$bgcolor};" : NULL; $border_shadow = mytheme_option('bbar', 'bar-shadow-color'); $border_shadow = $border_shadow != "#" && !empty($border_shadow) ? $border_shadow : NULL; $border_shadow = mytheme_option('bbar', 'disable-shadow-color') ? $border_shadow : NULL; $border_shadow = !empty($border_shadow) ? "box-shadow:0 3px 5px {$border_shadow}; -moz-box-shadow:0 3px 5px {$border_shadow};-webkit-box-shadow:0 3px 5px {$border_shadow};" : NULL; $inline_style = !empty($bgcolor) ? $bgcolor : NULL; $inline_style .= !empty($border_shadow) ? $border_shadow : NULL; $inline_style = !empty($inline_style) ? "style='{$inline_style}'" : NULL; ?> <div id="bbar-wrapper" <?php echo $inline_style; ?> > <div id="bbar-body" <?php echo $bbar_body; ?> > <div class="container"> <?php $bar = stripslashes(mytheme_option('bbar', 'message')); echo do_shortcode($bar); ?> </div> <div id="bbar-close"><img src="<?php echo IAMD_BASE_URL . "images/bbar/close-bar.png"; ?> " alt="bclose" title="" /> </div> </div> <div id="bbar-open" <?php echo $bbar_open; ?> ><img src="<?php echo IAMD_BASE_URL . "images/bbar/open-bar.png"; ?> " alt="bopen" /> </div> </div><?php } }
<?php $label = __("Background Color", 'dt_delicate'); $name = "mytheme[appearance][boxed-layout-bg-color]"; $value = mytheme_option('appearance', 'boxed-layout-bg-color') != NULL ? mytheme_option('appearance', 'boxed-layout-bg-color') : "#"; $tooltip = __("Pick a background color of the theme.(e.g. #a314a3)", 'dt_delicate'); mytheme_admin_color_picker($label, $name, $value, ''); ?> <p class="note"> <?php echo $tooltip; ?> </p> <div class="hr_invisible"> </div> <?php echo mytheme_admin_jqueryuislider(__("Background opacity", 'dt_delicate'), "mytheme[appearance][boxed-layout-bg-opacity]", mytheme_option("appearance", "boxed-layout-bg-opacity"), ""); ?> </div><!-- Boxed Layout BG Color --> </div><!-- Upload custom BG option Ends --> </div><!-- .box-content --> </div><!-- .bpanel-box --> </div><!--Layout Section End--> </div><!-- .bpanel-main-content end --> </div><!-- #appearance end-->
$title = get_the_category_by_ID($cat_id); register_sidebar(array('name' => "Category: {$title}", 'id' => "category-{$cat_id}-sidebar", 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>')); } if (class_exists('woocommerce')) { #Custom Sidebars for Product $products = mytheme_option("widgetarea", "products"); $products = !empty($products) ? $products : array(); $widget_areas_for_products = array_filter(array_unique($products)); foreach ($widget_areas_for_products as $id) { $title = get_the_title($id); register_sidebar(array('name' => "Product: {$title}", 'id' => "product-{$id}-sidebar", 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>')); } #Custom Sidebars for Product Category $product_categories = mytheme_option("widgetarea", "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}", 'id' => "product-category-{$slug}-sidebar", 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>')); } #Custom Sidebars for Product Tag $product_tags = mytheme_option("widgetarea", "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}", 'id' => "product-tag-{$slug}-sidebar", 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widgettitle"><span>', 'after_title' => '</span></h3>')); } }
$result = 'Please select an event.'; } elseif (empty($post_data['description'])) { $result = 'Please enter a description of your project.'; } elseif (!$team_members) { $result = 'Please enter the name and email of at least one team member.'; } else { $project_name = $post_data['project_name']; $challenge_name = $post_data['challenge_name']; $challenge_id = $post_data['challenge_id']; $event_id = $post_data['event_id']; $description = $post_data['description']; $new_post = array('post_title' => $project_name, 'post_name' => sanitize_title_with_dashes($project_name, '', 'save'), 'post_content' => $description, 'post_status' => 'draft', 'post_author' => 1, 'post_type' => 'project'); // Save the new post $post_id = wp_insert_post($new_post, true); if (is_wp_error($post_id)) { $contactemail = mytheme_option('contact-email'); $result = 'Uh oh, looks like something went wrong on our end. Please email your project to <a href="mailto:' . $contactemail . '">' . $contactemail . '</a> and we will enter it for you!'; } else { // Add the rest of the fields add_post_meta($post_id, 'challenge_name', $challenge_name); add_post_meta($post_id, 'challenge_id', $challenge_id); add_post_meta($post_id, 'event_id', $event_id); add_post_meta($post_id, 'link_demo', $post_data['link_demo']); add_post_meta($post_id, 'link_repo', $post_data['link_repo']); add_post_meta($post_id, 'link_video', $post_data['link_video']); // Foreach team member with a name, add them to the project update_field('team_members', $MAX_TEAM_MEMBERS, $post_id); for ($n = 0; $n < $MAX_TEAM_MEMBERS; $n++) { if (!empty($post_data['name_' . $n])) { update_field('team_members_' . $n . '_name', $post_data['name_' . $n], $post_id); update_field('team_members_' . $n . '_email', $post_data['email_' . $n], $post_id);
$show_sidebar = true; $sidebar_class = "left-sidebar"; break; case 'with-right-sidebar': $show_sidebar = true; break; } ?> <!-- **Primary Section** --> <section id="primary" class="<?php echo $page_layout; ?> "> <div class="error-info"> <?php echo stripcslashes(mytheme_option('specialty', '404-message')); ?> <?php get_search_form(); ?> </div> </section><!-- **Primary Section** --> <?php if ($show_sidebar) { ?> <!-- **Secondary Section ** --> <section id="secondary" class="<?php echo $sidebar_class; ?> ">
<div class="image-preview-container"> <input id="mytheme-buddhapanellogo" name="mytheme[advance][buddhapanel-logo-url]" type="text" class="uploadfield medium" readonly="readonly" value="<?php echo mytheme_option('advance', 'buddhapanel-logo-url'); ?> " /> <input type="button" value="<?php _e('Upload', 'dt_delicate'); ?> " class="upload_image_button show_preview" /> <input type="button" value="<?php _e('Remove', 'dt_delicate'); ?> " class="upload_image_reset" /> <?php mytheme_adminpanel_image_preview(mytheme_option('advance', 'buddhapanel-logo-url'), true, 'logo.png'); ?> </div> </div> <p class="note"> <?php _e('Upload an image to replace the default buddha panel logo.<b><i>You can set your own brnad</i></b>. ', 'dt_delicate'); ?> </p> </div><!-- Buddha Panel logo --> </div> <!-- .bpanel-box ends here --> </div><!-- #my-admin ends here --> </div><!-- .bpanel-main-content ends here--> </div><!-- #advance ends here -->