Support » Plugin: Search Exclude » Scope exclude to ignore admin searches

  • ResolvedPlugin Contributor williamdodson

    (@williamdodson)


    My company is using a modified version of your plugin where I scope the exclude to public-facing search only. I was wondering if the exclude works globally by design or if you would accept a patch that makes it work only on the public side of a site?

    The support page is not the best place to post code samples, so please let me know if you’re interested in seeing the changes and/or merging them into the official repo. Here is a GitHub Gist for quick reference:

    https://gist.github.com/obxdesignworks/277f830a57c6215a127c

    Thanks for any help you can offer!
    -WD

    https://wordpress.org/plugins/search-exclude/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor pronskiy

    (@pronskiy)

    Hi!
    Good comment, thanks for sharing with me!
    I was not using search on admin side so never thought about this moment.
    Sure, I’m interested in merging your code to the repo. Actually there is a github mirror for the plugin code https://github.com/pronskiy/wp-search-exclude so you could send full PR there. Will this work for you?

    Also you can contact me by email (roman@pronskiy.com) or skype (romanpronskiy).

    Plugin Contributor pronskiy

    (@pronskiy)

    Hey!
    Thanks for your your pull-request, I merged it and released version 1.0.5.
    Also added you to plugin contributors! 😉

    Plugin Contributor stevelock

    (@stevelock)

    Hi there,

    The is_admin()-solution is a bit too drastic; because it also returns true when an Ajax-function is called. So themes querying a search using Ajax don’t benefit from your plugin. I’ve pulled a request solving this problem, while at the same time disabling excludes when in the admin panel.

    Plugin Contributor pronskiy

    (@pronskiy)

    Hi, Stevelock!

    Good catch! I will review your PR and merge it today. Thank you!

    Plugin Contributor pronskiy

    (@pronskiy)

    Hey, Stevelock!

    I merged your PR, thanks for contribution!

    Plugin Contributor stevelock

    (@stevelock)

    Superb! Thanks 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Scope exclude to ignore admin searches’ is closed to new replies.