'primary', 'menu_class' => $class, ) ); } add_action( 'genesis_after_header', 'genesis_do_subnav' ); /** * Echo the "Secondary Navigation" menu. * * Applies the `genesis_do_subnav` filter. * * @since 1.0.0 */ function genesis_do_subnav() { // Do nothing if menu not supported. if ( ! genesis_nav_menu_supported( 'secondary' ) ) { return; } $class = 'menu genesis-nav-menu menu-secondary'; if ( genesis_superfish_enabled() ) { $class .= ' js-superfish'; } genesis_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => $class, ) ); } add_filter( 'wp_nav_menu_items', 'genesis_nav_right', 10, 2 ); /** * Filter the Primary Navigation menu items, appending either RSS links, search form, twitter link, or today's date. * * @since 1.0.0 * * @param string $menu HTML string of list items. * @param stdClass $args Menu arguments. * @return string HTML string of list items with optional nav extras. * Return early unmodified if first Genesis version is higher than 2.0.2. */ function genesis_nav_right( $menu, stdClass $args ) { // Only allow if using 2.0.2 or lower. if ( genesis_first_version_compare( '2.0.2', '>' ) ) { return $menu; } if ( 'primary' !== $args->theme_location || ! genesis_get_option( 'nav_extras' ) ) { return $menu; } switch ( genesis_get_option( 'nav_extras' ) ) { case 'rss': $rss = '' . __( 'Posts', 'genesis' ) . ''; $rss .= '' . __( 'Comments', 'genesis' ) . ''; $menu .= '