-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheacSimpleSMTP.php
executable file
·86 lines (81 loc) · 2.45 KB
/
eacSimpleSMTP.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
namespace EarthAsylumConsulting;
/**
* Add {eac}SimpleSMTP extension to {eac}Doojigger
*
* @category WordPress Plugin
* @package {eac}SimpleSMTP\{eac}Doojigger Extensions
* @author Kevin Burkholder <KBurkholder@EarthAsylum.com>
* @copyright Copyright (c) 2024 EarthAsylum Consulting <www.earthasylum.com>
* @version 1.x
*
* @wordpress-plugin
* Plugin Name: {eac}SimpleSMTP
* Description: {eac}SimpleSMTP Configure WordPress wp_mail and phpmailer to use your SMTP server
* Version: 1.0.12
* Requires at least: 5.8
* Tested up to: 6.6
* Requires PHP: 7.4
* Plugin URI: https://eacdoojigger.earthasylum.com/eacsimplesmtp/
* Author: EarthAsylum Consulting
* Author URI: http://www.earthasylum.com
* License: GPLv3 or later
* License URI: https://www.gnu.org/licenses/gpl.html
*/
if (!defined('EAC_DOOJIGGER_VERSION'))
{
\add_action( 'all_admin_notices', function()
{
echo '<div class="notice notice-error is-dismissible"><p>{eac}SimpleSMTP requires installation & activation of '.
'<a href="https://eacdoojigger.earthasylum.com/eacdoojigger" target="_blank">{eac}Doojigger</a>.</p></div>';
}
);
return;
}
class eacSimpleSMTP
{
/**
* constructor method
*
* @return void
*/
public function __construct()
{
/*
* {pluginname}_load_extensions - get the extensions directory to load
*
* @param array $extensionDirectories - array of [plugin_slug => plugin_directory]
* @return array updated $extensionDirectories
*/
add_filter( 'eacDoojigger_load_extensions', function($extensionDirectories)
{
/*
* Enable update notice (self hosted or wp hosted)
*/
eacDoojigger::loadPluginUpdater(__FILE__,'wp');
/*
* Add links on plugins page
*/
add_filter( (is_network_admin() ? 'network_admin_' : '').'plugin_action_links_' . plugin_basename( __FILE__ ),
function($pluginLinks, $pluginFile, $pluginData) {
return array_merge(
[
'settings' => eacDoojigger::getSettingsLink($pluginData,'simple_smtp'),
'documentation' => eacDoojigger::getDocumentationLink($pluginData),
'support' => eacDoojigger::getSupportLink($pluginData),
],
$pluginLinks
);
},20,3
);
/*
* Add our extension to load
*/
$extensionDirectories[ plugin_basename( __FILE__ ) ] = [plugin_dir_path( __FILE__ ).'/Extensions'];
return $extensionDirectories;
}
);
}
}
new \EarthAsylumConsulting\eacSimpleSMTP();
?>