Initial commit: ATT Consent plugin v1.0.0

Google Consent Mode v2 cookie consent plugin with session attribution
preservation, custom script management, and gtag.js/GTM support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 05:45:42 +00:00
commit 6bf9f553de
19 changed files with 2726 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?php
/**
* Categories settings tab.
*
* @package ATT_Consent
* @var array $settings Current settings.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
<?php wp_nonce_field( 'att_cc_save_settings' ); ?>
<input type="hidden" name="action" value="att_cc_save_settings">
<input type="hidden" name="att_cc_tab" value="categories">
<p><?php esc_html_e( 'Customise the descriptions shown to visitors for each cookie category in the preferences modal.', 'att-consent' ); ?></p>
<table class="form-table">
<tr>
<th scope="row">
<label for="cat_necessary_desc"><?php esc_html_e( 'Necessary', 'att-consent' ); ?></label>
</th>
<td>
<textarea name="cat_necessary_desc" id="cat_necessary_desc" rows="3"
class="large-text"><?php echo esc_textarea( $settings['cat_necessary_desc'] ); ?></textarea>
<p class="description"><?php esc_html_e( 'Always enabled. Maps to: security_storage.', 'att-consent' ); ?></p>
</td>
</tr>
<tr>
<th scope="row">
<label for="cat_functional_desc"><?php esc_html_e( 'Functional', 'att-consent' ); ?></label>
</th>
<td>
<textarea name="cat_functional_desc" id="cat_functional_desc" rows="3"
class="large-text"><?php echo esc_textarea( $settings['cat_functional_desc'] ); ?></textarea>
<p class="description"><?php esc_html_e( 'Maps to: functionality_storage, personalization_storage.', 'att-consent' ); ?></p>
</td>
</tr>
<tr>
<th scope="row">
<label for="cat_analytics_desc"><?php esc_html_e( 'Analytics', 'att-consent' ); ?></label>
</th>
<td>
<textarea name="cat_analytics_desc" id="cat_analytics_desc" rows="3"
class="large-text"><?php echo esc_textarea( $settings['cat_analytics_desc'] ); ?></textarea>
<p class="description"><?php esc_html_e( 'Maps to: analytics_storage.', 'att-consent' ); ?></p>
</td>
</tr>
<tr>
<th scope="row">
<label for="cat_marketing_desc"><?php esc_html_e( 'Marketing', 'att-consent' ); ?></label>
</th>
<td>
<textarea name="cat_marketing_desc" id="cat_marketing_desc" rows="3"
class="large-text"><?php echo esc_textarea( $settings['cat_marketing_desc'] ); ?></textarea>
<p class="description"><?php esc_html_e( 'Maps to: ad_storage, ad_user_data, ad_personalization.', 'att-consent' ); ?></p>
</td>
</tr>
</table>
<?php submit_button(); ?>
</form>