| @@ -15,11 +15,11 @@ | ||
| 15 | 15 | * |
| 16 | 16 | * @return void |
| 17 | 17 | */ |
| 18 | 18 | public function __construct() { |
| 19 | - add_action( 'add_attachment', array( &$this, 'addAttachment' ) ); | |
| 20 | - add_action( 'edit_attachment', array( &$this, 'editAttachment' ) ); | |
| 21 | - add_action( 'delete_attachment', array( &$this, 'deleteAttachment' ) ); | |
| 19 | + add_action( 'add_attachment', [ &$this, 'addAttachment' ] ); | |
| 20 | + add_action( 'edit_attachment', [ &$this, 'editAttachment' ] ); | |
| 21 | + add_action( 'delete_attachment', [ &$this, 'deleteAttachment' ] ); | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Log the action regarding the attachment. |
| @@ -30,14 +30,14 @@ | ||
| 30 | 30 | */ |
| 31 | 31 | protected function _addLogAttachment( $action, $attachment_id ) { |
| 32 | 32 | $attachment = get_post( $attachment_id ); |
| 33 | 33 | $this->insert( |
| 34 | - array( | |
| 34 | + [ | |
| 35 | 35 | 'action' => $action, |
| 36 | 36 | 'object' => 'attachment', |
| 37 | 37 | 'object_id' => $attachment_id, |
| 38 | 38 | 'object_name' => esc_html( get_the_title( $attachment->ID ) ), |
| 39 | - ) | |
| 39 | + ] | |
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |