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']; } } /** * Fires immediately after install action. * * @since 4.5.1.1 */ do_action( 'mainwp_install_update_actions', $website, $pAction, $data, $type, $post_data, $upload ); } /** * * 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 ) { if ( 'plugin_action' === $action ) { $plugin_act = isset( $params['action'] ) ? $params['action'] : ''; 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 ); } } } }