diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-09-13 11:29:33 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-09-13 11:29:33 +0000 |
commit | caa73945f9fe69875171ea2aade2c53e60b21bbe (patch) | |
tree | dbcc35d42a519d3796c82c3942891226a425c2e7 /Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php | |
parent | 5f134fb5839bf3e161385727c2a2009b54444878 (diff) | |
download | Post-SMTP-caa73945f9fe69875171ea2aade2c53e60b21bbe.zip |
hooks + sanitize bug
Diffstat (limited to 'Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php')
-rw-r--r-- | Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php b/Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php index 6ddebd7..705ef23 100644 --- a/Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php +++ b/Postman/Postman-Configuration/PostmanRegisterConfigurationSettings.php @@ -234,6 +234,7 @@ class PostmanSettingsRegistry { 'notification_chrome_uid_callback', ), PostmanAdminController::NOTIFICATIONS_OPTIONS, PostmanAdminController::NOTIFICATIONS_SECTION ); + do_action( 'post_smtp_settings' ); } } @@ -443,12 +444,20 @@ class PostmanSettingsRegistry { public function notification_service_callback() { $inputDescription = __( 'Select the notification service you want to recieve alerts about failed emails.' ); + + $options = apply_filters('post_smtp_notification_service', array( + 'default' => __( 'WP Admin Email', 'post-smtp' ), + 'pushover' => __( 'Pushover', 'post-smtp' ), + 'slack' => __( 'Slack', 'post-smtp' ), + )); + printf( '<select id="input_%2$s" class="input_%2$s" name="%1$s[%2$s]">', PostmanOptions::POSTMAN_OPTIONS, PostmanOptions::NOTIFICATION_SERVICE ); $currentKey = $this->options->getNotificationService(); - $this->printSelectOption( __( 'Email', 'post-smtp' ), 'default', $currentKey ); - $this->printSelectOption( __( 'Pushover', 'post-smtp' ), 'pushover', $currentKey ); - $this->printSelectOption( __( 'Slack', 'post-smtp' ), 'slack', $currentKey ); + foreach ( $options as $key => $label ) { + $this->printSelectOption( $label, $key, $currentKey ); + } + printf( '</select><br/><span class="postman_input_description">%s</span>', $inputDescription ); } |