refactor sidebar areas, implements GH#9
This commit is contained in:
parent
175f07400d
commit
0b7b641e84
116
functions.php
116
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' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Right Sidebar','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Above Header','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Header','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Menubar','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Over Comic','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Left of Comic','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Right of Comic','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Under Comic','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Over Blog','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Blog','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Under Blog','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
register_sidebar(array('name'=>'Footer','before_widget' => '
|
||||
<div id="%1$s" class="widget %2$s">
|
||||
','after_widget' => '
|
||||
</div>','before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>
|
||||
' ));
|
||||
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' => '<div id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h2 class="widgettitle">',
|
||||
'after_title' => '</h2>'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
function storyline_category_list() {
|
||||
|
|
Loading…
Reference in New Issue