diff options
author | Yehuda Hassine <yehuda@myinbox.in> | 2019-04-22 00:23:38 +0300 |
---|---|---|
committer | Yehuda Hassine <yehuda@myinbox.in> | 2019-04-22 00:23:38 +0300 |
commit | 7781aa65cef32d8c8196979edb21ec4551e5b904 (patch) | |
tree | 2a7944400ede6a9a574a83ce89d010b26628fe02 /Postman/Postman-Email-Log/PostmanEmailLogView.php | |
parent | dad9828e8c866e50d6e44aebd103f1ab97409a5b (diff) | |
download | Post-SMTP-7781aa65cef32d8c8196979edb21ec4551e5b904.zip |
better meta query,bugs, optimization
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogView.php')
-rw-r--r-- | Postman/Postman-Email-Log/PostmanEmailLogView.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogView.php b/Postman/Postman-Email-Log/PostmanEmailLogView.php index 2f41bcf..a9722bd 100644 --- a/Postman/Postman-Email-Log/PostmanEmailLogView.php +++ b/Postman/Postman-Email-Log/PostmanEmailLogView.php @@ -1,5 +1,7 @@ <?php +require_once dirname(__DIR__) . '/PostmanEmailLogs.php'; + /** * See http://wpengineer.com/2426/wp_list_table-a-step-by-step-guide/ */ @@ -92,7 +94,7 @@ class PostmanEmailLogView extends WP_List_Table { $transcriptUrl = admin_url( sprintf( $iframeUri, 'transcript', $item ['ID'] ) ); $resendUrl = admin_url( sprintf( $iframeUri, 'resend', $item ['ID'] ) ); - $meta_values = get_post_meta( $item ['ID'] ); + $meta_values = PostmanEmailLogs::get_data( $item ['ID'] ); $actions = array( 'delete' => sprintf( '<a href="%s">%s</a>', $deleteUrl, _x( 'Delete', 'Delete an item from the email log', 'post-smtp' ) ), @@ -365,7 +367,7 @@ class PostmanEmailLogView extends WP_List_Table { /* Translators: where %s indicates the relative time from now */ $date = sprintf( _x( '%s ago', 'A relative time as in "five days ago"', 'post-smtp' ), $humanTime ); } - $meta_values = get_post_meta( $post->ID ); + $meta_values = PostmanEmailLogs::get_data( $post->ID ); $sent_to = array_map( 'sanitize_email', explode( ',' , $meta_values ['to_header'] [0] ) ); $flattenedPost = array( // the post title must be escaped as they are displayed in the HTML output |