コード例 #1
0
ファイル: header.php プロジェクト: pbhanu1994/bhanuprakash
function novalite_header_content()
{
    if (is_page() && novalite_postmeta('wip_slogan')) {
        ?>


<section id="subheader">
	<div class="container">
    	<div class="row">
        	<div class="span12">
            	<p> <?php 
        echo novalite_postmeta('wip_slogan');
        ?>
 </p>
            </div>
        </div>
    </div>
</section>

<?php 
    }
    ?>


<?php 
    if (novalite_postmeta('wip_header_sidebar') != "none" && is_active_sidebar('header_sidebar_area')) {
        ?>

	
    <section class="container head_widget content">
		<div class="container">
            
			<?php 
        if (is_active_sidebar('header_sidebar_area')) {
            ?>

                
				<!-- FOOTER WIDGET BEGINS -->
                    
                        <section class="row widget">
                            <?php 
            dynamic_sidebar('header_sidebar_area');
            ?>

                        </section>
        
				<!-- FOOTER WIDGET END -->
                    
			<?php 
        }
        ?>

        
		</div>
        
	</section>
    
<?php 
    }
}
コード例 #2
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>";
                    }
                    ?>

					   
					</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_metabox">
		
						<div class="input-left">
		
							<label for="<?php 
                            echo $field['id'];
                            ?>
"><?php 
                            echo $field['name'];
                            ?>
</label>
							
							<p><?php 
                            echo $field['desc'];
                            ?>
</p>
							
						</div>
						<div class="input-right">
		
								<div class="bool-slider <?php 
                            if (novalite_postmeta($field['id']) != "") {
                                echo stripslashes(novalite_postmeta($field['id']));
                            } else {
                                echo "on";
                            }
                            ?>
">
									
									<div class="inset">
										<div class="control"></div>
									</div>
									
									<input name="<?php 
                            echo $field['id'];
                            ?>
" id="<?php 
                            echo $field['id'];
                            ?>
" type="hidden" value="<?php 
                            if (novalite_postmeta($field['id']) != "") {
                                echo novalite_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_metabox">
						
						<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 (novalite_postmeta($field['id']) != "") {
                                echo novalite_postmeta($field['id']);
                            }
                            ?>
" style="width:100%"/>
							
						</div>
						
						<div class="clear"></div>
                        
					</div>
				
					<?php 
                            break;
                        case 'select':
                            ?>

					
					<div class="wip_metabox">
						
						<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 (novalite_postmeta($field['id']) == $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_metabox">
						<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 (novalite_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_metabox">
						
						<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 (novalite_postmeta($field['id']) != "") {
                                echo stripslashes(novalite_postmeta($field['id']));
                            }
                            ?>
</textarea>
						</div>
						<div class="clear"></div>
					
                    </div>
							
					<?php 
                            break;
                    }
                }
            }
        }
    }
コード例 #3
0
ファイル: main.php プロジェクト: pbhanu1994/bhanuprakash
function novalite_template($id)
{
    $template = array("full" => "span12", "left-sidebar" => "span8", "right-sidebar" => "span8");
    $span = $template["full"];
    $sidebar = "full";
    if (is_search() && novalite_setting('wip_search_layout')) {
        $span = $template[novalite_setting('wip_search_layout')];
        $sidebar = novalite_setting('wip_search_layout');
    } else {
        if ((is_category() || is_tag() || is_tax() || is_month()) && novalite_setting('wip_category_layout')) {
            $span = $template[novalite_setting('wip_category_layout')];
            $sidebar = novalite_setting('wip_category_layout');
        } else {
            if (is_home() && novalite_setting('wip_home')) {
                $span = $template[novalite_setting('wip_home')];
                $sidebar = novalite_setting('wip_home');
            } else {
                if (is_home() && !novalite_setting('wip_home')) {
                    $span = $template["right-sidebar"];
                    $sidebar = "right-sidebar";
                } else {
                    if (novalite_postmeta('wip_template')) {
                        $span = $template[novalite_postmeta('wip_template')];
                        $sidebar = novalite_postmeta('wip_template');
                    }
                }
            }
        }
    }
    return ${$id};
}