本文整理匯總了PHP中is_sidebar_active函數的典型用法代碼示例。如果您正苦於以下問題:PHP is_sidebar_active函數的具體用法?PHP is_sidebar_active怎麽用?PHP is_sidebar_active使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了is_sidebar_active函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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
}
}
示例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');
}
}
示例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');
}
示例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">
示例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();
示例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();
示例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
}
示例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;
}
示例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>
示例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
}
}
示例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
}
?>
示例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
}
示例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');
}
}
示例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" />
示例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
}