コード例 #1
0
function jumbotron_widget_area_callback()
{
    if (is_active_sidebar('jumbotron-widget-area')) {
        ?>
<header <?php 
        echo genesis_attr('jumbotron-header');
        ?>
>
	<?php 
        genesis_structural_wrap('jumbotron-outer');
        ?>
        	<div class="jumbotron">
                	<?php 
        genesis_structural_wrap('jumbotron-inner');
        ?>
                    		<?php 
        dynamic_sidebar('jumbotron-widget-area');
        ?>
                	<?php 
        genesis_structural_wrap('jumbotron-inner', 'close');
        ?>
            	</div>
        <?php 
        genesis_structural_wrap('jumbotron-outer', close);
        ?>
</header>
<?php 
    }
}
/**
 * Pulled from genesis/lib/structure/footer.php with one minor change to always display footer widgets.
 *
 * Echo the markup necessary to facilitate the footer widget areas.
 *
 * Check for a numerical parameter given when adding theme support - if none is found, then the function returns early.
 *
 * The child theme must style the widget areas.
 *
 * Applies the `genesis_footer_widget_areas` filter.
 *
 * @since 1.6.0
 *
 * @uses genesis_structural_wrap() Optionally adds wrap with footer-widgets context.
 *
 * @return null Return early if number of widget areas could not be determined, or nothing is added to the first widget area.
 */
function uci_footer_widget_areas()
{
    $footer_widgets = get_theme_support('genesis-footer-widgets');
    if (!$footer_widgets || !isset($footer_widgets[0]) || !is_numeric($footer_widgets[0])) {
        return;
    }
    $footer_widgets = (int) $footer_widgets[0];
    // Commented out to always display widget areas, even if footer-1 is empty.
    //* Check to see if first widget area has widgets. If not, do nothing. No need to check all footer widget areas.
    //if ( ! is_active_sidebar( 'footer-1' ) )
    //	return;
    $inside = '';
    $output = '';
    $counter = 1;
    while ($counter <= $footer_widgets) {
        //* Darn you, WordPress! Gotta output buffer.
        ob_start();
        dynamic_sidebar('footer-' . $counter);
        $widgets = ob_get_clean();
        $inside .= sprintf('<div class="footer-widgets-%d widget-area">%s</div>', $counter, $widgets);
        $counter++;
    }
    if ($inside) {
        $output .= genesis_markup(array('html5' => '<div %s>', 'xhtml' => '<div id="footer-widgets" class="footer-widgets">', 'context' => 'footer-widgets'));
        $output .= genesis_structural_wrap('footer-widgets', 'open', 0);
        $output .= $inside;
        $output .= genesis_structural_wrap('footer-widgets', 'close', 0);
        $output .= '</div>';
    }
    echo apply_filters('genesis_footer_widget_areas', $output, $footer_widgets);
}
コード例 #3
0
/**
 * Echo the markup necessary to facilitate the footer widget areas.
 *
 * Check for a numerical parameter given when adding theme support - if none is found, then the function returns early.
 *
 * The child theme must style the widget areas.
 *
 * Applies the `genesis_footer_widget_areas` filter.
 *
 * @since 1.6.0
 *
 * @uses genesis_structural_wrap() Optionally adds wrap with footer-widgets context.
 *
 * @return null Return early if number of widget areas could not be determined, or nothing is added to the first widget area.
 */
function gmdl_footer_widget_areas()
{
    $footer_widgets = get_theme_support('genesis-footer-widgets');
    if (!$footer_widgets || !isset($footer_widgets[0]) || !is_numeric($footer_widgets[0])) {
        return;
    }
    $footer_widgets = (int) $footer_widgets[0];
    $footer_widget_large_class = 12 / $footer_widgets;
    //* Check to see if first widget area has widgets. If not, do nothing. No need to check all footer widget areas.
    if (!is_active_sidebar('footer-1')) {
        return;
    }
    $inside = '';
    $output = '';
    $counter = 1;
    while ($counter <= $footer_widgets) {
        //* Darn you, WordPress! Gotta output buffer.
        ob_start();
        dynamic_sidebar('footer-' . $counter);
        $widgets = ob_get_clean();
        $inside .= sprintf('<div class="mdl-cell mdl-cell--4-col-tablet mdl-cell-%d-col footer-widgets-%d widget-area">%s</div>', $footer_widget_large_class, $counter, $widgets);
        $counter++;
    }
    if ($inside) {
        $output .= genesis_markup(array('html5' => '<div %s>', 'xhtml' => '<div id="footer-widgets" class="footer-widgets mdl-mega-footer">', 'context' => 'footer-widgets'));
        $output .= genesis_structural_wrap('footer-widgets', 'open', 0);
        $output .= $inside;
        $output .= genesis_structural_wrap('footer-widgets', 'close', 0);
        $output .= '</div>';
    }
    echo apply_filters('genesis_footer_widget_areas', $output, $footer_widgets);
}
コード例 #4
0
ファイル: home.php プロジェクト: kabrewer07/mrw
/**
 * Display widget content for homepage sections.
 *
 */
