function widget($args, $instance)
        {
            extract($args);
            $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
            echo $before_widget;
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            // Fetch sponsors
            $terms = wcb_get_option('sponsor_level_order');
            foreach ($terms as $term) {
                $sponsors = wcb_sponsor_query(array('taxonomy' => $term->taxonomy, 'term' => $term->slug));
                if (!wcb_have_sponsors()) {
                    continue;
                }
                // Open sponsor level
                ?>
			<div <?php 
                wcb_sponsor_level_class($term);
                ?>
>
			<h4 class="sponsor-level-title"><?php 
                echo esc_html($term->name);
                ?>
</h4><?php 
                while (wcb_have_sponsors()) {
                    wcb_the_sponsor();
                    ?>
<a class="sponsor-logo" href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    printf(esc_attr__('Permalink to %s', 'wordcampbase'), the_title_attribute('echo=0'));
                    ?>
" rel="bookmark"><?php 
                    if (has_post_thumbnail()) {
                        the_post_thumbnail();
                    } else {
                        the_title();
                    }
                    ?>
</a><?php 
                }
                // Close sponsor level.
                ?>
			</div><?php 
            }
            echo $after_widget;
        }
 function structure()
 {
     $rows = array(new WCB_Header(), new WCB_Menu());
     $keys = array('after_header', 'before_content', 'content', 'after_content', 'before_footer');
     foreach ($keys as $id) {
         if (!isset($this->sidebars[$id])) {
             continue;
         }
         $option = wcb_get_option($id);
         if (!$option['front_only'] || is_front_page()) {
             $rows[] = $this->sidebars[$id];
         }
     }
     $rows[] = new WCB_Footer();
     $this->row_structure($rows);
 }
    function content()
    {
        ?>
		<div id="<?php 
        echo $this->get_id();
        ?>
" class="grid_12">
			<div id="access" role="navigation" class="clearfix">
				<?php 
        /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */
        ?>
				<div class="skip-link screen-reader-text"><a href="#content" title="<?php 
        esc_attr_e('Skip to content', 'wordcampbase');
        ?>
"><?php 
        _e('Skip to content', 'wordcampbase');
        ?>
</a></div>
				<?php 
        /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */
        ?>
				<?php 
        wp_nav_menu(array('container_class' => 'menu-header', 'theme_location' => 'primary'));
        ?>

				<?php 
        $option = wcb_get_option('featured_button');
        if ($option['visible']) {
            ?>
					<a href="<?php 
            echo esc_url($option['url']);
            ?>
" class="button featured-button">
						<?php 
            echo esc_html($option['text']);
            ?>
					</a>
				<?php 
        }
        ?>

			</div><!-- #access -->
		</div>
	<?php 
    }
Esempio n. 4
0
/**
 * Print the typekit script tags.
 */
function wcb_typekit_scripts()
{
    $option = wcb_get_option('typekit');
    $kit_id = apply_filters('wcb_typekit_id', $option);
    if (empty($kit_id)) {
        return;
    }
    ?>
	<script type="text/javascript" src="http://use.typekit.com/<?php 
    echo esc_attr($kit_id);
    ?>
.js"></script>
	<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
	<?php 
}
						<h1 class="entry-title"><?php 
    the_title();
    ?>
</h1>
						<div class="entry-content"><?php 
    the_content();
    ?>
</div>
					</div>
				<?php 
}
?>
				</div>

				<div class="sponsors"><?php 
$terms = wcb_get_option('sponsor_level_order');
foreach ($terms as $term) {
    $sponsors = wcb_sponsor_query(array('taxonomy' => $term->taxonomy, 'term' => $term->slug));
    if (!wcb_have_sponsors()) {
        continue;
    }
    // Open sponsor level
    ?>
					<div <?php 
    wcb_sponsor_level_class($term);
    ?>
>
					<h2 class="sponsor-level-title"><?php 
    echo esc_html($term->name);
    ?>
</h2><?php