diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-11-17 13:03:43 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-11-17 13:03:43 +0000 |
commit | 0b244f7df855f16d1d767054bd7b728ef21462e9 (patch) | |
tree | 0a48cb82a796c6b7e2432741b03995cb2bae611e /Postman/Postman-Email-Log/PostmanEmailLogController.php | |
parent | 238d3e53f51c4408581b4961924120ac008a2ae4 (diff) | |
download | Post-SMTP-0b244f7df855f16d1d767054bd7b728ef21462e9.zip |
= 1.7.8 - 2017-11-17
* = Menu Items grouping =
* Fixed: IP detection error in some web hosts
* Fixed: Link open in new page attribute = _blank
* Fixed: Replace deprecated PHP 7 functions.
* Updated: Validator TLD's list
* Added: Email log date and search filter.
* Added: Alert on sending error (Fallback to local mail)
* Added: Email body preview (not raw)
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogController.php')
-rw-r--r-- | Postman/Postman-Email-Log/PostmanEmailLogController.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogController.php b/Postman/Postman-Email-Log/PostmanEmailLogController.php index 1cdbee3..a7bd78a 100644 --- a/Postman/Postman-Email-Log/PostmanEmailLogController.php +++ b/Postman/Postman-Email-Log/PostmanEmailLogController.php @@ -20,7 +20,7 @@ class PostmanEmailLogController { add_action( 'admin_menu', array( $this, 'postmanAddMenuItem', - ) ); + ),20 ); } else { $this->logger->trace( 'not creating PostmanEmailLog admin menu item' ); } @@ -227,13 +227,20 @@ class PostmanEmailLogController { print '</table>'; print '<hr/>'; print '<pre>'; - print esc_html( $post->post_content ); + print $this->sanitize_message( $post->post_content ); print '</pre>'; print '</body></html>'; die(); } } + function sanitize_message( $message ) { + $allowed_tags = wp_kses_allowed_html( 'post' ); + $allowed_tags['style'] = array(); + + return wp_kses( $message, $allowed_tags ); + } + /** */ function view_transcript_log_item() { @@ -279,11 +286,13 @@ class PostmanEmailLogController { // only do this for administrators if ( PostmanUtils::isAdmin() ) { $this->logger->trace( 'created PostmanEmailLog admin menu item' ); - /* Translators where (%s) is the name of the plugin */ - $page = add_management_page( sprintf( __( '%s Email Log', Postman::TEXT_DOMAIN ), __( 'Postman SMTP', Postman::TEXT_DOMAIN ) ), _x( 'Email Log', 'The log of Emails that have been delivered', Postman::TEXT_DOMAIN ), 'read_private_posts', 'postman_email_log', array( - $this, - 'postman_render_email_page', - ) ); + /* + Translators where (%s) is the name of the plugin */ + $pageTitle = sprintf( __( '%s Email Log', Postman::TEXT_DOMAIN ), __( 'Postman SMTP', Postman::TEXT_DOMAIN ) ); + $pluginName = _x( 'Email Log', 'The log of Emails that have been delivered', Postman::TEXT_DOMAIN ); + + $page = add_submenu_page( PostmanViewController::POSTMAN_MENU_SLUG, $pageTitle, $pluginName, 'read_private_posts', 'postman_email_log', array( $this, 'postman_render_email_page' ) ); + // When the plugin options page is loaded, also load the stylesheet add_action( 'admin_print_styles-' . $page, array( $this, |