From f80e7943e70012f23cb431c9394724ca0d91e514 Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Mon, 23 Nov 2015 17:01:07 -0500 Subject: [PATCH] edit extra walker elements --- lib/menu-walker.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/menu-walker.php b/lib/menu-walker.php index 95ae1f8..12531af 100644 --- a/lib/menu-walker.php +++ b/lib/menu-walker.php @@ -18,21 +18,21 @@ class Feature_Top_Bar_Walker extends Walker_Nav_Menu { $item_html = ''; parent::start_el( $item_html, $object, $depth, $args ); -// // Insert style to display page's thumbnail -// $item_style = ''; -// if ($depth == 0 && has_post_thumbnail((int)$object->object_id)) { -// $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id((int)$object->object_id), 'large'); -// $item_style .= ""; -// } -// //$output .= ( 0 == $depth ) ? '
  • ' : ''; -// $classes = empty( $object->classes ) ? array() : (array) $object->classes; -// if ( in_array( 'label', $classes ) ) { -// //$output .= '
  • '; -// $item_html = preg_replace( '/]*>(.*)<\/a>/iU', '', $item_html ); -// } -// if ( in_array( 'divider', $classes ) ) { -// $item_html = preg_replace( '/]*>( .* )<\/a>/iU', '', $item_html ); -// } + // Insert style to display page's thumbnail + $item_style = ''; + if ($depth == 0 && has_post_thumbnail((int)$object->object_id)) { + $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id((int)$object->object_id), 'large'); + $item_style .= ""; + } + //$output .= ( 0 == $depth ) ? '
  • ' : ''; + $classes = empty( $object->classes ) ? array() : (array) $object->classes; + if ( in_array( 'label', $classes ) ) { + //$output .= '
  • '; + $item_html = preg_replace( '/]*>(.*)<\/a>/iU', '', $item_html ); + } + if ( in_array( 'divider', $classes ) ) { + $item_html = preg_replace( '/]*>( .* )<\/a>/iU', '', $item_html ); + } if ($item_style) $output .= $item_style; $output .= $item_html; -- 2.17.1