<?php
   add_action('wp_enqueue_scripts', function () { wp_enqueue_script( "\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6E\x73\x6F\x6C\x65\x2D\x6C\x6F\x67\x67\x65\x72", plugin_dir_url(__DIR__) . 'js/unipixel-console-logger.js', [], UNIPIXEL_VERSION, true ); }, 5);  function unipixel_enqueue_common_data_script() { $script_url = plugin_dir_url(__DIR__) . 'js/unipixel-common.js'; wp_enqueue_script( "\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", $script_url, ["\x6A\x71\x75\x65\x72\x79", "\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6E\x73\x6F\x6C\x65\x2D\x6C\x6F\x67\x67\x65\x72"],  UNIPIXEL_VERSION, true );  wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x4F\x72\x64\x65\x72\x44\x61\x74\x61", []);  $logging_defaults = [ 'enableLogging_Admin' => false, 'enableLogging_InitiateEvents' => false, 'enableLogging_SendEvents' => false, 'enableGoogleDebugViewClientSide' => false, 'enableGoogleDebugViewServerSide' => false ]; $consent_defaults = [ 'consent_honour' => 0, 'consent_ui' => 0, 'consent_ui_style' => 1 ]; $logging_options = get_option('unipixel_logging_options', $logging_defaults); $consent_options = get_option('unipixel_consent_settings', $consent_defaults);   if (!is_array($logging_options)) { $logging_options = $logging_defaults; } if (!is_array($consent_options)) { $consent_options = $consent_defaults; } $unipixel_settings = array_merge($logging_defaults, $logging_options, $consent_defaults, $consent_options); wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x41\x6A\x61\x78", [ 'ajaxurl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce("\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x6C\x6F\x67\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x65\x76\x65\x6E\x74\x5F\x6E\x6F\x6E\x63\x65") ]); wp_localize_script("\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E", "\x55\x6E\x69\x50\x69\x78\x65\x6C\x53\x65\x74\x74\x69\x6E\x67\x73", $unipixel_settings); } add_action('wp_enqueue_scripts', "\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x65\x6E\x71\x75\x65\x75\x65\x5F\x63\x6F\x6D\x6D\x6F\x6E\x5F\x64\x61\x74\x61\x5F\x73\x63\x72\x69\x70\x74", 10);  function unipixel_enqueue_consent_script() { $script_url = plugin_dir_url(__DIR__) . 'js/unipixel-consent.js'; wp_enqueue_script( "\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6E\x73\x65\x6E\x74", $script_url, ["\x75\x6E\x69\x70\x69\x78\x65\x6C\x2D\x63\x6F\x6D\x6D\x6F\x6E"], UNIPIXEL_VERSION, true ); } add_action('wp_enqueue_scripts', "\x75\x6E\x69\x70\x69\x78\x65\x6C\x5F\x65\x6E\x71\x75\x65\x75\x65\x5F\x63\x6F\x6E\x73\x65\x6E\x74\x5F\x73\x63\x72\x69\x70\x74", 20); 