Fix \' being expressed when searching for users & add display_name to searchable columns
|Reported by:||aubreypwd||Owned by:||nacin|
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"
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
Change History (11)
comment:1 in reply to: ↑ description aubreypwd — 4 months ago
comment:4 SergeyBiryukov — 4 months ago
- Component changed from General to Administration
- Severity changed from trivial to normal
- Version changed from trunk to 3.1
- Component changed from Administration to Users
- Focuses administration added
- Keywords commit added; dev-feedback removed
- Milestone changed from Awaiting Review to 3.9