Ejemplo n.º 1
0
 /**
  * Get singleton instance
  * @return WpvSidebars singleton instance
  */
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
    /**
     * displays the right sidebar if there is one
     */
    public static function right_sidebar()
    {
        $layout_type = WpvTemplates::get_layout();
        if ($layout_type == 'right-only' || $layout_type == 'left-right') {
            ?>
			<aside class="<?php 
            echo esc_attr(apply_filters('wpv_right_sidebar_class', 'right', $layout_type));
            ?>
">
				<?php 
            WpvSidebars::get_instance()->get_sidebar('right');
            ?>
			</aside>
		<?php 
        }
    }
Ejemplo n.º 3
0
 /**
  * Load widgets
  */
 public function load_widgets()
 {
     $wpv_sidebars = WpvSidebars::getInstance();
     $wpv_sidebars->register_sidebars();
     add_filter('widget_text', 'do_shortcode');
     add_filter('widget_title', 'do_shortcode');
     $widgets = array('advertisement', 'authors', 'contactinfo', 'flickr', 'gmap', 'icon-link', 'post-formats', 'posts', 'subpages');
     $enabled = get_theme_support('wpv-enabled-widgets');
     if (is_array($enabled)) {
         $widgets = $enabled;
     }
     foreach ($widgets as $name) {
         require_once WPV_WIDGETS . "/{$name}.php";
     }
 }