/** * PHP that always loads no matter if section is added or not. */ function section_persistent() { $per_row = ploption('footer_num_columns') ? ploption('footer_num_columns') : 5; $this->markup_start = sprintf('<div class="pp%s footcol"><div class="footcol-pad">', $per_row); $this->markup_end = '</div></div>'; pl_register_sidebar(array('id' => $this->id, 'name' => $this->name, 'description' => __('Use this sidebar if you want to use widgets in your footer columns instead of the default.', 'pagelines'), 'before_widget' => $this->markup_start, 'after_widget' => $this->markup_end)); register_nav_menus(array('footer_nav' => __('Page Navigation in Footer Columns', 'pagelines'))); }
/** * PHP that always loads no matter if section is added or not. */ function section_persistent() { // Setup master array $this->master_array(); // Register Section Sidebars foreach ($this->master as $key => $i) { pl_register_sidebar(array('id' => sanitize_title($i['name']), 'name' => $i['name'], 'description' => $i['description'], 'before_widget' => '<div id="%1$s" class="%2$s widget fix"><div class="widget-pad">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>')); } }
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' => __('Secondary Sidebar', 'pagelines'), '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')), '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 $id => $args) { $args['id'] = $id; pl_register_sidebar($args); } }