__( 'Header Menu', 'twentyten'), 'footer-menu' => __( 'Footer Menu', 'twentyten' ), 'slidedown-menu' => __( 'SlideDown Menu', 'twentyten' ) ) ); } endif; /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * * To override this in a child theme, remove the filter and optionally add * your own function tied to the wp_page_menu_args filter hook. * * @since Twenty Ten 1.0 */ function melville_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'melville_page_menu_args' ); /** * Sets the post excerpt length to 40 characters. * * To override this length in a child theme, remove the filter and add your own * function tied to the excerpt_length filter hook. * * @since Twenty Ten 1.0 * @return int */ function melville_excerpt_length( $length ) { return 40; } add_filter( 'excerpt_length', 'melville_excerpt_length' ); /** * Returns a "Continue Reading" link for excerpts * * @since Twenty Ten 1.0 * @return string "Continue Reading" link */ function melville_continue_reading_link() { return ' ' . __( 'continue reading', 'twentyten' ) . ''; } /** * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link(). * * To override this in a child theme, remove the filter and add your own * function tied to the excerpt_more filter hook. * * @since Twenty Ten 1.0 * @return string An ellipsis */ function melville_auto_excerpt_more( $more ) { return '… ' . melville_continue_reading_link() . ' »'; } add_filter( 'excerpt_more', 'melville_auto_excerpt_more' ); /** * Adds a pretty "Continue Reading" link to custom post excerpts. * * To override this link in a child theme, remove the filter and add your own * function tied to the get_the_excerpt filter hook. * * @since Twenty Ten 1.0 * @return string Excerpt with a pretty "Continue Reading" link */ function melville_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= melville_continue_reading_link(); } return $output; } add_filter( 'get_the_excerpt', 'melville_custom_excerpt_more' ); /** * Remove inline styles printed when the gallery shortcode is used. * * Galleries are styled by the theme in Twenty Ten's style.css. * * @since Twenty Ten 1.0 * @return string The gallery style filter, with the styles themselves removed. */ function melville_remove_gallery_css( $css ) { return preg_replace( "##s", '', $css ); } add_filter( 'gallery_style', 'melville_remove_gallery_css' ); if ( ! function_exists( 'melville_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own twentyten_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Twenty Ten 1.0 * * @param WP_Comment $comment The comment object. * @param array $args An array of arguments. @see get_comment_reply_link() * @param int $depth The depth of the comment. */ function melville_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case '': case 'comment': ?>
  • id="li-comment-">
    says:', 'twentyten' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved ) : ?>
    $depth, 'max_depth' => $args['max_depth'], ) ) ); ?>
  • widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); } add_action( 'widgets_init', 'melville_remove_recent_comments_style' ); if ( ! function_exists( 'melville_posted_on' ) ) : /** * Prints HTML with meta information for the current post--date/time and author. * * @since Twenty Ten 1.0 */ function melville_posted_on() { printf( __( '%2$s', 'twentyten' ), 'meta-prep meta-prep-author', sprintf( '%3$s', get_permalink(), esc_attr( get_the_time() ), get_the_date() ) ); } endif; if ( ! function_exists( 'melville_posted_in' ) ) : /** * Prints HTML with meta information for the current post (category, tags and permalink). * * @since Twenty Ten 1.0 */ function melville_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = 'Posted in %1$s and tagged %2$s.'; } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = 'Posted in %1$s.'; } else { $posted_in = 'Posted in'; } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_category_list( ', ' ), $tag_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } endif; // dropcaps function melville_shortcode_dropcaps($atts, $content = null, $code) { return '' . do_shortcode($content) . ''; } add_shortcode('dropcap', 'melville_shortcode_dropcaps'); //build out our Portfolio Theme options add_option("melville_theme_footer", 'show'); $melville_footer = get_option('melville_theme_footer'); define('melville_footer',$melville_footer); // create the admin menu // hook in the action for the admin options page add_action('admin_menu', 'add_melville_theme_option_page'); function add_melville_theme_option_page() { // hook in the options page function add_theme_page('Melville Theme Options', 'Melville Theme Options', 'manage_options', __FILE__, 'melville_theme_options_page'); } function melville_theme_options_page() { ?>

    Theme options

    Show Raygun credit in the footer (we appreciate it!)

    Melville theme for WordPress, made by Raygun. __( 'First Footer Widget Area', 'twentyten' ), 'id' => 'first-footer-widget-area', 'description' => __( 'An optional widget area for your site footer.', 'twentyten' ), 'before_widget' => '

  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 4, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 'id' => 'second-footer-widget-area', 'description' => __( 'An optional widget area for your site footer.', 'twentyten' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 5, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Third Footer Widget Area', 'twentyten' ), 'id' => 'third-footer-widget-area', 'description' => __( 'An optional widget area for your site footer.', 'twentyten' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 6, located in the footer. Empty by default. register_sidebar( array( 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 'id' => 'fourth-footer-widget-area', 'description' => __( 'An optional widget area for your site footer.', 'twentyten' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 5, located in the popout. Empty by default. register_sidebar( array( 'name' => __( 'First Slidedown Widget Area', 'twentyten' ), 'id' => 'first-slidedown-widget-area', 'description' => __( 'An optional widget area for your site sidedown.', 'twentyten' ), 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 6, located in the popout. Empty by default. register_sidebar( array( 'name' => __( 'Second Slidedown Widget Area', 'twentyten' ), 'id' => 'second-slidedown-widget-area', 'description' => __( 'An optional widget area for your site slidedown.', 'twentyten' ), 'before_widget' => '
    ', 'after_widget' => '
    ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'melville_widgets_init' ); ?>