From 0b7b641e84ba4a0b5adb4edc55cfb023baa68935 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 23 Nov 2009 21:27:39 -0500 Subject: [PATCH] refactor sidebar areas, implements GH#9 --- functions.php | 116 ++++++++++++++++---------------------------------- 1 file changed, 37 insertions(+), 79 deletions(-) diff --git a/functions.php b/functions.php index a035c20..c2d82da 100644 --- a/functions.php +++ b/functions.php @@ -76,7 +76,7 @@ function comicpress_load_options() { $comicpress_options = get_option('comicpress_options'); if (empty($comicpress_options)) { $comicpress_options['comicpress_version'] = '2.9.0.1'; - + $comicpress_options['disable_comic_frontpage'] = false; $comicpress_options['disable_comic_blog_frontpage'] = false; $comicpress_options['disable_comic_blog_single'] = false; @@ -87,24 +87,24 @@ function comicpress_load_options() { $comicpress_options['disable_page_titles'] = false; $comicpress_options['static_blog'] = false; $comicpress_options['disable_default_comic_nav'] = false; - + $comicpress_options['cp_theme_layout'] = 'standard'; $comicpress_options['transcript_in_posts'] = false; $comicpress_options['enable_widgetarea_use_sidebar_css'] = false; - + $comicpress_options['enable_custom_image_header'] = false; $comicpress_options['custom_image_header_width'] = '980'; $comicpress_options['custom_image_header_height'] = '120'; - + $comicpress_options['enable_numbered_pagination'] = false; $comicpress_options['disable_page_restraints'] = false; - + $comicpress_options['enable_related_comics'] = false; $comicpress_options['enable_related_posts'] = false; - + $comicpress_options['comic_clicks_next'] = false; $comicpress_options['rascal_says'] = false; - + $comicpress_options['enable_post_calendar'] = false; $comicpress_options['enable_post_author_gravatar'] = false; $comicpress_options['enable_comic_post_calendar'] = false; @@ -114,30 +114,30 @@ function comicpress_load_options() { $comicpress_options['disable_comment_note'] = false; $comicpress_options['blogposts_with_comic'] = false; $comicpress_options['remove_wptexturize'] = false; - + $comicpress_options['moods_directory'] = 'default'; $comicpress_options['graphicnav_directory'] = 'default'; $comicpress_options['calendar_directory'] = 'none'; $comicpress_options['avatar_directory'] = 'none'; - + $comicpress_options['enable_search_in_menubar'] = false; $comicpress_options['enable_rss_in_menubar'] = true; $comicpress_options['enable_navigation_in_menubar'] = true; $comicpress_options['contact_in_menubar'] = false; $comicpress_options['disable_dynamic_menubar_links'] = false; $comicpress_options['disable_default_menubar'] = false; - + $comicpress_options['archive_display_order'] = 'desc'; $comicpress_options['excerpt_or_content_archive'] = 'content'; $comicpress_options['excerpt_or_content_search'] = 'excerpt'; $comicpress_options['category_thumbnail_postcount'] = '-1'; - + $comicpress_options['members_post_category'] = ''; - + $comicpress_options['split_column_in_two'] = false; $comicpress_options['author_column_one'] = ''; $comicpress_options['author_column_two'] = ''; - + $comicpress_options['buy_print_email'] = 'philip@frumph.net'; $comicpress_options['buy_print_url'] = '/shop/'; $comicpress_options['buy_print_us_amount'] = '24.95'; @@ -145,7 +145,7 @@ function comicpress_load_options() { $comicpress_options['buy_print_add_shipping'] = false; $comicpress_options['buy_print_us_ship'] = '4.95'; $comicpress_options['buy_print_int_ship'] = '9.95'; - + add_option('comicpress_options', $comicpress_options, '', 'yes'); // update_option('comicpress_options', $comicpress_options); } @@ -764,71 +764,29 @@ add_filter('the_content','insert_comic_feed'); // Register Sidebar and Define Widgets if ( function_exists('register_sidebar') ) { - register_sidebar(array('name'=>'Left Sidebar', 'before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Right Sidebar','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Above Header','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Header','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Menubar','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Over Comic','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Left of Comic','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Right of Comic','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Under Comic','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Over Blog','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Blog','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Under Blog','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); - register_sidebar(array('name'=>'Footer','before_widget' => ' -
-','after_widget' => ' -
','before_title' => '

', 'after_title' => '

-' )); + foreach (array( + __('Left Sidebar', 'comicpress'), + __('Right Sidebar', 'comicpress'), + __('Above Header', 'comicpress'), + __('Header', 'comicpress'), + __('Menubar', 'comicpress'), + __('Over Comic', 'comicpress'), + __('Left of Comic', 'comicpress'), + __('Right of Comic', 'comicpress'), + __('Under Comic', 'comicpress'), + __('Over Blog', 'comicpress'), + __('Blog', 'comicpress'), + __('Under Blog', 'comicpress'), + __('Footer', 'comicpress') + ) as $label) { + register_sidebar(array( + 'name'=> $label, + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + )); + } } function storyline_category_list() {