PluginProbe
MC4WP: Mailchimp Top Bar – Email Subscribe Notification Bar / trunk
MC4WP: Mailchimp Top Bar – Email Subscribe Notification Bar vtrunk
1.7.7 1.7.6 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1 1.1.2 1.1.3 1.2 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.2 All 53 releases
mailchimp-top-bar / mailchimp-top-bar.php

mailchimp-top-bar.php in MC4WP: Mailchimp Top Bar – Email Subscribe Notification Bar trunk, at mailchimp-top-bar.php

64 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 Plugin Name: MC4WP: Mailchimp Top Bar
5 Plugin URI: https://www.mc4wp.com/
6 Description: Adds a Mailchimp opt-in bar to the top of your site.
7 Version: 1.7.7
8 Author: ibericode
9 Author URI: https://www.ibericode.com/
10 Text Domain: mailchimp-top-bar
11 Requires Plugins: mailchimp-for-wp
12 Requires PHP: 7.4
13 License: GPL-3.0-or-later
14 License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
16
17 Mailchimp Top Bar
18 Copyright (C) 2015, Danny van Kooten, hi@dannyvankooten.com
19
20 This program is free software: you can redistribute it and/or modify
21 it under the terms of the GNU General Public License as published by
22 the Free Software Foundation, either version 3 of the License, or
23 (at your option) any later version.
24
25 This program is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
29
30 You should have received a copy of the GNU General Public License
31 along with this program. If not, see <https://www.gnu.org/licenses/>.
32 */
33
34 if (! defined('ABSPATH')) {
35 exit;
36 }
37
38 add_action(
39 "plugins_loaded",
40 function () {
41 // check for PHP 7.4 or higher
42 if (PHP_VERSION_ID < 70400) {
43 return;
44 }
45
46 define("MAILCHIMP_TOP_BAR_FILE", __FILE__);
47 define("MAILCHIMP_TOP_BAR_DIR", __DIR__);
48 define('MAILCHIMP_TOP_BAR_VERSION', '1.7.7');
49
50 require __DIR__ . "/src/functions.php";
51
52 if (is_admin()) {
53 require __DIR__ . "/src/class-admin.php";
54 $admin = new MailChimp\TopBar\Admin();
55 $admin->add_hooks();
56 } else {
57 require __DIR__ . "/src/class-bar.php";
58 $bar = new MailChimp\TopBar\Bar();
59 add_action("wp", [$bar, "init"]);
60 }
61 },
62 30
63 );
64