public function navbar_brand($arg = array())
    {
        $html = '<span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
				<a class="navbar-brand" href="' . home_url('/') . '" title="' . esc_attr(get_bloginfo('name', 'display')) . '" rel="home" itemprop="url"><span itemprop="name">' . get_bloginfo('name') . '</span></a>
				<meta  itemprop="image" content="' . italystrap_logo() . '"/>
			</span>';
        return $html;
    }
示例#2
0
    function widget($args, $instance)
    {
        $cache = wp_cache_get('widget_italystrap_vcard', 'widget');
        if (!is_array($cache)) {
            $cache = array();
        }
        if (!isset($args['widget_id'])) {
            $args['widget_id'] = null;
        }
        if (isset($cache[$args['widget_id']])) {
            echo $cache[$args['widget_id']];
            return;
        }
        ob_start();
        extract($args, EXTR_SKIP);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Company name', 'ItalyStrap') : $instance['title'], $instance, $this->id_base);
        foreach ($this->fields as $name => $label) {
            if (!isset($instance[$name])) {
                $instance[$name] = '';
            }
        }
        echo $before_widget;
        if ($title) {
            echo $before_title, $title, $after_title;
        }
        ?>
	<ul itemscope itemtype="http://schema.org/Organization" class="list-unstyled">
		<meta  itemprop="logo" content="<?php 
        echo italystrap_logo();
        ?>
"/>
		<li><strong><a itemprop="url" href="<?php 
        echo home_url('/');
        ?>
"><span itemprop="name"><?php 
        bloginfo('name');
        ?>
</span></a></strong></li>
			<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
				<li itemprop="streetAddress"><?php 
        echo $instance['street_address'];
        ?>
</li>
				<li itemprop="addressLocality"><?php 
        echo $instance['locality'];
        ?>
</li>
				<li itemprop="addressRegion"><?php 
        echo $instance['region'];
        ?>
</li>
				<li itemprop="postalCode"><?php 
        echo $instance['postal_code'];
        ?>
</li>
			</div>
		<li itemprop="telephone"><?php 
        echo $instance['tel'];
        ?>
</li>
		<li itemprop="email"><a href="mailto:<?php 
        echo $instance['email'];
        ?>
"><?php 
        echo $instance['email'];
        ?>
</a></li>
	</ul>
  <?php 
        echo $after_widget;
        $cache[$args['widget_id']] = ob_get_flush();
        wp_cache_set('widget_italystrap_vcard', $cache, 'widget');
    }
示例#3
0
						<div class="navbar-header">
							<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
							</button>
							<span itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
								<a class="navbar-brand" href="<?php 
echo home_url('/');
?>
" title="<?php 
echo esc_attr(get_bloginfo('name', 'display'));
?>
" rel="home" itemprop="url"><span itemprop="name"><?php 
bloginfo('name');
?>
</span></a>
								<meta  itemprop="image" content="<?php 
echo italystrap_logo();
?>
"/>
							</span>
						</div>
							<?php 
wp_nav_menu(array('theme_location' => 'main-menu', 'depth' => 2, 'container' => 'div', 'container_class' => 'navbar-collapse collapse', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'menu_id' => 'main-menu', 'walker' => new wp_bootstrap_navwalker()));
?>
					</div>
				</div>
			</div>
		</nav>
	</header>