WordPress.org

Make WordPress Core

Ticket #40927: 40927.3.diff

File 40927.3.diff, 539 bytes (added by justinbusa, 3 years ago)
  • plugin.php

     
    10931093
    10941094        $new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $icon_class . $hookname, $hookname, $icon_url );
    10951095
     1096        if ( ! is_null( $position ) && ! is_int( $position ) && ! is_string( $position ) ) {
     1097                $position = (string) $position;
     1098        }
     1099
    10961100        if ( null === $position ) {
    10971101                $menu[] = $new_menu;
    10981102        } elseif ( isset( $menu[ "$position" ] ) ) {