IL Privacy & Cookie Consent

설명

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.

스크린샷

  • Consent banner at bottom of page – Hebrew view with RTL support
  • Detailed preferences modal – Granular category selection

설치

Install from WordPress.org

  1. Go to your WordPress admin area
  2. Navigate to “Plugins” > “Add New”
  3. Search for “IL Privacy”
  4. Click “Install Now” and then “Activate”

Manual Installation

  1. Download the plugin ZIP file
  2. Upload the il-privacy-cookie-consent folder to /wp-content/plugins/
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Go to ‘IL Privacy’ menu for settings

After Installation

  1. The plugin automatically creates a privacy policy page
  2. The consent banner will automatically appear to new visitors
  3. Customize texts and colors as needed in settings
  4. Add script mappings to categories (Google Analytics, Facebook Pixel, etc.)
  5. Test that the banner displays correctly on your site

FAQ

Is this plugin compliant with Amendment 13?

Yes! The plugin stores consent event logs with timestamp, policy version, IP hash (not raw IP), and allows data export.

Does the plugin block scripts automatically?

Yes, for scripts that are mapped to categories. You can add mappings in the plugin settings.

How do I add support for Google Analytics?

In the plugin settings, go to “Categories and Scripts” and add the Google Analytics handle (e.g., gtag or google-analytics) to the “Analytics” category.

Does the plugin affect performance?

No! The plugin is very lightweight – JS+CSS < 10KB gzipped, no jQuery dependency, vanilla JS only.

후기

모든 0 평가 읽기

기여자 & 개발자

“IL Privacy & Cookie Consent”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “IL Privacy & Cookie Consent”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.1.9

  • Date: 2025-12-23
  • Fixed: Added backwards compatibility for old shortcode names ([il_privacy_policy], [il_cookies_table], [il_marketing_consent]).

1.1.8

  • Date: 2025-12-23
  • Fixed: Added proper permission_callback to REST API routes with session ownership check.
  • Fixed: Added escaping (esc_url) for iframe sources in content filter.
  • Fixed: Removed redundant load_plugin_textdomain calls (handled by WP.org).
  • Fixed: Removed unneeded development folders (.wordpress-org).

1.1.7

  • Date: 2025-12-10
  • Fixed: Namespace changed from ILPrivacy to Ilpramco (WordPress.org naming convention)
  • Fixed: Tested up to updated to WordPress 6.9

1.1.6

  • Date: 2025-11-23
  • Fixed: Plugin description changed from Hebrew to English (WordPress.org requirement)
  • Fixed: ALL option names changed from il_privacy_* to ilpramco_* prefix
  • Fixed: ALL settings groups changed from il_privacy_* to ilpramco_* prefix
  • Fixed: ALL admin post actions changed from il_privacy_* to ilpramco_* prefix
  • Fixed: ALL shortcodes renamed: [ilpramco_policy], [ilpramco_cookies_table], [ilpramco_marketing_consent]
  • Fixed: ALL transients renamed from il_privacy_* to ilpramco_* prefix
  • Fixed: Cookie name changed from il_privacy to ilpramco_consent
  • Fixed: Database table name remains ilpramco_consent (already correct)
  • Note: This is a breaking change – existing consent cookies will need to be re-accepted
  • Improved: Full compliance with WordPress.org plugin naming conventions

1.1.5

  • Date: 2025-11-23
  • Added: Full multilingual support (English/Hebrew) with automatic language detection
  • Added: WPML, Polylang, and TranslatePress compatibility
  • Added: Automatic language detection from URL parameters (?lang=en)
  • Added: Dynamic RTL/LTR support based on current language
  • Added: English translation file (en_US.po)
  • Added: Hebrew translation file (he_IL.po)
  • Improved: Banner and modal now automatically adjust text direction (RTL/LTR)
  • Improved: Privacy policy page supports multilingual content
  • Improved: Admin settings interface respects current site language
  • Improved: CSS styles updated for better RTL/LTR compatibility

1.1.4

  • Date: 2025-11-23
  • Fixed: Removed all backwards compatibility constants (IL_PRIVACY_) – only ILPRAMCO_ constants now used
  • Fixed: Removed all backwards compatibility functions (il_privacy_) – only ilpramco_ functions now used
  • Fixed: Updated all internal function calls to use new ilpramco_ prefix
  • Fixed: Removed backwards compatibility filter (il_privacy_script_mapping)
  • Fixed: Added proper phpcs:ignore comments for PluginCheck.Security.DirectDB warnings (all $table_name uses are safe)
  • Improved: Cleaner codebase with consistent prefixing throughout
  • Breaking: If you were using il_privacy_* functions in custom code, please update to ilpramco_* equivalents

1.1.3

  • Date: 2025-11-17
  • Fixed: Removed duplicate Plugin URI (was identical to Author URI)
  • Fixed: All inline scripts now use wp_add_inline_script() instead of direct script tags
  • Fixed: Global prefixes changed from IL_PRIVACY_ to ILPRAMCO_ for better uniqueness (backwards compatible)
  • Fixed: Function prefixes changed from il_privacy_ to ilpramco_ (backwards compatible)
  • Fixed: Class name changed from IL_Privacy to ILPRAMCO_Plugin (backwards compatible)
  • Fixed: All global variables in uninstall.php now properly prefixed
  • Fixed: Contributors field updated to match WordPress.org username (oyosh)
  • Improved: Complete English translation of readme.txt for WordPress.org submission
  • Improved: Better compliance with WordPress.org plugin guidelines and naming conventions
  • Note: All old function/constant names still work via backwards compatibility layer

1.1.2

  • Date: 2025-11-03
  • Improved: New design for banner buttons with color #244368
  • Improved: Changed font to Rubik for banner
  • Improved: Buttons displayed in single row (flex-row) with wrap
  • Improved: Text size increased to 14px for better readability
  • Improved: Enhanced hover effect on banner buttons

1.1.1

  • Date: 2025-11-03
  • Added: Ability to edit privacy policy content directly from admin
  • Added: Additional fields for contact details (company name, address, update date)
  • Improved: Support for dynamic tags in custom privacy policy
  • Improved: Enhanced interface for managing privacy policy content
  • Preparation: Added assets and prepared for WordPress.org submission

1.1.0

  • Improved: Enhanced support for Elementor forms
  • Fixed: Compatibility issues with PHP 8.1+
  • Added: More detailed logs for debugging

1.0.0

  • Initial release
  • Consent banner + preferences modal
  • Script blocking by categories
  • Consent event logging to database
  • CSV export
  • Shortcodes for privacy policy, cookies table, marketing consent
  • Full RTL and accessibility support
  • Hebrew defaults