| @@ -15,11 +15,11 @@ | ||
| 15 | 15 | * |
| 16 | 16 | * @return void |
| 17 | 17 | */ |
| 18 | 18 | public function __construct() { |
| 19 | - add_action( 'activated_plugin', array( &$this, 'activated_plugin' ) ); | |
| 20 | - add_action( 'deactivated_plugin', array( &$this, 'deactivated_plugin' ) ); | |
| 21 | - add_action( 'upgrader_process_complete', array( &$this, 'plugin_install_or_update' ), 10, 2 ); | |
| 19 | + add_action( 'activated_plugin', [ &$this, 'activated_plugin' ] ); | |
| 20 | + add_action( 'deactivated_plugin', [ &$this, 'deactivated_plugin' ] ); | |
| 21 | + add_action( 'upgrader_process_complete', [ &$this, 'plugin_install_or_update' ], 10, 2 ); | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Log the action regarding the plugin. |
| @@ -37,14 +37,14 @@ | ||
| 37 | 37 | $plugin_name = $plugin_data['Name']; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $this->insert( |
| 41 | - array( | |
| 41 | + [ | |
| 42 | 42 | 'action' => $action, |
| 43 | 43 | 'object' => 'plugin', |
| 44 | 44 | 'object_id' => 0, |
| 45 | 45 | 'object_name' => esc_html( $plugin_name ), |
| 46 | - ) | |
| 46 | + ] | |
| 47 | 47 | ); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| @@ -99,9 +99,9 @@ | ||
| 99 | 99 | if ( ! isset( $upgrader->skin->plugin ) ) { |
| 100 | 100 | return; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - $slugs = array( $upgrader->skin->plugin ); | |
| 103 | + $slugs = [ $upgrader->skin->plugin ]; | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // Loop through all updated plugins. |
| 107 | 107 | foreach ( $slugs as $slug ) { |