Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[s2Member-List /] Search * Wildcards Enabled by Default? #394

Closed
jaswrks opened this issue Nov 28, 2014 · 1 comment
Closed

[s2Member-List /] Search * Wildcards Enabled by Default? #394

jaswrks opened this issue Nov 28, 2014 · 1 comment

Comments

@jaswrks
Copy link
Contributor

jaswrks commented Nov 28, 2014

A user writes...

can the search functionality automatically include the * so that users don't need to do that themselves. Most internet users will not know to do that. That's just something that people who are familiar with databases would try.

Agreed! This is something that is supported by the underlying WP_User_Query class, but the default behavior is to find an exact match. That should default to fuzzy matches, and provide another shortcode attribute to control the behavior.

Temporary workaround...

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php

<?php
add_action('init', function(){
    if(!empty($_REQUEST['s2-s']))
        $_REQUEST['s2-s'] = '*'.$_REQUEST['s2-s'].'*';
}, 1);
@jaswrks
Copy link
Contributor Author

jaswrks commented Feb 4, 2015

This issue was resolved in the release of s2Member v150203. Please see: http://www.s2member.com/kb/v150203/ If there are any follow-ups needed, please open a new issue and we will investigate. Thanks!

@wpsharks wpsharks locked and limited conversation to collaborators Feb 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants