From 7aa4390a6702059342aad220e53e3aa4efc9caad Mon Sep 17 00:00:00 2001 From: yehudah Date: Mon, 19 Aug 2019 20:55:55 +0000 Subject: adding hooks --- Postman/PostmanOptions.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Postman/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; } -- cgit v1.2.3