本文整理汇总了PHP中is_dynamic_sidebar函数的典型用法代码示例。如果您正苦于以下问题:PHP is_dynamic_sidebar函数的具体用法?PHP is_dynamic_sidebar怎么用?PHP is_dynamic_sidebar使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_dynamic_sidebar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: search_widget
function search_widget()
{
?>
<li id="search_widget" class="widget widget_search">
<?php
if (!is_dynamic_sidebar()) {
?>
<h2><?php
_e('Etc', 'depo-masthead');
?>
</h2><?php
}
?>
<form method="get" id="searchform" action="<?php
bloginfo('url');
?>
/">
<label class="hidden" for="s"><?php
_e('Search for:');
?>
</label>
<div><input type="text" value="<?php
the_search_query();
?>
" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form></li><?php
}
示例2: kiyomizu_the_content_filter
function kiyomizu_the_content_filter($content)
{
if (is_home() || is_archive()) {
$content = kiyomizu_make_excerpt($content);
} elseif (is_page() || is_single()) {
if (is_dynamic_sidebar('Kiyomizu Content Widget')) {
echo "<ul class='kiyomizu-content-top-widget'>";
dynamic_sidebar('Kiyomizu Content Widget');
echo "</ul>";
}
}
return $content;
}
示例3: shortcode_handler
/**
* Frontend Shortcode Handler
*
* @param array $atts array of attributes
* @param string $content text within enclosing form of shortcode element
* @param string $shortcodename the shortcode found, when == callback name
* @return string $output returns the modified html string
*/
function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
{
$output = "";
if (!isset($atts['widget_area'])) {
return $output;
}
if (is_dynamic_sidebar($atts['widget_area'])) {
ob_start();
dynamic_sidebar($atts['widget_area']);
$output = ShortcodeHelper::avia_remove_autop(ob_get_clean(), true);
if ($output) {
$output = "<div class='avia-builder-widget-area clearfix " . $meta['el_class'] . "'>" . $output . "</div>";
}
}
return $output;
}
示例4: shortcode_handle
/**
* Frontend Shortcode Handle.
* @param array $atts Array of attributes.
* @param string $content Text within enclosing form of shortcode element.
* @param string $shortcode The shortcode found, when == callback name.
* @param string $meta Meta data.
* @return string Returns the modified html string.
*/
public function shortcode_handle($atts, $content = '', $shortcode = '', $meta = '')
{
if (!isset($atts['widget_area'])) {
return;
}
ob_start();
?>
<div class="axiscomposer ac-sidebar clearfix"><?php
if (is_dynamic_sidebar($atts['widget_area'])) {
dynamic_sidebar($atts['widget_area']);
}
?>
</div>
<?php
return ob_get_clean();
}
示例5: youxi_shortcode_widget_area_cb
/**
* Widget Area Shortcode Handler
*/
function youxi_shortcode_widget_area_cb($atts, $content, $tag)
{
$o = '';
if (is_dynamic_sidebar($atts['id'])) {
ob_start();
dynamic_sidebar($atts['id']);
$o = ob_get_clean();
}
return $o;
}
示例6: parabola_smenur_socials
?>
<ul class="xoxo">
<?php
if ($parabola_socialsdisplay2) {
?>
<li id="socials-left" class="widget-container">
<?php
parabola_smenur_socials();
?>
</li>
<?php
}
?>
<?php
if (is_dynamic_sidebar('right-widget-area')) {
dynamic_sidebar('right-widget-area');
} else {
?>
<li class="widget-container widget-placeholder">
<h3 class="widget-title"><?php
_e('Right Sidebar', 'parabola');
?>
</h3>
<p><?php
printf(__('You currently have no widgets set in the right sidebar. You can add widgets via the <a href="%s">Dasboard</a>.', 'parabola'), esc_url(admin_url() . "widgets.php"));
echo "<br/>";
printf(__('To hide this sidebar, switch to a different Layout via the <a href="%s">Theme Settings</a>.', 'parabola'), esc_url(admin_url() . "themes.php?page=parabola-page"));
?>
</p>
</li>
示例7: add_sidebar
public static function add_sidebar()
{
if (is_dynamic_sidebar()) {
$slug = sanitize_title('qsot-calendar');
global $wp_registered_sidebars;
if (!isset($wp_registered_sidebars[$slug])) {
$a = array('id' => $slug, 'name' => __('Non-JS Calendar Page', 'opentickets-community-edition'), 'description' => __('Widget area on calendar template that shows when a user does not have javascript enabled.', 'opentickets-community-edition'), 'before_widget' => '<div id="%1$s" class="widget %SPAN% %2$s"><div class="widget-inner">', 'after_widget' => '</div><div class="clear"></div></div>', 'before_title' => '<h3 class="widgettitle">', 'after_title' => '</h3>');
register_sidebar($a);
}
/* @@@ NICE TO HAVE - get widget auto assignment to work
$default_widget_class = 'qsot_upcoming_shows_widget';
global $wp_registered_widgets, $sidebars_widgets;
if (true || !isset($sidebars_widgets[$slug])) {
$pos = array();
foreach (array_keys($wp_registered_widgets) as $key) {
if (($name = preg_replace('#^'.$default_widget_class.'(.*)$#', '\1', $key)) != $key) {
$pos[] = empty($name) ? '-1' : $name;
}
}
$pos = array_filter($pos);
$wslug = $default_widget_class;
if (!empty($pos)) {
$wslug .= (min($pos)-1);
}
die(__log($sidebars_widgets[$slug], $wp_registered_widgets[$sidebars_widgets[$slug][0]]));
}
*/
}
}
示例8: blogsixteen_sidebar_body_class
function blogsixteen_sidebar_body_class($classes)
{
$classes[] = is_dynamic_sidebar('sidebar-1') ? 'has-sidebar' : 'no-sidebar';
return $classes;
}
示例9: dynamic_sidebar
<?php
//footer dynamic sidebar 1-4
if (is_dynamic_sidebar('footer-left')) {
?>
<div class="bluebox-heading">
<h3>Contact</h3>
</div>
<?php
dynamic_sidebar('footer-left');
}
?>
</div>
<div class="col-md-4">
<?php
//footer dynamic sidebar 1-4
if (is_dynamic_sidebar('footer-center')) {
dynamic_sidebar('footer-center');
}
?>
</div>
<div class="col-md-4">
<div class="bluebox-heading">
<h3>Réseaux Sociaux</h3>
</div>
<div class="social-widget">
<ul>
<li>
<a href="#">
<span><i class="fa fa-facebook"></i></span>
<span><i class="fa fa-facebook"></i></span>
</a>
示例10:
<?php
if ($footer_top_bar) {
echo '<div class="float_left">' . $footer_top_bar . '</div>';
}
?>
<div class="float_right">
<a class="back-to-top" id="smooth-scroll" title="Back to top">
Back to Top <span class="icon-arrow-up"></span>
</a>
</div>
<div class="clearfix"></div>
</div> <!-- container -->
</div> <!-- topbar -->
<?php
if (is_dynamic_sidebar('sidebar-footer')) {
?>
<div class="mid_bar">
<div class="container">
<?php
dynamic_sidebar('sidebar-footer');
?>
</div> <!-- container -->
</div> <!-- midbar -->
<?php
}
?>
<?php
if ($footer_links || $get_footer_site_info || $footer_logo) {
?>
示例11: get_option
?>
<div class="widgets">
<div class="widgetstitle">关于本站</div>
<div class="about"><?php
echo get_option('blog_about');
?>
</div>
</div>
<?php
}
?>
<?php
}
?>
<?php
if (is_dynamic_sidebar()) {
dynamic_sidebar('right_sidebar');
}
?>
<div class="widgets" id="float">
<div class="adbox">
<div class="adimg">
<ul>
<?php
if (get_option('blog_ad1') != "") {
?>
<li><?php
echo get_option('blog_ad1');
?>
</li><?php
}
示例12: date
* @package Nonprofit_Organization
*/
?>
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="footer-logo">
<a href="#" onclick="return false;"><img alt="footer-logo-1" src="http://localhost/nonprofit-org/wp-content/themes/nonprofit-org/images/footer/footer-logo-1.png"></a>
<a href="#" onclick="return false;"><img alt="footer-logo-2" src="http://localhost/nonprofit-org/wp-content/themes/nonprofit-org/images/footer/footer-logo-2.png"></a>
<a href="#" onclick="return false;"><img alt="footer-logo-3" src="http://localhost/nonprofit-org/wp-content/themes/nonprofit-org/images/footer/footer-logo-3.png"></a>
</div>
<div class="footer-content">
<div class="footer-newsletter">
<?php
if (is_dynamic_sidebar('footer-newsletter')) {
dynamic_sidebar('footer-newsletter');
}
?>
</div>
<hr>
<div class="footer-company-information-and-social-media">
<div class="footer-company-information">
<a href="http://localhost/nonprofit-org/sitemap/">SITEMAP</a> | <a href="#" onclick="return false;">PRIVACY POLICY</a><br/>
COPYRIGHT <?php
echo date('Y');
?>
NONPROFIT ORGANIZATION
</div>
示例13:
<?php
if (is_dynamic_sidebar('right-sidebar')) {
dynamic_sidebar('right-sidebar');
}
示例14: esc_url
<h1 class="site-title"><a href="<?php
echo esc_url(home_url('/'));
?>
" rel="home"><?php
bloginfo('name');
?>
</a></h1>
<h2 class="site-description"><?php
bloginfo('description');
?>
</h2>
</div><!-- .site-branding -->
<nav id="site-navigation" class="main-navigation" role="navigation">
<h1 class="screen-reader-text">Main Navigation</h1>
<div class="navicon closed"><i class="fa fa-navicon"></i></div>
<?php
wp_nav_menu(array('theme_location' => 'primary', 'depth' => 2));
?>
</nav><!-- #site-navigation -->
</header><!-- #masthead -->
<?php
if (is_front_page() && !is_paged() && is_dynamic_sidebar('abovecontent')) {
dynamic_sidebar('abovecontent');
}
?>
<!-- Widget location to hold slider -->
<div id="content" class="site-content">
示例15: chatControl
//.........这里部分代码省略.........
$div .= '<div id="f7settings" style="display:none">';
$div .= '<div id="wrapper_settings">';
$div .= '<div class="f7separator"><div class="f7inner">Select chat button type</div></div>';
$div .= '<div class="setting">';
$div .= '<input type="radio" name="buttonAppearance" id="buttonImageType" class="f7button1">Graphics chat button';
$div .= '<div class="settingInt">';
$div .= '<input type="radio" name="customImages" id="buttonImageSource" class="f7button3">Use images selected in your account setings <span f7title="Images uploaded to Account Settings / Images page of your Provide Support account Control Panel will be used" class="f7tooltip-sign">?</span>';
$div .= '<div class="settingIntInt" style="font-size: 11px; color: #888;">';
$div .= '';
$div .= '</div>';
$div .= '</div>';
$div .= '<div class="settingInt">';
$div .= '<input type="radio" name="customImages" class="f7button4">Use custom images <span f7title="You can specify here actual links to images stored on your server. If you use your Live Chat account on several websites, this feature lets you display your custom chat icons, different from the ones uploaded to your Provide Support account" class="f7tooltip-sign">?</span>';
$div .= '<div class="settingIntInt">';
$div .= 'Online image URL <input type="text" id="buttonImageUrlOnline">';
$div .= '</div>';
$div .= '<div class="settingIntInt">';
$div .= 'Offline image URL <input type="text" id="buttonImageUrlOffline">';
$div .= '</div>';
$div .= '</div>';
$div .= '</div>';
$div .= '<div class="setting">';
$div .= '<input type="radio" class="f7button2" name="buttonAppearance">Text chat link <span f7title="HTML formatting is supported for Chat Link texts" class="f7tooltip-sign">?</span>';
$div .= '<div class="settingInt">';
$div .= 'Online Chat Link text <input type="text" id="buttonImageTextOnline">';
$div .= '</div>';
$div .= '<div class="settingInt">';
$div .= 'Offline Chat Link text <input type="text" id="buttonImageTextOffline">';
$div .= '</div>';
$div .= '</div>';
$div .= '<div class="f7separator"><div class="f7inner">Chat button position</div></div>';
$div .= '<div class="setting">';
$disDisabled = '';
if (!is_dynamic_sidebar()) {
$disDisabled = ' disabled="disabled" ';
}
$div .= '<input type="radio" location="widget" name="buttonLocation"' . $disDisabled . '>Show Chat Button as a widget <a target="blank" href="/wp-admin/widgets.php" style="display:none">Open widget settings</a> <span f7title="Your Live Chat button will be displayed in your sidebar, click Open widget settings to specify the position and alignment options for it. If your website does not have any sidebar, consider using \'Show Сhat Button at a fixed position on the browser window\' option." class="f7tooltip-sign">?</span>';
$div .= '<div class="settingInt" style="font-size:11px; color:#888; line-height:13px;">';
$div .= '';
$div .= '</div>';
$div .= '</div>';
$div .= '<div class="setting">';
$div .= '<input type="radio" location="fixed" name="buttonLocation">Show Сhat Button at a fixed position on the browser window <span f7title="Specify vertical and horizontal position in pixels or percent for your Chat Button" class="f7tooltip-sign">?</span>';
$div .= '<div class="settingInt" style="font-size: 11px; color: #888;">';
$div .= '';
$div .= '</div>';
$div .= '<div class="settingInt" style="padding-top: 0px; margin-bottom: 10px;">';
$div .= '<div class="f7part1">';
$div .= 'Vertical';
$div .= '</div>';
$div .= '<div class="f7part2">';
$div .= '<input type="text" id="buttonLocationVerticalValue" value=50>';
$div .= '</div>';
$div .= '<div class="f7part3">';
$div .= '<input type="radio" class="f7button5" name="specVerticalPx" id="buttonLocationVerticalBy">px';
$div .= '<br />';
$div .= '<input type="radio" class="f7button6" name="specVerticalPx" checked>%';
$div .= '</div>';
$div .= '<div class="f7part4">';
$div .= '<input type="radio" class="f7button9" name="specVerticalFrom" id="buttonLocationVerticalFrom">from top';
$div .= '<br />';
$div .= '<input type="radio" class="f7button10" name="specVerticalFrom" checked>from bottom';
$div .= '</div>';
$div .= '</div>';
$div .= '<div class="settingInt" style=" padding-top: 0px; ">';
$div .= '<div class="f7part1">';