dane-m
9/2/2013 - 7:07 PM

gistfile1.txt

add_filter('nav_menu_link_attributes' , 'att_add_menu_id', 3, 10);
if ( !function_exists( 'att_add_menu_id') ) {
  function att_add_menu_id($atts, $item, $args) {
		if( 'page' == $item->object ){
			$id = $item->object_id;
			$id = 'page-'. esc_attr( basename( get_permalink( $id ) ) );
			$atts['id'] = $id;
		}
		return $atts;
	}
}