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:
parent
12e31d0401
commit
20107df793
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue