| 1 |
<?php |
| 2 |
/** |
| 3 |
* Advanced settings panel. |
| 4 |
* |
| 5 |
* Each option is a self-describing row — label and helper copy on the left, the |
| 6 |
* control on the right — instead of the old label/tooltip pair. Rollback used to |
| 7 |
* be a second tab in here; it is its own settings panel now, see |
| 8 |
* views/rollback-settings.php. |
| 9 |
* |
| 10 |
* @package |
| 11 |
*/ |
| 12 |
|
| 13 |
// Consent lives in the telemetry SDK's option, not in WPFunnels' general |
| 14 |
// settings, so read it through the singleton. A site that has never answered |
| 15 |
// the setup-wizard question returns null and renders as off, which matches the |
| 16 |
// SDK's own "no consent yet, send nothing" behaviour. |
| 17 |
$wpfnl_telemetry = \WPFunnels\Tracking\Telemetry::instance(); |
| 18 |
$wpfnl_tracking_consent = $wpfnl_telemetry ? 'yes' === $wpfnl_telemetry->get_consent_state() : false; |
| 19 |
?> |
| 20 |
|
| 21 |
<div class="wpfnl-settings-list"> |
| 22 |
|
| 23 |
<div class="wpfnl-settings-list__row"> |
| 24 |
<div class="wpfnl-settings-list__info"> |
| 25 |
<h5 class="wpfnl-settings-list__title"><?php esc_html_e( 'Remove WPF Transient Cache', 'wpfnl' ); ?></h5> |
| 26 |
<p class="wpfnl-settings-list__desc"><?php esc_html_e( 'If you are facing issues such as not getting plugin updates or your license not working, clear the transient cache and try again.', 'wpfnl' ); ?></p> |
| 27 |
</div> |
| 28 |
|
| 29 |
<div class="wpfnl-settings-list__action"> |
| 30 |
<div class="transient-btn-wrapper"> |
| 31 |
<button class="clear-transients-btn clear-template" id="clear-transients" title="<?php esc_attr_e( 'Clear transient cache', 'wpfnl' ); ?>"> |
| 32 |
<?php require WPFNL_DIR . '/admin/partials/icons/delete-transient-icon.php'; ?> |
| 33 |
</button> |
| 34 |
<span class="wpfnl-alert"></span> |
| 35 |
</div> |
| 36 |
</div> |
| 37 |
</div> |
| 38 |
|
| 39 |
<div class="wpfnl-settings-list__row"> |
| 40 |
<div class="wpfnl-settings-list__info"> |
| 41 |
<h5 class="wpfnl-settings-list__title"><?php esc_html_e( 'Disable Theme Styles in Funnel Pages', 'wpfnl' ); ?></h5> |
| 42 |
<p class="wpfnl-settings-list__desc"><?php esc_html_e( 'When enabled, your theme styles will not be loaded while editing funnel pages. WPFunnels will load its own default styles instead.', 'wpfnl' ); ?></p> |
| 43 |
</div> |
| 44 |
|
| 45 |
<div class="wpfnl-settings-list__action"> |
| 46 |
<span class="wpfnl-switcher extra-sm no-title"> |
| 47 |
<input type="checkbox" name="disable-theme-style" id="disable-theme-style" <?php checked( 'on', isset( $this->general_settings['disable_theme_style'] ) ? $this->general_settings['disable_theme_style'] : 'off' ); ?> /> |
| 48 |
<label for="disable-theme-style"></label> |
| 49 |
</span> |
| 50 |
</div> |
| 51 |
</div> |
| 52 |
|
| 53 |
<div class="wpfnl-settings-list__row"> |
| 54 |
<div class="wpfnl-settings-list__info"> |
| 55 |
<h5 class="wpfnl-settings-list__title"><?php esc_html_e( 'Clear Funnel Data on Plugin Uninstall', 'wpfnl' ); ?></h5> |
| 56 |
<p class="wpfnl-settings-list__desc"><?php esc_html_e( 'All of your funnel data will be permanently deleted when you uninstall WPFunnels. If you enable this and delete the plugin, you cannot restore your saved data.', 'wpfnl' ); ?></p> |
| 57 |
</div> |
| 58 |
|
| 59 |
<div class="wpfnl-settings-list__action"> |
| 60 |
<span class="wpfnl-switcher extra-sm no-title"> |
| 61 |
<input type="checkbox" name="wpfnl-data-cleanup" id="wpfnl-data-cleanup" <?php checked( 'on', isset( $this->general_settings['uninstall_cleanup'] ) ? $this->general_settings['uninstall_cleanup'] : 'off' ); ?> /> |
| 62 |
<label for="wpfnl-data-cleanup"></label> |
| 63 |
</span> |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
|
| 67 |
<div class="wpfnl-settings-list__row"> |
| 68 |
<div class="wpfnl-settings-list__info"> |
| 69 |
<h5 class="wpfnl-settings-list__title"><?php esc_html_e( 'Help Us Improve Your Experience', 'wpfnl' ); ?></h5> |
| 70 |
<p class="wpfnl-settings-list__desc"> |
| 71 |
<?php esc_html_e( 'Collect non-sensitive information from your website, such as the PHP version and features used, to help us fix bugs faster, make smarter decisions, and build features that actually matter to you.', 'wpfnl' ); ?> |
| 72 |
<a href="https://getwpfunnels.com/privacy-policy/" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Learn More', 'wpfnl' ); ?></a>. |
| 73 |
</p> |
| 74 |
</div> |
| 75 |
|
| 76 |
<div class="wpfnl-settings-list__action"> |
| 77 |
<span class="wpfnl-switcher extra-sm no-title"> |
| 78 |
<input |
| 79 |
type="checkbox" |
| 80 |
name="wpfnl-allow-tracking" |
| 81 |
id="wpfnl-allow-tracking" |
| 82 |
data-initial="<?php echo $wpfnl_tracking_consent ? 'yes' : 'no'; ?>" |
| 83 |
<?php checked( true, $wpfnl_tracking_consent ); ?> |
| 84 |
/> |
| 85 |
<label for="wpfnl-allow-tracking"></label> |
| 86 |
</span> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
|
| 90 |
</div> |
| 91 |
|