__( 'Primary Navigation', 'redo_domain' ), ) ); function redo_page_menu() { // fallback for primary navigation ?> '333333', 'border' => '444444', 'text' => 'eeeeee', 'link' => 'cccccc', 'url' => 'ee0000', ); $content_width = 655; // pixels add_theme_support( 'automatic-feed-links' ); function get_redo_ping_type($trackbacktxt = 'Trackback', $pingbacktxt = 'Pingback') { $type = get_comment_type(); switch( $type ) { case 'trackback' : return $trackbacktxt; break; case 'pingback' : return $pingbacktxt; break; } return false; } /* By Mark Jaquith, http://txfx.net */ function redo_nice_category($normal_separator = ', ', $penultimate_separator = ' and ') { $categories = get_the_category(); if (empty($categories)) { _e('Uncategorized','redo_domain'); return; } $thelist = ''; $i = 1; $n = is_countable($categories) ? count($categories) : 0 ; foreach ($categories as $category) { if (1 < $i and $i != $n) { $thelist .= $normal_separator; } if (1 < $i and $i == $n) { $thelist .= $penultimate_separator; } $thelist .= 'cat_name) . '">'.$category->cat_name.''; ++$i; } return apply_filters('the_category', $thelist, $normal_separator); } function redo_body_id() { if (get_option('permalink_structure') != '' and is_page()) { echo "id='" . get_query_var('name') . "'"; } } // Semantic class functions from Sandbox 0.6.1 (http://www.plaintxt.org/themes/sandbox/) // Template tag: echoes semantic classes in the function redo_body_class() { global $wp_query, $current_user; $c = array('wordpress', 'k2'); redo_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; // CSS does not allow a digit as first character if ( is_single() ) { the_post(); $c[] = 'single'; if ( isset($wp_query->post->post_date) ) { redo_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'; echo implode(' ', apply_filters('body_class', $c)); } // Template tag: echoes semantic classes in each post
function redo_post_class( $post_count = 1, $post_asides = false ) { global $post; $c = array("p$post_count", $post->post_status); $c[] = 'author-' . get_the_author_login(); redo_date_classes(mysql2date('U', $post->post_date), $c); if ( $post_asides ) { $c[] = 'redo-asides'; } if ( $post_count & 1 == 1 ) { $c[] = 'alt'; } echo implode(' ', get_post_class( $c, $post->ID )); } // Template tag: echoes semantic classes for a comment
  • function redo_comment_class( $comment_count = 1, $echo = true) { global $comment, $post; $c = array($comment->comment_type, "c$comment_count"); 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'; } } redo_date_classes(mysql2date('U', $comment->comment_date), $c, 'c-'); if ( $comment_count & 1 == 1 ) { $c[] = 'alt'; } if ( is_trackback() ) { $c[] = 'trackback'; } $return = implode( ' ', apply_filters( 'comment_class', $c, array(), $comment->comment_ID, $comment, $post ) ); if ($echo) echo $return; else return $return; } // Adds four time- and date-based classes to an array // with all times relative to GMT (sometimes called UTC) function redo_date_classes($t, &$c, $p = '') { $t = $t + ( (int) get_option( 'gmt_offset' ) * 3600 ); $c[] = $p . 'y' . gmdate('Y', $t); // Year $c[] = $p . 'm' . gmdate('m', $t); // Month $c[] = $p . 'd' . gmdate('d', $t); // Day $c[] = $p . 'h' . gmdate('h', $t); // Hour } // Register the sidebar - This allows for multiple sidebars to be used. if(function_exists('register_sidebars')) { register_sidebars(1, array('before_widget' => '
    ','after_widget' => '
    ')); } // this ends the admin page function redoable_lite_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; global $comment_count; $comment_count++; extract($args, EXTR_SKIP); ?>
  • >
    %3$s', get_comment_ID(), (function_exists('time_since')? sprintf(__('%s ago.','redo_domain'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) ): __('Permanent Link to this Comment','redo_domain') ), sprintf(__('%1$s at %2$s','redo_domain'), get_comment_date(get_option('date_format')), get_comment_time() ) ); ?>
    'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    comment_approved) { ?>

  • >
    ' . get_redo_ping_type(__('Trackback','redo_domain'), __('Pingback','redo_domain')) . '', sprintf('%3$s', get_comment_ID(), (function_exists('time_since')? sprintf(__('%s ago.','redo_domain'), time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) ): __('Permanent Link to this Comment','redo_domain') ), sprintf(__('%1$s at %2$s','redo_domain'), get_comment_date(__('M jS, Y','redo_domain')), get_comment_time() ) ) ); ?> ',''); } ?>
    tag based on what is being viewed. * * @since Redoable Lite 1.2 */ function redoable_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'redo_domain' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'redoable_wp_title', 10, 2 );