View difference between Paste ID: Fw3e0wqC and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
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 | } |