mirror of
https://ghproxy.net/https://github.com/elementor/activity-log.git
synced 2025-10-04 03:06:11 +08:00
added update plugins
This commit is contained in:
parent
e214ac4b1e
commit
4f02d1390f
1 changed files with 20 additions and 0 deletions
|
@ -81,6 +81,26 @@ class AAL_Hook_Plugins extends AAL_Hook_Base {
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ( 'update' === $extra['action'] ) {
|
||||
if ( isset( $extra['bulk'] ) && true == $extra['bulk'] )
|
||||
$slugs = $extra['plugins'];
|
||||
else
|
||||
$slugs = array( $upgrader->skin->plugin );
|
||||
|
||||
foreach ( $slugs as $slug ) {
|
||||
$data = get_plugin_data( WP_PLUGIN_DIR . '/' . $slug, true, false );
|
||||
|
||||
aal_insert_log(
|
||||
array(
|
||||
'action' => 'updated',
|
||||
'object_type' => 'Plugin',
|
||||
'object_name' => $data['Name'],
|
||||
'object_subtype' => $data['Version'],
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue