diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-12-05 21:53:16 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2017-12-05 21:53:16 +0000 |
commit | 82f78770cb8c6058bf506db617ed95c21e3c7b0a (patch) | |
tree | b33b8a3d3eb8eac9fe6f8272f62e626ea4de0623 /Postman/Postman-Email-Log/PostmanEmailLogService.php | |
parent | 362ab9579ed96c1ec9b24b9c0f4097081ba3516f (diff) | |
download | Post-SMTP-82f78770cb8c6058bf506db617ed95c21e3c7b0a.zip |
* Welcome on activation
* email log records per page
* email logs trash all
* remove gmail hosts for non gmail host
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogService.php')
-rw-r--r-- | Postman/Postman-Email-Log/PostmanEmailLogService.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogService.php b/Postman/Postman-Email-Log/PostmanEmailLogService.php index 5f57ed8..6c0784b 100644 --- a/Postman/Postman-Email-Log/PostmanEmailLogService.php +++ b/Postman/Postman-Email-Log/PostmanEmailLogService.php @@ -234,10 +234,10 @@ if ( ! class_exists( 'PostmanEmailLogPurger' ) ) { * * @return unknown */ - function __construct() { + function __construct( $args = array() ) { $this->logger = new PostmanLogger( get_class( $this ) ); - $args = array( - 'posts_per_page' => 1000, + $defaults = array( + 'posts_per_page' => -1, 'offset' => 0, 'category' => '', 'category_name' => '', @@ -253,7 +253,9 @@ if ( ! class_exists( 'PostmanEmailLogPurger' ) ) { 'post_status' => 'private', 'suppress_filters' => true, ); - $this->posts = get_posts( $args ); + $args = wp_parse_args( $args, $defaults ); + $query = new WP_Query( $args ); + $this->posts = $query->posts; } /** |