IL Privacy & Cookie Consent is a comprehensive, production-ready plugin for displaying cookie consent banners, blocking non-essential scripts until consent is obtained, logging consent events (compliant with Amendment 13 of the Israeli Privacy Protection Law), creating privacy policy pages, supporting RTL and accessibility, with Hebrew defaults.
Key Features
- Customizable consent banner – Floating window at the bottom of the page with options: “Accept All”, “Reject Non-Essential Cookies”, “Preferences”
- Detailed preferences modal – Granular selection of categories: Essential (required), Analytics, Marketing, Functional
- Script blocking – Map scripts to categories and block them until appropriate consent is obtained
- Consent event logging – Database storage with IP hash, User Agent, date, version (compliant with Amendment 13)
- CSV log export – Export consent data for reporting
- Privacy policy page – Automatic creation of draft page with
[ilpramco_policy]shortcode - Cookies table –
[il_cookies_table]shortcode to display cookie catalog - Marketing consent for forms –
[il_marketing_consent]shortcode for forms - RTL and accessibility – Full RTL support, WCAG, keyboard navigation, focus trap
- Lightweight – Very small JS+CSS (< 10KB gzipped), no jQuery dependency
- DNT support – Option to respect Do Not Track
Minimum Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher (supports PHP 8.1+)
Usage
Shortcodes:
[ilpramco_policy]– Displays the full privacy policy[ilpramco_cookies_table]– Displays cookies table[ilpramco_marketing_consent]– Marketing consent checkbox for forms
JavaScript API:
`javascript
// Get current consent const consent = window.ILPrivacy.getConsent();
// Register callback for changes window.ILPrivacy.onChange(function(consent) { console.log(‘Consent updated:’, consent); });
// Enable a category window.ILPrivacy.enableCategory(‘analytics’);
// Check if category is enabled if (window.ILPrivacy.isCategoryEnabled(‘marketing’)) { // Load marketing scripts }
// Open preferences modal window.ILPrivacy.openPreferences();
// Revoke consent window.ILPrivacy.revokeConsent(); `
Script Mapping:
`php
// Add script to category add_action(‘wp_enqueue_scripts’, function() { wp_enqueue_script(‘google-analytics’, ‘…’, [], ‘1.0’, true);
// Map to category
$mapping = get_option('ilpramco_script_mapping', []);
$mapping['google-analytics'] = 'analytics';
update_option('ilpramco_script_mapping', $mapping);
}); `
Privacy & Legal
This plugin is designed to help comply with Amendment 13 of the Israeli Privacy Protection Law and GDPR regulations in Europe. However, using this plugin does not constitute legal advice and does not guarantee full legal compliance. It is recommended to consult with a legal advisor regarding your specific legal requirements.
The plugin stores the following data: * User ID (if user is logged in) * Session ID (UUID) * Hash of IP address (SHA256 with salt) * User Agent * Consent (categories, version, date)
The plugin does not store raw IP addresses.
