Beispiel #1
0
    function zupp_footer_sidebar_function()
    {
        $sidebarname = "footer-sidebar-area";
        $sidebar_check = true;
        if (zupp_is_single() && zupp_postmeta('zupp_footer_sidebar') == "none") {
            $sidebar_check = false;
        }
        if (is_active_sidebar($sidebarname) && $sidebar_check == true) {
            ?>

        <footer id="footer">
            
            <div class="container">
    
    			<section class="row widgets">
							
					<?php 
            dynamic_sidebar($sidebarname);
            ?>
							
                </section>
    
            </div>
            
        </footer>
    
<?php 
        }
    }
Beispiel #2
0
 function zupp_slogan_function($title = "enabled", $style = "")
 {
     global $s;
     $html = '';
     if (zupp_is_single()) {
         if (zupp_postmeta('zupp_slogan')) {
             $html = zupp_postmeta('zupp_slogan');
         }
         if (zupp_postmeta('zupp_subslogan')) {
             $html .= '<span>' . zupp_postmeta('zupp_subslogan') . '</span>';
         }
     } elseif (is_search()) {
         $html = "<h1 class='title'>" . __('Search results for : ', "zupp") . $s . "</h1>";
     } elseif (is_404()) {
         $html = "<h1 class='title'>" . __('Content not found', "zupp") . "</h1>";
     } elseif (is_home()) {
         $html = "<h1 class='title'>" . get_bloginfo('name') . '<span>' . get_bloginfo('description') . '</span></h1>';
     } elseif (zupp_get_archive_title()) {
         if (strstr(zupp_get_archive_title(), ':')) {
             $archive_title = explode(":", zupp_get_archive_title());
             $html = "<h1 class='title'>" . $archive_title[1] . "</h1>";
         } else {
             $html = "<h1 class='title'>" . zupp_get_archive_title() . "</h1>";
         }
     }
     if (!empty($html)) {
         echo '<div id="slogan" ' . $style . '>' . $html . '</div>';
     }
 }
Beispiel #3
0
 function zupp_after_content_function($type = "")
 {
     if (!zupp_is_single()) {
         do_action('zupp_excerpt');
     } else {
         if ((!zupp_postmeta('zupp_view_post_info') || zupp_postmeta('zupp_view_post_info') == "on") && $type == "post") {
             echo '<div class="line"><div class="post-info">';
             echo '<span class="genericon genericon-time"></span>' . get_the_date();
             echo '<span class="genericon genericon-category"></span>';
             the_category(', ');
             the_tags('<span class="genericon genericon-tag"></span>', ', ');
             if (!zupp_postmeta('zupp_post_icons') || zupp_postmeta('zupp_post_icons') == "on") {
                 echo zupp_posticon();
             }
             echo '</div></div>';
         }
         the_content();
         echo '<div class="clear"></div>';
     }
 }
    the_post();
    do_action('zupp_postformat');
    wp_link_pages(array('before' => '<div class="wip-pagination">', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
    ?>
                        
                    <div style="clear:both"></div>
                    
                </article>
        
                <?php 
    comments_template();
    ?>

			</div>
        
        </div>

		<?php 
    get_sidebar();
}
?>
           
    </div>
    
</div>

<?php 
if (zupp_postmeta('zupp_bottom_sidebar') && zupp_postmeta('zupp_bottom_sidebar') != "none") {
    do_action('zupp_bottom_sidebar', zupp_postmeta('zupp_bottom_sidebar'));
}
get_footer();
 function zupp_sidebar_name($type)
 {
     $sidebars = array("header" => array("postmeta" => "zupp_header_sidebar", "default" => "header-sidebar-area"), "side" => array("postmeta" => "zupp_sidebar", "default" => "side-sidebar-area"), "scroll" => array("postmeta" => "zupp_scroll_sidebar", "default" => "scroll-sidebar-area"), "bottom" => array("postmeta" => "zupp_bottom_sidebar", "default" => "bottom-sidebar-area"), "footer" => array("postmeta" => "zupp_footer_sidebar", "default" => "footer-sidebar-area"));
     if (zupp_is_single()) {
         $sidebar_name = zupp_postmeta($sidebars[$type]['postmeta']);
     } else {
         $sidebar_name = $sidebars[$type]['default'];
     }
     return $sidebar_name;
 }
 function zupp_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()) && zupp_setting('zupp_category_layout')) {
         $span = $template[zupp_setting('zupp_category_layout')];
         $sidebar = zupp_setting('zupp_category_layout');
     } else {
         if (is_home() && zupp_setting('zupp_home')) {
             $span = $template[zupp_setting('zupp_home')];
             $sidebar = zupp_setting('zupp_home');
         } else {
             if (is_search() && zupp_setting('zupp_search_layout')) {
                 $span = $template[zupp_setting('zupp_search_layout')];
                 $sidebar = zupp_setting('zupp_search_layout');
             } else {
                 if ((is_single() || is_page()) && zupp_postmeta('zupp_template')) {
                     $span = $template[zupp_postmeta('zupp_template')];
                     $sidebar = zupp_postmeta('zupp_template');
                 }
             }
         }
     }
     return ${$id};
 }
Beispiel #7
0
    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 "on-off":
                            ?>
				
					<div class="wip_inputbox">
		
						<div class="input-left">
		
							<label for="<?php 
                            echo $field['id'];
                            ?>
"><?php 
                            echo $field['name'];
                            ?>
