diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-08-19 20:55:55 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-08-19 20:55:55 +0000 |
commit | 7aa4390a6702059342aad220e53e3aa4efc9caad (patch) | |
tree | b89bd5c2d78d4fce915629b2844a5a54ae6994ca /Postman/PostmanOptions.php | |
parent | aba9ae5fb48fa655d8ca01504efd4f6121ca41b5 (diff) | |
download | Post-SMTP-7aa4390a6702059342aad220e53e3aa4efc9caad.zip |
adding hooks
Diffstat (limited to 'Postman/PostmanOptions.php')
-rw-r--r-- | Postman/PostmanOptions.php | 12 |
1 files changed, 11 insertions, 1 deletions
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; } |