'."\n"; } else { $header_img_tag = ''. $header_img_alt. ''."\n"; } echo '
' . "\n"; if(!get_tarski_option('display_title') && !is_home()) { echo ''. $header_img_tag. ''."\n"; } else { echo $header_img_tag; } echo "
\n"; } } // Site title output function get_tarski_doctitle() { global $wp_query; $sep = ' · '; if((get_option('show_on_front') == 'posts') && is_home()) { if(get_bloginfo('description')) { $content = $sep. get_bloginfo('description'); } } elseif(is_search()) { $content = $sep. __('Search results','tarski'); } elseif(is_month()) { $content = $sep. single_month_title(' ', false); } else { $content = wp_title($sep, false); } return get_bloginfo('name'). $content; } function tarski_doctitle() { echo get_tarski_doctitle(); } // Returns site title in markup function tarski_sitetitle() { global $wp_query; $front_page_id = get_option('page_on_front'); if(get_tarski_option('display_title')) { if((get_option('show_on_front') == 'page') && ($front_page_id == $wp_query->post->ID)) { $prefix = '

'; $suffix = '

'; } elseif((get_option('show_on_front') == 'posts') && is_home()) { $prefix = '

'; $suffix = '

'; } else { $prefix = '

'; $suffix = '

'; } return $prefix . get_bloginfo('name') . $suffix; } } // Returns tagline in markup function tarski_tagline() { if((get_tarski_option('display_tagline') && get_bloginfo('description'))) { return '

'. get_bloginfo('description'). '

'; } } // Outputs site title and tagline function tarski_titleandtag() { $opening_tag = '
'; $closing_tag = '
'; if(tarski_tagline() || tarski_sitetitle()) { echo $opening_tag . "\n"; echo tarski_sitetitle() . "\n"; echo tarski_tagline() . "\n"; echo $closing_tag . "\n"; } } function home_link_name() { if(get_tarski_option('home_link_name')) { return get_tarski_option('home_link_name'); } else { return __('Home','tarski'); } } // Navbar function get_tarski_navbar() { global $wpdb; $current = 'class="nav-current" '; if(get_option('show_on_front') != 'page') { if(is_home()) { $home_status = $current; } $output = sprintf( '
  • %3$s
  • '."\n", $home_status, get_bloginfo('url').'/', home_link_name() ); } $nav_pages = get_tarski_option('nav_pages'); if($nav_pages) { $nav_pages = explode(',', $nav_pages); foreach($nav_pages as $page) { if(is_page($page) || ((get_option('show_on_front') == 'page') && (get_option('page_for_posts') == $page) && is_home())) { $page_status = $current; } else { $page_status = false; } $output .= sprintf( '
  • %4$s
  • '."\n", $page.'-'.$wpdb->get_var("SELECT post_name from $wpdb->posts WHERE ID = $page"), $page_status, get_permalink($page), $wpdb->get_var("SELECT post_title from $wpdb->posts WHERE ID = $page") ); } } $output = apply_filters('tarski_navbar', $output); return $output; } function tarski_navbar() { echo get_tarski_navbar(); } function add_admin_link($input) { if(is_user_logged_in()) { $input .= '
  • '. __('Site Admin','tarski'). '
  • '. "\n"; } return $input; } // Body classes if(!function_exists('tarski_bodyclass')) { function tarski_bodyclass() { if(get_tarski_option('centered_theme')) { // Centred or not echo 'center'; } else { echo 'left'; } if(get_tarski_option('swap_sides')) { // Swapped or not echo ' janus'; } if(get_tarski_option('style')) { // Alternate style echo ' ' . str_replace('.css', '', get_tarski_option('style')); } if (is_page() || is_single() || is_404()) { // Is it a single page? echo ' single'; } } } // Body ids if(!function_exists('tarski_bodyid')) { function tarski_bodyid() { global $post, $wp_query; if(is_home()) { return 'home'; } elseif(is_search()) { return 'search'; } elseif(is_page()) { return 'page-'. $post->post_name; } elseif(is_single()) { return 'post-'. $post->post_name; } elseif(is_category()) { $cat_ID = intval(get_query_var('cat')); $category = &get_category($cat_ID); return 'cat-'. $category->category_nicename; } elseif(is_author()) { $author = the_archive_author(); return 'author-'. $author->user_login; } elseif(is_date()) { $year = get_query_var('year'); $monthnum = get_query_var('monthnum'); $day = get_query_var('day'); if(is_year()) { return 'date-'. $year; } elseif(is_month()) { return 'date-'. $year. '-'. $monthnum; } elseif(is_day()) { return 'date-'. $year. '-'. $monthnum. '-'. $day; } } elseif(is_archive() && function_exists('is_tag')) { if(is_tag()) { $tag_ID = intval(get_query_var('tag_id')); $tag = &get_term($tag_ID, 'post_tag'); return 'tag-'. $tag->slug; } } elseif(is_404()) { return '404'; } else { return 'unknown'; } } } // Footer sidebar function tarski_searchform() { if(!is_search()) { include(TEMPLATEPATH . '/searchform.php'); } } // Default footer stuff including credit function tarski_feed_and_credit() { if(detectWPMU()) { $current_site = get_current_site(); } ?>

    WordPress and Tarski', 'tarski'); if(detectWPMU()) { echo ' | '. __('Hosted by ','tarski'). ''. $current_site->site_name. ''; } ?>