This commit is contained in:
Prospress Inc
2018-07-19 12:14:08 +02:00
committed by Remco Tolsma
parent 5fb62b0e6a
commit 1039aec2d9
126 changed files with 13546 additions and 4169 deletions

View File

@@ -49,7 +49,10 @@ class ActionScheduler_wpCommentLogger extends ActionScheduler_Logger {
if ( empty($comment) || $comment->comment_type != self::TYPE ) {
return new ActionScheduler_NullLogEntry();
}
return new ActionScheduler_LogEntry( $comment->comment_post_ID, $comment->comment_content, $comment->comment_type );
$date = as_get_datetime_object( $comment->comment_date_gmt );
$date->setTimezone( ActionScheduler_TimezoneHelper::get_local_timezone() );
return new ActionScheduler_LogEntry( $comment->comment_post_ID, $comment->comment_content, $date );
}
/**
@@ -87,8 +90,6 @@ class ActionScheduler_wpCommentLogger extends ActionScheduler_Logger {
/**
* @param WP_Comment_Query $query
*
* @return void
*/
public function filter_comment_queries( $query ) {
foreach ( array('ID', 'parent', 'post_author', 'post_name', 'post_parent', 'type', 'post_type', 'post_id', 'post_ID') as $key ) {
@@ -205,8 +206,6 @@ class ActionScheduler_wpCommentLogger extends ActionScheduler_Logger {
/**
* Delete comment count cache whenever there is new comment or the status of a comment changes. Cache
* will be regenerated next time ActionScheduler_wpCommentLogger::filter_comment_count() is called.
*
* @return void
*/
public function delete_comment_count_cache() {
delete_transient( 'as_comment_count' );