function desertvista_home_loop_helper()
{
    if (is_active_sidebar('properties')) {
        echo '<div class="properties">';
        dynamic_sidebar('properties');
        echo '</div><!-- end .properties -->';
    }
    if (is_active_sidebar('welcome')) {
        echo '<div class="welcome">';
        genesis_structural_wrap('welcome');
        dynamic_sidebar('welcome');
        genesis_structural_wrap('welcome', 'close');
        echo '</div><!-- end .welcome -->';
    }
    if (is_active_sidebar('communities')) {
        echo '<div class="communities">';
        echo '<h4>' . __('Communities', 'desertvista') . '</h4>';
        dynamic_sidebar('communities');
        echo '</div><!-- end .communities -->';
    }
    if (is_active_sidebar('featured-bottom-left') || is_active_sidebar('featured-bottom-right')) {
        echo '<div class="featured-bottom">';
        echo '<div class="featured-bottom-left">';
        dynamic_sidebar('featured-bottom-left');
        echo '</div><!-- end .featured-bottom-left -->';
        echo '<div class="featured-bottom-right">';
        dynamic_sidebar('featured-bottom-right');
        echo '</div><!-- end .featured-bottom-right -->';
        echo '</div><!-- end .featured-bottom -->';
    }
}
コード例 #5
0
ファイル: footer.php プロジェクト: Bobcatou/enhanceworldwide
function wsm_child_do_footer()
{
    echo '<div class="footer-left">';
    $contact = genesis_get_option('wsm_contact_info', 'patricia-settings');
    if (!empty($contact)) {
        echo '<p class="contact-info">' . genesis_get_option('wsm_contact_info', 'patricia-settings') . '</p>';
    }
    $credit = genesis_get_option('wsm_credit', 'patricia-settings');
    if (!empty($contact)) {
        echo '<p class="credit">' . genesis_get_option('wsm_credit', 'patricia-settings') . '</p>';
    }
    echo '</div><!-- end .footer-left -->';
    echo '<div class="footer-right">';
    if (has_nav_menu('footer')) {
        $args = array('theme_location' => 'footer', 'container' => '', 'menu_class' => genesis_get_option('nav_superfish') ? 'nav genesis-nav-menu superfish' : 'nav genesis-nav-menu', 'echo' => 0);
        $nav = wp_nav_menu($args);
    }
    $nav_output = sprintf('<div class="footer-nav">%2$s%1$s%3$s</div>', $nav, genesis_structural_wrap('nav', '<div class="menu-wrap">', 0), genesis_structural_wrap('nav', '</div><!-- end .wrap -->', 0));
    echo apply_filters('wsm_do_footer_nav', $nav_output, $nav, $args);
    $copyright = genesis_get_option('wsm_copyright', 'patricia-settings');
    if (!empty($copyright)) {
        echo '<p class="copy">' . genesis_get_option('wsm_copyright', 'patricia-settings') . '</p>';
    }
    echo '</div><!-- end .footer-right -->';
}
コード例 #6
0
ファイル: single-portfolio.php プロジェクト: sello-rex/ased
function zp_get_portfolio_sidebar()
{
    global $post;
    // retrieve post meta values
    $button_label = get_post_meta($post->ID, 'button_label', true);
    $button_link = get_post_meta($post->ID, 'button_link', true);
    $date_label = get_post_meta($post->ID, 'date_label', true);
    $date_value = get_post_meta($post->ID, 'date_value', true);
    $client_label = get_post_meta($post->ID, 'client_label', true);
    $client_value = get_post_meta($post->ID, 'client_value', true);
    $category_label = get_post_meta($post->ID, 'category_label', true);
    $video_link = get_post_meta($post->ID, 'video_link', true);
    $output = '';
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $output .= '<div class="col-md-12 single_portfolio_sidebar">';
            if ($button_link) {
                $output .= '<div class="single_portfolio_section single_portfolio_button col-m-12"><a class="btn btn-hg btn-primary " href="' . $button_link . '">' . $button_label . '</a></div>';
            }
            $output .= '<div class="single_portfolio_section single_portfolio_content col-m-12">' . get_the_content() . '</div>';
            if ($date_value || $client_value || $category_label) {
                $output .= '<div class="single_portfolio_section single_portfolio_meta col-m-12">';
                if ($date_value) {
                    $output .= '<div class="meta_value date_meta"><span class="meta_label">' . $date_label . '</span>' . $date_value . '</div>';
                }
                if ($client_value) {
                    $output .= '<div class="meta_value client_meta"><span class="meta_label">' . $client_label . '</span>' . $client_value . '</div>';
                }
                // retrieve portfolio category
                if ($category_label) {
                    $output .= '<div class="meta_value category_meta"><span class="meta_label">' . $category_label . '</span>';
                    $categories = wp_get_post_terms($post->ID, 'portfolio_category');
                    foreach ($categories as $category) {
                        $output .= $category->name . ' ';
                    }
                    $output .= '</div>';
                }
                $output .= '</div>';
            }
            $output .= '<div class="single_portfolio_section single_portfolio_nav col-m-12">';
            $prev_post = get_previous_post();
            if (!empty($prev_post)) {
                $output .= '<div class="single_nav_prev"><a href="' . get_permalink($prev_post->ID) . '" class="btn btn-sm btn-primary">' . __('previous', 'start') . '</a></div>';
            }
            $next_post = get_next_post();
            if (!empty($next_post)) {
                $output .= '<div class="single_nav_next inline"><a href="' . get_permalink($next_post->ID) . '" class="btn btn-sm btn-primary">' . __('next', 'start') . '</a></div>';
            }
            $output .= '</div>';
            $output .= '</div>';
        }
    }
    genesis_structural_wrap('sidebar');
    do_action('genesis_before_sidebar_widget_area');
    echo $output;
    do_action('genesis_after_sidebar_widget_area');
    genesis_structural_wrap('sidebar', 'close');
}
コード例 #7
0
function bfg_do_home_featured()
{
    genesis_markup(array('html5' => '<div %s>', 'xhtml' => '<div class="home-featured">', 'context' => 'home-featured'));
    genesis_structural_wrap('home-featured');
    genesis_widget_area('home-featured', array('before' => '', 'after' => ''));
    genesis_structural_wrap('home-featured', 'close');
    echo '</div>';
}
コード例 #8
0
ファイル: functions.php プロジェクト: kabrewer07/mrw
/**
 * Add disclaimer widget area on Genesis after hook
 *
 */
