__('Main Navigation'), 'another-menu' => __('Another Navigation') ) ); } //Add the above function to init hook. add_action( 'wp_head', 'add_our_scripts',0); add_action('init', 'add_wp3menu_support'); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'shape', TEMPLATEPATH . '/languages' ); $locale = get_locale(); $locale_file = TEMPLATEPATH . "/languages/$locale.php"; if ( is_readable($locale_file) ) require_once($locale_file); // Get the page number function get_page_number() { if (get_query_var('paged')) { print ' | ' . __( 'Page ' , 'shape') . get_query_var('paged'); } } // end get_page_number // For category lists on category archives: Returns other categories except the current one (redundant) function cats_meow($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 )); } // end cats_meow // For tag lists on tag archives: Returns other tags except the current one (redundant) function tag_ur_it($glue) { $current_tag = single_tag_title( '', '', false ); $separator = "\n"; $tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) ); foreach ( $tags as $i => $str ) { if ( strstr( $str, ">$current_tag<" ) ) { unset($tags[$i]); break; } } if ( empty($tags) ) return false; return trim(join( $glue, $tags )); } // end tag_ur_it // Register widgetized areas function theme_widgets_init() { // Area 1 register_sidebar( array ( 'name' => 'Primary Widget Area', 'id' => 'primary-widget-area', 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 2 register_sidebar( array ( 'name' => 'Secondary Widget Area', 'id' => 'secondary-widget-area', 'before_widget' => '
  • ', 'after_widget' => "
  • ", 'before_title' => '

    ', 'after_title' => '

    ', ) ); } // end theme_widgets_init add_action( 'init', 'theme_widgets_init' ); if ( isset( $_GET['activated'] ) ) { update_option( 'sidebars_widgets', $preset_widgets ); } // Check for static widgets in widget-ready areas function is_sidebar_active( $index ){ global $wp_registered_sidebars; $widgetcolums = wp_get_sidebars_widgets(); if ($widgetcolums[$index]) return true; return false; } // end is_sidebar_active // Produces an avatar image with the hCard-compliant photo class function commenter_link() { $commenter = get_comment_author_link(); if ( ereg( ']* class=[^>]+>', $commenter ) ) { $commenter = ereg_replace( '(]* class=[\'"]?)', '\\1url ' , $commenter ); } else { $commenter = ereg_replace( '(' . $commenter . ''; } // end commenter_link // Custom callback to list comments in the shape style function custom_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; $GLOBALS['comment_depth'] = $depth; ?>
  • | Permalink', 'shape'), get_comment_date(), get_comment_time(), '#comment-' . get_comment_ID() ); edit_comment_link(__('Edit', 'shape'), ' | ', ''); ?>
    comment_approved == '0') _e("\t\t\t\t\tYour comment is awaiting moderation.\n", 'shape') ?>
    __('Reply','shape'), 'login_text' => __('Log in to reply.','shape'), 'depth' => $depth, 'before' => '' ))); endif; ?>
  • | ', ''); ?>
    comment_approved == '0') _e('\t\t\t\t\tYour trackback is awaiting moderation.\n', 'shape') ?>