Exemple #1
0
 function dt_sensei_after_main_content()
 {
     echo "</section>";
     if (is_singular('course')) {
         $page_layout = dttheme_option('sensei', "course-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     } elseif (is_singular('lesson')) {
         $page_layout = dttheme_option('sensei', "lesson-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     } elseif (is_singular('quiz')) {
         $page_layout = dttheme_option('sensei', "quiz-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     } elseif (taxonomy_exists('course-category')) {
         $page_layout = dttheme_option('sensei', "course-category-layout");
         $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     }
     $show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
     $sidebar_class = "";
     switch ($page_layout) {
         case 'with-left-sidebar':
             $page_layout = "page-with-sidebar with-left-sidebar";
             $show_sidebar = $show_left_sidebar = true;
             $sidebar_class = "secondary-has-left-sidebar";
             break;
         case 'with-right-sidebar':
             $page_layout = "page-with-sidebar with-right-sidebar";
             $show_sidebar = $show_right_sidebar = true;
             $sidebar_class = "secondary-has-right-sidebar";
             break;
         case 'both-sidebar':
             $page_layout = "page-with-sidebar page-with-both-sidebar";
             $show_sidebar = $show_right_sidebar = $show_left_sidebar = true;
             $sidebar_class = "secondary-has-both-sidebar";
             break;
         case 'content-full-width':
         default:
             $page_layout = "content-full-width";
             break;
     }
     if ($show_sidebar) {
         if ($show_right_sidebar) {
             echo '<section id="secondary-right" class="secondary-sidebar ' . $sidebar_class . '">';
             get_sidebar('right');
             echo '</section>';
         }
     }
 }
 function dt_services_columns_display($columns, $id)
 {
     global $post;
     switch ($columns) {
         case 'details':
             $info = get_post_meta($post->ID, "_info", true);
             $info = is_array($info) ? $info : array();
             $price = array_key_exists('price', $info) ? $info['price'] : "";
             $price = !empty($price) ? dt_currency_symbol(dttheme_option('company', 'currency')) . ' ' . $price : "";
             $price = !empty($price) ? '<p>' . __("Price", "dt_themes") . ' - ' . $price . '</p>' : "";
             echo $price;
             $duration = array_key_exists('duration', $info) ? $info['duration'] : "";
             $duration = !empty($duration) ? '<p>' . __("Duration", 'dt_themes') . ' - ' . durationToString($duration) . '</p>' : "";
             echo $duration;
             break;
     }
 }
Exemple #3
0
	function widget($args, $instance) {
		extract($args);
		echo $before_widget;
		$title = empty($instance['title']) ? '' : strip_tags($instance['title']);
		$title = apply_filters( 'widget_title', $title );

		$desc = empty($instance['desc']) ? '' : strip_tags($instance['desc']);
		$desc = apply_filters( 'widget_title', $desc );

		$list_id = $instance['list_id'];
		
		if ( !empty( $title ) ) echo $before_title.$title.$after_title;
		
		if ( !empty( $desc ) ) echo "<p>$desc</p>";
		
		if( isset( $_REQUEST['mythem_mc_emailid']) ):
			require_once(IAMD_FW."theme_widgets/mailchimp/MCAPI.class.php");
			$mcapi = new MCAPI( dttheme_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:white;">'.__('Success!&nbsp; Check your inbox or spam folder for a message containing a confirmation link.','dt_themes').'</span>';
			else:
				// An error ocurred, return error message   
				$msg = '<span style="color:red;"><b>'.__('Error:','dt_themes').'</b>&nbsp; ' . $mcapi->errorMessage.'</span>';
			endif;
			
		endif;
		
		echo '<form method="post" class="mailchimp-form">';
		echo '	<input type="email" placeholder="'.__('Enter Email Address','dt_themes').'" name="mythem_mc_emailid" value="" required/>';
		echo "	<input type='hidden' name='mythem_mc_listid' value='$list_id' />";
		echo '	<input type="submit" name="submit" class="nl-submit" value="Signup" />';
		echo '</form>';

		if ( isset ( $msg ) ) echo '<span class="zn_mailchimp_result">'.$msg.'</span>';
		
		echo $after_widget;		
	}
Exemple #4
0
    function widget($args, $instance)
    {
        extract($args);
        global $post;
        $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
        $_post_count = (int) $instance['_post_count'];
        $_post_categories = "";
        if (!empty($instance['_post_categories']) && is_array($instance['_post_categories'])) {
            $_post_categories = array_filter($instance['_post_categories']);
        } elseif (!empty($instance['_post_categories'])) {
            $_post_categories = explode(",", $instance['_post_categories']);
        }
        $_enable_course_image = $instance['_enable_course_image'] == 1 ? 1 : 0;
        $arg = array('posts_per_page' => $_post_count, 'post_type' => 'dt_courses', 'orderby' => 'menu_order', 'order' => 'ASC');
        $arg = empty($_post_categories) ? $arg : array('posts_per_page' => $_post_count, 'tax_query' => array(array('taxonomy' => 'course_category', 'field' => 'id', 'operator' => 'IN', 'terms' => $_post_categories)), 'orderby' => 'menu_order', 'order' => 'ASC');
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        echo "<div class='recent-course-widget'><ul>";
        query_posts($arg);
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                $title = strlen(get_the_title()) > 20 ? substr(get_the_title(), 0, 15) . "..." : get_the_title();
                echo "<li>";
                if (1 == $_enable_course_image) {
                    if (has_post_thumbnail()) {
                        $image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'dt-course-widget');
                        echo '<img src="' . $image_url[0] . '" alt="' . get_the_title() . '" width="' . $image_url[1] . '" height="' . $image_url[2] . '" />';
                    } else {
                        echo '<img src="http://placehold.it/110x90&text=Image" alt="' . get_the_title() . '" />';
                    }
                }
                echo "<h6><a href='" . get_permalink() . "'>{$title}</a></h6>";
                $course_settings = get_post_meta(get_the_ID(), '_course_settings');
                $starting_price = dttheme_wp_kses(get_post_meta(get_the_ID(), 'starting-price', true));
                if ($starting_price != '') {
                    echo '<span class="dt-sc-course-price">
									<span class="amount">';
                    if (dttheme_option('dt_course', 'currency-position') == 'after-price') {
                        echo $starting_price . dttheme_wp_kses(dttheme_option('dt_course', 'currency'));
                    } else {
                        echo dttheme_wp_kses(dttheme_option('dt_course', 'currency')) . $starting_price;
                    }
                    echo '</span>
							</span>';
                }
                echo "</li>";
            }
        } else {
            echo "<li>" . __('No Course Entries found', 'dt_themes') . "</li>";
        }
        wp_reset_query();
        echo "</ul></div>";
        echo $after_widget;
    }
    foreach ($payment_data as $payment) {
        $course = get_post($payment['course_id']);
        $out .= '<tr>
							<td class="aligncenter">' . $i . '</td>
							<td class="aligncenter">' . $course->post_title . '</td>
							<td class="aligncenter">' . $payment['purchases'] . '</td>
							<td class="aligncenter">' . $payment['starting_price'] . '</td>
							<td class="aligncenter">' . $payment['commission'] . '</td>
							<td class="aligncenter">' . $payment['topay'] . '</td>
						</tr>';
        $total = $total + $payment['topay'];
        $i++;
    }
    if ($total > 0) {
        $out .= '<tr>
							<td colspan="6">&nbsp;</td>
						</tr>';
        $out .= '<tr>
							
							<td colspan="5" class="alignright"><strong>' . __('Total (' . dttheme_wp_kses(dttheme_option('dt_course', 'currency')) . ')', 'dt_themes') . '</strong></td>
							<td>' . $total . '</td>
						</tr>';
    }
    $out .= '</table>';
    echo $out;
}
?>
        
    </div>
    
