Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#20087 closed defect (bug) (invalid)

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

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

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
15 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
15 years ago

What was the error?

#3 @shopandstore
15 years ago

Call to undefined function wp_trim_words()

#4 @nacin
15 years ago

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

#5 @shopandstore
15 years ago

  • Resolution → fixed
  • Status new → closed

#7 @SergeyBiryukov
15 years ago

  • Resolution fixed
  • Status closed → reopened

#8 @SergeyBiryukov
15 years ago

  • Milestone Awaiting Review
  • Resolution → invalid
  • Status reopened → closed
Note: See TracTickets for help on using tickets.