PluginProbe
Patchstack – WordPress & Plugins Security / 2.2.7
Patchstack – WordPress & Plugins Security v2.2.7
2.3.7 trunk 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.2 2.1.20 2.1.21 2.1.22 2.1.23 2.1.24 2.1.25 2.1.3 2.1.4 2.1.5 2.1.6 All 49 releases
← All changes | includes/events/comments.php +10 -10 2.1.212.2.7 View file →
@@ -15,16 +15,16 @@
15 15 *
16 16 * @return void
17 17 */
18 18 public function __construct() {
19 - add_action( 'wp_insert_comment', array( &$this, 'handleCommentLog' ), 10, 2 );
20 - add_action( 'edit_comment', array( &$this, 'handleCommentLog' ) );
21 - add_action( 'trash_comment', array( &$this, 'handleCommentLog' ) );
22 - add_action( 'untrash_comment', array( &$this, 'handleCommentLog' ) );
23 - add_action( 'spam_comment', array( &$this, 'handleCommentLog' ) );
24 - add_action( 'unspam_comment', array( &$this, 'handleCommentLog' ) );
25 - add_action( 'delete_comment', array( &$this, 'handleCommentLog' ) );
26 - add_action( 'transition_comment_status', array( &$this, 'transitionCommentStatus' ), 10, 3 );
19 + add_action( 'wp_insert_comment', [ &$this, 'handleCommentLog' ], 10, 2 );
20 + add_action( 'edit_comment', [ &$this, 'handleCommentLog' ] );
21 + add_action( 'trash_comment', [ &$this, 'handleCommentLog' ] );
22 + add_action( 'untrash_comment', [ &$this, 'handleCommentLog' ] );
23 + add_action( 'spam_comment', [ &$this, 'handleCommentLog' ] );
24 + add_action( 'unspam_comment', [ &$this, 'handleCommentLog' ] );
25 + add_action( 'delete_comment', [ &$this, 'handleCommentLog' ] );
26 + add_action( 'transition_comment_status', [ &$this, 'transitionCommentStatus' ], 10, 3 );
27 27
28 28 }
29 29
30 30 /**
@@ -40,14 +40,14 @@
40 40 $comment = get_comment( $id );
41 41 }
42 42
43 43 $this->insert(
44 - array(
44 + [
45 45 'action' => $action,
46 46 'object' => 'comment',
47 47 'object_id' => $id,
48 48 'object_name' => esc_html( get_the_title( $comment->comment_post_ID ) ),
49 - )
49 + ]
50 50 );
51 51 }
52 52
53 53 /**