Opened 10 years ago

Closed 10 years ago

#686 closed defect (bug) (fixed)

Searching functions with parenthesis returns no results for valid funtion names

Reported by: blobaugh's profile blobaugh Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords:


When using the code reference search form at for functions by name with and without the parenthesis changes the results.

For example, searching for 'sanitize_text_field()' will return zero results[]=wp-parser-function&post_type[]=wp-parser-hook&post_type[]=wp-parser-class&post_type[]=wp-parser-method

While searching for 'sanitize_text_field' returns multiple results[]=wp-parser-function&post_type[]=wp-parser-hook&post_type[]=wp-parser-class&post_type[]=wp-parser-method

Searching with the () should return the function and searching without () should return both the function and the hook.

Change History (2)

This ticket was mentioned in Slack in #docs by blobaugh. View the logs.

10 years ago

#2 @coffee2code
10 years ago

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

In 951:

Code Reference: presume an exact match search request for a function or method if search term ends with '()'. Fixes #686

Falls back to general search if no exact match found.

Note: See TracTickets for help on using tickets.