Ensure we never have two seperators together.

git-svn-id: https://develop.svn.wordpress.org/trunk@9989 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-11-30 22:47:26 +00:00
parent 12e31d0401
commit 20107df793
1 changed files with 15 additions and 0 deletions

View File

@ -174,6 +174,21 @@ foreach ( $menu as $id => $data ) {
}
}
// Remove any duplicated seperators
$seperator_found = false;
foreach ( $menu as $id => $data ) {
if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) {
if (false == $seperator_found) {
$seperator_found = true;
} else {
unset($menu[$id]);
$seperator_found = false;
}
} else {
$seperator_found = false;
}
}
unset($id);
function add_cssclass($add, $class) {