PluginProbe
Patchstack – WordPress & Plugins Security / 2.2.11
Patchstack – WordPress & Plugins Security v2.2.11
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/plugins.php +6 -6 2.1.62.2.11 View file →
@@ -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 ) {