| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: FluentSMTP |
| 4 |
Plugin URI: https://fluentsmtp.com |
| 5 |
Description: The Ultimate SMTP Connection Plugin for WordPress. |
| 6 |
Version: 2.2.82 |
| 7 |
Author: FluentSMTP & WPManageNinja Team |
| 8 |
Author URI: https://fluentsmtp.com |
| 9 |
License: GPL2 |
| 10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 11 |
Text Domain: fluent-smtp |
| 12 |
Domain Path: /language |
| 13 |
*/ |
| 14 |
|
| 15 |
!defined('WPINC') && die; |
| 16 |
|
| 17 |
define('FLUENTMAIL_PLUGIN_FILE', __FILE__); |
| 18 |
|
| 19 |
require_once plugin_dir_path(__FILE__) . 'boot.php'; |
| 20 |
|
| 21 |
register_activation_hook( |
| 22 |
__FILE__, array('\FluentMail\Includes\Activator', 'handle') |
| 23 |
); |
| 24 |
|
| 25 |
register_deactivation_hook( |
| 26 |
__FILE__, array('\FluentMail\Includes\Deactivator', 'handle') |
| 27 |
); |
| 28 |
|
| 29 |
/** |
| 30 |
* Initializes the Fluent SMTP plugin. |
| 31 |
* |
| 32 |
* This function creates a new instance of the FluentMail\Includes\Core\Application class and registers |
| 33 |
* an action hook to be executed when the plugins are loaded. Inside the action hook, the 'fluentMail_loaded' |
| 34 |
* action is triggered with the application instance as a parameter. |
| 35 |
* |
| 36 |
* @since 1.0.0 |
| 37 |
*/ |
| 38 |
function fluentSmtpInit() { |
| 39 |
$application = new FluentMail\Includes\Core\Application; |
| 40 |
add_action('plugins_loaded', function () use ($application) { |
| 41 |
do_action('fluentMail_loaded', $application); |
| 42 |
}); |
| 43 |
} |
| 44 |
|
| 45 |
fluentSmtpInit(); |
| 46 |
|
| 47 |
if (!function_exists('wp_mail')): |
| 48 |
function wp_mail($to, $subject, $message, $headers = '', $attachments = array()) { |
| 49 |
return fluentMailSend($to, $subject, $message, $headers, $attachments); |
| 50 |
} |
| 51 |
else : |
| 52 |
if (!(defined('DOING_AJAX') && DOING_AJAX)): |
| 53 |
add_action('init', 'fluentMailFuncCouldNotBeLoadedRecheckPluginsLoad'); |
| 54 |
endif; |
| 55 |
endif; |
| 56 |
|
| 57 |
/* |
| 58 |
* Thanks for checking the source code |
| 59 |
* Please check the full source here: https://github.com/WPManageNinja/fluent-smtp |
| 60 |
* Would love to welcome your pull request |
| 61 |
*/ |
| 62 |
|