HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ns3133907 6.8.0-86-generic #87-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 18:03:36 UTC 2025 x86_64
User: cssnetorguk (1024)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //home/pbyh.co.uk/public_html/wp-content/plugins/complianz-gdpr/integrations/plugins/qtranslate.php
<?php defined( 'ABSPATH' ) or die();
/**
 * Make options translatable in qtranslate
 * @param array $options
 *
 * @return array
 */
function cmplz_qtranslatex_options($options){
	$keys = array(
		'header',
		'accept_optin',
		'accept_optout',
		'manage_consent',
		'manage_options',
		'save_settings',
		'dismiss',
		'message_optout',
		'message_optin',
		'category_functional',
		'category_preferences',
		'category_statistics',
		'functional_text',
		'statistics_text',
		'statistics_text_anonymous',
		'preferences_text',
		'marketing_text',
		'category_marketing',
	);

	foreach($keys as $key){
		if ( isset($options[$key]['text']) && is_string($options[$key]['text']) ){
			$options[$key]['text'] = __($options[$key]['text']);
		} else if ( isset($options[$key]) && is_string($options[$key]) ) {
			$options[$key] = __($options[$key]);
		}
	}
	return $options;
}
add_filter('cmplz_cookiebanner_settings_html','cmplz_qtranslatex_options',10,1);