function agentpress_disclaimer()
{
    if (is_active_sidebar('disclaimer')) {
        echo '<div class="disclaimer">';
        genesis_structural_wrap('disclaimer');
        dynamic_sidebar('disclaimer');
        genesis_structural_wrap('disclaimer', 'close');
        echo '</div><!-- end .disclaimer -->';
    }
}
コード例 #9
0
ファイル: front-page.php プロジェクト: Bobcatou/bryancadynew
/**
 * Display content for the "Home Gallery" section.
 *
 * @since 1.0.0
 */
function utility_pro_add_home_gallery()
{
    printf('<div %s>', genesis_attr('home-gallery'));
    genesis_structural_wrap('home-gallery');
    genesis_widget_area('utility-home-gallery-1', array('before' => '<div class="home-gallery-1 widget-area">', 'after' => '</div>'));
    genesis_widget_area('utility-home-gallery-2', array('before' => '<div class="home-gallery-2 widget-area">', 'after' => '</div>'));
    genesis_widget_area('utility-home-gallery-3', array('before' => '<div class="home-gallery-3 widget-area">', 'after' => '</div>'));
    genesis_widget_area('utility-home-gallery-4', array('before' => '<div class="home-gallery-4 widget-area">', 'after' => '</div>'));
    genesis_structural_wrap('home-gallery', 'close');
    echo '</div>';
}
コード例 #10
0
ファイル: front-page.php プロジェクト: e-baker/1sentence
function minimum_home_featured()
{
    printf('<div %s>', genesis_attr('home-featured'));
    genesis_structural_wrap('home-featured');
    genesis_widget_area('home-featured-1', array('before' => '<div class="home-featured-1 widget-area">', 'after' => '</div>'));
    genesis_widget_area('home-featured-2', array('before' => '<div class="home-featured-2 widget-area">', 'after' => '</div>'));
    genesis_widget_area('home-featured-3', array('before' => '<div class="home-featured-3 widget-area">', 'after' => '</div>'));
    genesis_widget_area('home-featured-4', array('before' => '<div class="home-featured-4 widget-area">', 'after' => '</div>'));
    genesis_structural_wrap('home-featured', 'close');
    echo '</div>';
    //* end .home-featured
}
コード例 #11
0
ファイル: functions.php プロジェクト: aroldoa/alicepediatric
function menu_in_footer()
{
    $class = 'menu-footer';
    $args = array('menu' => 'Footer', 'container' => '', 'menu_class' => $class, 'echo' => 0, 'depth' => 1);
    $nav = wp_nav_menu($args);
    $nav_markup_open = genesis_markup(array('html5' => '<nav %s>', 'xhtml' => '<div id="nav">', 'context' => 'nav-footer', 'echo' => false));
    $nav_markup_open .= genesis_structural_wrap('menu-footer', 'open', 0);
    $nav_markup_close = genesis_structural_wrap('menu-footer', 'close', 0);
    $nav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
    $nav_output = $nav_markup_open . $nav . $nav_markup_close;
    echo $nav_output;
}
コード例 #12
0
function bfg_footer_widget_areas()
{
    $footer_widgets = get_theme_support('genesis-footer-widgets');
    if (!$footer_widgets || !isset($footer_widgets[0]) || !is_numeric($footer_widgets[0])) {
        return;
    }
    $footer_widgets = (int) $footer_widgets[0];
    //* Check to see if first widget area has widgets. If not, do nothing. No need to check all footer widget areas.
    if (!is_active_sidebar('footer-1')) {
        return;
    }
    switch ($footer_widgets) {
        case '1':
        default:
            $class = 'col-sm-12';
            break;
        case '2':
            $class = 'col-sm-6';
            break;
        case '3':
            $class = 'col-sm-4';
            break;
        case '4':
            $class = 'col-sm-3';
            break;
        case '6':
            $class = 'col-sm-2';
            break;
        case '12':
            $class = 'col-sm-1';
            break;
    }
    $inside = '';
    $output = '';
    $counter = 1;
    while ($counter <= $footer_widgets) {
        //* Darn you, WordPress! Gotta output buffer.
        ob_start();
        dynamic_sidebar('footer-' . $counter);
        $widgets = ob_get_clean();
        $inside .= sprintf('<div class="footer-widgets-%d %s widget-area">%s</div>', $counter, $class, $widgets);
        $counter++;
    }
    if ($inside) {
        $output .= genesis_markup(array('html5' => '<div %s>', 'xhtml' => '<div id="footer-widgets" class="footer-widgets">', 'context' => 'footer-widgets'));
        $output .= genesis_structural_wrap('footer-widgets', 'open', 0);
        $output .= $inside;
        $output .= genesis_structural_wrap('footer-widgets', 'close', 0);
        $output .= '</div>';
    }
    echo apply_filters('genesis_footer_widget_areas', $output, $footer_widgets);
}
コード例 #13
0
/**
 * Return the markup to display a menu consistent with the Genesis format.
 *
 * Applies the `genesis_$location_nav` filter e.g. `genesis_header_nav`. For primary and secondary menu locations, it
 * also applies the `genesis_do_nav` and `genesis_do_subnav` filters for backwards compatibility.
 *
 * Makes Genesis Structural Wrap optional for better Bootstrap 3 compatibility
 *
 * @since 2.1.0
 *
 * @uses genesis_markup()             Contextual markup.
 * @uses genesis_html5()              Check for HTML5 support.
 * @uses genesis_structural_wrap()    Adds optional internal wrap divs.
 *
 * @param string $args Menu arguments.
 *
 * @return string Navigation menu markup.
 */
