function diarjolite_header_content() { if (is_page() && diarjolite_postmeta('diarjolite_slogan')) { ?> <section id="subheader"> <div class="container"> <div class="row"> <div class="col-md-12"> <p> <?php echo diarjolite_postmeta('diarjolite_slogan'); ?> </p> </div> </div> </div> </section> <?php } }
function diarjolite_template($id) { $template = array("full" => "col-md-12", "left-sidebar" => "col-md-8", "right-sidebar" => "col-md-8"); $span = $template["right-sidebar"]; $sidebar = "right-sidebar"; if ((is_category() || is_tag() || is_tax() || is_month()) && diarjolite_setting('diarjolite_category_layout')) { $span = $template[diarjolite_setting('diarjolite_category_layout')]; $sidebar = diarjolite_setting('diarjolite_category_layout'); } else { if (is_home() && diarjolite_setting('diarjolite_home')) { $span = $template[diarjolite_setting('diarjolite_home')]; $sidebar = diarjolite_setting('diarjolite_home'); } else { if (is_search() && diarjolite_setting('diarjolite_search_layout')) { $span = $template[diarjolite_setting('diarjolite_search_layout')]; $sidebar = diarjolite_setting('diarjolite_search_layout'); } else { if ((is_single() || is_page()) && diarjolite_postmeta('diarjolite_template')) { $span = $template[diarjolite_postmeta('diarjolite_template')]; $sidebar = diarjolite_postmeta('diarjolite_template'); } } } } return ${$id}; }
public function metaboxes_panel() { $metaboxes_fields = $this->metaboxes_fields; global $post, $post_id; foreach ($metaboxes_fields as $value) { switch ($value['type']) { case 'navigation': ?> <div id="tabs" class="metaboxes"> <ul> <?php foreach ($value['item'] as $option => $name) { echo "<li class='" . $option . "'><a href='#" . str_replace(" ", "", $option) . "'>" . $name . "</a></li>"; } ?> <li class="clear"></li> </ul> <?php break; case 'begintab': ?> <div id="<?php echo $value['tab']; ?> " > <?php break; case 'endtab': ?> </div> <?php break; } foreach ($value as $field) { if (isset($field['type'])) { switch ($field['type']) { case 'start': ?> <div class="postformat" id="<?php echo $field['id']; ?> "> <?php break; case 'end': ?> </div> <?php break; case 'title': ?> <h2 class="title"><?php echo $field['name']; ?> </h2> <?php break; case 'text': ?> <p class="wip_inputbox"> <div class="input-left"> <label for="<?php echo $field['id']; ?> "><?php echo $field['name']; ?> </label><br /> <em> <?php echo $field['desc']; ?> </em> </div> <div class="input-right"> <input name="<?php echo $field['id']; ?> " id="<?php echo $field['id']; ?> " type="<?php echo $field['type']; ?> " value="<?php if (diarjolite_postmeta($field['id']) != "") { echo diarjolite_postmeta($field['id']); } ?> " style="width:100%"/> </div> <div class="clear"></div> </p> <?php break; case 'select': ?> <p class="wip_inputbox"> <div class="input-left"> <label for="<?php echo $field['id']; ?> "><?php echo $field['name']; ?> </label><br /> <em> <?php echo $field['desc']; ?> </em> </div> <div class="input-right"> <select name="<?php echo $field['id']; ?> " id="<?php echo $field['id']; ?> " style="width:100%"> <?php foreach ($field['options'] as $option => $values) { ?> <option <?php if (diarjolite_postmeta($field['id']) == $option || !diarjolite_postmeta($field['id']) && $field['std'] == $option) { echo 'selected="selected"'; } ?> value="<?php echo $option; ?> "><?php echo $values; ?> </option><?php } ?> </select> </div> <div class="clear"></div> </p> <?php break; case 'taxonomy-select': $slideshows = get_terms("slideshows"); foreach ($slideshows as $slideshow) { $wp_terms[$slideshow->term_id] = $slideshow->name; } ?> <p class="wip_inputbox"> <label for="<?php echo $field['id']; ?> "><?php echo $field['name']; ?> </label> <select name="<?php echo $field['id']; ?> " id="<?php echo $field['id']; ?> " style="width:100%"> <option value="all"> All </option> <?php foreach ($wp_terms as $option => $values) { ?> <option <?php if (diarjolite_postmeta($field['id']) == $option) { echo 'selected="selected"'; } ?> value="<?php echo $option; ?> "><?php echo $values; ?> </option><?php } ?> </select> <em> <?php echo $field['desc']; ?> </em> </p> <?php break; case 'textarea': ?> <p class="wip_inputbox"> <div class="input-left"> <label for="<?php echo $field['id']; ?> "><?php echo $field['name']; ?> </label><br /> <em> <?php echo $field['desc']; ?> </em> </div> <div class="input-right"> <textarea name="<?php echo $field['id']; ?> " id="<?php echo $field['id']; ?> " type="<?php echo $field['type']; ?> " style="width:100%"><?php if (diarjolite_postmeta($field['id']) != "") { echo stripslashes(diarjolite_postmeta($field['id'])); } ?> </textarea> </div> <div class="clear"></div> </p> <?php break; } } } } }
<div class="row"> <div id="sidebar" class="post-container col-md-12"> <div class="sidebar-box"> <?php if (is_active_sidebar('side-sidebar-area')) { dynamic_sidebar('side-sidebar-area'); } else { the_widget('WP_Widget_Archives', '', array('before_widget' => '<div class="post-article">', 'after_widget' => '</div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>')); the_widget('WP_Widget_Calendar', array("title" => __('Calendar', "diarjolite")), array('before_widget' => '<div class="post-article">', 'after_widget' => '</div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>')); the_widget('WP_Widget_Categories', '', array('before_widget' => '<div class="post-article">', 'after_widget' => '</div>', 'before_title' => '<h3 class="title">', 'after_title' => '</h3>')); } ?> <?php dynamic_sidebar(diarjolite_postmeta('diarjolite_sidebar')); ?> </div> </div> </div> </div> <?php }