本文整理汇总了PHP中is_sidebar_active函数的典型用法代码示例。如果您正苦于以下问题:PHP is_sidebar_active函数的具体用法?PHP is_sidebar_active怎么用?PHP is_sidebar_active使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_sidebar_active函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: hybrid_get_secondary
/**
* Displays the secondary widget area
* Check if the widget area is active or if the default is set to home
* If neither is true, don't display the XHTML
*
* @since 0.2.2
*/
function hybrid_get_secondary()
{
global $hybrid_settings;
if ($hybrid_settings['secondary_inserts_default'] && is_sidebar_active(__('Secondary Home', 'hybrid')) && !is_page_template('no-widgets.php') || is_sidebar_active(hybrid_secondary_var()) && !is_page_template('no-widgets.php')) {
?>
<div id="secondary">
<?php
hybrid_before_secondary();
// Before secondary hook
if (dynamic_sidebar(hybrid_secondary_var())) {
} else {
if ($hybrid_settings['secondary_inserts_default']) {
if (dynamic_sidebar(__('Secondary Home', 'hybrid'))) {
}
}
}
hybrid_after_secondary();
// After secondary hook
?>
</div>
<?php
}
}
开发者ID:alicam,项目名称:vanilla-theme,代码行数:32,代码来源:secondary.php
示例2: add_wicked_footer_aside
function add_wicked_footer_aside()
{
if (is_sidebar_active('footer-aside')) {
echo thematic_before_widget_area('footer-aside');
dynamic_sidebar('footer-aside');
echo thematic_after_widget_area('footer-aside');
}
}
开发者ID:jmawebco,项目名称:wordpress1,代码行数:8,代码来源:widget-areas.php
示例3: vanilla_widget_block
function vanilla_widget_block($block = null)
{
$block = sanitize_title_with_dashes(strtolower($block));
// Apply action
do_action('vanilla_widget_' . str_replace('-', '_', $block) . '_before');
if (function_exists('dynamic_sidebar') && is_sidebar_active($block)) {
$tpl_source = '<metal:block define-macro="' . str_replace("-", "_", $block) . '">' . "\n" . "<!-- widget block: " . $block . " -->\n" . '<span tal:condition="php:VANILLA_DEBUG" class="widget-debug">' . $block . '</span>' . "\n";
$tpl_source .= vanilla_widget_template_markup($block);
$tpl_source .= '${php:vanilla_widget_block_wrapper(\'' . $block . '\')}' . "\n" . '</metal:block><metal:block use-macro="' . str_replace("-", "_", $block) . '" />' . "\n";
//echo $tpl_source;
echo "\t\t<div id=\"" . $block . "\" class=\"block\">\n";
// Load and fire the PHPTAL template!
${$block} = new PHPTAL();
global $tpl_set;
${$block}->setSource($tpl_source, $tpl_set . $block);
vanilla_output_page(${$block});
echo "</div>\n";
}
// Apply action
do_action('vanilla_widget_' . str_replace('-', '_', $block) . '_after');
}
开发者ID:alicam,项目名称:vanilla-theme,代码行数:21,代码来源:widgets.php
示例4: do_action
?>
<?php
do_action('mystique_after_main');
?>
<!-- footer -->
<div id="footer">
<?php
$jquery = get_mystique_option('jquery');
// at least 1st footer area must have widgets
if (is_sidebar_active('footer-1')) {
$sidebar2 = is_sidebar_active('footer-2');
$sidebar3 = is_sidebar_active('footer-3');
$sidebar4 = is_sidebar_active('footer-4');
?>
<!-- blocks + slider -->
<div id="footer-blocks" class="page-content <?php
if (($sidebar2 || $sidebar3 || $sidebar4) && $jquery) {
echo 'withSlider';
}
?>
">
<?php
if (($sidebar2 || $sidebar3 || $sidebar4) && $jquery) {
?>
<!-- block navigation -->
<div class="slide-navigation">
开发者ID:nottombrown,项目名称:vlab,代码行数:31,代码来源:footer.php
示例5: the_content
the_content();
?>
</p>
</section>
<?php
}
}
?>
</section>
<!-- SIDEBAR RIGHT -->
<section id="sidebar" class="right" style="float:right;">
<?php
get_sidebar('right');
?>
<?php
if (is_sidebar_active('right')) {
?>
<div id="sidebar_right">
<?php
dynamic_sidebar('right');
?>
</div>
<?php
}
?>
</section>
<?php
get_footer();
开发者ID:kanhaiyasharma,项目名称:Bestswiss,代码行数:31,代码来源:single.php
示例6: dynamic_sidebar
if (is_sidebar_active('secondary-aside')) {
?>
<div id="secondary" class="aside main-aside">
<ul class="xoxo">
<?php
dynamic_sidebar('secondary-aside');
?>
</ul>
</div><!-- #secondary .aside -->
<?php
}
}
?>
<?php
if (is_sidebar_active('1st-subsidiary-aside')) {
?>
<div id="final" class="aside main-aside">
<ul class="xoxo">
<?php
dynamic_sidebar('1st-subsidiary-aside');
?>
</ul>
</div><!-- #primary .aside -->
<?php
}
?>
<?php
thematic_belowmainasides();
开发者ID:ramblinollie,项目名称:VAM,代码行数:31,代码来源:sidebar.php
示例7:
<?php
if (is_sidebar_active('footer-one') || is_sidebar_active('footer-two')) {
?>
<div class="row pad_foot clearfix">
<div class="row_inner">
<!-- Widget 1 -->
<div class="grid_6">
<?php
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-one')) {
}
?>
</div>
<!-- Widget 2 -->
<div class="grid_6">
<?php
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-two')) {
}
?>
</div>
</div><!-- row inner -->
</div><!-- row -->
<?php
}
开发者ID:devmoonshine,项目名称:development,代码行数:25,代码来源:footer-2.php
示例8: sb_after_content
<?php
sb_after_content();
?>
<?php
comments_template('', true);
?>
</div><!-- #content -->
</div><!-- #container -->
<?php
$sidebar = 'tertiary_widget_area';
$location = 'tertiary';
if (is_sidebar_active($sidebar) || has_action("sb_no_{$sidebar}_widgets")) {
?>
<?php
do_action("sb_before_{$location}_widgets");
?>
<div id="<?php
echo $location;
?>
" class="aside <?php
echo $location;
?>
-aside<?php
if ($classes) {
echo ' ' . $classes;
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:30,代码来源:page-tertiarysidebar.php
示例9: dynamic_sidebar
<?php
if (function_exists('is_sidebar_active') && is_sidebar_active('region-right')) {
?>
<section id="sidebar-right"><div id="sidebar-right-inner" class="region region-right">
<?php
dynamic_sidebar('region-right');
?>
</div></section>
<?php
}
?>
</div></div>
<div id="push"></div>
</div></div>
<footer id="footer"><div id="footer-inner" class="region region-footer">
<?php
if (function_exists('is_sidebar_active') && is_sidebar_active('region-footer')) {
?>
<?php
dynamic_sidebar('region-footer');
?>
<?php
}
?>
</div></footer>
<?php
wp_footer();
?>
</body>
</html>
开发者ID:godzivan,项目名称:dangerous-prototypes-open-hardware,代码行数:31,代码来源:footer.php
示例10: sb_do_secondary_widgets
function sb_do_secondary_widgets()
{
if (is_sidebar_active('secondary_widget_area') || has_action('sb_no_secondary_widgets')) {
?>
<div id="secondary" class="aside secondary-aside">
<ul class="xoxo">
<?php
if (!dynamic_sidebar('secondary-aside')) {
sb_no_secondary_widgets();
}
?>
</ul>
</div><!-- #secondary .aside -->
<?php
}
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:18,代码来源:hooks.php
示例11: dynamic_sidebar
<?php
if (is_sidebar_active('primary_widget_area')) {
?>
<div id="primary" class="widget-area">
<ul class="xoxo">
<?php
dynamic_sidebar('primary_widget_area');
?>
</ul>
</div><!-- #primary .widget-area -->
<?php
}
?>
<?php
if (is_sidebar_active('secondary_widget_area')) {
?>
<div id="secondary" class="widget-area">
<ul class="xoxo">
<?php
dynamic_sidebar('secondary_widget_area');
?>
</ul>
</div><!-- #secondary .widget-area -->
<?php
}
?>
开发者ID:MarkusSilvo,项目名称:your-wordpress-theme,代码行数:29,代码来源:sidebar.php
示例12:
?>
<?php
}
}
?>
</div><!-- /#content -->
<?php
if (IS_MOBI == 'false') {
?>
<div id="sidebar" class="grid_5 omega <?php
echo $sidebar;
?>
region"><div id="sidebar_inner">
<?php
if (function_exists('dynamic_sidebar')) {
if (is_sidebar_active($sidebar)) {
echo '<div id="' . $sidebar . '">';
dynamic_sidebar($sidebar);
echo '</div>';
} else {
ashford_hint('div', $sidebar, 'Activate the ' . $sidebar . ' by adding a widget.');
}
}
?>
</div><!-- /#sidebar_inner -->
<?php
ashford_outline_region(get_bloginfo('url') . '/wp-admin/widgets.php', 'Sidebar(s)', 'Activate this region by adding widgets to the sidebars.');
?>
</div><!-- /#sidebar -->
<?php
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:31,代码来源:page_2_column_right.php
示例13: thematic_page_bottom
function thematic_page_bottom()
{
if (is_sidebar_active('page-bottom')) {
echo thematic_before_widget_area('page-bottom');
dynamic_sidebar('page-bottom');
echo thematic_after_widget_area('page-bottom');
}
}
开发者ID:jentanbernardus,项目名称:Thematic-html5boilerplate,代码行数:8,代码来源:widgets-extensions.php
示例14: bloginfo
} else {
?>
<p id="blog-description"><?php
bloginfo('description');
?>
</p>
<?php
}
?>
</div>
<!-- #masthead -->
<!-- #header_widget --><!--
<?php
if (is_sidebar_active('header_widget')) {
?>
<?php
dynamic_sidebar('header_widget');
?>
<?php
}
?>
-->
<div id="search-wrapper">
<form id="search" action="<?php
bloginfo('url') . '/';
?>
" method="GET">
<fieldset>
<input type="hidden" name="domains" value="nmsu.edu" />
开发者ID:nmsuweb,项目名称:WordPressTheme,代码行数:31,代码来源:header.php
示例15: bloginfo
<?php
if (is_sidebar_active('top_widget_area')) {
?>
<div class="top-widget">
<div class="ito-search-language">
<div class="ito-search">
<?php
if (is_widget_active('top_widget_area', 'search')) {
?>
<form id="searchform" method="get" action="<?php
bloginfo('home');
?>
">
<input type="text" name="s" id="s" value="" size="13" />
</form>
<?php
}
?>
<?php
if (is_widget_active('top_widget_area', 'polylang')) {
the_language_menu(array('display_names_as' => 'slug'));
}
?>
</div>
</div>
</div>
<?php
}
开发者ID:ramonvloon,项目名称:Ingrid,代码行数:31,代码来源:top-widget.php
示例16:
<?php
if (is_sidebar_active('footer-one')) {
?>
<div class="row pad_foot clearfix">
<div class="row_inner">
<!-- Widget 1 -->
<div class="grid_12">
<?php
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-one')) {
}
?>
</div>
</div><!-- row inner -->
</div><!-- row -->
<?php
}
开发者ID:devmoonshine,项目名称:development,代码行数:17,代码来源:footer-1.php
示例17: thematic_subsidiaryclose
function thematic_subsidiaryclose()
{
if (is_sidebar_active('1st-subsidiary-aside') || is_sidebar_active('2nd-subsidiary-aside') || is_sidebar_active('3rd-subsidiary-aside')) {
// one of the subsidiary asides has a widget
?>
</div><!-- #subsidiary -->
<?php
}
}
开发者ID:jentanbernardus,项目名称:Thematic-html5boilerplate,代码行数:11,代码来源:sidebar-extensions.php
示例18: count
?>
</div>
<!-- /side wrap -->
</div>
<!-- /mid column wrap -->
</div>
<!-- /main wrapper -->
<!-- clear main & sidebar sections -->
<div class="clearcontent"></div>
<!-- /clear main & sidebar sections -->
<?php
// check if we have widgets
if (is_sidebar_active('sidebar-3')) {
?>
<!-- footer widgets -->
<ul id="footer-widgets" class="widgetcount-<?php
$sidebars_widgets = wp_get_sidebars_widgets();
$wcount = count($sidebars_widgets['sidebar-3']);
print $wcount;
?>
">
<?php
if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer')) {
} else {
?>
<?php
}
?>
开发者ID:besimhu,项目名称:legacy,代码行数:31,代码来源:footer.php
示例19: dynamic_sidebar
dynamic_sidebar('region-navbar');
?>
<?php
}
?>
</div></nav>
<?php
}
?>
<div id="main"><div id="main-inner" class="clearfix <?php
print has_navbar();
?>
">
<div id="content"><div id="content-inner">
<?php
if (function_exists('is_sidebar_active') && is_sidebar_active('region-content-top')) {
?>
<div id="content-top" class="region region-content_top">
<?php
dynamic_sidebar('region-content-top');
?>
</div> <!-- /#content-top -->
<?php
}
?>
<div id="content-area">
开发者ID:godzivan,项目名称:dangerous-prototypes-open-hardware,代码行数:31,代码来源:header.php
示例20: do_sidebar
/**
* Render markup and action hooks for a given sidebar (override this to customize your markup)
*
* @since StartBox 2.5
*
* @param string $location the unique ID to give the container for this sidebar
* @param string $sidebar the ID of the sidebar to attach to this location by default
* @param string $classes additional custom classes to add to the container for this sidebar
*/
function do_sidebar($location = null, $sidebar = null, $classes = null)
{
// Grab the stored post types and taxonomies that will display a custom sidebar
$post_type = $this->get_custom_sidebars('post_type');
$tax = $this->get_custom_sidebars('taxonomy');
// Maybe replace the default sidebar with a custom sidebar
$sidebar = $this->maybe_replace_current_sidebar($location, $sidebar);
// If the sidebar has widgets, or an action attached to it, commence output
if (is_sidebar_active($sidebar) || has_action("sb_no_{$sidebar}_widgets")) {
?>
<?php
do_action("sb_before_{$location}");
?>
<div id="<?php
echo $location;
?>
" class="aside <?php
echo $location;
?>
-aside<?php
if ($classes) {
echo ' ' . $classes;
}
?>
">
<?php
do_action("sb_before_{$location}_widgets");
?>
<ul class="xoxo">
<?php
if (!dynamic_sidebar($sidebar)) {
do_action("sb_no_{$sidebar}_widgets");
}
?>
</ul>
<?php
do_action("sb_after_{$location}_widgets");
?>
</div><!-- #<?php
echo $location;
?>
.aside-<?php
echo $location;
?>
.aside -->
<?php
do_action("sb_after_{$location}");
?>
<?php
}
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:62,代码来源:sidebars.php
注:本文中的is_sidebar_active函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论