Exemplo n.º 1
0
 function register_sidebars()
 {
     // This array contains the sidebars in the correct order.
     $sidebars = array('sb_primary' => array('name' => __('Primary Sidebar', 'pagelines'), 'description' => __('The main widgetized sidebar.', 'pagelines')), 'sb_secondary' => array('name' => sprintf('%s%s', __('Secondary Sidebar', 'pagelines'), !VPRO ? ' (Pro Only)' : ''), 'description' => __('The secondary widgetized sidebar for the theme.', 'pagelines')), 'sb_tertiary' => array('name' => __('Tertiary Sidebar', 'pagelines'), 'description' => __('A 3rd widgetized sidebar for the theme that can be used in standard sidebar templates.', 'pagelines')), 'sb_universal' => array('name' => __('Universal Sidebar', 'pagelines'), 'description' => __('A universal widgetized sidebar', 'pagelines'), 'pro' => true), 'sb_fullwidth' => array('name' => __('Full Width Sidebar', 'pagelines'), 'description' => __('Shows full width widgetized sidebar.', 'pagelines')), 'sb_content' => array('name' => __('Content Sidebar', 'pagelines'), 'description' => __('Displays a widgetized sidebar inside the main content area. Set it up in the widgets panel.', 'pagelines')));
     foreach ($sidebars as $key => $sidebar) {
         if (isset($sidebar['pro']) && !VPRO) {
             continue;
         }
         pagelines_register_sidebar(pagelines_standard_sidebar($sidebar['name'], $sidebar['description']));
     }
 }
Exemplo n.º 2
0
 function section_persistent()
 {
     $setup = pagelines_standard_sidebar($this->name, $this->settings['description']);
     register_sidebar($setup);
 }
Exemplo n.º 3
0
/**
 * register_sidebar wrapper
 * 
 * Includes standard sidebar args
 * Updates old index-key sidebars in the process
 *
 * @since	2.4.6
 * 
 * @param  [type] $args [description]
 * @return [type]       [description]
 */
function pl_register_sidebar($args)
{
    $base = pagelines_standard_sidebar('name', 'description');
    // defaults to merge with
    $args = array_merge($base, $args);
    // migrate sidebars' widgets from assigned index key to declared id
    if (!empty($args['id'])) {
        global $wp_registered_sidebars;
        $i = count($wp_registered_sidebars) + 1;
        pl_migrate_widgets("sidebar-{$i}", $args['id']);
    }
    register_sidebar($args);
}