Make WordPress Core

Changeset 34861


Ignore:
Timestamp:
10/06/2015 01:45:24 PM (9 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/menu.php

    r32730 r34861  
    182182$separator_found = false;
    183183foreach ( $menu as $id => $data ) {
    184     if ( 0 == strcmp('wp-menu-separator', $data[4] ) ) {
     184    if ( false !== strpos( $data[4], 'wp-menu-separator' ) ) {
    185185        if ( ! $separator_found ) {
    186186            $separator_found = true;
    187187        } else {
    188188            unset($menu[$id]);
    189             $separator_found = false;
    190189        }
    191190    } else {
Note: See TracChangeset for help on using the changeset viewer.