function gb_genesis_get_nav_menu($args = array(), $structural_wrap = false)
{
    $args = wp_parse_args($args, array('theme_location' => '', 'container' => '', 'menu_class' => 'menu genesis-nav-menu', 'echo' => 0));
    //* If a menu is not assigned to theme location, abort
    if (!has_nav_menu($args['theme_location'])) {
        return;
    }
    $sanitized_location = sanitize_key($args['theme_location']);
    $nav = wp_nav_menu($args);
    //* Do nothing if there is nothing to show
    if (!$nav) {
        return;
    }
    $xhtml_id = $args['theme_location'];
    if ('primary' === $args['theme_location']) {
        $xhtml_id = 'nav';
    } elseif ('secondary' === $args['theme_location']) {
        $xhtml_id = 'subnav';
    }
    $nav_markup_open = genesis_markup(array('html5' => '<nav %s>', 'xhtml' => '<div id="' . $xhtml_id . '">', 'context' => 'nav-' . $sanitized_location, 'echo' => false));
    $nav_markup_close = '';
    if ($structural_wrap) {
        $nav_markup_open .= genesis_structural_wrap('menu-' . $sanitized_location, 'open', 0);
        $nav_markup_close .= genesis_structural_wrap('menu-' . $sanitized_location, 'close', 0);
    }
    $nav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
    $nav_output = $nav_markup_open . $nav . $nav_markup_close;
    $filter_location = 'genesis_' . $sanitized_location . '_nav';
    //* Handle back-compat for primary and secondary nav filters.
    if ('primary' === $args['theme_location']) {
        $filter_location = 'genesis_do_nav';
    } elseif ('secondary' === $args['theme_location']) {
        $filter_location = 'genesis_do_subnav';
    }
    /**
     * Filter the navigation markup.
     *
     * @since 2.1.0
     *
     * @param string $nav_output Opening container markup, nav, closing container markup.
     * @param string $nav Navigation list (`<ul>`).
     * @param array $args {
     *     Arguments for `wp_nav_menu()`.
     *
     *     @type string $theme_location Menu location ID.
     *     @type string $container Container markup.
     *     @type string $menu_class Class(es) applied to the `<ul>`.
     *     @type bool $echo 0 to indicate `wp_nav_menu()` should return not echo.
     * }
     */
    return apply_filters($filter_location, $nav_output, $nav, $args);
}
コード例 #14
0
ファイル: functions.php プロジェクト: akapheim/GSWGAlocal
function minimum_site_tagline()
{
    printf('<div %s>', genesis_attr('site-tagline'));
    genesis_structural_wrap('site-tagline');
    printf('<div %s>', genesis_attr('site-tagline-left'));
    printf('<p %s>%s</p>', genesis_attr('site-description'), esc_html(get_bloginfo('description')));
    echo '</div>';
    printf('<div %s>', genesis_attr('site-tagline-right'));
    genesis_widget_area('site-tagline-right');
    echo '</div>';
    genesis_structural_wrap('site-tagline', 'close');
    echo '</div>';
}
コード例 #15
0
ファイル: menu.php プロジェクト: elderxavier/ALLAN-JUNIOR-IAN
/**
 * This function  is responsible for displaying the "Secondary Navigation" bar.
 *
 * @uses genesis_nav(), genesis_get_option(), wp_nav_menu
 * @since 1.0.1
 *
 */
function genesis_do_subnav()
{
    if (genesis_get_option('subnav')) {
        if (has_nav_menu('secondary')) {
            $args = array('theme_location' => 'secondary', 'container' => '', 'menu_class' => genesis_get_option('subnav_superfish') ? 'nav superfish' : 'nav', 'echo' => 0);
            $subnav = wp_nav_menu($args);
        } elseif ('nav-menu' != genesis_get_option('subnav_type', 'genesis-vestige')) {
            $args = array('theme_location' => 'secondary', 'menu_class' => genesis_get_option('subnav_superfish', 'genesis-vestige') ? 'nav superfish' : 'nav', 'show_home' => genesis_get_option('subnav_home', 'genesis-vestige'), 'type' => genesis_get_option('subnav_type', 'genesis-vestige'), 'sort_column' => genesis_get_option('subnav_pages_sort', 'genesis-vestige'), 'orderby' => genesis_get_option('subnav_categories_sort', 'genesis-vestige'), 'depth' => genesis_get_option('subnav_depth', 'genesis-vestige'), 'exclude' => genesis_get_option('subnav_exclude', 'genesis-vestige'), 'include' => genesis_get_option('subnav_include', 'genesis-vestige'), 'echo' => false);
            $subnav = genesis_nav($args);
        }
        $subnav_output = sprintf('<div id="subnav">%2$s%1$s%3$s</div>', $subnav, genesis_structural_wrap('subnav', '<div class="wrap">', 0), genesis_structural_wrap('subnav', '</div><!-- end .wrap -->', 0));
        echo apply_filters('genesis_do_subnav', $subnav_output, $subnav, $args);
    }
}
コード例 #16
0
ファイル: menu.php プロジェクト: netmagik/netmagik
/**
 * Return the markup to display a menu consistent with the Genesis format.
 *
 * Applies the `genesis_$location_nav` filter e.g. `genesis_header_nav`. For primary and secondary menu locations, it
 * applies the `genesis_do_nav` and `genesis_do_subnav` filters instead for backwards compatibility.
 *
 * @since 2.1.0
 *
 * @param string|array $args Menu arguments.
 * @return string|null Navigation menu markup, or `null` if menu is not assigned to theme location, there is
 *                     no menu, or there are no menu items in the menu.
 */
