| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Disable Emails |
| 4 |
Plugin URI: https://shop.webaware.com.au/downloads/disable-emails/ |
| 5 |
Description: Stop WordPress from sending any emails. ANY! |
| 6 |
Version: 1.8.3 |
| 7 |
Author: WebAware |
| 8 |
Author URI: https://shop.webaware.com.au/ |
| 9 |
Text Domain: disable-emails |
| 10 |
Domain Path: /languages |
| 11 |
*/ |
| 12 |
|
| 13 |
/* |
| 14 |
copyright (c) 2014-2026 WebAware Pty Ltd (email : support@webaware.com.au) |
| 15 |
|
| 16 |
This program is free software; you can redistribute it and/or |
| 17 |
modify it under the terms of the GNU General Public License |
| 18 |
as published by the Free Software Foundation; either version 2 |
| 19 |
of the License, or (at your option) any later version. |
| 20 |
|
| 21 |
This program is distributed in the hope that it will be useful, |
| 22 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 |
GNU General Public License for more details. |
| 25 |
|
| 26 |
You should have received a copy of the GNU General Public License |
| 27 |
along with this program; if not, write to the Free Software |
| 28 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 29 |
*/ |
| 30 |
|
| 31 |
if (!defined('ABSPATH')) { |
| 32 |
exit; |
| 33 |
} |
| 34 |
|
| 35 |
// don't go any further if plugin is already loaded (e.g. mu-plugin) |
| 36 |
if (defined('DISABLE_EMAILS_PLUGIN_FILE')) { |
| 37 |
return; |
| 38 |
} |
| 39 |
|
| 40 |
// phpcs:disable Modernize.FunctionCalls.Dirname.FileConstant |
| 41 |
define('DISABLE_EMAILS_PLUGIN_FILE', __FILE__); |
| 42 |
define('DISABLE_EMAILS_PLUGIN_ROOT', dirname(__FILE__) . '/'); |
| 43 |
define('DISABLE_EMAILS_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__)); |
| 44 |
define('DISABLE_EMAILS_MIN_PHP', '5.6'); |
| 45 |
define('DISABLE_EMAILS_VERSION', '1.8.3'); |
| 46 |
|
| 47 |
require DISABLE_EMAILS_PLUGIN_ROOT . 'includes/functions-global.php'; |
| 48 |
require DISABLE_EMAILS_PLUGIN_ROOT . 'includes/class.Requires.php'; |
| 49 |
|
| 50 |
if (version_compare(PHP_VERSION, DISABLE_EMAILS_MIN_PHP, '<')) { |
| 51 |
add_action('admin_notices', 'disable_emails_fail_php_version'); |
| 52 |
return; |
| 53 |
} |
| 54 |
|
| 55 |
require DISABLE_EMAILS_PLUGIN_ROOT . 'includes/bootstrap.php'; |
| 56 |
|