</label>
							<em><?php 
                            echo $field['desc'];
                            ?>
</em>
							
						</div>
						
                        <div class="input-right">
		
								<div class="bool-slider <?php 
                            if (zupp_postmeta($field['id']) != "") {
                                echo stripslashes(zupp_postmeta($field['id']));
                            } else {
                                echo $field['std'];
                            }
                            ?>
">
									
									<div class="inset"><div class="control"></div></div>
									
									<input name="<?php 
                            echo $field['id'];
                            ?>
" id="<?php 
                            echo $field['id'];
                            ?>
" type="hidden" value="<?php 
                            if (zupp_postmeta($field['id']) != "") {
                                echo zupp_postmeta($field['id']);
                            } else {
                                echo $field['std'];
                            }
                            ?>
" class="on-off" />
	
								</div>  
								
								<div class="clear"></div>      
						
						</div>	
							
						<div class="clear"></div>
						
					</div>
				
					<?php 
                            break;
                        case 'title':
                            ?>
					
					<h2 class="title"><?php 
                            echo $field['name'];
                            ?>
</h2>
					
					<?php 
                            break;
                        case 'text':
                            ?>
					
					<div class="wip_inputbox">
						
						<div class="input-left">
						
							<label for="<?php 
                            echo $field['id'];
                            ?>
"><?php 
                            echo $field['name'];
                            ?>
</label>
							<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 (zupp_postmeta($field['id']) != "") {
                                echo zupp_postmeta($field['id']);
                            }
                            ?>
" style="width:100%"/>
							
						</div>
						
						<div class="clear"></div>
                        
					</div>
				
					<?php 
                            break;
                        case "color":
                            ?>
								
					<div class="wip_inputbox">
						
						<div class="input-left">
						
							<label for="<?php 
                            echo $field['id'];
                            ?>
"><?php 
                            echo $field['name'];
                            ?>
</label>
							<em> <?php 
                            echo $field['desc'];
                            ?>
 </em>
							
						</div>
						
						<div class="input-right">
						
							<input data-hex="true" name="<?php 
                            echo $field['id'];
                            ?>
" id="<?php 
                            echo $field['id'];
                            ?>
" type="<?php 
                            echo $field['type'];
                            ?>
" value="<?php 
                            if (zupp_postmeta($field['id']) != "") {
                                echo zupp_postmeta($field['id']);
                            } else {
                                echo $field['std'];
                            }
                            ?>
" style="width:90%"/>
							
						</div>
						
						<div class="clear"></div>
                        
					</div>

					<?php 
                            break;
                        case "upload":
                            ?>
				
					<div class="wip_inputbox">
				 
						<div class="input-left">
						
							<label for="<?php 
                            echo $field['id'];
                            ?>
"><?php 
                            echo $field['name'];
                            ?>
</label>
							<em> <?php 
                            echo $field['desc'];
                            ?>
 </em>
							
						</div>

						<div class="input-right">
						
							<input id="<?php 
                            echo $field['id'];
                            ?>
" type="text" name="<?php 
                            echo $field['id'];
                            ?>
" class="idattachment" value="<?php 
                            if (zupp_postmeta($field['id']) != "") {
                                echo zupp_postmeta($field['id']);
                            } else {
                                echo $field['std'];
                            }
                            ?>
" />
									
							<input type="button" name="just_button" class="button" value="<?php 
                            esc_attr_e('Upload');
                            ?>
" />
							
						</div>

						<div class="clear"></div>

					</div>
				
					<?php 
                            break;
                        case 'select':
                            ?>
					
					<div class="wip_inputbox">
						
						<div class="input-left">
						
							<label for="<?php 
                            echo $field['id'];
                            ?>
"><?php 
                            echo $field['name'];
                            ?>
</label>
							<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 (zupp_postmeta($field['id']) == $option || !zupp_postmeta($field['id']) && $field['std'] == $option) {
                                    echo 'selected="selected"';
                                }
                                ?>
 value="<?php 
                                echo $option;
                                ?>
"><?php 
                                echo $values;
                                ?>
</option>
								
								<?php 
                            }
                            ?>
  

							</select>

						</div>
						
						<div class="clear"></div>
					
                    </div>
					
					<?php 
                            break;
                        case 'taxonomy-select':
                            $slideshows = get_terms("slideshows");
                            foreach ($slideshows as $slideshow) {
                                $wp_terms[$slideshow->term_id] = $slideshow->name;
                            }
                            ?>
					
					<div 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 (zupp_postmeta($field['id']) == $option) {
                                    echo 'selected="selected"';
                                }
                                ?>
 value="<?php 
                                echo $option;
                                ?>
"><?php 
                                echo $values;
                                ?>
</option><?php 
                            }
                            ?>
						</select>
						<em> <?php 
                            echo $field['desc'];
                            ?>
 </em>
					</div>
				
				
					<?php 
                            break;
                        case 'textarea':
                            ?>
							
					<div class="wip_inputbox">
						
						<div class="input-left">
						
                        	<label for="<?php 
                            echo $field['id'];
                            ?>
"><?php 
                            echo $field['name'];
                            ?>
</label>
							<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 (zupp_postmeta($field['id']) != "") {
                                echo stripslashes(zupp_postmeta($field['id']));
                            }
                            ?>
</textarea>
						
                        </div>
					
                    	<div class="clear"></div>
					
                    </div>
							
					<?php 
                            break;
                    }
                }
            }
        }
    }