• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_sidebars函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_sidebars函数的典型用法代码示例。如果您正苦于以下问题:PHP get_sidebars函数的具体用法?PHP get_sidebars怎么用?PHP get_sidebars使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_sidebars函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_template_part

</div><?php 
        }
    }
} else {
    get_template_part('post', 'noresults');
}
if ($is_post_wrap == '1') {
    ?>
</div><?php 
}
get_template_part('navigation');
?>
            
            <?php 
$theme->hook('content_after');
?>
        
        </div><!-- #content -->
    
        <?php 
get_sidebars();
?>
        
        <?php 
$theme->hook('main_after');
?>
        
    </div><!-- #main -->
    
<?php 
get_footer();
开发者ID:ashik968,项目名称:digiplot,代码行数:31,代码来源:archive.php


示例2: get_sidebars

    </div><!-- #content-wrap -->
    
    <div id="primary-sidebar-wrap" class="span-8 last">
            
            <?php 
get_sidebars('primary');
?>
    
    </div><!-- #primary-sidebar-wrap -->
    
    
</div><!-- #main -->
        
<?php 
get_footer();
开发者ID:jacko5,项目名称:bjj,代码行数:15,代码来源:content-after.php


示例3: get_template_part

         * Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part
         */
        $is_post_wrap++;
        if ($is_post_wrap == '1') {
            ?>
<div><?php 
        }
        get_template_part('post', 'homepage');
        if ($is_post_wrap == '2') {
            $is_post_wrap = 0;
            ?>
</div><?php 
        }
    }
} else {
    get_template_part('post', 'noresults');
}
?>
				</div>
			</td>
			<td>
				<div style="float:right"> 	
					<?php 
get_sidebars(null);
?>
				</div>
			</td>
		</tr>
	</table>
<?php 
get_footer();
开发者ID:adwisatya,项目名称:firPro,代码行数:31,代码来源:index.php


示例4: array