function genesis_get_nav_menu($args = array())
{
    $args = wp_parse_args($args, array('theme_location' => '', 'container' => '', 'menu_class' => 'menu genesis-nav-menu', 'link_before' => genesis_html5() ? sprintf('<span %s>', genesis_attr('nav-link-wrap')) : '', 'link_after' => genesis_html5() ? '</span>' : '', 'echo' => 0));
    // If a menu is not assigned to theme location, abort.
    if (!has_nav_menu($args['theme_location'])) {
        return;
    }
    // If genesis-accessibility for 'drop-down-menu' is enabled and the menu doesn't already have the superfish class, add it.
    if (genesis_superfish_enabled() && false === strpos($args['menu_class'], 'js-superfish')) {
        $args['menu_class'] .= ' js-superfish';
    }
    $sanitized_location = sanitize_key($args['theme_location']);
    $nav = wp_nav_menu($args);
    // Do nothing if there is nothing to show.
    if (!$nav) {
        return;
    }
    $nav_markup_open = genesis_structural_wrap('menu-' . $sanitized_location, 'open', 0);
    $nav_markup_close = genesis_structural_wrap('menu-' . $sanitized_location, 'close', 0);
    $params = array('theme_location' => $args['theme_location']);
    $nav_output = genesis_markup(array('open' => '<nav %s>', 'close' => '</nav>', 'context' => 'nav-' . $sanitized_location, 'content' => $nav_markup_open . $nav . $nav_markup_close, 'echo' => false, 'params' => $params));
    $filter_location = 'genesis_' . $sanitized_location . '_nav';
    // Handle back-compat for primary and secondary nav filters.
    if ('primary' === $args['theme_location']) {
        $filter_location = 'genesis_do_nav';
    } elseif ('secondary' === $args['theme_location']) {
        $filter_location = 'genesis_do_subnav';
    }
    /**
     * Filter the navigation markup.
     *
     * @since 2.1.0
     *
     * @param string $nav_output Opening container markup, nav, closing container markup.
     * @param string $nav Navigation list (`<ul>`).
     * @param array $args {
     *     Arguments for `wp_nav_menu()`.
     *
     *     @type string $theme_location Menu location ID.
     *     @type string $container Container markup.
     *     @type string $menu_class Class(es) applied to the `<ul>`.
     *     @type bool $echo 0 to indicate `wp_nav_menu()` should return not echo.
     * }
     */
    return apply_filters($filter_location, $nav_output, $nav, $args);
}
コード例 #17
0
ファイル: home.php プロジェクト: kabrewer07/mrw
/**
 * Display widget content for homepage sections.
 *
 */
function signature_home_loop_helper()
{
    if (is_active_sidebar('slider') || is_active_sidebar('property-search')) {
        echo '<div class="featured-top" id="featured-header" style="width:100%; max-width:920px; min-height:200px; height:auto;">';
        echo '<div class="slider">';
        dynamic_sidebar('slider');
        echo '</div><!-- end .slider -->';
        echo '<div class="property-quick-search">';
        dynamic_sidebar('property-search');
        echo '</div><!-- end .property-quick-search -->';
        echo '</div><!-- end .featured-top -->';
    }
    if (is_active_sidebar('welcome')) {
        echo '<div class="welcome">';
        genesis_structural_wrap('welcome');
        dynamic_sidebar('welcome');
        genesis_structural_wrap('welcome', 'close');
        echo '</div><!-- end .welcome -->';
    }
    if (is_active_sidebar('communities')) {
        echo '<div class="communities">';
        echo '<h4>' . __('Communities', 'signature') . '</h4>';
        dynamic_sidebar('communities');
        echo '</div><!-- end .communities -->';
    }
    echo '<!--<iframe src="//player.vimeo.com/video/113641523?title=0&amp;byline=0&amp;portrait=0" width="1040" height="585" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>-->';
    if (is_active_sidebar('properties')) {
        echo '<div class="properties">';
        dynamic_sidebar('properties');
        echo '</div><!-- end .properties -->';
    }
    if (is_active_sidebar('featured-bottom-left') || is_active_sidebar('featured-bottom-right')) {
        echo '<div class="featured-bottom">';
        echo '<div class="featured-bottom-left">';
        dynamic_sidebar('featured-bottom-left');
        echo '</div><!-- end .featured-bottom-left -->';
        echo '<div class="featured-bottom-right">';
        dynamic_sidebar('featured-bottom-right');
        echo '</div><!-- end .featured-bottom-right -->';
        echo '</div><!-- end .featured-bottom -->';
    }
}
コード例 #18
0
/**
 * Display widget content for homepage sections.
 *
 */
