-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwemail.php
100 lines (86 loc) · 3.16 KB
/
wemail.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
/**
* Plugin Name: weMail - Email Marketing Simplified With WordPress
* Description: Send Beautiful Email Newsletters with WordPress
* Plugin URI: https://wordpress.org/plugins/wemail/
* Author: weDevs
* Author URI: https://getwemail.io/?utm_source=wp-org&utm_medium=author-uri
* Version: 1.14.7
* License: GPL-3.0
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wemail
* Domain Path: /i18n/languages
*
* Copyright (c) 2020 weMail (email: [email protected]). All rights reserved.
*
* Released under the GPL license
* http://www.opensource.org/licenses/gpl-license.php
*
* This is an add-on for WordPress
* http://wordpress.org/
*
* **************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
* **************************************************************************
*/
// don't call the file directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class_exists( 'WeDevs\WeMail\WeMail' ) || require_once __DIR__ . '/vendor/autoload.php';
use WeDevs\WeMail\WeMail;
define( 'WEMAIL_FILE', __FILE__ );
define( 'WEMAIL_PATH', dirname( WEMAIL_FILE ) );
/**
* Init the wemail plugin
*
* @since 1.0.0
*
* @return WeMail
*/
function wemail() {
return WeMail::instance();
}
// kick it off
wemail();
/**
* Initialize the plugin tracker
*
* @return void
*/
function appsero_init_tracker_wemail() {
if ( ! class_exists( 'Appsero\Client' ) ) {
require_once __DIR__ . '/appsero/src/Client.php';
}
$client = new Appsero\Client( '2452f1cc-57eb-4e54-b027-1b5a2957d066', 'weMail', __FILE__ );
// Active insights
$client->insights()->hide_notice()->init();
}
appsero_init_tracker_wemail();
/**
* Add custom links in activation tab of wemail
*/
function wemail_plugin_action_links( $links ) {
$links = array_merge(
array(
'<a href="https://getwemail.io/docs/wemail/get-started/?utm_source=orgplugin&utm_medium=dashboarddoc&utm_campaign=settinglink" target="_blank">' . __( 'Docs', 'wemail' ) . '</a>',
'<a href="https://getwemail.io/contact?utm_source=orgplugin&utm_medium=dashboardcontact&utm_campaign=settinglink" target="_blank">' . __( 'Support', 'wemail' ) . '</a>',
'<a href="https://getwemail.io/?utm_source=site-plugin-settings&utm_medium=website-url" target="_blank">' . __( 'Visit Site', 'wemail' ) . '</a>',
),
$links
);
return $links;
}
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'wemail_plugin_action_links' );