Skip to content

Commit

Permalink
Merge pull request #4 from mitchelldmiller/3-change-confusing-name
Browse files Browse the repository at this point in the history
3 change confusing name
  • Loading branch information
mitchelldmiller authored Jul 6, 2023
2 parents 628c6e8 + 6f52bba commit ba39748
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 41 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
block-wp-search
Stop WP Search
====================
* Requires: [WordPress 2.3](https://wordpress.org/support/wordpress-version/version-2-3/)
* Tested with: [WordPress 6.0](https://wordpress.org/support/wordpress-version/version-6-0/)
* Stable version: [1.02](https://github.com/mitchelldmiller/block-wp-search/releases/latest)
* Tested with: [WordPress 6.2.2](https://wordpress.org/support/wordpress-version/version-6-2-2/)
* Stable version: [1.03](https://github.com/mitchelldmiller/stop-wp-search/releases/latest)

Description
-----------
>Block WP Search is the easiest way to block all search requests to your WordPress site.
> Stop users from searching your WordPress Website. Redirect search requests.
WordPress search is not always helpful: especially for small sites.
Use Block WordPress Search plugin to redirect search requests.
Stop WP Searches is the easiest way to block search requests to your WordPress site.

WordPress search is not always helpful: especially for small sites.
Use Stop WP Search plugin to redirect search requests.

Formerly: Block WP Search.

Features
-----------
Expand All @@ -19,36 +23,35 @@ Installation
-----------

__Automated__
* Install [GitHub Updater](https://github.com/afragen/github-updater/releases/latest) plugin to install Block WP Search from Github.
* See [GitHub Updater Wiki](https://github.com/afragen/github-updater/wiki) for additional information.
* Install [Git Updater](https://github.com/afragen/git-updater/releases/latest) plugin to install / update Stop WP Search from Github.

__Manual__
1. Download the plugin and unpack in your `/wp-content/plugins` directory.
2. Activate the plugin through the WordPress _Plugins_ menu.

__WP-CLI__
* How to install and activate the latest version of Block WP Search with [WP-CLI](https://wp-cli.org/) :
* How to install and activate the latest version of Stop WP Search with [WP-CLI](https://wp-cli.org/) :

`wp plugin install https://github.com/mitchelldmiller/block-wp-search/archive/refs/tags/v.102.zip --activate`
`wp plugin install https://github.com/mitchelldmiller/stop-wp-search/archive/refs/tags/v.103.zip --activate`

Configuration
-----------
* No options.

Updates
-----------
* Install [GitHub Updater](https://github.com/afragen/github-updater/releases/latest) plugin to update Block WP Search from Github.
* Install [Git Updater](https://github.com/afragen/git-updater/releases/latest) plugin to update Stop WP Search from Github.

Translators / Translations
-----------
* Nothing to translate.

Privacy
-----------
* Increases privacy. Stops random search requests.
* Increases privacy. Prevents random search requests.

License
-----------
Block WP Search is licensed under the MIT License.
Encourage future development with a [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4AAGBFXRAPFJY).
Stop WP Search is licensed under the MIT License.

Stop WP Search is free for personal or commercial use. Please support future development with a [donation](https://mitchelldmiller.com/donate).
27 changes: 14 additions & 13 deletions BlockWpSearch.php → StopWpSearch.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<?php
/**
* Plugin Name: Block WP Search
* Description: Block all WordPress Searches.
* Version: 1.02
* Plugin Name: Stop WP Search
* Description: Stop users from searching your WordPress Website. Redirect search requests.
* Version: 1.03
* Author: Mitchell D. Miller
* Author URI: https://mitchelldmiller.com/
* Plugin URI: https://github.com/mitchelldmiller/block-wp-search
* GitHub Plugin URI: https://github.com/mitchelldmiller/block-wp-search
* Plugin URI: https://github.com/mitchelldmiller/stop-wp-search
* GitHub Plugin URI: https://github.com/mitchelldmiller/stop-wp-search
* License: MIT
* License URI: https://github.com/mitchelldmiller/block-wp-search/blob/main/LICENSE
* License URI: https://github.com/mitchelldmiller/stop-wp-search/blob/main/LICENSE
*/

/*
* Block WP Search WordPress Plugin - Block all WordPress Searches.
* Stop WP Search - WordPress Plugin - Redirect all WordPress Searches.
* Formerly Block WP Search.
*
* Copyright (C) 2022 Mitchell D. Miller
* Copyright (C) 2022-2023 Mitchell D. Miller
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand All @@ -34,24 +35,24 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
class BlockWpSearch {
class StopWpSearch {

/**
* Add init hook to intercept search requests.
* @see https://developer.wordpress.org/reference/hooks/init/
* @return BlockWpSearch
* @return StopWpSearch
*/
public static function no_searches_allowed() {
$bs = new self();
add_action('init', array($bs, 'block_searches'), 0, 0);
add_action('init', array($bs, 'stop_searches'), 0, 0);
return $bs;
}

/**
* Block all searches. Redirect to /not_found/.
* @todo Add option to change redirect.
*/
public function block_searches() {
public function stop_searches() {
if (defined( 'WP_CLI' ) && WP_CLI) {
return;
}
Expand All @@ -75,4 +76,4 @@ public function block_searches() {
public function __construct() { }

}
BlockWpSearch::no_searches_allowed();
StopWpSearch::no_searches_allowed();
36 changes: 22 additions & 14 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
=== Quick Mail ===
Contributors: brainiac
Tags: search
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4AAGBFXRAPFJY
Donate link: https://mitchelldmiller.com/donate
Requires at least: 2.3
Tested up to: 6.0.0
Tested up to: 6.2.2
Requires PHP: 5.3
Stable tag: 1.02
Stable tag: 1.03
License: MIT
License URI: https://github.com/mitchelldmiller/block-wp-search/blob/main/LICENSE
License URI: https://github.com/mitchelldmiller/stop-wp-search/blob/main/LICENSE

Block search requests to your WordPress site.
Stop users from searching your WordPress Website. Redirect search requests.

== Description ==
>Block WP Searches is the easiest way to block all search requests to your WordPress site.
> Stop users from searching your WordPress Website. Redirect search requests.

Stop WP Searches is the easiest way to block search requests to your WordPress site.

WordPress search is not always helpful: especially for small sites.
Use Block WordPress Search plugin to redirect search requests.
Use Stop WP Search plugin to redirect search requests.

Formerly: Block WP Search.

== Features ==
* Redirects search requests to `/not_found/`

= Learn More =
* [Follow development on Github](https://github.com/mitchelldmiller/block-wp-search/).
* [Follow development on Github](https://github.com/mitchelldmiller/stop-wp-search/).

== Installation ==
= Automated =
* Install [GitHub Updater](https://github.com/afragen/github-updater/releases/latest) plugin to install Quick Mail from Github.
* See [GitHub Updater Wiki](https://github.com/afragen/github-updater/wiki) for additional information.
* Install [Git Updater](https://github.com/afragen/git-updater/releases/latest) plugin to install / update Stop WP Search from Github.

= Manual =
1. Download the plugin and unpack in your `/wp-content/plugins` directory.
2. Activate the plugin through the WordPress _Plugins_ menu.

= WP-CLI
* How to install and activate the latest version of Block WP Search with [WP-CLI](https://wp-cli.org/) :
* How to install and activate the latest version of Stop WP Search with [WP-CLI](https://wp-cli.org/) :

`wp plugin install https://github.com/mitchelldmiller/block-wp-search/archive/main.zip --activate`
`wp plugin install https://github.com/mitchelldmiller/stop-wp-search/archive/main.zip --activate`

== Configuration ==
* No options.
Expand All @@ -58,14 +61,19 @@ Use Block WordPress Search plugin to redirect search requests.
= 1.02
* Check for empty server variables.

= 1.03
* Block WP Search is now Stop WP Search.

== Upgrade Notice ==

= 1.00 =
* First public release.

= 1.02 =
* Upgrade recommeneded.
* Upgrade recommended.

= 1.03 =
* Upgrade recommended.

== License ==
Block Wp Search is free for personal or commercial use. Please support future development with a [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4AAGBFXRAPFJY).
Stop WP Search is free for personal or commercial use. Please support future development with a [donation](https://mitchelldmiller.com/donate).

0 comments on commit ba39748

Please sign in to comment.