$action, 'object_type' => 'Attachment', 'object_subtype' => $post->post_type, 'object_id' => $attachment_id, 'object_name' => esc_html( get_the_title( $post->ID ) ), ] ); } public function hooks_delete_attachment( $attachment_id ) { $this->_add_log_attachment( 'deleted', $attachment_id ); } public function hooks_edit_attachment( $attachment_id ) { $this->_add_log_attachment( 'updated', $attachment_id ); } public function hooks_add_attachment( $attachment_id ) { $this->_add_log_attachment( 'added', $attachment_id ); } }