Add consent reopener: floating widget + anchor link trigger
Allow visitors to reopen the cookie preferences modal after making their choice via a configurable floating button (bottom-right or right-side vertical) or any anchor link with href="#att-cc-preferences". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,42 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="floating_widget"><?php esc_html_e( 'Floating Widget', 'att-consent' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<select name="floating_widget" id="floating_widget">
|
||||
<option value="bottom-right" <?php selected( $settings['floating_widget'], 'bottom-right' ); ?>>
|
||||
<?php esc_html_e( 'Bottom Right (recommended)', 'att-consent' ); ?>
|
||||
</option>
|
||||
<option value="right" <?php selected( $settings['floating_widget'], 'right' ); ?>>
|
||||
<?php esc_html_e( 'Right Side (vertical)', 'att-consent' ); ?>
|
||||
</option>
|
||||
<option value="none" <?php selected( $settings['floating_widget'], 'none' ); ?>>
|
||||
<?php esc_html_e( 'Disabled', 'att-consent' ); ?>
|
||||
</option>
|
||||
</select>
|
||||
<p class="description">
|
||||
<?php esc_html_e( 'A small floating button that allows visitors to reopen the cookie preferences modal after they\'ve made their choice.', 'att-consent' ); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="floating_widget_label"><?php esc_html_e( 'Floating Widget Label', 'att-consent' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" name="floating_widget_label" id="floating_widget_label"
|
||||
value="<?php echo esc_attr( $settings['floating_widget_label'] ); ?>"
|
||||
class="regular-text">
|
||||
<p class="description">
|
||||
<?php esc_html_e( 'Text shown on the floating widget button.', 'att-consent' ); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="consent_expiry"><?php esc_html_e( 'Consent Expiry (days)', 'att-consent' ); ?></label>
|
||||
|
||||
Reference in New Issue
Block a user