| @@ 39-54 (lines=16) @@ | ||
| 36 | return; |
|
| 37 | } |
|
| 38 | ||
| 39 | if ( 'install' === $details['action'] ) { |
|
| 40 | $plugin_path = $upgrader->plugin_info(); |
|
| 41 | $plugins = get_plugins(); |
|
| 42 | $plugin_info = $plugins[ $plugin_path ]; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * Signals to the sync listener that a plugin was installed and a sync action |
|
| 46 | * reflecting the installation and the plugin info should be sent |
|
| 47 | * |
|
| 48 | * @since 4.9.0 |
|
| 49 | * |
|
| 50 | * @param string $plugin_path Path of plugin installed |
|
| 51 | * @param mixed $plugin_info Array of info describing plugin installed |
|
| 52 | */ |
|
| 53 | do_action( 'jetpack_installed_plugin', $plugin_path, $plugin_info ); |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| 57 | public function delete_plugin( $plugin_path ) { |
|
| @@ 36-51 (lines=16) @@ | ||
| 33 | return; |
|
| 34 | } |
|
| 35 | ||
| 36 | if ( 'install' === $details['action'] ) { |
|
| 37 | $plugin_path = $upgrader->plugin_info(); |
|
| 38 | $plugins = get_plugins(); |
|
| 39 | $plugin_info = $plugins[ $plugin_path ]; |
|
| 40 | ||
| 41 | /** |
|
| 42 | * Signals to the sync listener that a plugin was installed and a sync action |
|
| 43 | * reflecting the installation and the plugin info should be sent |
|
| 44 | * |
|
| 45 | * @since 4.9.0 |
|
| 46 | * |
|
| 47 | * @param string $plugin_path Path of plugin installed |
|
| 48 | * @param mixed $plugin_info Array of info describing plugin installed |
|
| 49 | */ |
|
| 50 | do_action( 'jetpack_installed_plugin', $plugin_path, $plugin_info ); |
|
| 51 | } |
|
| 52 | } |
|
| 53 | ||
| 54 | public function init_full_sync_listeners( $callable ) { |
|