function agentpress_home_loop_helper()
{
    if (is_active_sidebar('slider') || is_active_sidebar('property-search')) {
        echo '<div class="featured-top">';
        echo '<div class="slider">';
        dynamic_sidebar('slider');
        echo '</div><!-- end .slider -->';
        echo '<div class="property-quick-search">';
        dynamic_sidebar('property-search');
        echo '</div><!-- end .property-quick-search --></div>';
        echo '</div><!-- end .featured-top -->';
    }
    if (is_active_sidebar('welcome')) {
        echo '<div class="welcome">';
        genesis_structural_wrap('welcome');
        dynamic_sidebar('welcome');
        genesis_structural_wrap('welcome', 'close');
        echo '</div><!-- end .welcome -->';
    }
    if (is_active_sidebar('properties')) {
        echo '<div class="properties">';
        dynamic_sidebar('properties');
        echo '</div><!-- end .properties -->';
    }
    if (is_active_sidebar('communities')) {
        echo '<div class="communities">';
        echo '<h4>' . __('Communities', 'agentpress') . '</h4>';
        dynamic_sidebar('communities');
        echo '</div><!-- end .communities -->';
    }
    if (is_active_sidebar('featured-bottom-left') || is_active_sidebar('featured-bottom-right')) {
        echo '<div class="featured-bottom">';
        echo '<div class="featured-bottom-left">';
        dynamic_sidebar('featured-bottom-left');
        echo '</div><!-- end .featured-bottom-left -->';
        echo '<div class="featured-bottom-right">';
        dynamic_sidebar('featured-bottom-right');
        echo '</div><!-- end .featured-bottom-right -->';
        echo '</div><!-- end .featured-bottom -->';
    }
}
コード例 #19
0
ファイル: home.php プロジェクト: kabrewer07/mrw
/**
 * Display widget content for homepage sections.
 *
 */
function inspiration_home_loop_helper()
{
    if (is_active_sidebar('slider') || is_active_sidebar('property-search')) {
        echo '<div class="featured-top" id="featured-header" style="width:100%; max-width:960px; min-height:200px; height:auto;">';
        echo '<div class="slider">';
        dynamic_sidebar('slider');
        echo '</div><!-- end .slider -->';
        echo '<div class="property-quick-search">';
        dynamic_sidebar('property-search');
        echo '</div><!-- end .property-quick-search -->';
        echo '</div><!-- end .featured-top -->';
    }
    if (is_active_sidebar('properties')) {
        echo '<div class="properties">';
        dynamic_sidebar('properties');
        echo '</div><!-- end .properties -->';
    }
    if (is_active_sidebar('welcome')) {
        echo '<div class="welcome">';
        genesis_structural_wrap('welcome');
        dynamic_sidebar('welcome');
        genesis_structural_wrap('welcome', 'close');
        echo '</div><!-- end .welcome -->';
    }
    if (is_active_sidebar('communities')) {
        echo '<div class="communities">';
        echo '<h4>' . __('Communities', 'inspiration') . '</h4>';
        dynamic_sidebar('communities');
        echo '</div><!-- end .communities -->';
    }
    if (is_active_sidebar('featured-bottom-left') || is_active_sidebar('featured-bottom-right')) {
        echo '<div class="featured-bottom">';
        echo '<div class="featured-bottom-left">';
        dynamic_sidebar('featured-bottom-left');
        echo '</div><!-- end .featured-bottom-left -->';
        echo '<div class="featured-bottom-right">';
        dynamic_sidebar('featured-bottom-right');
        echo '</div><!-- end .featured-bottom-right -->';
        echo '</div><!-- end .featured-bottom -->';
    }
}
コード例 #20
0
/**
 * Tweak original logic to dynamically add footer-widgets wrapper class for active sidebar count
 *
 * Echo the markup necessary to facilitate the footer widget areas.
 *
 * Check for a numerical parameter given when adding theme support - if none is found, then the function returns early.
 *
 * The child theme must style the widget areas.
 *
 * Applies the `genesis_footer_widget_areas` filter.
 *
 * @since 1.6.0
 *
 * @uses genesis_structural_wrap() Optionally adds wrap with footer-widgets context.
 *
 * @return null Return early if number of widget areas could not be determined, or nothing is added to the first widget area.
 */
function gb_genesis_footer_widget_areas()
{
    global $gb_active_footer_widget_areas;
    $footer_widgets = get_theme_support('genesis-footer-widgets');
    if (!$footer_widgets || !isset($footer_widgets[0]) || !is_numeric($footer_widgets[0])) {
        return;
    }
    $footer_widgets = (int) $footer_widgets[0];
    //* Check to see if first widget area has widgets. If not, do nothing. No need to check all footer widget areas.
    if (!is_active_sidebar('footer-1')) {
        return;
    }
    $inside = '';
    $output = '';
    $counter = 1;
    $active = 0;
    while ($counter <= $footer_widgets) {
        if (is_active_sidebar('footer-' . $counter)) {
            //* Darn you, WordPress! Gotta output buffer.
            ob_start();
            dynamic_sidebar('footer-' . $counter);
            $widgets = ob_get_clean();
            $inside .= sprintf('<div class="footer-widgets-%d widget-area">%s</div>', $counter, $widgets);
            $active++;
        }
        $counter++;
    }
    $gb_active_footer_widget_areas = $active;
    add_filter('genesis_attr_footer-widgets', 'gb_footer_widgets_count_class');
    if ($inside) {
        $output .= genesis_markup(array('html5' => '<div %s>', 'xhtml' => '<div id="footer-widgets" class="footer-widgets">', 'context' => 'footer-widgets'));
        $output .= genesis_structural_wrap('footer-widgets', 'open', 0);
        $output .= '<div class="inner-wrap">' . $inside . '</div>';
        $output .= genesis_structural_wrap('footer-widgets', 'close', 0);
        $output .= '</div>';
    }
    echo apply_filters('genesis_footer_widget_areas', $output, $footer_widgets);
}
コード例 #21
0
function bsg_nav_navbar_markup($nav_output, $nav, $args)
{
    $args['depth'] = 3;
    $args['menu_class'] = 'nav navbar-nav';
    $args['fallback_cb'] = 'wp_bootstrap_navwalker::fallback';
    $args['walker'] = new wp_bootstrap_navwalker();
    $nav = wp_nav_menu($args);
    $sanitized_location = sanitize_key($args['theme_location']);
    $data_target = 'nav-collapse-' . $sanitized_location;
    $nav_markup = <<<EOT
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#{$data_target}">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
EOT;
    $nav_markup .= apply_filters("bsg_nav_navbar_brand_{$sanitized_location}", $navbar_brand);
    $nav_markup .= '</div>';
    // .navbar-header
    $nav_markup .= '<div class="collapse navbar-collapse" id="' . $data_target . '">';
    ob_start();
    do_action('bsg_nav_before_' . $sanitized_location);
    $before_nav = ob_get_clean();
    ob_start();
    do_action('bsg_nav_before_' . $sanitized_location);
    $after_nav = ob_get_clean();
    $nav_markup .= $before_nav . $nav . $after_nav;
    $nav_markup .= '</div>';
    // .collapse .navbar-collapse
    $nav_markup_open = sprintf('<nav %s>', genesis_attr('nav-' . $sanitized_location));
    $nav_markup_open .= genesis_structural_wrap('menu-' . $sanitized_location, 'open', 0);
    $nav_markup_close = genesis_structural_wrap('menu-' . $sanitized_location, 'close', 0) . '</nav>';
    $nav_output = $nav_markup_open . $nav_markup . $nav_markup_close;
    return $nav_output;
}
コード例 #22
0
/**
 * Echo the opening structural markup for the header.
 *
 * @since 1.2.0
 *
 * @uses genesis_structural_wrap() Maybe add closing .wrap div tag with header context.
 * @uses genesis_markup()          Apply contextual markup.
 */
