Filter menu IDs, fixes #8523

git-svn-id: http://svn.automattic.com/wordpress/trunk@10123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-12-08 03:46:26 +00:00
parent 797f203e2f
commit 535b79426a

View File

@ -57,7 +57,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
$class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
$tabindex = ' tabindex="1"';
$id = isset($item[5]) && ! empty($item[5]) ? ' id="' . $item[5] . '"' : '';
$id = isset($item[5]) && ! empty($item[5]) ? ' id="' . preg_replace( '|[^a-zA-Z0-9_:.]|', '-', $item[5] ) . '"' : '';
$img = '';
if ( isset($item[6]) && ! empty($item[6]) ) {
if ( 'div' === $item[6] )