Easily translate YOOtheme Pro 5 Consent Manager texts from the WordPress admin panel.
A lightweight WordPress plugin that allows you to customize all 21 text strings in the YOOtheme Pro 5 Consent Manager directly from your admin panel. No coding required!
- ✅ 21 Translatable Strings - All consent manager texts
- ✅ 36 Pre-configured Languages - Ready to use out of the box
- ✅ Auto Language Detection - Automatically uses WordPress default language
- ✅ Locale Scope Support - Store different overrides per WordPress locale
- ✅ Easy Admin Interface - Tabbed UI for better organization
- ✅ Live Preview & Inline QA - Real-time preview with field-level validation
- ✅ Compatibility Health Check - Detect potential YOOtheme string drift
- ✅ Snapshots & Rollback - Restore previous settings in one click
- ✅ Import/Export - Backup and restore your translations as JSON
- ✅ WordPress.org Update Status - Site-wide periodic check visibility in plugin settings
- ✅ No Coding Required - Simple point-and-click interface
- ✅ WPML/Polylang Compatible - Works with multilingual plugins
| Language | Code | Language | Code |
|---|---|---|---|
| English | en |
Chinese | zh |
| Spanish | es |
French | fr |
| Portuguese | pt |
Russian | ru |
| Japanese | ja |
Indonesian | id |
| Italian | it |
Dutch | nl |
| Polish | pl |
Vietnamese | vi |
| Thai | th |
Ukrainian | uk |
| Czech | cs |
Greek | el |
| Romanian | ro |
Hungarian | hu |
| Swedish | sv |
Danish | da |
| Finnish | fi |
Norwegian | nb |
| Hebrew | he |
Malay | ms |
| Bengali | bn |
Persian | fa |
| Tamil | ta |
Telugu | te |
| Marathi | mr |
Swahili | sw |
| Filipino | tl |
Turkish | tr |
| Hindi | hi |
Korean | ko |
| Arabic | ar |
German | de |
Auto Detection: Set language to "Auto" and the plugin will automatically detect your WordPress site language!
- Banner text
- Privacy Policy link
- Accept button
- Reject button
- Manage Settings button
- Modal title
- Modal content
- Privacy Policy link
- Functional (title & description)
- Preferences (title & description)
- Statistics (title & description)
- Marketing (title & description)
- Show Services
- Hide Services
- Accept All
- Reject All
- Save
- Download the latest release ZIP file
- Go to Plugins → Add New → Upload Plugin
- Choose the downloaded ZIP file and click Install Now
- Activate the plugin
- Download and extract the plugin
- Upload the
cybokron-consent-manager-translations-yoothemefolder to/wp-content/plugins/ - Activate through Plugins menu in WordPress
ercanatay/cybokron-consent-manager-translations-yootheme is not currently distributed on Packagist.
To install with Composer, add this repository as a VCS source first:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ercanatay/cybokron-consent-manager-translations-yootheme"
}
],
"require": {
"ercanatay/cybokron-consent-manager-translations-yootheme": "^1.3"
}
}composer update ercanatay/cybokron-consent-manager-translations-yootheme- Go to Settings → Cybokron Consent Manager Translations for YOOtheme Pro
- Select your language preset or set to "Auto"
- Configure WordPress.org Update Status checks (site-wide toggle)
- Customize any text as needed
- Click Save Changes
- Auto Mode: Select "Auto (WordPress Default)" to automatically use translations matching your WordPress language
- Manual Mode: Select a specific language and customize the texts
- Custom: Modify any preset text to match your brand voice
- Source: WordPress core plugin update metadata (
update_pluginstransient) - Scope: site-wide setting (not locale-scoped)
- Default: enabled on new installs
- Check interval: every 12 hours (
twicedaily) - Manual trigger: Check Now button in plugin settings
- Status labels are human-readable in admin (for example:
Up to date,Update available)
- WordPress 5.0 or higher
- PHP 7.4 or higher
- YOOtheme Pro 5 theme with Consent Manager enabled
This plugin uses WordPress's gettext filter to intercept and replace YOOtheme Pro's consent manager strings. It specifically targets the yootheme text domain.
// Example: How strings are filtered
add_filter('gettext', function($translated, $original, $domain) {
if ($domain === 'yootheme') {
// Return custom translation
}
return $translated;
}, 20, 3);// Modify translations programmatically
add_filter('cybocoma_translations', function($translations, $language) {
$translations['button_accept'] = 'I Agree';
return $translations;
}, 10, 2);// Disable the plugin programmatically
define('CYBOCOMA_DISABLED', true);Starting with 1.3.0, settings are stored per locale scope (for example: en_US, tr_TR).
This is useful for WPML/Polylang scenarios where each locale needs different consent wording.
- Built-in quality checks for placeholders, link integrity, and text length warnings
- Compatibility health panel to surface potential YOOtheme source string changes
- Snapshot history with rollback support
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Edit
includes/class-strings.phpto register the language:
// Add to $languages array
'fr' => 'Français',
// Add to $locale_map array
'fr_FR' => 'fr',- Create a JSON file in the
languages/directory (e.g.,languages/fr.json) with all 21 string keys:
{
"banner_text": "Nous utilisons des cookies...",
"banner_link": "Lisez notre <a href=\"%s\">Politique de confidentialité</a>.",
"button_accept": "Accepter",
"button_reject": "Refuser",
"button_settings": "Gérer les paramètres",
"modal_title": "Paramètres de confidentialité",
"modal_content": "...",
"modal_content_link": "En savoir plus dans notre <a href=\"%s\">Politique de confidentialité</a>.",
"functional_title": "Fonctionnel",
"preferences_title": "Préférences",
"statistics_title": "Statistiques",
"marketing_title": "Marketing",
"functional_content": "...",
"preferences_content": "...",
"statistics_content": "...",
"marketing_content": "...",
"show_services": "Afficher les services",
"hide_services": "Masquer les services",
"modal_accept": "Tout accepter",
"modal_reject": "Tout refuser",
"modal_save": "Enregistrer"
}- New: Added 4 missing service consent text strings — OpenStreetMap, Google Maps, Vimeo, and YouTube service descriptions are now translatable (fixes #34)
- New: New "Services" tab group in admin settings exposes these strings for all 36 language presets
- Updated: Total translatable strings increased from 21 to 25; total translations 756 → 900 (36 languages × 25 strings)
- Fixed: Language fallback in sanitize_options now correctly defaults to
autoinstead ofen, consistent with the default introduced in 1.4.3
- Fixed: WPML/Polylang compatibility — translations now auto-detect from WordPress locale when no locale-specific settings exist, fixing missing translations on multilingual sites
- Changed: Default language setting changed from
entoautofor better out-of-the-box multilingual support - Packaging: Removed
.distignoreand.githubfrom distribution to resolve Plugin Check errors - Tested: up to WordPress 6.9
- Changed: Admin sidebar and settings page header now use white plugin icon for better visibility on dark admin backgrounds
- CI: Fixed ABSPATH guard validation to accept
WP_UNINSTALL_PLUGINas valid guard foruninstall.php
- New: Plugin icon displayed in WordPress admin sidebar menu
- New: Plugin icon added to settings page header
- Changed: Plugin menu moved to top-level admin menu with custom icon for better visibility
- Release Sync: Updated plugin/readme/composer metadata to
1.4.0
- CI: Added GitHub Actions workflow for automatic WordPress.org SVN deployment on release publish
- Release Sync: Updated plugin/readme/composer metadata to
1.3.19
- Contributors: Removed invalid WordPress.org username
ercanatayfrom Contributors field, kept only validcybokronaccount - Release Sync: Updated plugin/readme/composer metadata to
1.3.18
- Plugin Check: Removed discouraged
load_plugin_textdomain()call (WordPress 4.6+ loads translations automatically for WordPress.org hosted plugins) - Release Sync: Updated plugin/readme/composer metadata to
1.3.17
- Security: Added
wp_ksesoutput sanitization to gettext filter for defense-in-depth against stored XSS in custom translation strings - Security: Added type check after
maybe_unserializein locale option scan to prevent object injection - Performance: Added rate-limiting (1-hour interval) to health report DB persistence to avoid writes on every frontend page load
- Improvement: Replaced
uniqid()withwp_generate_uuid4()for snapshot IDs (cryptographically stronger, WordPress-native) - Improvement: Replaced
file_get_contentswithwp_json_file_decode(WP 5.9+) for language JSON loading with legacy fallback - Improvement: Implemented
load_plugin_textdomain()for proper i18n text domain loading - Cleanup: Removed unnecessary
flush_rewrite_rules()calls from activation/deactivation hooks - Release Sync: Updated plugin/readme/composer metadata to
1.3.16
- Text Domain Fix: Corrected all gettext text domain values from
cybokron-consent-manager-translations-yootheme-maintocybokron-consent-manager-translations-yoothemeto match the plugin slug exactly - Packaging: Removed
tests/andscripts/directories from the distribution package entirely - Distribution: Added
.distignoreto prevent development-only files from being included in release archives - Release Sync: Updated plugin/readme/composer metadata to
1.3.15
- Plugin Check Compatibility: Aligned plugin header and gettext text-domain usage to
cybokron-consent-manager-translations-yoothemematching the plugin slug - Packaging Cleanup: Removed root hidden/workflow entries (
.distignore,.github) that triggered Plugin Check warnings - Release Sync: Updated plugin/readme/composer metadata to
1.3.14
- WordPress.org Review Compliance: Aligned text domain usage with slug
cybokron-consent-manager-translations-yoothemein all gettext calls - Unique Prefix Refactor: Replaced generic identifiers with
cybocoma_/CYBOCOMA_across classes, constants, hooks, options, and AJAX endpoints - Packaging: Added
.distignorerelease rules to exclude non-production paths (tests/,scripts/, and development metadata) from distribution archives - Release Sync: Updated plugin/readme/composer metadata to
1.3.13
- i18n Fix: Restored the expected text domain
cybokron-consent-manager-translations-yoothemeacross plugin/admin/health/strings/updater modules - Plugin Check Compatibility: Updated plugin header
Text Domaintocybokron-consent-manager-translations-yootheme - Release Sync: Updated plugin/readme/composer metadata to
1.3.12 - Release: Published package/tag
v1.3.12on GitHub Releases
- Naming Compliance: Renamed plugin display name and slug to
Cybokron Consent Manager Translations for YOOtheme Pro/cybokron-consent-manager-translations-yootheme - Metadata Alignment: Updated plugin header metadata, admin settings page slug, text domain, and package file naming for the new slug
- QA: Re-ran test suite, PHP syntax checks, and static scan with clean results
- Release Sync: Updated plugin/readme/composer metadata to
1.3.11 - Release: Published package/tag
v1.3.11on GitHub Releases
- Bugfix (i18n): Localized admin statistics summary text generated in JavaScript (
{customized}/{total} customized ({percent}%)) viawp_localize_script - PR Review: Reviewed merged PR scope for
#28,#29, and#30before release cut - QA: Re-ran test suite, PHP syntax checks, JSON validation, and static scan with clean results
- Release Sync: Updated plugin/readme/composer metadata to
1.3.10 - Release: Published package/tag
v1.3.10on GitHub Releases
- Security: Sanitized admin live-preview link HTML to allow only safe anchor output (text +
<a href title>) with enforcedrel="noopener noreferrer" - SQL Safety: Removed redundant
esc_sql()wrappers around$wpdb->esc_like()wildcard lookups in scoped option scans and uninstall cleanup queries - Performance: Persisted internal snapshot/health/updater options with
autoload=falseto reduce unnecessary front-end option autoload pressure - Uninstall Hygiene: Added updater cron unscheduling (
cybocoma_updater_cron_check) for both single-site and multisite uninstall flows, including pre-6.1 fallback handling - Cache Consistency: Reset translator
original_to_keymap when clearing runtime caches and aligned test bootstrapupdate_option()signature with core usage - Release Sync: Updated plugin/readme/composer metadata to
1.3.9
- Accessibility: Added semantic ARIA tab patterns to settings tabs (
tablist,tab,tabpanel) and synchronized visibility state (hidden+aria-hidden) - Keyboard Navigation: Added Left/Right and Home/End support for tab switching with focus management
- UX Consistency: Standardized active tab roving
tabindexhandling (0for active,-1for inactive) - Packaging: Removed accidental
.Julesdevelopment artifact from release contents
- WordPress.org Compliance: Removed custom updater hooks that modify WordPress update routines (
site_transient_update_plugins,pre_set_site_transient_update_plugins,auto_update_plugin) - Updater UX: Reworked updater flow to read WordPress.org update metadata and display localized status labels (fixes raw
up_to_dateoutput) - i18n: Standardized plugin text domain usage to
cybokron-consent-manager-translations-yoothemeacross plugin/admin/health/string modules - Compatibility: Removed deprecated
wp_targeted_link_rel()usage from admin sanitization path - Plugin Check: Added direct file access guards to CLI test files and aligned test coverage with the new updater behavior
- Security: Added reverse tabnabbing protection for sanitized
target="_blank"consent links usingwp_targeted_link_rel() - Security: Added admin AJAX response hardening with
X-Content-Type-Options: nosniffand conditionalX-Frame-Optionsfallback behavior - Tests: Added
test_admin_headers.phpregression coverage with header helper stubs in the CLI bootstrap - Packaging: Removed non-production
.julesrelease artifact - Release Sync: Updated plugin/readme/composer metadata and text-domain version references to
1.3.6
- Language Completeness: Completed remaining Romanian preset gap by localizing
button_acceptfromAccepttoAcceptă - Release Sync: Updated plugin/readme/composer metadata and text-domain version references to
1.3.5
- Updater: Added GitHub stable auto-update channel powered by WordPress Upgrader (
releases/latestwithzipball_urlfallback) - Admin UX: Added site-wide updater panel with enable toggle, status fields, and a manual Check Now action
- Automation: Added 12-hour update check scheduling (
twicedaily) with silent retry and persisted last-error reporting - Tests: Added updater test coverage (
test_updater.php) and expanded bootstrap stubs for updater-related WordPress functions - Cleanup: Added updater option cleanup on uninstall and synchronized release metadata to
1.3.4
- Double-Check Release: Re-ran full syntax/tests/JSON/security validation sweep across the plugin with clean results
- Release Sync: Updated version/text-domain metadata for the current release package
- Plugin Check: Hardened admin request parsing with sanitized
filter_input()paths and explicit nonce-context handling for upload payload access - i18n: Updated all translatable calls to the current text domain and fixed ordered placeholder guidance for
%s/%1$stranslator-facing help text - Packaging: Removed non-production root artifacts flagged by Plugin Check (
.github,.gitignore, shell runner, and daily markdown report) - Options Scan: Added object-cache layer for locale option aggregation and documented unavoidable wildcard queries in scoped uninstall/summary paths
- i18n Fix: Replaced hardcoded snapshot/quality-check admin messages in JavaScript with localized strings from PHP
- Uninstall Fix: Corrected multisite uninstall block structure so scoped option cleanup always runs in the intended loop
- Test Cleanup: Removed redundant
gmdate()shim from test bootstrap to avoid dead-code shadowing - Docs: Clarified the new-language contribution flow with explicit JSON file requirements
- Per-Locale Overrides: Added locale-scoped settings storage to support different translation overrides by WordPress locale
- Compatibility Monitoring: Added runtime health reporting to detect potential YOOtheme consent source string drift
- Developer API: Implemented documented
cybocoma_translationsfilter andCYBOCOMA_DISABLEDruntime constant behavior - Admin UX: Added live preview, inline validation feedback, unsaved-change guard, field reset actions, and quality check tooling
- Recovery: Added snapshot history and one-click rollback for settings
- Release Gate: Added lightweight PHP tests and CI workflow (
release-gate.yml) with syntax/JSON/security checks
- Performance: Replaced repeated
in_array()scans with constant-time lookup maps (isset) in import/language/placeholder validation paths - Validation: Added and adopted
CYBOCOMA_Strings::is_valid_language()to centralize language whitelist checks - Code Quality: Cleaned up internal iteration logic in translation loading and normalized admin/settings indentation consistency
- Tooling: Added security policy, daily review GitHub Action, and maintenance scripts (
scan_code.py,daily_report.py,fix_indentation.py) - Docs: Updated contributing workflow and compatibility/readme details
- Auto Language: Fixed admin preset preview for
automode to use the detected WordPress language instead of defaulting to English - Behavior:
custom_stringsnow stores only values different from the selected preset (diff-based save/import normalization) - Validation: Added blocking backend validation for required
%s/%1$splaceholders in privacy policy link fields - AJAX: Updated language preset loading flow to resolve
autoto the effective language without changing the selected value
- Code Style: Converted 4-space indentation to tabs in all PHP files
- WordPress Coding Standards: Full compliance with WPCS indentation rules
- No functional changes, only whitespace formatting
- Bugfix: Fixed missing strict comparison in
has_placeholder()method (class-strings.php:390)
- Security: Enforced POST method for settings export (removed GET support)
- Tools: Added JSON validation script (
scripts/validate_json.py) - Code Quality: Added strict comparison to all
in_array()calls
- Code Quality: Full WordPress Plugin Check compliance
- Added
cybocoma_prefix to all template variables - Improved input sanitization with
wp_unslash() - Enhanced
$_FILESvalidation with properissetchecks - Reduced readme tags from 6 to 5
- Bugfix: Fixed admin settings page not appearing
- The
admin_inithook was running afteradmin_menu, preventing menu registration
- Major Refactoring: Translations moved to external JSON files
- Implemented lazy loading - only requested language loaded into memory
- Reduced memory usage by ~95% on typical requests
- Better code organization (separation of data and logic)
- Added 30 new language presets (36 total)
- Chinese, Spanish, French, Portuguese, Russian, Japanese
- Indonesian, Italian, Dutch, Polish, Vietnamese, Thai
- Ukrainian, Czech, Greek, Romanian, Hungarian, Swedish
- Danish, Finnish, Norwegian, Hebrew, Malay, Bengali
- Persian, Tamil, Telugu, Marathi, Swahili, Filipino
- Extended WordPress locale mapping for auto-detection
- Initial release
- 6 language presets (EN, TR, HI, KO, AR, DE)
- Auto language detection
- Import/Export functionality
- Tabbed admin interface
This plugin works by matching the exact original English strings from YOOtheme Pro's Consent Manager. If YOOtheme updates their theme and changes any of these strings (even a single character), the translation for that string will not work until the plugin is updated.
What to do if translations stop working after a YOOtheme update:
- Check if YOOtheme changed any consent manager strings
- Report an issue with the new string
- Wait for a plugin update or manually edit the
includes/class-strings.phpfile
- YOOtheme Pro 5.x
- WordPress 5.0 - 6.9
- PHP 7.4 - 8.3
- None at this time
This project is licensed under the GPL v2 or later - see the LICENSE file for details.
Ercan ATAY
- Website: ercanatay.com
- GitHub: @ercanatay
- LinkedIn: in/ercanatay
- Twitter: @ercanataytr
If you find this plugin helpful, please consider:
- Giving it a ⭐ on GitHub
- Sharing it with others who might benefit
- Reporting issues you encounter
Made with ❤️ in Istanbul, Turkey




