mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-05 07:58:35 +01:00
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:
parent
8c256a3357
commit
c5475fbfc2
@ -181,12 +181,11 @@ unset($id, $data, $subs, $first_sub);
|
|||||||
// Remove any duplicated separators
|
// Remove any duplicated separators
|
||||||
$separator_found = false;
|
$separator_found = false;
|
||||||
foreach ( $menu as $id => $data ) {
|
foreach ( $menu as $id => $data ) {
|
||||||
if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) {
|
if ( false !== strpos( $data[4], 'wp-menu-separator' ) ) {
|
||||||
if ( ! $separator_found ) {
|
if ( ! $separator_found ) {
|
||||||
$separator_found = true;
|
$separator_found = true;
|
||||||
} else {
|
} else {
|
||||||
unset($menu[$id]);
|
unset($menu[$id]);
|
||||||
$separator_found = false;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$separator_found = false;
|
$separator_found = false;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user