Esempio n. 1
0
function kadence_widgets_init()
{
    //Topbar
    if (kadence_display_topbar_widget()) {
        register_sidebar(array('name' => __('Topbar Widget', 'virtue'), 'id' => 'topbarright', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<span class="topbar-widgettitle">', 'after_title' => '</span>'));
    }
    // Sidebars
    register_sidebar(array('name' => __('Primary Sidebar', 'virtue'), 'id' => 'sidebar-primary', 'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></section>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer
    global $virtue;
    if (isset($virtue['footer_layout'])) {
        $footer_layout = $virtue['footer_layout'];
    } else {
        $footer_layout = "twoc";
    }
    if ($footer_layout == "fourc") {
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 1', 'virtue'), 'id' => 'footer_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 2', 'virtue'), 'id' => 'footer_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 3', 'virtue'), 'id' => 'footer_3', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 4', 'virtue'), 'id' => 'footer_4', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
    } else {
        if ($footer_layout == "threec") {
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 1', 'virtue'), 'id' => 'footer_third_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 2', 'virtue'), 'id' => 'footer_third_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 3', 'virtue'), 'id' => 'footer_third_3', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
        } else {
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 1', 'virtue'), 'id' => 'footer_double_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 2', 'virtue'), 'id' => 'footer_double_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
        }
    }
    // Widgets
    register_widget('Kadence_Contact_Widget');
    register_widget('Kadence_Social_Widget');
    register_widget('Kadence_Recent_Posts_Widget');
    register_widget('Kadence_Image_Grid_Widget');
    register_widget('Simple_About_With_Image');
}
Esempio n. 2
0
function kadence_widgets_init()
{
    //Topbar
    if (kadence_display_topbar_widget()) {
        register_sidebar(array('name' => __('Topbar Widget', 'virtue'), 'id' => 'topbarright', 'before_widget' => '<span class="topbar-widgetcontent">', 'after_widget' => '</span>', 'before_title' => '<span class="topbar-widgettitle">', 'after_title' => '</span>'));
    }
    //header
    global $virtue_premium;
    if (isset($virtue_premium['logo_layout']) && $virtue_premium['logo_layout'] == 'logowidget') {
        register_sidebar(array('name' => __('Header Widget Area', 'virtue'), 'id' => 'headerwidget', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => ''));
    }
    //Slider Widget
    global $virtue_premium;
    if (isset($virtue_premium['slider_widget_layout']) && $virtue_premium['slider_widget_layout'] == 'slidernwidget') {
        register_sidebar(array('name' => __('Slider Widget', 'virtue'), 'id' => 'slider-widget', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => ''));
    }
    // Sidebars
    register_sidebar(array('name' => __('Primary Sidebar', 'virtue'), 'id' => 'sidebar-primary', 'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></section>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    register_sidebar(array('name' => __('Home Widget Area', 'virtue'), 'id' => 'homewidget', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h3>', 'after_title' => '</h3>'));
    // Footer
    global $virtue_premium;
    if (isset($virtue_premium['footer_layout'])) {
        $footer_layout = $virtue_premium['footer_layout'];
    } else {
        $footer_layout = "fourc";
    }
    if ($footer_layout == "fourc") {
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 1', 'virtue'), 'id' => 'footer_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 2', 'virtue'), 'id' => 'footer_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 3', 'virtue'), 'id' => 'footer_3', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 4', 'virtue'), 'id' => 'footer_4', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
        }
    } else {
        if ($footer_layout == "threec") {
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 1', 'virtue'), 'id' => 'footer_third_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 2', 'virtue'), 'id' => 'footer_third_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 3', 'virtue'), 'id' => 'footer_third_3', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
            }
        } else {
            if ($footer_layout == "twoc") {
                if (function_exists('register_sidebar')) {
                    register_sidebar(array('name' => __('Footer Column 1', 'virtue'), 'id' => 'footer_double_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
                }
                if (function_exists('register_sidebar')) {
                    register_sidebar(array('name' => __('Footer Column 2', 'virtue'), 'id' => 'footer_double_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
                }
            } else {
                if (function_exists('register_sidebar')) {
                    register_sidebar(array('name' => __('Footer Column 1', 'virtue'), 'id' => 'footer_single_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h3>', 'after_title' => '</h3>'));
                }
            }
        }
    }
    // Widgets
    register_widget('Kadence_Contact_Widget');
    register_widget('Kadence_Social_Widget');
    register_widget('Kadence_Recent_Posts_Widget');
    register_widget('Kadence_Testimonial_Slider_Widget');
    register_widget('Kadence_Image_Grid_Widget');
    register_widget('Simple_About_With_Image');
    register_widget('kad_gallery_widget');
    register_widget('kad_carousel_widget');
    register_widget('kad_infobox_widget');
    register_widget('kad_gmap_widget');
    register_widget('kad_calltoaction_widget');
    register_widget('kad_imgmenu_widget');
}
Esempio n. 3
0
                echo $woocommerce->cart->get_cart_total();
                ?>
                      </a>
                    </li>
                  </ul>
                <?php 
            }
        }
    }
    ?>
          </div>
        </div><!-- close col-md-6 -->
        <div class="col-md-6 col-sm-6 kad-topbar-right">
          <div id="topbar-search" class="topbar-widget">
            <?php 
    if (kadence_display_topbar_widget()) {
        if (is_active_sidebar('topbarright')) {
            dynamic_sidebar('topbarright');
        }
    } else {
        if (kadence_display_top_search()) {
            get_search_form();
        }
    }
    ?>
        </div>
        </div> <!-- close col-md-6-->
      </div> <!-- Close Row -->
    </div> <!-- Close Container -->
  </section>
<?php 
Esempio n. 4
0
function kadence_widgets_init()
{
    //Topbar
    if (kadence_display_topbar_widget()) {
        register_sidebar(array('name' => __('Topbar Widget', 'pinnacle'), 'id' => 'topbarright', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<span class="topbar-widget-title">', 'after_title' => '</span>'));
    }
    // Sidebars
    register_sidebar(array('name' => __('Primary Sidebar', 'pinnacle'), 'id' => 'sidebar-primary', 'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-inner">', 'after_widget' => '</div></section>', 'before_title' => '<h5 class="widget-title">', 'after_title' => '</h5>'));
    register_sidebar(array('name' => __('Home Widget Area', 'pinnacle'), 'id' => 'homewidget', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>'));
    // Footer
    global $pinnacle;
    if (isset($pinnacle['footer_layout'])) {
        $footer_layout = $pinnacle['footer_layout'];
    } else {
        $footer_layout = "fourc";
    }
    if ($footer_layout == "fourc" || $footer_layout == "five") {
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 1', 'pinnacle'), 'id' => 'footer_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 2', 'pinnacle'), 'id' => 'footer_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 3', 'pinnacle'), 'id' => 'footer_3', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
        }
        if (function_exists('register_sidebar')) {
            register_sidebar(array('name' => __('Footer Column 4', 'pinnacle'), 'id' => 'footer_4', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
        }
    } else {
        if ($footer_layout == "threec") {
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 1', 'pinnacle'), 'id' => 'footer_third_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 2', 'pinnacle'), 'id' => 'footer_third_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 3', 'pinnacle'), 'id' => 'footer_third_3', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
            }
        } else {
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 1', 'pinnacle'), 'id' => 'footer_double_1', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
            }
            if (function_exists('register_sidebar')) {
                register_sidebar(array('name' => __('Footer Column 2', 'pinnacle'), 'id' => 'footer_double_2', 'before_widget' => '<div class="footer-widget"><aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside></div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
            }
        }
    }
    // Widgets
    register_widget('kad_contact_widget');
    register_widget('kad_social_widget');
    register_widget('kad_recent_posts_widget');
    if (kadence_testimonial_post_on()) {
        register_widget('kad_testimonial_slider_widget');
    }
    register_widget('kad_post_grid_widget');
    register_widget('kad_image_widget');
    register_widget('kad_gallery_widget');
    register_widget('kad_carousel_widget');
    register_widget('kad_infobox_widget');
    register_widget('kad_gmap_widget');
    register_widget('kad_calltoaction_widget');
    register_widget('kad_imgmenu_widget');
    register_widget('kad_split_content_widget');
}