function gmdl_header_markup_close()
{
    genesis_structural_wrap('header', 'close');
    genesis_markup(array('html5' => '</header>', 'xhtml' => '</div>'));
}
コード例 #23
0
/**
 * Checks if the elements supports genesis-structural-wraps
 * Uses genesis_structural_wrap to close the markup for wrap
 * Echos markup if genesis_structural_wrap is not supported
 * @since 1.0
 */
function cuttz_structural_wrap_close($context)
{
    $wrap_support = get_theme_support('genesis-structural-wraps');
    if (search_context($context, $wrap_support)) {
        genesis_structural_wrap($context, 'close');
    } else {
        echo '</div>';
    }
}
コード例 #24
0
ファイル: menu.php プロジェクト: treydonovan/innergame-anna
/**
 * Echo the "Secondary Navigation" menu.
 *
 * The preferred option for creating menus is the Custom Menus feature in WordPress. There is also a fallback to using
 * the Genesis wrapper functions for creating a menu of Pages, or a menu of Categories (maintained only for backwards
 * compatibility).
 *
 * Either output can be filtered via `genesis_do_subnav`.
 *
 * @since 1.0.0
 *
 * @uses genesis_nav_menu_supported() Checks for support of specific nav menu.
 * @uses genesis_markup()             Contextual markup.
 * @uses genesis_html5()              Check for HTML5 support.
 * @uses genesis_structural_wrap()    Adds optional internal wrap divs.
 */
function genesis_do_subnav()
{
    //* Do nothing if menu not supported
    if (!genesis_nav_menu_supported('secondary')) {
        return;
    }
    //* If menu is assigned to theme location, output
    if (has_nav_menu('secondary')) {
        $class = 'menu genesis-nav-menu menu-secondary';
        if (genesis_superfish_enabled()) {
            $class .= ' js-superfish';
        }
        $args = array('theme_location' => 'secondary', 'container' => '', 'menu_class' => $class, 'echo' => 0);
        $subnav = wp_nav_menu($args);
        //* Do nothing if there is nothing to show
        if (!$subnav) {
            return;
        }
        $subnav_markup_open = genesis_markup(array('html5' => '<nav %s>', 'xhtml' => '<div id="subnav">', 'context' => 'nav-secondary', 'echo' => false));
        $subnav_markup_open .= genesis_structural_wrap('menu-secondary', 'open', 0);
        $subnav_markup_close = genesis_structural_wrap('menu-secondary', 'close', 0);
        $subnav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
        $subnav_output = $subnav_markup_open . $subnav . $subnav_markup_close;
        echo apply_filters('genesis_do_subnav', $subnav_output, $subnav, $args);
    }
}
コード例 #25
0
<?php

genesis_structural_wrap('inner', '</div><!-- end .wrap -->');
echo '</div><!-- end #inner -->
</div><!-- end #wrap -->
<div id="stickyfoot"><div class="stickywrap twelvecol">';
echo '<header id="branding" role="banner" class="threecol"><hgroup>';
do_action('genesis_header');
echo '</hgroup></header>';
echo '<div class="footer-widgets-1 widget-area threecol" role="complementary">';
if (is_active_sidebar('footer-bottom-left')) {
    dynamic_sidebar('footer-bottom-left');
}
echo '</div>';
echo '<div class="footer-widgets-2 widget-area  threecol" role="complementary">';
if (is_active_sidebar('footer-bottom-mid')) {
    dynamic_sidebar('footer-bottom-mid');
}
echo '</div>';
echo '<div class="footer-widgets-3 widget-area threecol last" role="complementary">';
if (is_active_sidebar('footer-bottom-right')) {
    dynamic_sidebar('footer-bottom-right');
}
echo '</div>';
do_action('genesis_footer');
do_action('genesis_after_footer');
echo '</div></div>';
wp_footer();
// we need this for plugins
do_action('genesis_after');
?>
コード例 #26
0
ファイル: footer.php プロジェクト: robalford/alfordhomesinc
/**
 * Echo the closing div tag for the footer.
 *
 * Also optionally adds wrapping div closing tag.
 *
 * @since 1.2.0
 *
 * @uses genesis_structural_wrap() Maybe add closing .wrap div tag with footer context.
 * @uses genesis_markup()          Apply contextual markup.
 */
