"; if ( !is_home() || is_paged() ) { ?>
  • \n"; } function barthelme_admin_hCard() { global $wpdb, $admin_info; $admin_info = get_userdata(1); echo '' . $admin_info->first_name . ' ' . $admin_info->last_name . ''; } function barthelme_author_hCard() { global $wpdb, $authordata; echo '' . get_the_author() . ''; } function barthelme_body_class( $print = true ) { global $wp_query, $current_user; $c = array('wordpress'); barthelme_date_classes(time(), $c); is_home() ? $c[] = 'home' : null; is_archive() ? $c[] = 'archive' : null; is_date() ? $c[] = 'date' : null; is_search() ? $c[] = 'search' : null; is_paged() ? $c[] = 'paged' : null; is_attachment() ? $c[] = 'attachment' : null; is_404() ? $c[] = 'four04' : null; if ( is_single() ) { the_post(); $c[] = 'single'; if ( isset($wp_query->post->post_date) ) barthelme_date_classes(mysql2date('U', $wp_query->post->post_date), $c, 's-'); foreach ( (array) get_the_category() as $cat ) $c[] = 's-category-' . $cat->category_nicename; $c[] = 's-author-' . get_the_author_login(); rewind_posts(); } else if ( is_author() ) { $author = $wp_query->get_queried_object(); $c[] = 'author'; $c[] = 'author-' . $author->user_nicename; } else if ( is_category() ) { $cat = $wp_query->get_queried_object(); $c[] = 'category'; $c[] = 'category-' . $cat->category_nicename; } else if ( is_page() ) { the_post(); $c[] = 'page'; $c[] = 'page-author-' . get_the_author_login(); rewind_posts(); } if ( $current_user->ID ) $c[] = 'loggedin'; $c = join(' ', apply_filters('body_class', $c)); return $print ? print($c) : $c; } function barthelme_post_class( $print = true ) { global $post, $barthelme_post_alt; $c = array('hentry', "p$barthelme_post_alt", $post->post_type, $post->post_status); $c[] = 'author-' . get_the_author_login(); foreach ( (array) get_the_category() as $cat ) $c[] = 'category-' . $cat->category_nicename; barthelme_date_classes(mysql2date('U', $post->post_date), $c); if ( ++$barthelme_post_alt % 2 ) $c[] = 'alt'; $c = join(' ', apply_filters('post_class', $c)); return $print ? print($c) : $c; } $barthelme_post_alt = 1; function barthelme_comment_class( $print = true ) { global $comment, $post, $barthelme_comment_alt; $c = array($comment->comment_type); if ( $comment->user_id > 0 ) { $user = get_userdata($comment->user_id); $c[] = "byuser commentauthor-$user->user_login"; if ( $comment->user_id === $post->post_author ) $c[] = 'bypostauthor'; } barthelme_date_classes(mysql2date('U', $comment->comment_date), $c, 'c-'); if ( ++$barthelme_comment_alt % 2 ) $c[] = 'alt'; $c[] = "c$barthelme_comment_alt"; if ( is_trackback() ) { $c[] = 'trackback'; } $c = join(' ', apply_filters('comment_class', $c)); return $print ? print($c) : $c; } function barthelme_date_classes($t, &$c, $p = '') { $t = $t + (get_settings('gmt_offset') * 3600); $c[] = $p . 'y' . gmdate('Y', $t); $c[] = $p . 'm' . gmdate('m', $t); $c[] = $p . 'd' . gmdate('d', $t); $c[] = $p . 'h' . gmdate('h', $t); } function barthelme_other_cats($glue) { $current_cat = single_cat_title('', false); $separator = "\n"; $cats = explode($separator, get_the_category_list($separator)); foreach ( $cats as $i => $str ) { if ( strstr($str, ">$current_cat<") ) { unset($cats[$i]); break; } } if ( empty($cats) ) return false; return trim(join($glue, $cats)); } function widget_barthelme_search($args) { extract($args); ?>

    except the home.', 'barthelme'); ?>

    '

    ', 'title_after'=>'

    ', 'show_images'=>true)); } else { global $wpdb; $cats = $wpdb->get_results(" SELECT DISTINCT link_category, cat_name, show_images, show_description, show_rating, show_updated, sort_order, sort_desc, list_limit FROM `$wpdb->links` LEFT JOIN `$wpdb->linkcategories` ON (link_category = cat_id) WHERE link_visible = 'Y' AND list_limit <> 0 ORDER BY cat_name ASC", ARRAY_A); if ($cats) { foreach ($cats as $cat) { $orderby = $cat['sort_order']; $orderby = (bool_from_yn($cat['sort_desc'])?'_':'') . $orderby; echo '
  • ' . $cat['cat_name'] . "

    \n\t
      \n"; get_links($cat['link_category'], '
    • ',"
    • ","\n", bool_from_yn($cat['show_images']), $orderby, bool_from_yn($cat['show_description']), bool_from_yn($cat['show_rating']), $cat['list_limit'], bool_from_yn($cat['show_updated'])); echo "\n\t
    \n
  • \n"; } } } } function barthelme_widgets_init() { if ( !function_exists('register_sidebars') ) return; $p = array( 'before_title' => "

    ", 'after_title' => "

    \n", ); register_sidebars(1, $p); register_sidebar_widget(__('Search', 'barthelme'), 'widget_barthelme_search', null, 'search'); unregister_widget_control('search'); register_sidebar_widget(__('Meta', 'barthelme'), 'widget_barthelme_meta', null, 'meta'); unregister_widget_control('meta'); register_sidebar_widget(__('Links', 'barthelme'), 'widget_barthelme_links', null, 'links'); unregister_widget_control('links'); register_sidebar_widget(array('Home Link', 'widgets'), 'widget_barthelme_homelink'); register_widget_control(array('Home Link', 'widgets'), 'widget_barthelme_homelink_control', 300, 125); register_sidebar_widget(array('RSS Links', 'widgets'), 'widget_barthelme_rsslinks'); register_widget_control(array('RSS Links', 'widgets'), 'widget_barthelme_rsslinks_control', 300, 90); } function barthelme_add_admin() { if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { update_option( 'barthelme_basefontsize', $_REQUEST['bm_basefontsize'] ); update_option( 'barthelme_basefontfamily', $_REQUEST['bm_basefontfamily'] ); update_option( 'barthelme_headingfontfamily', $_REQUEST['bm_headingfontfamily'] ); update_option( 'barthelme_posttextalignment', $_REQUEST['bm_posttextalignment'] ); update_option( 'barthelme_layoutwidth', $_REQUEST['bm_layoutwidth'] ); update_option( 'barthelme_uppercolor', $_REQUEST['bm_uppercolor'] ); update_option( 'barthelme_lowercolor', $_REQUEST['bm_lowercolor'] ); update_option( 'barthelme_headerfontcolor', $_REQUEST['bm_headerfontcolor'] ); update_option( 'barthelme_authorlink', $_REQUEST['bm_authorlink'] ); if( isset( $_REQUEST['bm_basefontsize'] ) ) { update_option( 'barthelme_basefontsize', $_REQUEST['bm_basefontsize'] ); } else { delete_option( 'barthelme_basefontsize' ); } if( isset( $_REQUEST['bm_basefontfamily'] ) ) { update_option( 'barthelme_basefontfamily', $_REQUEST['bm_basefontfamily'] ); } else { delete_option( 'barthelme_basefontfamily' ); } if( isset( $_REQUEST['bm_headingfontfamily'] ) ) { update_option( 'barthelme_headingfontfamily', $_REQUEST['bm_headingfontfamily'] ); } else { delete_option('barthelme_headingfontfamily'); } if( isset( $_REQUEST['bm_posttextalignment'] ) ) { update_option( 'barthelme_posttextalignment', $_REQUEST['bm_posttextalignment'] ); } else { delete_option('barthelme_posttextalignment'); } if( isset( $_REQUEST['bm_layoutwidth'] ) ) { update_option( 'barthelme_layoutwidth', $_REQUEST['bm_layoutwidth'] ); } else { delete_option('barthelme_layoutwidth'); } if( isset( $_REQUEST['bm_uppercolor'] ) ) { update_option( 'barthelme_uppercolor', $_REQUEST['bm_uppercolor'] ); } else { delete_option('barthelme_uppercolor'); } if( isset( $_REQUEST['bm_lowercolor'] ) ) { update_option( 'barthelme_lowercolor', $_REQUEST['bm_lowercolor'] ); } else { delete_option('barthelme_lowercolor'); } if( isset( $_REQUEST['bm_headerfontcolor'] ) ) { update_option( 'barthelme_headerfontcolor', $_REQUEST['bm_headerfontcolor'] ); } else { delete_option('barthelme_headerfontcolor'); } if( isset( $_REQUEST['bm_authorlink'] ) ) { update_option( 'barthelme_authorlink', $_REQUEST['bm_authorlink'] ); } else { delete_option('barthelme_authorlink'); } header("Location: themes.php?page=functions.php&saved=true"); die; } else if ( 'reset' == $_REQUEST['action'] ) { delete_option('barthelme_basefontsize'); delete_option('barthelme_basefontfamily'); delete_option('barthelme_headingfontfamily'); delete_option('barthelme_posttextalignment'); delete_option('barthelme_layoutwidth'); delete_option('barthelme_uppercolor'); delete_option('barthelme_lowercolor'); delete_option('barthelme_headerfontcolor'); delete_option('barthelme_authorlink'); header("Location: themes.php?page=functions.php&reset=true"); die; } add_action('admin_head', 'barthelme_admin_head'); } add_theme_page("Barthelme Options", "Barthelme Options", 'edit_themes', basename(__FILE__), 'barthelme_admin'); } function barthelme_admin_head() { ?>

    View site »', 'barthelme'), get_bloginfo('home') . '/'); ?>

    Barthelme theme. You can customize this theme with the options below. You must click on Save Options to save any changes. You can also discard your changes and reload the default settings by clicking on Reset.', 'barthelme'); ?>

    " tabindex="1" size="10" />
    75%.', 'barthelme'); ?>









    Arial.', 'barthelme'), 'web safe'); ?>









    Georgia. ', 'barthelme'), 'web safe'); ?>

    " tabindex="20" size="10" />
    auto.', 'barthelme'); ?> Note: If you use 100%, the width will be ever-so-larger than the browser window. If you want to play, I suggest playing with ems. But really, auto is the best option.', 'barthelme'); ?>

    left.', 'barthelme'); ?>


    documentation for info). Default is displayed.', 'barthelme'); ?>


    Important note on color values below: You must enter the full, six-digit hexidecimal color value without the "#" symbol for each color value. Otherwise, things won\'t work.', 'barthelme'); ?>
    # " tabindex="23" size="10" />
    8999B0.', 'barthelme'); ?>
    # " tabindex="24" size="10" />
    BBC8D9.', 'barthelme'); ?>
    # " tabindex="25" size="10" />
    FEFEFE.', 'barthelme'); ?>

    Resetting clears all changes to the above options. After resetting, default options are loaded and this theme will continue to be the active theme. A reset does not affect the actual theme files in any way.', 'barthelme'); ?>

    Barthelme theme, version ' . $installedVersion . ', by Scott Allan Wallick.', 'barthelme'); ?>

    documentation for more information about the Barthelme theme and its advanced features.', 'barthelme'), get_template_directory_uri() . '/readme.html'); ?>

    Barthelme theme copyright © %1$s by Scott Allan Wallick is distributed with the GNU General Public License.', 'barthelme'), gmdate('Y') ); ?>

    ' . get_the_author() . ''; } else { echo '' . get_the_author() . ''; } } else if ( get_settings('barthelme_authorlink') =="displayed" ) { if ( is_single() || is_page() ) { return '' . get_the_author() . ''; } else { echo '' . get_the_author() . ''; } } else if ( get_settings('barthelme_authorlink') =="hidden" ) { if ( is_single() || is_page() ) { return '' . get_the_author() . ''; } else { echo ''; } }; } if ( get_settings('barthelme_basefontsize') == "" ) { $basefontsize = '75%'; } else { $basefontsize = stripslashes( get_settings('barthelme_basefontsize') ); }; if ( get_settings('barthelme_basefontfamily') == "" ) { $basefontfamily = 'arial,helvtica,sans-serif'; } else { $basefontfamily = stripslashes( get_settings('barthelme_basefontfamily') ); }; if ( get_settings('barthelme_headingfontfamily') == "" ) { $headingfontfamily = 'georgia,times,serif'; } else { $headingfontfamily = stripslashes( get_settings('barthelme_headingfontfamily') ); }; if ( get_settings('barthelme_layoutwidth') == "" ) { $layoutwidth = 'auto'; } else { $layoutwidth = stripslashes( get_settings('barthelme_layoutwidth') ); }; if ( get_settings('barthelme_posttextalignment') == "" ) { $posttextalignment = 'left'; } else { $posttextalignment = stripslashes( get_settings('barthelme_posttextalignment') ); }; if ( get_settings('barthelme_uppercolor') == "" ) { $uppercolor = '8a9aae'; } else { $uppercolor = stripslashes( get_settings('barthelme_uppercolor') ); }; if ( get_settings('barthelme_lowercolor') == "" ) { $lowercolor = 'bac8da'; } else { $lowercolor = stripslashes( get_settings('barthelme_lowercolor') ); }; if ( get_settings('barthelme_headerfontcolor') == "" ) { $headerfontcolor = 'fefefe'; } else { $headerfontcolor = stripslashes( get_settings('barthelme_headerfontcolor') ); }; ?>