__('Tabber Tabs Widget Area', 'slipfire'),
'id' => 'tabber_tabs',
'description' => __('Build your tabbed area by placing widgets here. !! IMPORTANT: DO NOT PLACE THE TABBER TABS WIDGET IN THIS AREA. BAD THINGS WILL HAPPEN !! Place the TABBER TABS widget in another widget area. ', 'slipfire'),
'before_widget' => '
',
'before_title' => ''
)
);
}
// Load the widget area last so we don't effect other widget areas.
add_action( 'wp_loaded', 'tabber_tabs_register_sidebar' );
/**
* Register the widget.
*
* @uses register_widget() Registers individual widgets.
* @link http://codex.wordpress.org/WordPress_Widgets_Api
*/
class Slipfire_Widget_Tabber extends WP_Widget {
function Slipfire_Widget_Tabber() {
$widget_ops = array( 'classname' => 'tabbertabs', 'description' => __('Place items in the TABBER TABS WIDGET AREA and have them show up here.', 'slipfire') );
$control_ops = array( 'width' => 230, 'height' => 350, 'id_base' => 'slipfire-tabber' );
$this->WP_Widget( 'slipfire-tabber', __('Tabber Tabs Widget', 'slipfire'), $widget_ops, $control_ops );
}
function widget( $args, $instance ) {
extract( $args );
$style = $instance['style']; // get the widget style from settings
echo $before_widget;
?>
__('Tabber', 'slipfire'), 'style' => 'style1' );
$instance = wp_parse_args( (array) $instance, $defaults ); ?>
';
}
/**
* Temporarily hide the "tabber" class so it does not "flash"
* on the page as plain HTML. After tabber runs, the class is changed
* to "tabberlive" and it will appear.
*/
function tabber_tabs_temp_hide(){
echo '';
}
/**
* Admin notice
*/
// Function to check if there are widgets in the Tabber Tabs widget area
// Thanks to Themeshaper: http://themeshaper.com/collapsing-wordpress-widget-ready-areas-sidebars/
function is_tabber_tabs_area_active( $index ){
global $wp_registered_sidebars;
$widgetcolums = wp_get_sidebars_widgets();
if ($widgetcolums[$index]) return true;
return false;
}
?>