uninstallation-settings.php
57 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Reset settings on uninstal section under the "data" tab. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.0.3 |
| 7 | */ |
| 8 | |
| 9 | $options = array( |
| 10 | '0' => array( |
| 11 | 'value' => '0', |
| 12 | 'label' => esc_html__( 'Preserve', 'hustle' ), |
| 13 | ), |
| 14 | '1' => array( |
| 15 | 'value' => '1', |
| 16 | 'label' => esc_html__( 'Reset', 'hustle' ), |
| 17 | 'content' => $this->get_html_for_options( |
| 18 | array( |
| 19 | array( |
| 20 | 'type' => 'inline_notice', |
| 21 | 'icon' => 'info', |
| 22 | 'value' => esc_html__( 'This will delete all the modules and their data - submissions, conversion data, and plugin settings when the plugin is uninstalled.', 'hustle' ), |
| 23 | ), |
| 24 | ), |
| 25 | true |
| 26 | ), |
| 27 | ), |
| 28 | ); |
| 29 | |
| 30 | $reset_settings_uninstall = '1' === $settings['reset_settings_uninstall']; ?> |
| 31 | <div class="sui-box-settings-row"> |
| 32 | |
| 33 | <div class="sui-box-settings-col-1"> |
| 34 | <span class="sui-settings-label"><?php esc_html_e( 'Uninstallation', 'hustle' ); ?></span> |
| 35 | <span class="sui-description"><?php esc_html_e( 'When you uninstall this plugin, what do you want to do with your plugin’s settings and data?', 'hustle' ); ?></span> |
| 36 | </div> |
| 37 | |
| 38 | <div class="sui-box-settings-col-2"> |
| 39 | |
| 40 | <?php |
| 41 | $this->render( |
| 42 | 'admin/global/sui-components/sui-tabs', |
| 43 | array( |
| 44 | 'name' => 'reset_settings_uninstall', |
| 45 | 'radio' => true, |
| 46 | 'saved_value' => $settings['reset_settings_uninstall'], |
| 47 | 'sidetabs' => true, |
| 48 | 'content' => true, |
| 49 | 'options' => $options, |
| 50 | ) |
| 51 | ); |
| 52 | ?> |
| 53 | |
| 54 | </div> |
| 55 | |
| 56 | </div> |
| 57 |