PluginProbe
Email Log / 2.6
Email Log v2.6
2.63 2.4.8 2.4.9 2.6 2.61 2.62 trunk 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.8.1 0.9 0.9.1 0.9.2 1.1 1.5 1.5.1 1.5.2 1.5.3 1.5.4 All 61 releases
email-log / email-log.php

email-log.php in Email Log 2.6, at email-log.php

90 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Email Log
4 * Plugin URI: https://wpemaillog.com/
5 * Description: Logs every email sent through WordPress
6 * Author: WebFactory Ltd
7 * Version: 2.6
8 * Author URI: https://www.webfactoryltd.com/
9 * Text Domain: email-log
10 * License: GPLv2 or later
11 * Requires at least: 4.0
12 * Tested up to: 6.8
13 * Requires PHP: 5.6
14 */
15
16 /**
17 * Copyright 2025 WebFactory Ltd
18 *
19 * Sudar Muthu https://github.com/sudar
20 * samuelaguilera https://github.com/samuelaguilera
21 * ChuckMac https://github.com/ChuckMac
22 * Maria Daniel Deepak https://github.com/mariadanieldeepak
23 *
24 * This program is free software; you can redistribute it and/or modify
25 * it under the terms of the GNU General Public License, version 2, as
26 * published by the Free Software Foundation.
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU General Public License for more details.
31 * You should have received a copy of the GNU General Public License
32 * along with this program; if not, write to the Free Software
33 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
34 */
35
36 defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
37
38 // @Alex this is ancient think we can remove it
39 // Include the stub of the old `EmailLog` class, so that old add-ons don't generate a fatal error.
40 require_once plugin_dir_path( __FILE__ ) . 'include/compatibility/EmailLog.php';
41
42 if ( version_compare( PHP_VERSION, '5.6.0', '<' ) ) {
43 /**
44 * Version 2.4.0 of the Email Log plugin dropped support for PHP 5.3 to PHP 5.5.
45 *
46 * Version 2.0 of the Email Log plugin dropped support for PHP 5.2.
47 * If you are still struck with PHP 5.2 and can't update, then use v1.9.1 of the plugin.
48 * But note that some add-ons may not work.
49 *
50 * @since 2.0
51 */
52 function email_log_compatibility_notice() {
53 ?>
54 <div class="error">
55 <p>
56 <?php
57 printf(
58 __( 'Email Log requires at least PHP 5.6 to function properly. Please upgrade PHP or use <a href="%s" target="_blank" rel="noopener">v1.9.1 of Email Log</a>.', 'email-log' ), // @codingStandardsIgnoreLine
59 'https://downloads.wordpress.org/plugin/email-log.1.9.1.zip'
60 );
61 ?>
62 </p>
63 </div>
64 <?php
65 }
66
67 add_action( 'admin_notices', 'email_log_compatibility_notice' );
68
69 /**
70 * Deactivate Email Log.
71 *
72 * @since 2.0
73 */
74 function email_log_deactivate() {
75 deactivate_plugins( plugin_basename( __FILE__ ) );
76 }
77
78 add_action( 'admin_init', 'email_log_deactivate' );
79
80 return;
81 }
82
83 // PHP is at least 5.6, so we can safely include namespace code.
84 require_once 'load-email-log.php';
85 load_email_log( __FILE__ );
86
87 // @Alex probably not needed anymore, it was a bug 5y ago
88 // Fix compatibility issues with wpmandrill plugin.
89 require_once plugin_dir_path( __FILE__ ) . 'include/compatibility/wpmandrill.php';
90