| @@ -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 | /** |