WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#20087 closed defect (bug) (invalid)

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

Reported by: 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)

comment:1 shopandstore2 years ago

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

comment:2 nacin2 years ago

What was the error?

comment:3 shopandstore2 years ago

Call to undefined function wp_trim_words()

comment:4 nacin2 years ago

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

comment:5 shopandstore2 years ago

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

comment:7 SergeyBiryukov2 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:8 SergeyBiryukov2 years ago

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