other_data ) && is_array( $output->other_data ) && isset( $output->other_data[ $website->id ]['install_items'] ) ) { $data['install_items'] = $output->other_data[ $website->id ]['install_items']; } } if ( 'updated' === $pAction && $is_auto_update ) { MainWP_Updates_Report_Manager::save_update_info( $website, $data, $type ); } /** * Fires immediately after install action. * * @since 4.5.1.1 */ do_action( 'mainwp_install_update_actions', $website, $pAction, $data, $type, $post_data, $upload, $is_auto_update ); } /** * * Handle @action mainwp_fetch_url_authed. * * @param object $website website. * @param array $information information result data. * @param string $action action. * @param array $params params input array. * @param array $others others input array. * * @since 4.5.1.1 */ public function hook_mainwp_fetch_url_authed( $website, $information, $action, $params, $others ) { // phpcs:ignore -- NOSONAR -complex method. if ( 'plugin_action' === $action ) { $plugin_act = isset( $params['action'] ) ? $params['action'] : ''; if ( 'delete' === $plugin_act && ! empty( $information['other_data']['duration_bulk'] ) ) { $params['duration_bulk'] = $information['other_data']['duration_bulk']; } if ( 'delete' === $plugin_act && ! empty( $information['other_data']['plugin_deactivated_data'] ) ) { do_action( 'mainwp_install_plugin_action', $website, 'deactivate', $params, $information['other_data']['plugin_deactivated_data'], $others ); } if ( in_array( $plugin_act, array( 'activate', 'deactivate', 'delete' ) ) && isset( $information['other_data']['plugin_action_data'] ) ) { do_action( 'mainwp_install_plugin_action', $website, $plugin_act, $params, $information['other_data']['plugin_action_data'], $others ); } } elseif ( 'theme_action' === $action ) { $theme_act = isset( $params['action'] ) ? $params['action'] : ''; if ( 'activate' === $theme_act && isset( $information['other_data']['theme_deactivate_data'] ) ) { do_action( 'mainwp_install_theme_action', $website, 'deactivate', $params, $information['other_data']['theme_deactivate_data'], $others ); } if ( in_array( $theme_act, array( 'activate', 'delete' ) ) && isset( $information['other_data']['theme_action_data'] ) ) { do_action( 'mainwp_install_theme_action', $website, $theme_act, $params, $information['other_data']['theme_action_data'], $others ); } } } }