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/attachment.php +5 -5 2.1.212.2.7 View file →
@@ -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 /**