diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-11-20 22:02:17 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-11-20 22:02:17 +0000 |
commit | a5f8d8dce0f9f7cc373d62a820d07902e02548d7 (patch) | |
tree | d4588eeb10d37ff8cc77162d6efd7abd9ea9a246 /Postman/Postman-Email-Log/PostmanEmailLogView.php | |
parent | c4a84af9a1de9645d1742b71c56f1c06f0d0cba0 (diff) | |
download | Post-SMTP-a5f8d8dce0f9f7cc373d62a820d07902e02548d7.zip |
* Fixed: misspled false
* Fixed: feedback form
* Fixed: Some localization strings
* Removed: deprecated function
* New: Option to input emails when resend email
* Added: explain message on email log filter
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogView.php')
-rw-r--r-- | Postman/Postman-Email-Log/PostmanEmailLogView.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogView.php b/Postman/Postman-Email-Log/PostmanEmailLogView.php index f8f4fac..fe0fdfe 100644 --- a/Postman/Postman-Email-Log/PostmanEmailLogView.php +++ b/Postman/Postman-Email-Log/PostmanEmailLogView.php @@ -105,7 +105,9 @@ class PostmanEmailLogView extends WP_List_Table { } if ( ! (empty( $meta_values ['original_to'] [0] ) && empty( $meta_values ['originalHeaders'] [0] )) ) { // $actions ['resend'] = sprintf ( '<a href="%s">%s</a>', $resendUrl, __ ( 'Resend', Postman::TEXT_DOMAIN ) ); - $actions ['resend'] = sprintf( '<span id="%3$s"><a href="javascript:postman_resend_email(%1$s);">%2$s</a></span>', $item ['ID'], __( 'Resend', Postman::TEXT_DOMAIN ), 'resend-' . $item ['ID'] ); + $emails = maybe_unserialize( $meta_values ['original_to'] [0] ); + $to = is_array( $emails ) ? implode( ',', $emails ) : $emails; + $actions ['resend'] = sprintf( '<span id="%3$s"><a class="postman-open-resend" href="#">%2$s</a></span><div style="display:none;"><input type="hidden" name="security" value="%6$s"><input type="text" name="mail_to" class="regular-text ltr" data-id="%1$s" value="%4$s"><button class="postman-resend button button-primary">%2$s</button><i style="color: black;">%5$s</i></div>', $item ['ID'], __( 'Resend', Postman::TEXT_DOMAIN ), 'resend-' . $item ['ID'], esc_attr( $to ), __( 'comma-separated for multiple emails', Postman::TEXT_DOMAIN ), wp_create_nonce( 'resend' ) ); } else { $actions ['resend'] = sprintf( '%2$s', $resendUrl, __( 'Resend', Postman::TEXT_DOMAIN ) ); } @@ -317,6 +319,7 @@ class PostmanEmailLogView extends WP_List_Table { $from_date = sanitize_text_field( $_POST['from_date'] ); $args['date_query']['after'] = $from_date; + $args['date_query']['column'] = 'post_date'; $args['date_query']['inclusive'] = false; } @@ -324,6 +327,7 @@ class PostmanEmailLogView extends WP_List_Table { $to_date = sanitize_text_field( $_POST['to_date'] ); $args['date_query']['before'] = $to_date; + $args['date_query']['column'] = 'post_date'; $args['date_query']['inclusive'] = true; } @@ -336,6 +340,8 @@ class PostmanEmailLogView extends WP_List_Table { } $posts = new WP_query( $args ); + $date_format = get_option( 'date_format' ); + $time_format = get_option( 'time_format' ); foreach ( $posts->posts as $post ) { $date = $post->post_date; @@ -351,7 +357,7 @@ class PostmanEmailLogView extends WP_List_Table { 'title' => esc_html( $post->post_title ), // the post status must be escaped as they are displayed in the HTML output 'status' => ($post->post_excerpt != null ? esc_html( $post->post_excerpt ) : __( 'Sent', Postman::TEXT_DOMAIN )), - 'date' => $date, + 'date' => date( "$date_format $time_format", strtotime( $post->post_date ) ), 'ID' => $post->ID, ); array_push( $data, $flattenedPost ); |