summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Hassine <yehuda@myinbox.in>2019-05-02 07:42:15 +0300
committerYehuda Hassine <yehuda@myinbox.in>2019-05-02 07:42:15 +0300
commit75e5f6e319d5d36f3076fe2eb449bb089b8ce3da (patch)
tree350acb4c3c39a98d2958183ef8d5156250d011fb
parent2418df179a32dfe20559a948e4fff10ee23e2a7c (diff)
downloadPost-SMTP-75e5f6e319d5d36f3076fe2eb449bb089b8ce3da.zip
small issues
-rw-r--r--Postman/Phpmailer/PostsmtpMailer.php1
-rw-r--r--Postman/Postman-Email-Log/PostmanEmailLogController.php2
-rw-r--r--Postman/Postman.php20
-rw-r--r--Postman/extra/donation.php2
4 files changed, 17 insertions, 8 deletions
diff --git a/Postman/Phpmailer/PostsmtpMailer.php b/Postman/Phpmailer/PostsmtpMailer.php
index b41b43c..82527d2 100644
--- a/Postman/Phpmailer/PostsmtpMailer.php
+++ b/Postman/Phpmailer/PostsmtpMailer.php
@@ -77,6 +77,7 @@ class PostsmtpMailer extends PHPMailer {
public function postman_wp_mail_result() {
$result = [
+ 'time' => '',
'exception' => $this->error,
'transcript' => '',
];
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogController.php b/Postman/Postman-Email-Log/PostmanEmailLogController.php
index 2845967..79751f3 100644
--- a/Postman/Postman-Email-Log/PostmanEmailLogController.php
+++ b/Postman/Postman-Email-Log/PostmanEmailLogController.php
@@ -351,6 +351,8 @@ class PostmanEmailLogController {
/* Translators where (%s) is the name of the plugin */
echo sprintf( __( '%s Email Log', 'post-smtp' ), __( 'Post SMTP', 'post-smtp' ) )?></h2>
+ <?php include_once POST_PATH . '/Postman/extra/donation.php'; ?>
+
<div
style="background: #ECECEC; border: 1px solid #CCC; padding: 0 10px; margin-top: 5px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;">
<p><?php
diff --git a/Postman/Postman.php b/Postman/Postman.php
index c832ef6..2956d44 100644
--- a/Postman/Postman.php
+++ b/Postman/Postman.php
@@ -96,7 +96,7 @@ class Postman {
$this->wpMailBinder = PostmanWpMailBinder::getInstance();
$this->logger->trace( 'SMTP Mailer: ' . PostmanOptions::getInstance()->getSmtpMailer() );
- PostmanWpMailBinder::getInstance()->bound = true;
+
if ( PostmanOptions::getInstance()->getTransportType() == 'smtp' &&
PostmanOptions::getInstance()->getSmtpMailer() !== 'phpmailer') {
@@ -104,6 +104,8 @@ class Postman {
// this design allows other plugins to register a Postman transport and call bind()
// bind may be called more than once
$this->wpMailBinder->bind();
+ } else {
+ PostmanWpMailBinder::getInstance()->bound = true;
}
// registers the custom post type for all callers
@@ -422,12 +424,16 @@ class Postman {
* @param mixed $pluginData
*/
private function registerTransports( $rootPluginFilenameAndPath ) {
- PostmanTransportRegistry::getInstance()->registerTransport( new PostmanDefaultModuleTransport( $rootPluginFilenameAndPath ) );
- PostmanTransportRegistry::getInstance()->registerTransport( new PostmanSmtpModuleTransport( $rootPluginFilenameAndPath ) );
- PostmanTransportRegistry::getInstance()->registerTransport( new PostmanGmailApiModuleTransport( $rootPluginFilenameAndPath ) );
- PostmanTransportRegistry::getInstance()->registerTransport( new PostmanMandrillTransport( $rootPluginFilenameAndPath ) );
- PostmanTransportRegistry::getInstance()->registerTransport( new PostmanSendGridTransport( $rootPluginFilenameAndPath ) );
- PostmanTransportRegistry::getInstance()->registerTransport( new PostmanMailgunTransport( $rootPluginFilenameAndPath ) );
+ $postman_transport_registry = PostmanTransportRegistry::getInstance();
+
+ $postman_transport_registry->registerTransport( new PostmanDefaultModuleTransport( $rootPluginFilenameAndPath ) );
+ $postman_transport_registry->registerTransport( new PostmanSmtpModuleTransport( $rootPluginFilenameAndPath ) );
+ $postman_transport_registry->registerTransport( new PostmanGmailApiModuleTransport( $rootPluginFilenameAndPath ) );
+ $postman_transport_registry->registerTransport( new PostmanMandrillTransport( $rootPluginFilenameAndPath ) );
+ $postman_transport_registry->registerTransport( new PostmanSendGridTransport( $rootPluginFilenameAndPath ) );
+ $postman_transport_registry->registerTransport( new PostmanMailgunTransport( $rootPluginFilenameAndPath ) );
+
+ do_action( 'postsmtp_register_transport', $postman_transport_registry );
}
/**
diff --git a/Postman/extra/donation.php b/Postman/extra/donation.php
index bee1980..61fc3a9 100644
--- a/Postman/extra/donation.php
+++ b/Postman/extra/donation.php
@@ -1,7 +1,7 @@
<?php
$postman_dismiss_donation = get_option('postman_dismiss_donation');
-if ( empty( $postman_dismiss_donation ) || $in_wizard ) : ?>
+if ( empty( $postman_dismiss_donation ) || isset( $in_wizard ) ) : ?>
<div class="updated settings-error notice is-dismissible post-smtp-donation">
<p style="font-size: 1.1em;">It is hard to continue development and support for this free plugin without contributions from users like you.<br>
If you enjoy using <strong>Post SMTP</strong> and find it useful, please consider making a donation.<br>