[wp-trac] [WordPress Trac] #26115: Fix \' being expressed when searching for users & add display_name to searchable columns

WordPress Trac noreply at wordpress.org
Tue Nov 19 19:31:52 UTC 2013


#26115: Fix \' being expressed when searching for users & add display_name to
searchable columns
--------------------------+------------------------------------
 Reporter:  aubreypwd     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  trivial       |   Keywords:  has-patch dev-feedback
--------------------------+------------------------------------
 == First Part ==

 Whether or not `display_name` can be included (see second part), this
 **does** fix the issue I am having where, when searching, it says
 **"Search Results for: O\'Rourke"** when I am searching for **"O'Rourke"**
 and my plugin comes in and lands a user with `_wp_usermeta.last_name =
 "O'Rourke"`.

 This fixes it so it says **"Search Results for: O'Rourke"**

 == Second Part ==

 I am using a self-made plugin to search by `usermeta` using `wp-
 admin/users.php` which allows an administrator to search for "Josh" or
 "Shawn." This is not included in core, so part of this patch asks to
 include `display_name` in `search_columns` again, see #18183 and #16366.
 Since http://core.trac.wordpress.org/attachment/ticket/16366/16366.diff
 core has added:

 {{{
 'ID', 'user_login', 'user_email', 'user_url', 'user_nicename'
 }}}

 ...so I thought I'd try again.

 If core could get `display_name` included, then first and last names could
 be searchable as long as the display name was set to First Last, etc,
 which would make the first part more important to core. If not, it just
 become's a simple fix to something core doesn't even really do (search my
 names where you might use `'`), but might be used with a plugin or a
 filter like #16366 and it would display O'Rourke last names weird.

 **May need testing around MS**

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26115>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list