WordPress.org

Make WordPress Core

Ticket #13295: 13295.diff

File 13295.diff, 604 bytes (added by blepoxp, 4 years ago)

fix undefined property

  • nav-menus.php

     
    369369} 
    370370 
    371371// Generate truncated menu names 
    372 foreach( (array) $nav_menus as $_nav_menu ) { 
     372foreach( (array) $nav_menus as $key => $_nav_menu ) { 
    373373        $_nav_menu->truncated_name = trim( wp_html_excerpt( $_nav_menu->name, 40 ) ); 
    374374        if ( $_nav_menu->truncated_name != $_nav_menu->name ) 
    375375                $_nav_menu->truncated_name .= '…'; 
     376                 
     377        $nav_menus[$key]->truncated_name = $_nav_menu->truncated_name; 
    376378} 
    377379 
    378380// The theme supports menus