Filter menu IDs, fixes #8523

git-svn-id: https://develop.svn.wordpress.org/trunk@10123 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2008-12-08 03:46:26 +00:00
parent 49c8881b1a
commit a9d2fd15ff

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] )