Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#20087 closed defect (bug) (invalid)

Bug in /wp-includes/nav-menu.php

Reported by: shopandstore's profile shopandstore Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

hello.
updated to 3.31
In my dashboard, while clicking to the Appearence> menus> there appears an error, that the function wp_trim_words is unknown;
the opened the nav-menu.php and saw these:

if ( empty( $menu_item->description ) ) 
$menu_item->description = apply_filters( 'nav_menu_description',  wp_trim_words( $menu_item->post_content, 200 ) );

### it seemed to me something unknown, then i simply added the following

'{' $menu_item->description = apply_filte.........content, 200 ) ); '}'

}}}

and error was corrected.

Change History (8)

#1 @shopandstore
13 years ago

sorry, the last paragraph was written unclearly. in short, when i added {} brackets after if() parameter, there wan no error anymore.

#2 @nacin
13 years ago

What was the error?

#3 @shopandstore
13 years ago

Call to undefined function wp_trim_words()

#4 @nacin
13 years ago

Brackets shouldn't have changed anything. Try a manual update. The function exists, I assure you.

#5 @shopandstore
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#7 @SergeyBiryukov
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#8 @SergeyBiryukov
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.