function genesis_footer_markup_close()
{
    genesis_structural_wrap('footer', 'close');
    genesis_markup(array('html5' => '</footer>', 'xhtml' => '</div>'));
}
コード例 #27
0
/**
 * Filters the footer widget area because with the Genesis function it's not possible to apply Bootstrap grid classes to the widgets dynamically in a proper way.
 * Defines an action to insert the footer widgets.
 *
 * See example code in functions.php
 *
 * @since 1.0.0
 *
 * Reference: genesis/lib/structure/footer.php
 */
function mov_footer_widget_areas($output)
{
    genesis_markup(array('html5' => '<div %s>' . genesis_sidebar_title('Footer'), 'xhtml' => '<div id="footer-widgets" class="footer-widgets">', 'context' => 'footer-widgets'));
    echo genesis_structural_wrap('footer-widgets', 'open', 0);
    do_action('mov_footer_widgets_output');
    echo genesis_structural_wrap('footer-widgets', 'close', 0);
    echo '</div>';
}
コード例 #28
0
function coastal_footer_widget_areas()
{
    global $footer_col_number, $footer_widget_columns;
    $footer_col_number = 3;
    //Add a default for column number so there's no need to add value for 3 columns
    $footer_widget_columns = get_theme_mod('footer_col_number', 'footer-col-varied-3');
    //Get column number value from theme customizer
    switch ($footer_widget_columns) {
        //For columns 2, 3, 4: Adds a class to reflect new style for width, which should no longer be a varied width
        case 'footer-col-1':
            $cs_col_class = "one-col";
            $footer_col_number = 1;
            break;
        case 'footer-col-2':
            $cs_col_class = "one-2-cols";
            $footer_col_number = 2;
            break;
        case 'footer-col-3':
            $cs_col_class = "one-3-cols";
            break;
        case 'footer-col-4':
            $cs_col_class = "one-4-cols";
            $footer_col_number = 4;
            break;
        default:
    }
    $cs_footer_widgets = $footer_col_number;
    if (!is_active_sidebar('footer-1')) {
        return;
    }
    $cs_inside = '';
    $cs_output = '';
    $cs_counter = 1;
    while ($cs_counter <= $cs_footer_widgets) {
        ob_start();
        dynamic_sidebar('footer-' . $cs_counter);
        $cs_widgets = ob_get_clean();
        if ($footer_widget_columns == "footer-col-varied-3") {
            $cs_inside .= sprintf('<div class="footer-widgets-%d widget-area">%s</div>', $cs_counter, $cs_widgets);
        } else {
            $cs_inside .= sprintf('<div class="col %s widget-area">%s</div>', $cs_col_class, $cs_widgets);
        }
        $cs_counter++;
    }
    if ($cs_inside) {
        $cs_output .= genesis_markup(array('html5' => '<div %s>', 'xhtml' => '<div id="footer-widgets" class="footer-widgets">', 'context' => 'footer-widgets'));
        $cs_output .= genesis_structural_wrap('footer-widgets', 'open', 0);
        $cs_output .= $cs_inside;
        $cs_output .= genesis_structural_wrap('footer-widgets', 'close', 0);
        $cs_output .= '</div>';
    }
    echo $cs_output;
    //**Removed apply filters and directly echo the output
}
コード例 #29
0
function zp_filter_genesis_subnav($nav_output, $nav, $args)
{
    if (!genesis_nav_menu_supported('secondary')) {
        return;
    }
    if (!is_home() || !is_front_page()) {
        //* If menu is assigned to theme location, output
        if (has_nav_menu('secondary')) {
            $class = 'menu genesis-nav-menu menu-secondary nav navbar-nav pull-right';
            if (genesis_superfish_enabled()) {
                $class .= ' js-superfish';
            }
            $args = array('theme_location' => 'secondary', 'container' => '', 'menu_class' => $class, 'echo' => 0);
            $subnav = wp_nav_menu($args);
            //* Do nothing if there is nothing to show
            if (!$subnav) {
                return;
            }
            $subnav_markup_open = genesis_markup(array('html5' => '<nav %s>', 'xhtml' => '<div id="subnav">', 'context' => 'nav-secondary', 'echo' => false));
            $subnav_markup_open .= genesis_structural_wrap('menu-secondary', 'open', 0);
            $subnav_markup_close = genesis_structural_wrap('menu-secondary', 'close', 0);
            $subnav_markup_close .= genesis_html5() ? '</nav>' : '</div>';
            $subnav_output = $subnav_markup_open . $subnav . $subnav_markup_close;
        }
        return $subnav_output;
    }
}
コード例 #30
0
ファイル: footer.php プロジェクト: Oak86/matthewbuttler.work
<?php

/**
 * Genesis Framework.
 *
 * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
 * Please do all modifications in the form of a child theme.
 *
 * @package Genesis\Templates
 * @author  StudioPress
 * @license GPL-2.0+
 * @link    http://my.studiopress.com/themes/genesis/
 */
genesis_structural_wrap('site-inner', 'close');
echo '</div>';
//* end .site-inner or #inner
do_action('genesis_before_footer');
do_action('genesis_footer');
do_action('genesis_after_footer');
echo '</div>';
//* end .site-container or #wrap
do_action('genesis_after');
wp_footer();
//* we need this for plugins
?>
</body>
</html>