';
$ara_collapsible_icons['minus'] = '
';
// Check for the required API functions
if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )
return;
// This prints the widget
function widget_ara_collapsiblearchive($args) {
$options = (array) get_option('widget_ara_collapsiblearchive');
$linktoplugin = $options['linktoplugin'] ? 1 : 0;
extract($args);
$start = ara_collapsiblearchive_microtime_float();
echo $before_widget;
echo "\n\t".''."\n";
echo ara_collapsiblearchive($before_title, $after_title);
if($linktoplugin)
{
print "\n\t".'';
}
echo $after_widget;
echo "\n\t".'';
$end = ara_collapsiblearchive_microtime_float();
echo "\n\t".''."\n";
}
// Tell Dynamic Sidebar about our new widget and its control
register_sidebar_widget(array('Collapsible Archive', 'widgets'), 'widget_ara_collapsiblearchive');
register_widget_control(array('Collapsible Archive', 'widgets'), 'widget_ara_collapsiblearchive_control', 300, 300);
}
function widget_ara_collapsiblearchive_enqueue()
{
$options = (array) get_option('widget_ara_collapsiblearchive');
$scriptaculous = $options['scriptaculous'] ? 1 : 0;
if(function_exists('wp_enqueue_script') && $scriptaculous > 0) wp_enqueue_script('scriptaculous-effects');
}
// Delay plugin execution to ensure Dynamic Sidebar has a chance to load first
add_action('widgets_init', 'widget_ara_collapsiblearchive_enqueue');
add_action('widgets_init', 'widget_ara_collapsiblearchive_init');
?>