Ensure we never have two seperators together.
git-svn-id: http://svn.automattic.com/wordpress/trunk@9989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
086dccd3bd
commit
cb9dd57472
|
@ -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