</div>
	<div class="column one-sixth"><?php 
_e('Price', 'dt_themes');
?>
</div>
	<div class="column five-sixth last"><?php 
$price = array_key_exists('price', $info) ? $info['price'] : "";
?>
		<input type="text" name="_info[price]" class='small-text' value="<?php 
echo $price;
?>
" placeholder="<?php 
_e('Price', 'dt_themes');
?>
">
		<?php 
echo dt_currency_symbol(dttheme_option('company', 'currency'));
?>
	</div>
</div>

<div class="custom-box">
	<div class="column one-sixth"><?php 
_e('Duration', 'dt_themes');
?>
</div>
	<div class="column five-sixth last">
		<select name="_info[duration]">
			<option value=""><?php 
_e('Select', 'dt_themes');
?>
</option><?php 
 function widget($args, $instance)
 {
     extract($args);
     echo $before_widget;
     $title = empty($instance['title']) ? '' : strip_tags($instance['title']);
     $title = apply_filters('widget_title', $title);
     $desc = empty($instance['desc']) ? '' : strip_tags($instance['desc']);
     $list_id = isset($instance['list_id']) ? $instance['list_id'] : '';
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     if (!empty($desc)) {
         echo "<p>{$desc}</p>";
     }
     if (isset($_REQUEST['mythem_mc_emailid'])) {
         require_once IAMD_FW . "theme_widgets/mailchimp/MCAPI.class.php";
         $mcapi = new MCAPI(dttheme_wp_kses(dttheme_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 class="success-msg">' . __('Success!&nbsp; Please check your inbox or spam folder.', 'dt_themes') . '</span>';
         } else {
             // An error ocurred, return error message
             $msg = '<span class="error-msg"><b>' . __('Error:', 'dt_themes') . '</b>&nbsp; ' . $mcapi->errorMessage . '</span>';
         }
     }
     echo '<form method="post" class="mailchimp-form">';
     echo '	<input type="email" placeholder="' . __('Enter Email Address', 'dt_themes') . '" name="mythem_mc_emailid" value="" required/>';
     echo "\t<input type='hidden' name='mythem_mc_listid' value='{$list_id}' />";
     echo '	<input type="submit" name="submit" class="nl-submit" value="Signup" />';
     echo '</form>';
     if (isset($msg)) {
         echo '<span class="zn_mailchimp_result">' . $msg . '</span>';
     }
     echo $after_widget;
 }
Exemple #8
0
<?php

$dt_bp_data = dttheme_option("bp");
$dt_bp_data = is_array($dt_bp_data) ? $dt_bp_data : array();
$dt_per_page = array_key_exists("members-per-page", $dt_bp_data) ? dttheme_wp_kses($dt_bp_data["members-per-page"]) : 10;
$dt_per_page - intval($dt_per_page);
?>

<?php 
do_action('bp_before_members_loop');
$columns = $post_class = "";
$members_page_layout = dttheme_option('bp', "members-page-layout");
switch ($members_page_layout) {
    case "one-half-column":
        $columns = 2;
        $post_class = "column dt-sc-one-half";
        break;
    case "one-third-column":
        $columns = 3;
        $post_class = "column dt-sc-one-third";
        break;
    case "one-fourth-column":
        $columns = 4;
        $post_class = "column dt-sc-one-fourth";
        break;
    default:
        $columns = 4;
        $post_class = "column dt-sc-one-fourth";
        break;
}
if (bp_has_members(bp_ajax_querystring('members') . '&per_page=' . $dt_per_page)) {
     <div class="clear"> </div>        
     
     <div class="column dt-sc-one-half first">
         <p> <input type="text" name="name" value="" placeholder="<?php _e('Name','dt_themes');?>"></p>
     </div>
     <div class="column dt-sc-one-half">
         <p><input type="email" name="email" value="" required placeholder="<?php _e('Email','dt_themes');?>"></p>
     </div>
     <div class="column dt-sc-one-half first">
         <p><input type="text" name="phone" value="" required placeholder="<?php _e('Phone','dt_themes');?>"></p>
     </div>
     
     <div class="column dt-sc-one-half">                
         <div class="choose-payment hidden">
             <?php $payatarrival = dttheme_option('company','enable-pay-at-arrival');
             $paypal = dttheme_option('company','enable-paypal');?>
             <select name="payment_type">
                 <option value=""><?php _e('Choose Payment','dt_themes');?></option>
                 <?php if( !empty($payatarrival) ): ?>
                     <option value="local"><?php _e('Pay At Arrival','dt_themes');?></option>
                 <?php endif;?>
                 <?php if( !empty($paypal) ): ?>					
                     <option value="paypal"><?php _e('Paypal Express Checkout','dt_themes');?></option>
                 <?php endif;?>
             </select>
         </div>
     </div>
     
     <textarea name="note" placeholder="<?php _e('Note','dt_themes');?>"></textarea>
 </div>    
       
Exemple #10
0
<?php

get_header();
$page_layout = dttheme_option('specialty', 'category-archives-layout');
$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
$post_layout = dttheme_option('specialty', 'category-archives-post-layout');
$post_layout = !empty($post_layout) ? $post_layout : "one-column";
$show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
$sidebar_class = "";
$container_class = "";
$image_size = "";
switch ($page_layout) {
    case 'with-left-sidebar':
        $page_layout = "page-with-sidebar with-left-sidebar";
        $show_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-left-sidebar";
        break;
    case 'with-right-sidebar':
        $page_layout = "page-with-sidebar with-right-sidebar";
        $show_sidebar = $show_right_sidebar = true;
        $sidebar_class = "secondary-has-right-sidebar";
        break;
    case 'content-full-width':
    default:
        $page_layout = "content-full-width";
        break;
}
switch ($post_layout) {
    case 'one-column':
        $post_class = $show_sidebar ? " column dt-sc-one-column with-sidebar blog-fullwidth" : " column dt-sc-one-column blog-fullwidth";
        $image_size = $show_sidebar ? "blog-one-column-with-sidebar" : "blog-one-column";
<?php

get_header();
$page_layout = dttheme_option('specialty', 'search-layout');
$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
$show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
$sidebar_class = $thumbnail_sidebar = "";
switch ($page_layout) {
    case 'with-left-sidebar':
        $page_layout = "page-with-sidebar with-left-sidebar";
        $show_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-left-sidebar";
        $thumbnail_sidebar = "-single-sidebar";
        break;
    case 'with-right-sidebar':
        $page_layout = "page-with-sidebar with-right-sidebar";
        $show_sidebar = $show_right_sidebar = true;
        $sidebar_class = "secondary-has-right-sidebar";
        $thumbnail_sidebar = "-single-sidebar";
        break;
    case 'both-sidebar':
        $page_layout = "page-with-sidebar page-with-both-sidebar";
        $show_sidebar = $show_right_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-both-sidebar";
        $thumbnail_sidebar = "-both-sidebar";
        break;
    case 'content-full-width':
    default:
        $page_layout = "content-full-width";
        $thumbnail_sidebar = "";
        break;
    $v = dttheme_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' alt='' /></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 = dttheme_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 
    function dt_sc_newsletter_section($atts, $content = null)
    {
        extract(shortcode_atts(array('title' => ''), $atts));
        $content = DTCoreShortcodesDefination::dtShortcodeHelper($content);
        $out = '<section id="newsletter">
					<h2 class="border-title aligncenter">' . $title . '</h2>
					<h6> ' . $content . ' </h6>
					<form name="frmsubscribe" method="post" class="dt-sc-subscribe-frm">
						<input type="email" name="dt_sc_mc_emailid" required="" placeholder="' . __('Your Email Address', 'dt_themes') . '" />
						<input type="hidden" name="dt_sc_mc_listid" value="' . stripslashes(dttheme_option('general', 'mailchimp-listid')) . '" />
						<input type="submit" name="submit" class="dt-sc-button small" value="' . __('Subscribe', 'dt_themes') . '" />
					</form>';
        if (isset($_REQUEST['dt_sc_mc_emailid'])) {
            require_once IAMD_FW . "theme_widgets/mailchimp/MCAPI.class.php";
            $mcapi = new MCAPI(dttheme_wp_kses(dttheme_option('general', 'mailchimp-key')));
            $list_id = dttheme_option('general', 'mailchimp-listid');
            if ($mcapi->listSubscribe($list_id, $_REQUEST['dt_sc_mc_emailid'])) {
                $msg = '<span class="success-msg">' . __('Success! Check your inbox or spam folder for a message containing a confirmation link.', 'dt_themes') . '</span>';
            } else {
                $msg = '<span class="error-msg"><b>' . __('Error:', 'dt_themes') . '</b>&nbsp; ' . $mcapi->errorMessage . '</span>';
            }
        }
        if (isset($msg)) {
            $out .= '<div class="dt_sc_mc_result">' . $msg . '</div>';
        }
        $out .= '</section>';
        return $out;
    }
Exemple #14
0
				<p> <?php 
        echo $count . '&nbsp;' . __('Lessons', 'dt_themes');
        ?>
 </p>
			</div>
			
			<div class="dt-sc-course-data">
				<div class="dt-sc-course-duration">
					<i class="fa fa-clock-o"> </i>
					<span> <?php 
        echo $duration;
        ?>
 </span>
				</div>
				<?php 
        if (function_exists('the_ratings') && !dttheme_option('general', 'disable-ratings-courses')) {
            echo do_shortcode('[ratings id="' . get_the_ID() . '"]');
        }
        ?>
			</div>
												
		</div>
	
	</article>
    
    </div>

<?php 
    }
} else {
    echo __('No courses to load!', 'dt_themes');
Exemple #15
0
            <!-- **Header** -->
            <header id="header" class="header2">
            
                <div class="container">
                    <!-- **Logo - Start** -->
                    <div id="logo">
						<?php 
if (dttheme_option('general', 'logo')) {
    $url = dttheme_option('general', 'logo-url');
    $url = !empty($url) ? $url : IAMD_BASE_URL . "images/logo.png";
    $retina_url = dttheme_option('general', 'retina-logo-url');
    $retina_url = !empty($retina_url) ? $retina_url : IAMD_BASE_URL . "images/logo@2x.png";
    $width = dttheme_option('general', 'retina-logo-width');
    $width = !empty($width) ? $width . "px;" : "98px";
    $height = dttheme_option('general', 'retina-logo-height');
    $height = !empty($height) ? $height . "px;" : "99px";
    ?>
                            <a href="<?php 
    echo home_url();
    ?>
" title="<?php 
    echo dttheme_blog_title();
    ?>
">
                                <img class="normal_logo" src="<?php 
    echo esc_url($url);
    ?>
" alt="<?php 
    echo dttheme_blog_title();
    ?>
" title="<?php 
                </div>
            
            <?php 
        }
    }
    ?>
      
            </div> 
        
        <?php 
}
?>
        
		<?php 
edit_post_link(__('Edit', 'dt_themes'), '<span class="edit-link">', '</span>');
if (!dttheme_option('general', 'disable-courses-comment')) {
    comments_template('', true);
}
?>
                
	</section><!-- ** Primary Section End ** --><?php 
if ($show_sidebar) {
    if ($show_right_sidebar) {
        ?>
			<!-- Secondary Right -->
			<section id="secondary-right" class="secondary-sidebar <?php 
        echo $sidebar_class;
        ?>
"><?php 
        get_sidebar('right');
        ?>
Exemple #17
0
    ?>
">
               	 		<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'], dttheme_option('seo', $option['id']));
    ?>
 /> <?php 
    echo $option['label'];
    ?>
                            </label>
                            <p class="note"><?php 
    echo $option["tooltip"];
    ?>
 </p>
                        </div>
                    </div>
		 <?php 
}
?>
                </div>
Exemple #18
0
function dttheme_set_layout()
{
    if (dttheme_option("mobile", "is-theme-responsive")) {
        wp_enqueue_style('responsive', IAMD_BASE_URL . "responsive.css");
    }
    $dttheme_options = get_option(IAMD_THEME_SETTINGS);
    $dttheme_mobile = array_key_exists("mobile", $dttheme_options) ? $dttheme_options['mobile'] : array();
    if (isset($dttheme_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) { div#slider { display:none !important; } 	}';
        $out .= '</style>';
        echo $out;
    }
}
    #Product Detail page Sidebar
    $product_layout = dttheme_option('woo', "product-layout");
    $product_layout = !empty($product_layout) ? $product_layout : "content-full-width";
    if ($product_layout != "content-full-width") {
        register_sidebar(array('name' => 'Product Detail Page Sidebar', 'id' => 'product-detail-sidebar', 'description' => __("Product detail page sidebar that appears on the left (or) right.", "dt_themes"), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
    }
    #Product Category Archive Sidebar
    $product_category_archive_layout = dttheme_option('woo', "product-category-layout");
    $product_category_archive_layout = !empty($product_category_archive_layout) ? $product_category_archive_layout : "content-full-width";
    if ($product_category_archive_layout != "content-full-width") {
        register_sidebar(array('name' => 'Product Category Archive Sidebar', 'id' => 'product-category-archive-sidebar', 'description' => __("Product category archive page sidebar that appears on the left (or) right.", "dt_themes"), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
    }
    #Product Tag Archive Sidebar
    $product_tag_archive_layout = dttheme_option('woo', "product-tag-layout");
    $product_tag_archive_layout = !empty($product_tag_archive_layout) ? $product_tag_archive_layout : "content-full-width";
    if ($product_tag_archive_layout != "content-full-width") {
        register_sidebar(array('name' => 'Product Tag Archive Sidebar', 'id' => 'product-tag-archive-sidebar', 'description' => __("Product tag archive page sidebar that appears on the left (or) right.", "dt_themes"), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
    }
}
#Footer Columnns
$footer_columns = dttheme_option('general', 'footer-columns');
dttheme_footer_widgetarea($footer_columns);
#Custom Mega Menu Sidebars
$widgets = dttheme_option('widgetarea', 'megamenu');
$widgets = is_array($widgets) ? array_unique($widgets) : array();
$widgets = array_filter($widgets);
foreach ($widgets as $key => $value) {
    $id = mb_convert_case($value, MB_CASE_LOWER, "UTF-8");
    $id = str_replace(" ", "-", $id);
    register_sidebar(array('name' => $value, 'id' => $id, 'description' => __("A unique mega menu sidebar that is created in Admin panel", "dt_themes"), 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>'));
}
Exemple #20
0
 function dt_woocommerce_output_upsells()
 {
     $page_layout = dttheme_option('woo', "product-layout");
     $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     $upsell_products = $page_layout === "content-full-width" ? 4 : 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;
 }
        }
        ?>
                
                
          <?php 
        if (array_key_exists("show-social-share", $portfolio_settings)) {
            echo '<div class="portfolio-share">';
            dttheme_social_bookmarks('sb-portfolio');
            echo '</div>';
        }
        edit_post_link(__('Edit', 'dt_themes'));
        echo $container_end;
        ?>
                
				 <?php 
        if (!dttheme_option('general', 'disable-portfolio-comment')) {
            comments_template();
        }
        ?>
             
                
                <!-- **Post Nav** -->
                <div class="post-nav-container">
                	<div class="post-prev-link"><?php 
        previous_post_link('%link', '<i class="fa fa-arrow-circle-left"> </i> %title<span> (' . __('Prev Entry', 'dt_themes') . ')</span>');
        ?>
 </div>
                    <div class="post-next-link"><?php 
        next_post_link('%link', '<span> (' . __('Next Entry', 'dt_themes') . ')</span> %title <i class="fa fa-arrow-circle-right"> </i>');
        ?>
</div>
Exemple #22
0
        echo $sidebar_class;
        ?>
"><?php 
        get_sidebar();
        ?>
</section><?php 
    }
}
?>
			<section id="primary" class="<?php 
echo $page_layout;
?>
">
				<div class="error-info">
					<?php 
echo stripcslashes(dttheme_option('specialty', '404-message'));
?>
					<a href="<?php 
echo home_url();
?>
" title="" class="dt-sc-button small"><?php 
_e('Back to Home', 'dt_themes');
?>
</a>
				</div>
			</section><!-- **Primary - End** --><?php 
if ($show_sidebar) {
    if ($show_right_sidebar) {
        ?>
			<!-- Secondary Right -->
			<section id="secondary-right" class="secondary-sidebar <?php 
Exemple #23
0
                </div>
                

                <div class="box-title"><h3><?php 
_e('Transfer Theme Options Data', 'dt_themes');
?>
</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_themes');
?>
</div>
                    <div class="clar"></div>
                    <div class="hr_invisible"></div>
                	<?php 
$data = array('onepage' => dttheme_option('onepage'), 'home' => dttheme_option('home'), 'general' => dttheme_option('general'), 'appearance' => dttheme_option('appearance'), 'integration' => dttheme_option('integration'), 'seo' => dttheme_option('seo'), 'specialty' => dttheme_option('specialty'), 'widgetarea' => dttheme_option("widgetarea"), 'mobile' => dttheme_option('mobile'), 'advance' => dttheme_option('advance'));
?>
                	<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_themes');
?>
</a>
                </div>
                
            
            </div>
<?php

get_header();
$page_layout = dttheme_option('dt_course', 'archives-layout');
$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
$show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
$sidebar_class = "";
switch ($page_layout) {
    case 'with-left-sidebar':
        $page_layout = "page-with-sidebar with-left-sidebar";
        $show_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-left-sidebar";
        break;
    case 'with-right-sidebar':
        $page_layout = "page-with-sidebar with-right-sidebar";
        $show_sidebar = $show_right_sidebar = true;
        $sidebar_class = "secondary-has-right-sidebar";
        break;
    case 'both-sidebar':
        $page_layout = "page-with-sidebar page-with-both-sidebar";
        $show_sidebar = $show_right_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-both-sidebar";
        break;
    case 'content-full-width':
    default:
        $page_layout = "content-full-width";
        break;
}
if ($show_sidebar) {
    if ($show_left_sidebar) {
        ?>
<?php

$tpl_default_settings = get_post_meta($post->ID, '_dt_post_settings', TRUE);
$tpl_default_settings = is_array($tpl_default_settings) ? $tpl_default_settings : array();
$hide_date_meta = isset($tpl_default_settings['disable-date-info']) ? " hidden " : "";
$hide_comment_meta = isset($tpl_default_settings['disable-comment-info']) ? " hidden " : " comments ";
$hide_author_meta = isset($tpl_default_settings['disable-author-info']) ? " hidden " : "";
$hide_category_meta = isset($tpl_default_settings['disable-category-info']) ? " hidden " : "";
$hide_tag_meta = isset($tpl_default_settings['disable-tag-info']) ? " hidden " : "tags";
$format = get_post_format($post->ID);
$pholder = dttheme_option('general', 'disable-placeholder-images');
?>

<!--#post-<?php 
the_ID();
?>
 starts -->
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class(array('blog-entry', 'blog-single-entry'));
?>
>
<div class="blog-entry-inner">

	<div class="entry-thumb">
		<?php 
if (($format === "image" || empty($format)) && !array_key_exists("disable-featured-image", $tpl_default_settings)) {
    ?>
				<a href="<?php 
Exemple #26
0
function dttheme_backup_and_restore_action()
{
    $save_type = $_POST['type'];
    if ($save_type == 'backup_options') {
        $data = array("general" => dttheme_option('general'), "appearance" => dttheme_option('appearance'), "integration" => dttheme_option('integration'), "mobile" => dttheme_option('mobile'), "social" => dttheme_option('social'), "seo" => dttheme_option('seo'), 'widgetarea' => dttheme_option("widgetarea"), "specialty" => dttheme_option('specialty'), "dt_course" => dttheme_option('dt_course'), "pagebuilder" => dttheme_option('pagebuilder'), "woo" => dttheme_option('woo'), '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, dttheme_default_option());
        # To set Default options
        die('1');
    }
}
                    $end = $reservation['end'];
                    $end = explode("(", $end);
                    $end = $end[0];
                    $end = new DateTime($end);
                    $end = $end->format('h:i A');
                    $time = $stime . ' - ' . $end;
                    $mseeage .= '<td>' . $time . '</td>';
                    $mseeage .= '</tr>';
                }
                $mseeage .= "</table>";
                #Mailing
                $tomorrow_agenda = $mseeage;
                $replace['staff_name'] = $staff_name;
                $replace['tomorrow_agenda'] = $tomorrow_agenda;
                $subject = dttheme_option('company', 'agenda_to_staff_subject');
                $subject = dt_replace_agenda($subject, $replace);
                $message = dttheme_option('company', 'agenda_to_staff_message');
                $message = dt_replace_agenda($message, $replace);
                if (dt_send_mail($info["emailid"], $subject, $message)) {
                    $update_wp_options = true;
                }
                #Mailing
            }
        }
        if ($update_wp_options) {
            foreach ($wp_options as $wp_option) {
                $wpdb->query("UPDATE {$wpdb->options} SET option_name = '{$wp_option}_agenda' WHERE option_name = '{$wp_option}'");
            }
        }
    }
}
" class="black mytheme_add_item" />
                         
                         <div class="column four-fifth last">
                             <p class="note"> <?php 
_e('Manage Social Icons here which will be displayed in Header Type 4', 'dt_themes');
?>
 </p>
                         </div>
                         
                         <div class="hr_invisible"></div>
                    </div>
                    
                    <div class="bpanel-option-set">
                        <ul class="menu-to-edit">
                        <?php 
$socials = dttheme_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 
        if (array_key_exists('icon', $s)) {
            $n = $s['icon'];
            $n = explode('-', $n);
            $k = 0;
Exemple #29
0
<?php

get_header();
$page_layout = dttheme_option('specialty', 'author-archives-layout');
$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
$post_layout = dttheme_option('specialty', 'author-archives-post-layout');
$post_layout = !empty($post_layout) ? $post_layout : "one-column";
$show_sidebar = $show_left_sidebar = $show_right_sidebar = false;
$sidebar_class = "";
$container_class = "";
$image_size = "";
switch ($page_layout) {
    case 'with-left-sidebar':
        $page_layout = "page-with-sidebar with-left-sidebar";
        $show_sidebar = $show_left_sidebar = true;
        $sidebar_class = "secondary-has-left-sidebar";
        break;
    case 'with-right-sidebar':
        $page_layout = "page-with-sidebar with-right-sidebar";
        $show_sidebar = $show_right_sidebar = true;
        $sidebar_class = "secondary-has-right-sidebar";
        break;
    case 'content-full-width':
    default:
        $page_layout = "content-full-width";
        break;
}
switch ($post_layout) {
    case 'one-column':
        $post_class = $show_sidebar ? " column dt-sc-one-column with-sidebar blog-fullwidth" : " column dt-sc-one-column blog-fullwidth";
        $image_size = $show_sidebar ? "blog-one-column-with-sidebar" : "blog-one-column";
Exemple #30
0
	<div class="top-bar">
		<div class="container">
			<ul class="contact-details">
				<li><span class="fa fa-phone"></span><?php _e('Call Us ','dt_themes'); echo dttheme_option('general','h2-phoneno');?></li>
				<li><span class="fa fa-user"></span><?php _e('Mail Us :','dt_themes');
					$email = dttheme_option('general','h2-emailid');
					$email = !empty($email)   ? $email : get_option('admin_email');?>
					<a href="mailto:<?php echo $email;?>" title=""><?php echo $email;?></a>
				</li>
			</ul>

			<?php if(dttheme_is_plugin_active('woocommerce/woocommerce.php')):
					 global $woocommerce;?>
					<ul class="cart-details">
						<li><span class="fa fa-shopping-cart"></span> 
							<a id="top-cart-count" href="<?php echo $woocommerce->cart->get_cart_url(); ?>"><?php echo sprintf(_n('Cart [%d] item', 'Cart [%d] items', $woocommerce->cart->cart_contents_count, 'dt_themes'), $woocommerce->cart->cart_contents_count);?></a></li>
						<li><a id="top-cart-total" href="<?php echo $woocommerce->cart->get_cart_url(); ?>"><?php echo $woocommerce->cart->get_cart_total(); ?></a></li>
					</ul><?php
			endif;?>	 	
		</div>
	</div>