/*-----------------------------------------------------------------------------------*/
/*	Toggles Config
/*-----------------------------------------------------------------------------------*/
$fusion_shortcodes['toggles'] = array('no_preview' => true, 'params' => array('divider_line' => array('std' => 'default', 'type' => 'select', 'label' => __('Divider Line', 'fusion-core'), 'desc' => __('Choose to display a divider line between each item.', 'fusion-core'), 'options' => array('' => 'Default', 'yes' => 'Yes', 'no' => 'No')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[accordian divider_line="{{divider_line}}" class="{{class}}" id="{{id}}"]{{child_shortcode}}[/accordian]', 'popup_title' => __('Insert Toggles Shortcode', 'fusion-core'), 'child_shortcode' => array('params' => array('title' => array('std' => '', 'type' => 'text', 'label' => __('Title', 'fusion-core'), 'desc' => __('Insert the toggle title', 'fusion-core')), 'open' => array('type' => 'select', 'label' => __('Open by Default', 'fusion-core'), 'desc' => __('Choose to have the toggle open when page loads', 'fusion-core'), 'options' => $reverse_choices), 'content' => array('std' => '', 'type' => 'textarea', 'label' => __('Toggle Content', 'fusion-core'), 'desc' => __('Insert the toggle content', 'fusion-core'))), 'shortcode' => '[toggle title="{{title}}" open="{{open}}"]{{content}}[/toggle]', 'clone_button' => __('Add Toggle', 'fusion-core')));
/*-----------------------------------------------------------------------------------*/
/*	Tooltip Config
/*-----------------------------------------------------------------------------------*/
$fusion_shortcodes['tooltip'] = array('no_preview' => true, 'params' => array('title' => array('std' => '', 'type' => 'text', 'label' => __('Tooltip Text', 'fusion-core'), 'desc' => __('Insert the text that displays in the tooltip', 'fusion-core')), 'placement' => array('type' => 'select', 'label' => __('Tooltip Position', 'fusion-core'), 'desc' => __('Choose the display position.', 'fusion-core'), 'options' => array('top' => __('Top', 'fusion-core'), 'bottom' => __('Bottom', 'fusion-core'), 'left' => __('Left', 'fusion-core'), 'Right' => __('Right', 'fusion-core'))), 'trigger' => array('type' => 'select', 'label' => __('Tooltip Trigger', 'fusion-core'), 'desc' => __('Choose action to trigger the tooltip.', 'fusion-core'), 'options' => array('hover' => __('Hover', 'fusion-core'), 'click' => __('Click', 'fusion-core'))), 'content' => array('std' => '', 'type' => 'textarea', 'label' => __('Content', 'fusion-core'), 'desc' => __('Insert the text that will activate the tooltip hover', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[tooltip title="{{title}}" placement="{{placement}}" trigger="{{trigger}}" class="{{class}}" id="{{id}}"]{{content}}[/tooltip]', 'popup_title' => __('Tooltip Shortcode', 'fusion-core'));
/*-----------------------------------------------------------------------------------*/
/*	Vimeo Config
/*-----------------------------------------------------------------------------------*/
$fusion_shortcodes['vimeo'] = array('no_preview' => true, 'params' => array('id' => array('std' => '', 'type' => 'text', 'label' => __('Video ID', 'fusion-core'), 'desc' => __('For example the Video ID for <br />https://vimeo.com/75230326 is 75230326', 'fusion-core')), 'width' => array('std' => '600', 'type' => 'text', 'label' => __('Width', 'fusion-core'), 'desc' => __('In pixels but only enter a number, ex: 600', 'fusion-core')), 'height' => array('std' => '350', 'type' => 'text', 'label' => __('Height', 'fusion-core'), 'desc' => __('In pixels but enter a number, ex: 350', 'fusion-core')), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay Video', 'fusion-core'), 'desc' => __('Set to yes to make video autoplaying', 'fusion-core'), 'options' => $reverse_choices), 'apiparams' => array('std' => '', 'type' => 'text', 'label' => __('AdditionalAPI Parameter', 'fusion-core'), 'desc' => __('Use additional API parameter, for example &title=0 to disable title on video. VimeoPlus account may be required.', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[vimeo id="{{id}}" width="{{width}}" height="{{height}}" autoplay="{{autoplay}}" api_params="{{apiparams}}" class="{{class}}"]', 'popup_title' => __('Vimeo Shortcode', 'fusion-core'));
/*-----------------------------------------------------------------------------------*/
/*	Widget Area Config
/*-----------------------------------------------------------------------------------*/
$fusion_shortcodes['fusion_widget_area'] = array('params' => array('name' => array('std' => '', 'type' => 'select', 'label' => __('Widget Area Name', 'fusion-core'), 'desc' => __('Choose a background color for the widget area.', 'fusion-core'), 'options' => get_sidebars()), 'background_color' => array('type' => 'colorpicker', 'label' => __('Background Color', 'fusion-core'), 'desc' => __('Choose a background color for the widget area.', 'fusion-core')), 'padding' => array('std' => '', 'type' => 'text', 'label' => __('Padding', 'fusion-core'), 'desc' => __('In pixels or percentage, ex: 10px or 10%.', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[fusion_widget_area name="{{name}}" background_color="{{background_color}}" padding="{{padding}}" class="{{class}}" id="{{id}}"][/fusion_widget_area]', 'popup_title' => __('Widget Area Shortcode', 'fusion-core'), 'no_preview' => true);
/*-----------------------------------------------------------------------------------*/
/*	Woo Featured Slider Config
/*-----------------------------------------------------------------------------------*/
$fusion_shortcodes['woofeatured'] = array('no_preview' => true, 'params' => array('picture_size' => array('type' => 'select', 'label' => __('Picture Size', 'fusion-core'), 'desc' => __('fixed = width and height will be fixed <br />auto = width and height will adjust to the image.', 'fusion-core'), 'options' => array('auto' => __('Auto', 'fusion-core'), 'fixed' => __('Fixed', 'fusion-core'))), 'carousel_layout' => array('type' => 'select', 'label' => __('Carousel Layout', 'fusion-core'), 'desc' => __('Choose to show titles on rollover image, or below image.', 'fusion-core'), 'options' => array('title_on_rollover' => __('Title on rollover', 'fusion-core'), 'title_below_image' => __('Title below image', 'fusion-core'))), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay', 'fusion-core'), 'desc' => __('Choose to autoplay the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'columns' => array('std' => '5', 'type' => 'select', 'label' => __('Maximum Columns', 'fusion-core'), 'desc' => __('Select the number of max columns to display.', 'fusion-core'), 'options' => fusion_shortcodes_range(6, false)), 'column_spacing' => array('std' => '10', 'type' => 'text', 'label' => __('Column Spacing', 'fusion-core'), "desc" => __("Insert the amount of spacing between items without 'px'. ex: 13.", "fusion-core")), 'scroll_items' => array('std' => '', 'type' => 'text', 'label' => __('Scroll Items', 'fusion-core'), "desc" => __("Insert the amount of items to scroll. Leave empty to scroll number of visible items.", "fusion-core")), 'show_nav' => array('type' => 'select', 'label' => __('Show Navigation', 'fusion-core'), 'desc' => __('Choose to show navigation buttons on the carousel.', 'fusion-core'), 'options' => $choices), 'mouse_scroll' => array('type' => 'select', 'label' => __('Mouse Scroll', 'fusion-core'), 'desc' => __('Choose to enable mouse drag control on the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'show_cats' => array('type' => 'select', 'label' => __('Show Categories', 'fusion-core'), 'desc' => __('Choose to show or hide the categories', 'fusion-core'), 'options' => $reverse_choices), 'show_price' => array('type' => 'select', 'label' => __('Show Price', 'fusion-core'), 'desc' => __('Choose to show or hide the price', 'fusion-core'), 'options' => $reverse_choices), 'show_buttons' => array('type' => 'select', 'label' => __('Show Buttons', 'fusion-core'), 'desc' => __('Choose to show or hide the icon buttons', 'fusion-core'), 'options' => $reverse_choices), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[featured_products_slider picture_size="{{picture_size}}" carousel_layout="{{carousel_layout}}" autoplay="{{autoplay}}" columns="{{columns}}" column_spacing="{{column_spacing}}" scroll_items="{{scroll_items}}" show_nav="{{show_nav}}" mouse_scroll="{{mouse_scroll}}" show_price="{{show_price}}" show_buttons="{{show_buttons}}" class="{{class}}" id="{{id}}"]', 'popup_title' => __('Woocommerce Featured Products Slider Shortcode', 'fusion-core'));
/*-----------------------------------------------------------------------------------*/
/*	Woo Products Slider Config
/*-----------------------------------------------------------------------------------*/
$fusion_shortcodes['wooproducts'] = array('params' => array('picture_size' => array('type' => 'select', 'label' => __('Picture Size', 'fusion-core'), 'desc' => __('fixed = width and height will be fixed <br />auto = width and height will adjust to the image.', 'fusion-core'), 'options' => array('fixed' => __('Fixed', 'fusion-core'), 'auto' => __('Auto', 'fusion-core'))), 'cat_slug' => array('type' => 'multiple_select', 'label' => __('Categories', 'fusion-core'), 'desc' => __('Select a category or leave blank for all', 'fusion-core'), 'options' => fusion_shortcodes_categories('product_cat')), 'number_posts' => array('std' => 5, 'type' => 'text', 'label' => __('Number of Products', 'fusion-core'), 'desc' => __('Select the number of products to display', 'fusion-core')), 'carousel_layout' => array('type' => 'select', 'label' => __('Carousel Layout', 'fusion-core'), 'desc' => __('Choose to show titles on rollover image, or below image.', 'fusion-core'), 'options' => array('title_on_rollover' => __('Title on rollover', 'fusion-core'), 'title_below_image' => __('Title below image', 'fusion-core'))), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay', 'fusion-core'), 'desc' => __('Choose to autoplay the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'columns' => array('std' => '5', 'type' => 'select', 'label' => __('Maximum Columns', 'fusion-core'), 'desc' => __('Select the number of max columns to display.', 'fusion-core'), 'options' => fusion_shortcodes_range(6, false)), 'column_spacing' => array('std' => '13', 'type' => 'text', 'label' => __('Column Spacing', 'fusion-core'), "desc" => __("Insert the amount of spacing between items without 'px'. ex: 13.", "fusion-core")), 'scroll_items' => array('std' => '', 'type' => 'text', 'label' => __('Scroll Items', 'fusion-core'), "desc" => __("Insert the amount of items to scroll. Leave empty to scroll number of visible items.", "fusion-core")), 'show_nav' => array('type' => 'select', 'label' => __('Show Navigation', 'fusion-core'), 'desc' => __('Choose to show navigation buttons on the carousel.', 'fusion-core'), 'options' => $choices), 'mouse_scroll' => array('type' => 'select', 'label' => __('Mouse Scroll', 'fusion-core'), 'desc' => __('Choose to enable mouse drag control on the carousel.', 'fusion-core'), 'options' => $reverse_choices), 'show_cats' => array('type' => 'select', 'label' => __('Show Categories', 'fusion-core'), 'desc' => __('Choose to show or hide the categories', 'fusion-core'), 'options' => $choices), 'show_price' => array('type' => 'select', 'label' => __('Show Price', 'fusion-core'), 'desc' => __('Choose to show or hide the price', 'fusion-core'), 'options' => $choices), 'show_buttons' => array('type' => 'select', 'label' => __('Show Buttons', 'fusion-core'), 'desc' => __('Choose to show or hide the icon buttons', 'fusion-core'), 'options' => $choices), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core')), 'id' => array('std' => '', 'type' => 'text', 'label' => __('CSS ID', 'fusion-core'), 'desc' => __('Add an ID to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[products_slider picture_size="{{picture_size}}" cat_slug="{{cat_slug}}" number_posts="{{number_posts}}" carousel_layout="{{carousel_layout}}" autoplay="{{autoplay}}" columns="{{columns}}" column_spacing="{{column_spacing}}" scroll_items="{{scroll_items}}" show_nav="{{show_nav}}" mouse_scroll="{{mouse_scroll}}" show_price="{{show_price}}" show_buttons="{{show_buttons}}" class="{{class}}" id="{{id}}"]', 'popup_title' => __('Woocommerce Products Slider Shortcode', 'fusion-core'), 'no_preview' => true);
/*-----------------------------------------------------------------------------------*/
/*	Youtube Config
/*-----------------------------------------------------------------------------------*/
$fusion_shortcodes['youtube'] = array('no_preview' => true, 'params' => array('id' => array('std' => '', 'type' => 'text', 'label' => __('Video ID', 'fusion-core'), 'desc' => __('For example the Video ID for <br />http://www.youtube.com/LOfeCR7KqUs is LOfeCR7KqUs', 'fusion-core')), 'width' => array('std' => '600', 'type' => 'text', 'label' => __('Width', 'fusion-core'), 'desc' => __('In pixels but only enter a number, ex: 600', 'fusion-core')), 'height' => array('std' => '350', 'type' => 'text', 'label' => __('Height', 'fusion-core'), 'desc' => __('In pixels but only enter a number, ex: 350', 'fusion-core')), 'autoplay' => array('type' => 'select', 'label' => __('Autoplay Video', 'fusion-core'), 'desc' => __('Set to yes to make video autoplaying', 'fusion-core'), 'options' => $reverse_choices), 'apiparams' => array('std' => '', 'type' => 'text', 'label' => __('AdditionalAPI Parameter', 'fusion-core'), 'desc' => __('Use additional API parameter, for example &rel=0 to disable related videos', 'fusion-core')), 'class' => array('std' => '', 'type' => 'text', 'label' => __('CSS Class', 'fusion-core'), 'desc' => __('Add a class to the wrapping HTML element.', 'fusion-core'))), 'shortcode' => '[youtube id="{{id}}" width="{{width}}" height="{{height}}" autoplay="{{autoplay}}" api_params="{{apiparams}}" class="{{class}}"]', 'popup_title' => __('Youtube Shortcode', 'fusion-core'));
/*-----------------------------------------------------------------------------------*/
/*	Fusion Slider Config
/*-----------------------------------------------------------------------------------*/
开发者ID:kevinaxu,项目名称:99boulders,代码行数:31,代码来源:config.php


示例5: admin_page

function admin_page()
{
    ?>
		<script>
			function remove_sidebar_link(name,num){
				answer = confirm("Are you sure you want to remove " + name + "?\nThis will remove any widgets you have assigned to this sidebar.");
				if(answer){
					//alert('AJAX REMOVE');
					remove_sidebar(name,num);
				}else{
					return false;
				}
			}
			function add_sidebar_link(){
				var sidebar_name = prompt("Sidebar Name:","");
				//alert(sidebar_name);
				add_sidebar(sidebar_name);
			}
		</script>
		<div class="wrap">
			<h2>Sidebars</h2>
			<br />
			<table class="widefat page" id="sbg_table" style="width:600px;">
				<tr>
					<th>Sidebar Name</th>
					<th>CSS class</th>
					<th>Remove</th>
				</tr>
				<?php 
    $sidebars = get_sidebars();
    //$sidebars = array('bob','john','mike','asdf');
    if (is_array($sidebars) && !empty($sidebars)) {
        $cnt = 0;
        foreach ($sidebars as $sidebar) {
            $alt = $cnt % 2 == 0 ? 'alternate' : '';
            ?>
				<tr class="<?php 
            echo $alt;
            ?>
">
					<td><?php 
            echo $sidebar;
            ?>
</td>
					<td><?php 
            echo name_to_class($sidebar);
            ?>
</td>
					<td><a href="javascript:void(0);" onclick="return remove_sidebar_link('<?php 
            echo $sidebar;
            ?>
',<?php 
            echo $cnt + 1;
            ?>
);" title="Remove this sidebar">remove</a></td>
				</tr>
				<?php 
            $cnt++;
        }
    } else {
        ?>
					<tr>
						<td colspan="3">No Sidebars defined</td>
					</tr>
					<?php 
    }
    ?>
			</table><br /><br />
            <div class="add_sidebar">
				<a href="javascript:void(0);" onclick="return add_sidebar_link()" title="Add a sidebar" class="button-primary">+ Add New Sidebar</a>

			</div>
			
		</div>
		<?php 
}
开发者ID:devmoonshine,项目名称:development,代码行数:76,代码来源:sidebar-generator.php


示例6: wp_get_header

<?php

wp_get_header();
?>
<div class="span-24" id="contentwrap">
    <?php 
get_sidebars('left');
?>
	<div class="span-14">
		<div id="content">	
			<h2 class='pagetitle'>Error 404 - Page Not Found</h2>
		</div>
	</div>

<?php 
get_sidebars('right');
?>
	</div>
<?php 
wp_get_footer();
开发者ID:USSLomaPrieta,项目名称:usslomaprieta.org,代码行数:20,代码来源:404.php



注:本文中的get_sidebars函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_sideview函数代码示例发布时间:2022-05-15
下一篇:
PHP get_sidebar函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap