Exemplo n.º 1
0
function page_settings($args)
{
    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();
    ?>
        
        <div class="j-pagetemplate-container">
        

				<div id="tpl-default-settings">
                    <!-- 1. Layout -->
                    <div class="custom-box ">
                        <div class="column one-sixth">
                            <label><?php 
    _e('Layout', 'dt_rise');
    ?>
 </label>
                        </div>
                        <div class="column five-sixth last">                        
                            <ul class="bpanel-layout-set">
                                <?php 
    $homepage_layout = array('content-full-width' => 'without-sidebar', 'with-left-sidebar' => 'left-sidebar', 'with-right-sidebar' => 'right-sidebar');
    $v = array_key_exists("layout", $tpl_default_settings) ? $tpl_default_settings['layout'] : 'content-full-width';
    foreach ($homepage_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>
                            <?php 
    $v = array_key_exists("layout", $tpl_default_settings) ? $tpl_default_settings['layout'] : 'content-full-width';
    ?>
                            <input id="mytheme-page-layout" name="layout" type="hidden"  value="<?php 
    echo $v;
    ?>
"/>
                            <p class="note"> <?php 
    _e("You can choose between a left, right or no sidebar layout.", 'dt_rise');
    ?>
 </p>
                        </div>
                    </div> <!-- Layout End-->
    
                    <!-- 2. Every Where Sidebar Start -->
                    <div class="custom-box">
                    	<div class="column one-sixth">
                            <label><?php 
    _e('Disable Every Where Sidebar', 'dt_rise');
    ?>
</label>
                        </div>
                        <div class="column five-sixth last">
							<?php 
    $switchclass = array_key_exists("disable-everywhere-sidebar", $tpl_default_settings) ? 'checkbox-switch-on' : 'checkbox-switch-off';
    $checked = array_key_exists("disable-everywhere-sidebar", $tpl_default_settings) ? ' checked="checked"' : '';
    ?>
                            <div data-for="mytheme-disable-everywhere-sidebar" class="checkbox-switch <?php 
    echo $switchclass;
    ?>
"></div>
                            <input id="mytheme-disable-everywhere-sidebar" class="hidden" type="checkbox" name="disable-everywhere-sidebar" value="true"  <?php 
    echo $checked;
    ?>
/>
                            <p class="note"> <?php 
    _e('Yes! to hide "Every Where Sidear" on this page.', 'dt_rise');
    ?>
 </p>
                        </div>
                    </div><!-- Comment Section End-->
                    
                    <!-- 4. Allow Commenet -->
                    <div class="custom-box">
                    	<div class="column one-sixth">
                            <label><?php 
    _e('Allow Comments', 'dt_rise');
    ?>
</label>
                        </div>
                        <div class="column five-sixth last">
							<?php 
    $switchclass = array_key_exists("comment", $tpl_default_settings) ? 'checkbox-switch-on' : 'checkbox-switch-off';
    $checked = array_key_exists("comment", $tpl_default_settings) ? ' checked="checked"' : '';
    ?>
                            <div data-for="mytheme-page-comment" class="checkbox-switch <?php 
    echo $switchclass;
    ?>
"></div>
                            <input id="mytheme-page-comment" class="hidden" type="checkbox" name="mytheme-page-comment" value="true"  <?php 
    echo $checked;
    ?>
/>
                            <p class="note"> <?php 
    _e('YES! to allow comments on this page.', 'dt_rise');
    ?>
 </p>
                        </div>
                    </div><!-- Allow Commenet End-->
                    <p class="note"><i> <?php 
    _e('All these changes applicable only for external pages.', 'dt_rise');
    ?>
 <i></p>
                </div><!-- .tpl-common-settings end -->    
                

             <!-- Blog Template Settings -->
             <div id="tpl-blog">
             	<!-- Post Playout -->
                <div class="custom-box">
                    <div class="column one-sixth">                
                        <label><?php 
    _e('Posts Layout', 'dt_rise');
    ?>
 </label>
                    </div>
                    <div class="column five-sixth last">                        
                        <ul class="bpanel-layout-set">
                        <?php 
    $posts_layout = array('one-column' => __("Single post per row.", 'dt_rise'), 'one-half-column' => __("Two posts per row.", 'dt_rise'), 'one-third-column' => __("Three posts per row.", 'dt_rise'), 'one-fourth-column' => __("Four posts per row.", 'dt_rise'));
    $v = array_key_exists("blog-post-layout", $tpl_default_settings) ? $tpl_default_settings['blog-post-layout'] : 'one-column';
    foreach ($posts_layout as $key => $value) {
        $class = $key == $v ? " class='selected' " : "";
        echo "<li><a href='#' rel='{$key}' {$class} title='{$value}'><img src='" . IAMD_FW_URL . "theme_options/images/columns/{$key}.png' /></a></li>";
    }
    ?>
                        </ul>
                        <input id="mytheme-blog-post-layout" name="mytheme-blog-post-layout" type="hidden" value="<?php 
    echo $v;
    ?>
"/>
                        <p class="note"> <?php 
    _e("Choose layout style for your Blog", 'dt_rise');
    ?>
 </p>
                    </div>
                </div><!-- Post Playout End-->

				<!-- Allow Excerpt -->
                <div class="custom-box">
                    <div class="column one-sixth">                 
                        <label><?php 
    _e('Allow Excerpt', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">                     
						<?php 
    $switchclass = array_key_exists("blog-post-excerpt", $tpl_default_settings) ? 'checkbox-switch-on' : 'checkbox-switch-off';
    $checked = array_key_exists("blog-post-excerpt", $tpl_default_settings) ? ' checked="checked"' : '';
    ?>
                        <div data-for="mytheme-blog-post-excerpt" class="checkbox-switch <?php 
    echo $switchclass;
    ?>
"></div>
                        <input id="mytheme-blog-post-excerpt" class="hidden" type="checkbox" name="mytheme-blog-post-excerpt" value="true"  <?php 
    echo $checked;
    ?>
/>
                        <p class="note"> <?php 
    _e('Enable Excerpt', 'dt_rise');
    ?>
 </p>
                    </div>
                </div><!-- Allow Excerpt End-->

                <!-- Excerpt Length-->
                <div class="custom-box">
                    <div class="column one-sixth">                                 
                        <label><?php 
    _e('Excerpt Length', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">                     
						<?php 
    $v = array_key_exists("blog-post-excerpt-length", $tpl_default_settings) ? $tpl_default_settings['blog-post-excerpt-length'] : '45';
    ?>
                        <input id="mytheme-blog-post-excerpt-length" name="mytheme-blog-post-excerpt-length" type="text" value="<?php 
    echo $v;
    ?>
" />
                        <p class="note"> <?php 
    _e("Limit! Number of charectors from the content to appear on each blog post (Number Only)", 'dt_rise');
    ?>
 </p>
                    </div>
                </div><!-- Excerpt Length End-->

                <!-- Post Count-->
                <div class="custom-box">
                    <div class="column one-sixth">                                 
                        <label><?php 
    _e('Post per page', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">
                        <select name="mytheme-blog-post-per-page">
                            <option value="-1"><?php 
    _e("All", 'dt_rise');
    ?>
</option>
                            <?php 
    $selected = array_key_exists("blog-post-per-page", $tpl_default_settings) ? $tpl_default_settings['blog-post-per-page'] : '';
    ?>
                            <?php 
    for ($i = 1; $i <= 30; $i++) {
        echo "<option value='{$i}'" . selected($selected, $i, false) . ">{$i}</option>";
    }
    ?>
                        </select>
                        <p class="note"><?php 
    _e("Your blog pages show at most selected number of posts per page.", 'dt_rise');
    ?>
</p>
                    </div>
                </div><!-- Post Count End-->
 
                 <!-- Post Animation-->
                <div class="custom-box">
                    <div class="column one-sixth">                                 
                        <label><?php 
    _e('Choose Post Animation', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">
                        <?php 
    $post_animation = array_key_exists("blog-post-animation", $tpl_default_settings) ? $tpl_default_settings['blog-post-animation'] : 'fadeInUp';
    ?>
 						<select name="mytheme-blog-post-animation"><?php 
    $animations = array("---", "flash", "shake", "bounce", "tada", "swing", "wobble", "pulse", "flip", "flipInX", "flipOutX", "flipInY", "flipOutY", "fadeIn", "fadeInUp", "fadeInDown", "fadeInLeft", "fadeInRight", "fadeInUpBig", "fadeInDownBig", "fadeInLeftBig", "fadeInRightBig", "fadeOut", "fadeOutUp", "fadeOutDown", "fadeOutLeft", "fadeOutRight", "fadeOutUpBig", "fadeOutDownBig", "fadeOutLeftBig", "fadeOutRightBig", "bounceIn", "bounceInUp", "bounceInDown", "bounceInLeft", "bounceInRight", "bounceOut", "bounceOutUp", "bounceOutDown", "bounceOutLeft", "bounceOutRight", "rotateIn", "rotateInUpLeft", "rotateInDownLeft", "rotateInUpRight", "rotateInDownRight", "rotateOut", "rotateOutUpLeft", "rotateOutDownLeft", "rotateOutUpRight", "rotateOutDownRight", "hinge", "rollIn", "rollOut", "lightSpeedIn", "lightSpeedOut", "slideDown", "slideUp", "slideLeft", "slideRight", "slideExpandUp", "expandUp", "expandOpen", "bigEntrance", "hatch", "floating", "tossing", "pullUp", "pullDown", "stretchLeft", "stretchRight");
    foreach ($animations as $animation) {
        $selected = selected($post_animation, $animation, false);
        echo "<option value='{$animation}' {$selected} >{$animation}</option>";
    }
    ?>
                        </select>                        
                        <p class="note"><?php 
    _e("You can choose animation for your blog posts.", 'dt_rise');
    ?>
</p>
                    </div>
                </div> <!-- Post Animation-->
               
                 <!-- Post Animation Delay-->
                <div class="custom-box">
                    <div class="column one-sixth">                                 
                        <label><?php 
    _e('Post Animation Delay', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">
                        <?php 
    $post_animation_delay = array_key_exists("blog-post-animation-delay", $tpl_default_settings) ? $tpl_default_settings['blog-post-animation-delay'] : '300';
    ?>
                        <input id="mytheme-blog-post-animation-delay" name="mytheme-blog-post-animation-delay" type="text" value="<?php 
    echo $post_animation_delay;
    ?>
" />
                        <p class="note"><?php 
    _e("You can choose animation delay for your blog posts.", 'dt_rise');
    ?>
</p>
                    </div>
                </div> <!-- Post Animation Delay-->

                <!-- Post Meta-->
                <div class="custom-box">
	                <h3><?php 
    _e('Post Meta Options', 'dt_rise');
    ?>
</h3>
                	<?php 
    $post_meta = array(array("id" => "disable-author-info", "label" => __("Disable the Author info.", 'dt_rise'), "tooltip" => __("By default the author info will display when viewing your posts. You can choose to disable it here.", 'dt_rise')), array("id" => "disable-date-info", "label" => __("Disable the date info.", 'dt_rise'), "tooltip" => __("By default the date info will display when viewing your posts. You can choose to disable it here.", 'dt_rise')), array("id" => "disable-comment-info", "label" => __("Disable the comment", 'dt_rise'), "tooltip" => __("By default the comment will display when viewing your posts. You can choose to disable it here.", 'dt_rise')), array("id" => "disable-category-info", "label" => __("Disable the category", 'dt_rise'), "tooltip" => __("By default the category will display when viewing your posts. You can choose to disable it here.", 'dt_rise')), array("id" => "disable-tag-info", "label" => __("Disable the tag", 'dt_rise'), "tooltip" => __("By default the tag will display when viewing your posts. You can choose to disable it here.", 'dt_rise')));
    $count = 1;
    foreach ($post_meta as $p_meta) {
        $last = $count % 3 == 0 ? "last" : '';
        $id = $p_meta['id'];
        $label = $p_meta['label'];
        $tooltip = $p_meta['tooltip'];
        $v = array_key_exists($id, $tpl_default_settings) ? $tpl_default_settings[$id] : '';
        $rs = checked($id, $v, false);
        $switchclass = $v != '' ? 'checkbox-switch-on' : 'checkbox-switch-off';
        echo "<div class='one-third-content {$last}'>";
        echo '<div class="bpanel-option-set">';
        echo "<label>{$label}</label>";
        echo "<div data-for='{$id}' class='checkbox-switch {$switchclass}'></div>";
        echo "<input class='hidden' id='{$id}' type='checkbox' name='mytheme-blog-{$id}' value='{$id}' {$rs} />";
        echo '<p class="note">';
        echo $tooltip;
        echo '</p>';
        echo '</div>';
        echo '</div>';
        $count++;
    }
    ?>
                </div><!-- Post Meta End-->
                
                <!-- Categories -->
                <div class="custom-box">
                	<h3><?php 
    _e('Exclude Categories', 'dt_rise');
    ?>
</h3>
                    <?php 
    if (array_key_exists("blog-post-exclude-categories", $tpl_default_settings)) {
        $exclude_cats = array_unique($tpl_default_settings["blog-post-exclude-categories"]);
        foreach ($exclude_cats as $cats) {
            echo "<!-- Category Drop Down Container -->\n\t\t\t\t\t\t\t\t\t  <div class='multidropdown'>";
            echo dtthemes_mytheme_categorylist("blog,exclude_cats", $cats, "multidropdown");
            echo "</div><!-- Category Drop Down Container end-->";
        }
    } else {
        echo "<!-- Category Drop Down Container -->";
        echo "<div class='multidropdown'>";
        echo dtthemes_mytheme_categorylist("blog,exclude_cats", "", "multidropdown");
        echo "</div><!-- Category Drop Down Container end-->";
    }
    ?>
                    <p class="note"> <?php 
    _e("You can choose certain categories to exclude from your blog page.", 'dt_rise');
    ?>
 </p>
                </div><!-- Categories End-->
             </div><!-- Blog Template Settings End-->

             <!-- Portfolio Template Settings -->
             <div id="tpl-portfolio">
             	<!-- Post Playout -->
                <div class="custom-box">
                    <div class="column one-sixth">                 
                        <label><?php 
    _e('Posts Layout', 'dt_rise');
    ?>
 </label>
                    </div>
                    <div class="column five-sixth last">       
                        <ul class="bpanel-layout-set">
                        <?php 
    $posts_layout = array('one-column' => __("Single post per row.", 'dt_rise'), 'one-half-column' => __("Two posts per row.", 'dt_rise'), 'one-third-column' => __("Three posts per row.", 'dt_rise'), 'one-fourth-column' => __("Four posts per row.", 'dt_rise'));
    $v = array_key_exists("portfolio-post-layout", $tpl_default_settings) ? $tpl_default_settings['portfolio-post-layout'] : 'one-column';
    foreach ($posts_layout as $key => $value) {
        $class = $key == $v ? " class='selected' " : "";
        echo "<li><a href='#' rel='{$key}' {$class} title='{$value}'><img src='" . IAMD_FW_URL . "theme_options/images/columns/{$key}.png' /></a></li>";
    }
    ?>
                        </ul>
                        <input id="mytheme-portfolio-post-layout" name="mytheme-portfolio-post-layout" type="hidden" value="<?php 
    echo $v;
    ?>
"/>
                        <p class="note"> <?php 
    _e("Choose layout style for your Portfolio", 'dt_rise');
    ?>
 </p>
                    </div>      

                </div><!-- Post Playout End-->

                <!-- Post Count-->
                <div class="custom-box">
                    <div class="column one-sixth">                 
                        <label><?php 
    _e('Post per page', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">   
                        <select name="mytheme-portfolio-post-per-page">
                            <option value="-1"><?php 
    _e("All", 'dt_rise');
    ?>
</option>
                            <?php 
    $selected = array_key_exists("portfolio-post-per-page", $tpl_default_settings) ? $tpl_default_settings['portfolio-post-per-page'] : '';
    ?>
                            <?php 
    for ($i = 1; $i <= 30; $i++) {
        echo "<option value='{$i}'" . selected($selected, $i, false) . ">{$i}</option>";
    }
    ?>
                        </select>
                        <p class="note"> <?php 
    _e("Your portfolio pages show at most selected number of posts per page.", 'dt_rise');
    ?>
 </p>
                    </div>
                </div><!-- Post Count End-->

                <div class="custom-box">
                    <div class="column one-sixth">                
	                    <label><?php 
    _e('Allow Filters', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">                       
						<?php 
    $switchclass = array_key_exists("filter", $tpl_default_settings) ? 'checkbox-switch-on' : 'checkbox-switch-off';
    $checked = array_key_exists("filter", $tpl_default_settings) ? ' checked="checked"' : '';
    ?>
                        <div data-for="mytheme-portfolio-filter" class="checkbox-switch <?php 
    echo $switchclass;
    ?>
"></div>
                        <input id="mytheme-portfolio-filter" class="hidden" type="checkbox" name="mytheme-portfolio-filter" value="true"  <?php 
    echo $checked;
    ?>
/>
                        <p class="note"> <?php 
    _e('Allow filter options for portfolio items', 'dt_rise');
    ?>
 </p>
                    </div>
                </div>
                
                <div class="custom-box">
                	<div class="column one-sixth"><label><?php 
    _e('Enable Ajax Load', 'dt_rise');
    ?>
</label></div>
                    <div class="column five-sixth last"><?php 
    $switchclass = array_key_exists("is-ajax-load", $tpl_default_settings) ? 'checkbox-switch-on' : 'checkbox-switch-off';
    $checked = array_key_exists("is-ajax-load", $tpl_default_settings) ? ' checked="checked"' : '';
    ?>
                        <div data-for="mytheme-portfolio-is-ajax-load" class="checkbox-switch <?php 
    echo $switchclass;
    ?>
"></div>
                        <input id="mytheme-portfolio-is-ajax-load" class="hidden" type="checkbox" name="mytheme-portfolio-is-ajax-load" value="true"  <?php 
    echo $checked;
    ?>
/>
                        <p class="note"> <?php 
    _e('Should the gallery details be opened on the same page when someone clicks a gallery item - known as AJAX Gallery?', 'dt_rise');
    ?>
 </p>
                    </div>
                </div>

                 <!-- Post Animation-->
                <div class="custom-box">
                    <div class="column one-sixth">                                 
                        <label><?php 
    _e('Choose Post Animation', 'dt_rise');
    ?>
</label>
                    </div>
                    <div class="column five-sixth last">
                        <?php 
    $post_animation = array_key_exists("portfolio-post-animation", $tpl_default_settings) ? $tpl_default_settings['portfolio-post-animation'] : 'fadeInUp';
    ?>
 						<select name="mytheme-portfolio-post-animation"><?php 
    $animations = array("---", "flash", "shake", "bounce", "tada", "swing", "wobble", "pulse", "flip", "flipInX", "flipOutX", "flipInY", "flipOutY", "fadeIn", "fadeInUp", "fadeInDown", "fadeInLeft", "fadeInRight", "fadeInUpBig", "fadeInDownBig", "fadeInLeftBig", "fadeInRightBig", "fadeOut", "fadeOutUp", "fadeOutDown", "fadeOutLeft", "fadeOutRight", "fadeOutUpBig", "fadeOutDownBig", "fadeOutLeftBig", "fadeOutRightBig", "bounceIn", "bounceInUp", "bounceInDown", "bounceInLeft", "bounceInRight", "bounceOut", "bounceOutUp", "bounceOutDown", "bounceOutLeft", "bounceOutRight", "rotateIn", "rotateInUpLeft", "rotateInDownLeft", "rotateInUpRight", "rotateInDownRight", "rotateOut", "rotateOutUpLeft", "rotateOutDownLeft", "rotateOutUpRight", "rotateOutDownRight", "hinge", "rollIn", "rollOut", "lightSpeedIn", "lightSpeedOut", "slideDown", "slideUp", "slideLeft", "slideRight", "slideExpandUp", "expandUp", "expandOpen", "bigEntrance", "hatch", "floating", "tossing", "pullUp", "pullDown", "stretchLeft", "stretchRight");
    foreach ($animations as $animation) {
        $selected = selected($post_animation, $animation, false);
        echo "<option value='{$animation}' {$selected} >{$animation}</option>";
    }
    ?>
                        </select>                        
                        <p class="note"><?php 
    _e("You can choose animation for your blog posts.", 'dt_rise');
    ?>
</p>
                    </div>
                </div> <!-- Post Animation-->

                 <!-- Categories -->
                <div class="custom-box">
                	<h3><?php 
    _e('Choose Categories', 'dt_rise');
    ?>
</h3>
                    <?php 
    if (array_key_exists("portfolio-categories", $tpl_default_settings)) {
        $exclude_cats = array_unique($tpl_default_settings["portfolio-categories"]);
        foreach ($exclude_cats as $cats) {
            echo "<!-- Category Drop Down Container -->\n\t\t\t\t\t\t\t\t\t  <div class='multidropdown'>";
            echo dtthemes_mytheme_portfolio_categorylist("portfolio,cats", $cats, "multidropdown");
            echo "</div><!-- Category Drop Down Container end-->";
        }
    } else {
        echo "<!-- Category Drop Down Container -->";
        echo "<div class='multidropdown'>";
        echo dtthemes_mytheme_portfolio_categorylist("portfolio,cats", "", "multidropdown");
        echo "</div><!-- Category Drop Down Container end-->";
    }
    ?>
                    <p class="note"> <?php 
    _e("You can choose only certain categories to show in portfolio items. ", 'dt_rise');
    ?>
 </p>
                </div><!-- Categories End-->                
                
             </div><!-- Portfolio Template Settings End-->
        </div>    
<?php 
    wp_reset_postdata();
}
Exemplo n.º 2
0
_e("Select a CATEGORY that should receive a new widget area:", 'dt_rise');
?>
</p>
                    <?php 
if (is_array(dtthemes_mytheme_option("widgetarea", "cats"))) {
    $cats = array_unique(dtthemes_mytheme_option("widgetarea", "cats"));
    foreach ($cats as $category) {
        echo "<!-- Category Drop Down Container -->";
        echo "<div class='multidropdown'>";
        echo dtthemes_mytheme_categorylist("widgetarea,cats", $category, "multidropdown");
        echo "</div><!-- Category Drop Down Container end-->";
    }
} else {
    echo "<!-- Category Drop Down Container -->";
    echo "<div class='multidropdown'>";
    echo dtthemes_mytheme_categorylist("widgetarea,cats", "", "multidropdown");
    echo "</div><!-- Category Drop Down Container end-->";
}
?>
                </div><!-- .box-content End-->
            </div><!-- .bpanel-box -->
        </div><!-- #for-categories end-->

<?php 
if (class_exists('woocommerce')) {
    ?>
        <!-- #for-products -->
        <div id="for-products" class="tab-content">
        	<!-- .bpanel-box-->
        	<div class="bpanel-box">
            	<div class="box-title">