diff options
Diffstat (limited to 'Postman')
-rw-r--r-- | Postman/Postman-Configuration/PostmanConfigurationController.php | 3 | ||||
-rw-r--r-- | Postman/Postman-Mail/PostmanMailgunTransport.php | 6 | ||||
-rw-r--r-- | Postman/Postman-Mail/PostmanModuleTransport.php | 2 | ||||
-rw-r--r-- | Postman/Postman.php | 3 | ||||
-rw-r--r-- | Postman/PostmanOptions.php | 12 |
5 files changed, 21 insertions, 5 deletions
diff --git a/Postman/Postman-Configuration/PostmanConfigurationController.php b/Postman/Postman-Configuration/PostmanConfigurationController.php index 6d5b6b5..a81605a 100644 --- a/Postman/Postman-Configuration/PostmanConfigurationController.php +++ b/Postman/Postman-Configuration/PostmanConfigurationController.php @@ -235,6 +235,9 @@ class PostmanConfigurationController { print '<div id="mailgun_settings" class="authentication_setting non-basic non-oauth2">'; do_settings_sections( PostmanMailgunTransport::MAILGUN_AUTH_OPTIONS ); print '</div>'; + + do_action( 'post_smtp_settings_sections' ); + print '</section>'; // end account config ?> diff --git a/Postman/Postman-Mail/PostmanMailgunTransport.php b/Postman/Postman-Mail/PostmanMailgunTransport.php index a673e01..63173db 100644 --- a/Postman/Postman-Mail/PostmanMailgunTransport.php +++ b/Postman/Postman-Mail/PostmanMailgunTransport.php @@ -154,9 +154,9 @@ class PostmanMailgunTransport extends PostmanAbstractModuleTransport implements // push the authentication options into the $overrideItem structure $overrideItem ['auth_items'] = array( array( - 'selected' => true, - 'name' => __( 'API Key', 'post-smtp' ), - 'value' => 'api_key', + 'selected' => true, + 'name' => __( 'API Key', 'post-smtp' ), + 'value' => 'api_key', ), ); return $overrideItem; diff --git a/Postman/Postman-Mail/PostmanModuleTransport.php b/Postman/Postman-Mail/PostmanModuleTransport.php index 37d692d..12d3d17 100644 --- a/Postman/Postman-Mail/PostmanModuleTransport.php +++ b/Postman/Postman-Mail/PostmanModuleTransport.php @@ -78,7 +78,7 @@ abstract class PostmanAbstractModuleTransport implements PostmanModuleTransport /** */ - public function __construct($rootPluginFilenameAndPath) { + public function __construct($rootPluginFilenameAndPath = null) { $this->logger = new PostmanLogger ( get_class ( $this ) ); $this->options = PostmanOptions::getInstance (); $this->rootPluginFilenameAndPath = $rootPluginFilenameAndPath; diff --git a/Postman/Postman.php b/Postman/Postman.php index 1610da5..71c7cfd 100644 --- a/Postman/Postman.php +++ b/Postman/Postman.php @@ -35,6 +35,8 @@ class Postman { private $pluginData; private $rootPluginFilenameAndPath; + public static $rootPlugin; + /** * The constructor * @@ -45,6 +47,7 @@ class Postman { assert( ! empty( $rootPluginFilenameAndPath ) ); assert( ! empty( $version ) ); $this->rootPluginFilenameAndPath = $rootPluginFilenameAndPath; + self::$rootPlugin = $rootPluginFilenameAndPath; // load the dependencies require_once 'PostmanOptions.php'; diff --git a/Postman/PostmanOptions.php b/Postman/PostmanOptions.php index 7d8c2a0..57fe658 100644 --- a/Postman/PostmanOptions.php +++ b/Postman/PostmanOptions.php @@ -164,6 +164,14 @@ if ( ! class_exists( 'PostmanOptions' ) ) { $this->load(); } + public function __call($method, $args) + { + if (isset($this->$method)) { + $func = $this->$method; + return call_user_func_array($func, $args); + } + } + public function save() { update_option( PostmanOptions::POSTMAN_OPTIONS, $this->options ); } @@ -172,7 +180,7 @@ if ( ! class_exists( 'PostmanOptions' ) ) { $this->load(); } - private function load() { + public function load() { $options = get_option( self::POSTMAN_OPTIONS ); @@ -189,6 +197,8 @@ if ( ! class_exists( 'PostmanOptions' ) ) { restore_current_blog(); } + do_action( 'post_smtp_options_load', $this ); + $this->options = $options; } |