= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'rhyme' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'alexis_title_filter', 10, 2 ); /*-----------------------------------[ register the custom nav menu(s) ] */ register_nav_menus( array( 'primary' => __('Primary Navigation', 'alexis'), )); /*-----------------------------------[ navigation menu ] */ // display a navigation menu created in the Appearance → Menus panel function alexis_nav() { wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'menu_class' => 'menu', 'echo' => true, 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => '3', 'fallback_cb' => 'false', 'items_wrap' => '
', 'walker' => '' )); } // remove class and ID from wp_nav_menu() for cleaner output function wp_nav_menu_attributes_filter($var) { return is_array($var) ? array_intersect($var, array('current-menu-item')) : ''; } // add_filter('nav_menu_css_class', 'wp_nav_menu_attributes_filter', 100, 1); add_filter('nav_menu_item_id', 'wp_nav_menu_attributes_filter', 100, 1); /*-----------------------------------[ switch default core markup ] */ // @link http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5 // // output valid HTML5 for search form, comment form, and comments/ // add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' )); /*-----------------------------------[ post thumbnails ] */ // enables post-thumbnail support add_theme_support( 'post-thumbnails'); /*-----------------------------------[ content width ] */ // set the content width based on the theme's design and stylesheet global $content_width; if ( ! isset( $content_width ) ) : $content_width = 730; /* pixels */ endif; /*-----------------------------------[ rss feed ] */ // enables post and comment RSS feed links to head add_theme_support( 'automatic-feed-links' ); /*-----------------------------------[ custom background ] */ $args = array( 'default-color' => 'ffffff', ); add_theme_support( 'custom-background', $args ); /*-----------------------------------------------------------------------[ WordPress comments via callback ] */ function alexis_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : // display trackbacks differently than normal comments ?>' ); // trivial replacements $from = array( 'class="attachment-large"', 'a href=', ); $to = array( '', 'a class="lightbox" href=', ); $html = str_replace( $from, $to, $html ); // remove width and height attributes: $html = preg_replace( '/(width|height)="\d*"\s/', "", $html ); // wrap the output in ul tags: $html = sprintf( '