Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 9th, 2010  |  syntax: PHP  |  size: 0.25 KB  |  views: 873  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. add_filter('walker_nav_menu_start_el', 'description_in_nav_el', 10, 4);
  2.  
  3. function description_in_nav_el($item_output, $item, $depth, $args)
  4. {
  5.         return preg_replace('/(<a.*?>[^<]*?)</', '$1' . "<span>{$item->post_content}</span><", $item_output);
  6. }
clone this paste RAW Paste Data