Admin Menu: remove duplicated separators, and use `strpos()` (instead of `strcmp()`) when determining if the separator CSS class is present.

Props rilwis, chriscct7.
Fixes #24104.

Built from https://develop.svn.wordpress.org/trunk@34861


git-svn-id: http://core.svn.wordpress.org/trunk@34826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-10-06 13:46:25 +00:00
parent 8c256a3357
commit c5475fbfc2
2 changed files with 2 additions and 3 deletions

View File

@ -181,12 +181,11 @@ unset($id, $data, $subs, $first_sub);
// Remove any duplicated separators
$separator_found = false;
foreach ( $menu as $id => $data ) {
if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) {
if ( false !== strpos( $data[4], 'wp-menu-separator' ) ) {
if ( ! $separator_found ) {
$separator_found = true;
} else {
unset($menu[$id]);
$separator_found = false;
}
} else {
$separator_found = false;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34860';
$wp_version = '4.4-alpha-34861';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.