Changeset 2922465
- Timestamp:
- 06/06/2023 04:14:56 PM (3 years ago)
- Location:
- termageddon-usercentrics
- Files:
-
- 7 edited
- 19 copied
-
tags/1.3.3 (copied) (copied from termageddon-usercentrics/trunk)
-
tags/1.3.3/README.txt (copied) (copied from termageddon-usercentrics/trunk/README.txt) (2 diffs)
-
tags/1.3.3/admin/class-termageddon-usercentrics-admin.php (copied) (copied from termageddon-usercentrics/trunk/admin/class-termageddon-usercentrics-admin.php) (4 diffs)
-
tags/1.3.3/admin/css/termageddon-usercentrics-admin.css (copied) (copied from termageddon-usercentrics/trunk/admin/css/termageddon-usercentrics-admin.css) (1 diff)
-
tags/1.3.3/admin/css/termageddon-usercentrics-admin.min.css (copied) (copied from termageddon-usercentrics/trunk/admin/css/termageddon-usercentrics-admin.min.css) (1 diff)
-
tags/1.3.3/admin/js (copied) (copied from termageddon-usercentrics/trunk/admin/js)
-
tags/1.3.3/admin/js/termageddon-usercentrics-admin.js (copied) (copied from termageddon-usercentrics/trunk/admin/js/termageddon-usercentrics-admin.js)
-
tags/1.3.3/admin/js/termageddon-usercentrics-admin.min.js (copied) (copied from termageddon-usercentrics/trunk/admin/js/termageddon-usercentrics-admin.min.js)
-
tags/1.3.3/includes/class-termageddon-usercentrics-activator.php (copied) (copied from termageddon-usercentrics/trunk/includes/class-termageddon-usercentrics-activator.php)
-
tags/1.3.3/includes/class-termageddon-usercentrics-deactivator.php (copied) (copied from termageddon-usercentrics/trunk/includes/class-termageddon-usercentrics-deactivator.php)
-
tags/1.3.3/includes/class-termageddon-usercentrics.php (copied) (copied from termageddon-usercentrics/trunk/includes/class-termageddon-usercentrics.php) (2 diffs)
-
tags/1.3.3/languages/termageddon-usercentrics-en_US.po (copied) (copied from termageddon-usercentrics/trunk/languages/termageddon-usercentrics-en_US.po)
-
tags/1.3.3/languages/termageddon-usercentrics.pot (copied) (copied from termageddon-usercentrics/trunk/languages/termageddon-usercentrics.pot)
-
tags/1.3.3/public/class-termageddon-usercentrics-public.php (copied) (copied from termageddon-usercentrics/trunk/public/class-termageddon-usercentrics-public.php) (1 diff)
-
tags/1.3.3/public/js (copied) (copied from termageddon-usercentrics/trunk/public/js)
-
tags/1.3.3/public/js/termageddon-usercentrics-ajax.js (copied) (copied from termageddon-usercentrics/trunk/public/js/termageddon-usercentrics-ajax.js)
-
tags/1.3.3/public/js/termageddon-usercentrics-ajax.min.js (copied) (copied from termageddon-usercentrics/trunk/public/js/termageddon-usercentrics-ajax.min.js)
-
tags/1.3.3/termageddon-usercentrics.code-workspace (copied) (copied from termageddon-usercentrics/trunk/termageddon-usercentrics.code-workspace)
-
tags/1.3.3/termageddon-usercentrics.php (copied) (copied from termageddon-usercentrics/trunk/termageddon-usercentrics.php) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/admin/class-termageddon-usercentrics-admin.php (modified) (4 diffs)
-
trunk/admin/css/termageddon-usercentrics-admin.css (modified) (1 diff)
-
trunk/admin/css/termageddon-usercentrics-admin.min.css (modified) (1 diff)
-
trunk/includes/class-termageddon-usercentrics.php (modified) (2 diffs)
-
trunk/public/class-termageddon-usercentrics-public.php (modified) (1 diff)
-
trunk/termageddon-usercentrics.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
termageddon-usercentrics/tags/1.3.3/README.txt
r2891339 r2922465 4 4 Tags: termageddon, cookie, consent, embed 5 5 Requires at least: 3.0.1 6 Tested up to: 6.2 7 Stable tag: 1.3. 26 Tested up to: 6.2.2 7 Stable tag: 1.3.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 27 27 == Changelog == 28 29 = 1.3.3 = 30 31 - [ADD] Added integration to improve support with Presto Player. 28 32 29 33 = 1.3.2 = -
termageddon-usercentrics/tags/1.3.3/admin/class-termageddon-usercentrics-admin.php
r2890756 r2922465 220 220 221 221 222 /** Build the default arguments for the current section 223 * 224 * @param mixed $tab The tab you are setting up; For use with identifying current tab and hiding/showing the tab. 225 * @return string[] 226 */ 227 public function add_new_subsection( string $section, array $options=[]) { 228 229 $name = (isset($options['name']) ? $options['name'] : false); 230 $description = (isset($options['description']) ? $options['description'] : false); 231 $indent = (isset($options['indent']) ? $options['indent'] === true : false); 232 $slim = (isset($options['slim']) ? $options['slim'] === true : false); 233 234 add_settings_field( 235 'termageddon_usercentrics_end-section-'.Termageddon_Usercentrics::generate_random_string(5), 236 ' </th></tr></tbody></table> 237 </div> 238 <div class="tu-toggle-section"> 239 <span class="tu-section-title">' . esc_html__( $name , 'termageddon-usercentrics') . ':</span> 240 '.(empty($description) ? '' : '<p>' . esc_html__( $description, 'termageddon-usercentrics' ) . '</p>').' 241 </div> 242 <div class="'.($indent ? 'tu-toggle-section' : 'tu-settings-section').($slim ? ' slim-section' : '').'"> 243 <table class="form-table" role="presentation"> 244 <tbody> 245 <tr style="display: none"> 246 <th scope="row">', 247 function() {}, // function which prints the field. 248 'termageddon-usercentrics', // page slug. 249 $section, // section ID. 250 array() 251 ); 252 } 253 254 255 public static function mark_as_beta() { 256 return ' <span class="tu-label-warning">BETA</span>'; 257 } 258 259 222 260 /** 223 261 * Buildout all settings sections in prep for registering the settings. … … 338 376 'termageddon_usercentrics_settings', // settings group name. 339 377 'termageddon_usercentrics_disable_logged_in', // option name. 378 '' // sanitization function. 379 ); 380 381 // BREAK SECTION FOR GEOLOCATION SETTINGS 382 $this->add_new_subsection('termageddon_usercentrics_section_settings', [ 383 'name' => 'Integrations', 384 'description' => 'We love to partner with other plugin developers to improve support with their plugins. If you encounter an issue, please contact our support to let us know.', 385 ]); 386 387 // Disable Login. 388 add_settings_field( 389 'termageddon_usercentrics_integration_presto_player', 390 __( 'Presto Player', 'termageddon-usercentrics' ).$this->mark_as_beta(), 391 array( &$this, 'presto_player_support' ), // function which prints the field. 392 'termageddon-usercentrics', // page slug. 393 'termageddon_usercentrics_section_settings', // section ID. 394 array( 395 'label_for' => 'termageddon_usercentrics_integration_presto_player', 396 ) 397 ); 398 399 register_setting( 400 'termageddon_usercentrics_settings', // settings group name. 401 'termageddon_usercentrics_integration_presto_player', // option name. 340 402 '' // sanitization function. 341 403 ); … … 454 516 ); 455 517 456 // Enable Geolocation AJAX Mode. 457 add_settings_field( 458 'termageddon_usercentrics_location_spacer', 459 ' </th></tr></tbody></table> 460 </div> 461 <div class="tu-toggle-section"> 462 <span class="tu-section-title">' . esc_html__( 'Geo-Location Settings' ) . ':</span> 463 <p>' . esc_html__( 'If you are experiencing issues or unexpected behavior, toggle the "Enable Location Logging" option. Please contact our support if you have any questions.', 'termageddon-usercentrics' ) . '</p> 464 </div> 465 <div class="tu-settings-section"> 466 <table class="form-table" role="presentation"> 467 <tbody> 468 <tr style="display: none"> 469 <th scope="row">', 470 function() {}, // function which prints the field. 471 'termageddon-usercentrics', // page slug. 472 'termageddon_usercentrics_section_geolocation', // section ID. 473 array() 474 ); 518 // BREAK SECTION FOR GEOLOCATION SETTINGS 519 $this->add_new_subsection('termageddon_usercentrics_section_geolocation', [ 520 'name' => 'Geo-Location Settings', 521 'description' => 'If you are experiencing issues or unexpected behavior, toggle the "Enable Location Logging" option. Please contact our support if you have any questions.', 522 ]); 475 523 476 524 // Enable Geolocation Debug Mode. … … 654 702 self::generate_checkbox( 'admin', 'disable', $args ); 655 703 } 704 705 /** 706 * The HTML field for the admin disable checkbox. 707 * 708 * @param array $args The arguments provided by the add_settings_field() method. 709 * @return void 710 */ 711 public function presto_player_support( array $args ) { 712 $args['label'] = 'enabled'; 713 self::generate_checkbox( 'presto_player', 'integration', $args ); 714 } 656 715 657 716 /** -
termageddon-usercentrics/tags/1.3.3/admin/css/termageddon-usercentrics-admin.css
r2834137 r2922465 49 49 .tu-section-hidden { 50 50 display: none; 51 } 52 .tu-label-warning { 53 background-color: orange; 54 color: white; 55 padding: 3px 5px; 56 border-radius: 5px; 57 font-size: 60%; 51 58 } 52 59 /** -
termageddon-usercentrics/tags/1.3.3/admin/css/termageddon-usercentrics-admin.min.css
r2834137 r2922465 1 textarea.termageddon-embed-code{width:100%;height:250px}.tu-section-settings,.tu-toggle-section{margin-top:2rem}.tu-toggle-section .tu-section-title{font-size:125%;font-weight:800}.tu-toggle-section .tu-section-title-helper{padding:1rem;color:#6c6c6c;font-style:italic}.tu-toggle-section input[readonly]{opacity:50%;pointer-events:none}.tu-toggle-section .form-table{margin-left:2rem}.tu-toggle-section .form-table td,.tu-toggle-section .form-table th{padding:.5rem 0}.tu-toggle-section.slim-section .form-table th{width:125px}.tu-settings-section .form-table th{width:300px}.tu-section-hidden{display:none} input[type=checkbox].wppd-ui-toggle{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;width:auto;height:auto;vertical-align:middle;position:relative;border:0;outline:0;cursor:pointer;margin:0 4px;background:0 0;box-shadow:none}input[type=checkbox].wppd-ui-toggle:focus{box-shadow:none}input[type=checkbox].wppd-ui-toggle:after{content:"";font-size:6px;font-weight:400;line-height:18px;text-indent:-14px;color:#fff;width:36px;height:18px;display:inline-block;background-color:#a7aaad;border-radius:72px;box-shadow:0 0 12px rgb(0 0 0 / 15%) inset}input[type=checkbox].wppd-ui-toggle:before{content:"";width:14px;height:14px;display:block;position:absolute;top:2px;left:2px;margin:0;border-radius:50%;background-color:#fff}input[type=checkbox].wppd-ui-toggle:checked:before{left:20px;margin:0;background-color:#fff}input[type=checkbox].wppd-ui-toggle,input[type=checkbox].wppd-ui-toggle:after,input[type=checkbox].wppd-ui-toggle:before,input[type=checkbox].wppd-ui-toggle:checked:after,input[type=checkbox].wppd-ui-toggle:checked:before{transition:ease .15s}input[type=checkbox].wppd-ui-toggle:checked:after{content:"ON";background-color:#2271b1}input[type=checkbox].wppd-ui-toggle.label-hidden:after{width:48px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:before{left:32px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:after{content:"HIDDEN"}input[type=checkbox].wppd-ui-toggle.label-enabled:after{font-size:8px;width:60px;content:"DISABLED";text-indent:15px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:before{left:44px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:after{background-color:#1ed14b;content:"ENABLED";text-indent:-14px}1 textarea.termageddon-embed-code{width:100%;height:250px}.tu-section-settings,.tu-toggle-section{margin-top:2rem}.tu-toggle-section .tu-section-title{font-size:125%;font-weight:800}.tu-toggle-section .tu-section-title-helper{padding:1rem;color:#6c6c6c;font-style:italic}.tu-toggle-section input[readonly]{opacity:50%;pointer-events:none}.tu-toggle-section .form-table{margin-left:2rem}.tu-toggle-section .form-table td,.tu-toggle-section .form-table th{padding:.5rem 0}.tu-toggle-section.slim-section .form-table th{width:125px}.tu-settings-section .form-table th{width:300px}.tu-section-hidden{display:none}.tu-label-warning{background-color:orange;color:#fff;padding:3px 5px;border-radius:5px;font-size:60%}input[type=checkbox].wppd-ui-toggle{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;width:auto;height:auto;vertical-align:middle;position:relative;border:0;outline:0;cursor:pointer;margin:0 4px;background:0 0;box-shadow:none}input[type=checkbox].wppd-ui-toggle:focus{box-shadow:none}input[type=checkbox].wppd-ui-toggle:after{content:"";font-size:6px;font-weight:400;line-height:18px;text-indent:-14px;color:#fff;width:36px;height:18px;display:inline-block;background-color:#a7aaad;border-radius:72px;box-shadow:0 0 12px rgb(0 0 0 / 15%) inset}input[type=checkbox].wppd-ui-toggle:before{content:"";width:14px;height:14px;display:block;position:absolute;top:2px;left:2px;margin:0;border-radius:50%;background-color:#fff}input[type=checkbox].wppd-ui-toggle:checked:before{left:20px;margin:0;background-color:#fff}input[type=checkbox].wppd-ui-toggle,input[type=checkbox].wppd-ui-toggle:after,input[type=checkbox].wppd-ui-toggle:before,input[type=checkbox].wppd-ui-toggle:checked:after,input[type=checkbox].wppd-ui-toggle:checked:before{transition:ease .15s}input[type=checkbox].wppd-ui-toggle:checked:after{content:"ON";background-color:#2271b1}input[type=checkbox].wppd-ui-toggle.label-hidden:after{width:48px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:before{left:32px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:after{content:"HIDDEN"}input[type=checkbox].wppd-ui-toggle.label-enabled:after{font-size:8px;width:60px;content:"DISABLED";text-indent:15px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:before{left:44px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:after{background-color:#1ed14b;content:"ENABLED";text-indent:-14px} -
termageddon-usercentrics/tags/1.3.3/includes/class-termageddon-usercentrics.php
r2890756 r2922465 312 312 return $execution_time; 313 313 } 314 315 316 /** 317 * Generate a random string with specified paramaters 318 * 319 * @param int $length The length of string to generate. 320 * @param array $options The various options to pass in. 'type' is a valid option. 321 * @return string $randomString - The randomized string 322 */ 323 public static function generate_random_string(int $length=10, array $options=[]) { 324 $type = (isset($options['type']) ? $options['type'] : null); 325 switch (strtolower($type)) { 326 case 'letters': 327 $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 328 break; 329 case 'numbers': 330 $characters = '0123456789'; 331 break; 332 default: 333 $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 334 break; 335 } 336 337 //Generate String 338 $charactersLength = strlen($characters); 339 $randomString = ''; 340 for ($i = 0; $i < $length; $i++) { 341 $randomString .= $characters[rand(0, $charactersLength - 1)]; 342 } 343 344 return $randomString; 345 346 } 347 314 348 315 349 … … 827 861 $show_in_virginia = get_option( 'termageddon_usercentrics_show_in_virginia', false ) ? true : false; 828 862 return ( $show_in_eu || $show_in_uk || $show_in_canada || $show_in_california || $show_in_virginia ); 863 } 864 865 /** Identifies if any geoip location is enabled. 866 * 867 * @return bool 868 */ 869 public static function is_integration_enabled( string $int ) { 870 return get_option( 'termageddon_usercentrics_integration_'.$int, false ) ? true : false; 829 871 } 830 872 -
termageddon-usercentrics/tags/1.3.3/public/class-termageddon-usercentrics-public.php
r2890756 r2922465 195 195 </script>'; 196 196 } 197 198 // Presto Player Integration Javascript. 199 if ( Termageddon_Usercentrics::is_integration_enabled('presto_player') ) { 200 $script .= '<script type="application/javascript" id="uc-integration-presto-player"> 201 function uc_integration_setup(iID,service) { 202 uc.blockElements({[iID] : \'figure.presto-block-video.presto-provider-\'+service}); 203 uc.reloadOnOptIn(iID); 204 uc.reloadOnOptOut(iID); 205 } 206 uc_integration_setup("BJz7qNsdj-7","youtube"); // Youtube 207 uc_integration_setup("HyEX5Nidi-m","vimeo"); // Vimeo 208 </script>'; 209 } 197 210 198 211 // Output to HTML HEAD. -
termageddon-usercentrics/tags/1.3.3/termageddon-usercentrics.php
r2890756 r2922465 15 15 * Plugin Name: Termageddon + Usercentrics 16 16 * Description: Easily integrate the Usercentrics consent solution into your website while controlling visibility for logged in users and admins. 17 * Version: 1.3. 217 * Version: 1.3.3 18 18 * Author: Termageddon 19 19 * Author URI: https://termageddon.com … … 34 34 * Rename this for your plugin and update it as you release new versions. 35 35 */ 36 define( 'TERMAGEDDON_COOKIE_VERSION', '1.3. 2' );36 define( 'TERMAGEDDON_COOKIE_VERSION', '1.3.3' ); 37 37 38 38 define( 'TERMAGEDDON_COOKIE_PLUGIN_PATH', dirname( __FILE__ ) );// No trailing slash. -
termageddon-usercentrics/trunk/README.txt
r2891339 r2922465 4 4 Tags: termageddon, cookie, consent, embed 5 5 Requires at least: 3.0.1 6 Tested up to: 6.2 7 Stable tag: 1.3. 26 Tested up to: 6.2.2 7 Stable tag: 1.3.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 27 27 == Changelog == 28 29 = 1.3.3 = 30 31 - [ADD] Added integration to improve support with Presto Player. 28 32 29 33 = 1.3.2 = -
termageddon-usercentrics/trunk/admin/class-termageddon-usercentrics-admin.php
r2890756 r2922465 220 220 221 221 222 /** Build the default arguments for the current section 223 * 224 * @param mixed $tab The tab you are setting up; For use with identifying current tab and hiding/showing the tab. 225 * @return string[] 226 */ 227 public function add_new_subsection( string $section, array $options=[]) { 228 229 $name = (isset($options['name']) ? $options['name'] : false); 230 $description = (isset($options['description']) ? $options['description'] : false); 231 $indent = (isset($options['indent']) ? $options['indent'] === true : false); 232 $slim = (isset($options['slim']) ? $options['slim'] === true : false); 233 234 add_settings_field( 235 'termageddon_usercentrics_end-section-'.Termageddon_Usercentrics::generate_random_string(5), 236 ' </th></tr></tbody></table> 237 </div> 238 <div class="tu-toggle-section"> 239 <span class="tu-section-title">' . esc_html__( $name , 'termageddon-usercentrics') . ':</span> 240 '.(empty($description) ? '' : '<p>' . esc_html__( $description, 'termageddon-usercentrics' ) . '</p>').' 241 </div> 242 <div class="'.($indent ? 'tu-toggle-section' : 'tu-settings-section').($slim ? ' slim-section' : '').'"> 243 <table class="form-table" role="presentation"> 244 <tbody> 245 <tr style="display: none"> 246 <th scope="row">', 247 function() {}, // function which prints the field. 248 'termageddon-usercentrics', // page slug. 249 $section, // section ID. 250 array() 251 ); 252 } 253 254 255 public static function mark_as_beta() { 256 return ' <span class="tu-label-warning">BETA</span>'; 257 } 258 259 222 260 /** 223 261 * Buildout all settings sections in prep for registering the settings. … … 338 376 'termageddon_usercentrics_settings', // settings group name. 339 377 'termageddon_usercentrics_disable_logged_in', // option name. 378 '' // sanitization function. 379 ); 380 381 // BREAK SECTION FOR GEOLOCATION SETTINGS 382 $this->add_new_subsection('termageddon_usercentrics_section_settings', [ 383 'name' => 'Integrations', 384 'description' => 'We love to partner with other plugin developers to improve support with their plugins. If you encounter an issue, please contact our support to let us know.', 385 ]); 386 387 // Disable Login. 388 add_settings_field( 389 'termageddon_usercentrics_integration_presto_player', 390 __( 'Presto Player', 'termageddon-usercentrics' ).$this->mark_as_beta(), 391 array( &$this, 'presto_player_support' ), // function which prints the field. 392 'termageddon-usercentrics', // page slug. 393 'termageddon_usercentrics_section_settings', // section ID. 394 array( 395 'label_for' => 'termageddon_usercentrics_integration_presto_player', 396 ) 397 ); 398 399 register_setting( 400 'termageddon_usercentrics_settings', // settings group name. 401 'termageddon_usercentrics_integration_presto_player', // option name. 340 402 '' // sanitization function. 341 403 ); … … 454 516 ); 455 517 456 // Enable Geolocation AJAX Mode. 457 add_settings_field( 458 'termageddon_usercentrics_location_spacer', 459 ' </th></tr></tbody></table> 460 </div> 461 <div class="tu-toggle-section"> 462 <span class="tu-section-title">' . esc_html__( 'Geo-Location Settings' ) . ':</span> 463 <p>' . esc_html__( 'If you are experiencing issues or unexpected behavior, toggle the "Enable Location Logging" option. Please contact our support if you have any questions.', 'termageddon-usercentrics' ) . '</p> 464 </div> 465 <div class="tu-settings-section"> 466 <table class="form-table" role="presentation"> 467 <tbody> 468 <tr style="display: none"> 469 <th scope="row">', 470 function() {}, // function which prints the field. 471 'termageddon-usercentrics', // page slug. 472 'termageddon_usercentrics_section_geolocation', // section ID. 473 array() 474 ); 518 // BREAK SECTION FOR GEOLOCATION SETTINGS 519 $this->add_new_subsection('termageddon_usercentrics_section_geolocation', [ 520 'name' => 'Geo-Location Settings', 521 'description' => 'If you are experiencing issues or unexpected behavior, toggle the "Enable Location Logging" option. Please contact our support if you have any questions.', 522 ]); 475 523 476 524 // Enable Geolocation Debug Mode. … … 654 702 self::generate_checkbox( 'admin', 'disable', $args ); 655 703 } 704 705 /** 706 * The HTML field for the admin disable checkbox. 707 * 708 * @param array $args The arguments provided by the add_settings_field() method. 709 * @return void 710 */ 711 public function presto_player_support( array $args ) { 712 $args['label'] = 'enabled'; 713 self::generate_checkbox( 'presto_player', 'integration', $args ); 714 } 656 715 657 716 /** -
termageddon-usercentrics/trunk/admin/css/termageddon-usercentrics-admin.css
r2834137 r2922465 49 49 .tu-section-hidden { 50 50 display: none; 51 } 52 .tu-label-warning { 53 background-color: orange; 54 color: white; 55 padding: 3px 5px; 56 border-radius: 5px; 57 font-size: 60%; 51 58 } 52 59 /** -
termageddon-usercentrics/trunk/admin/css/termageddon-usercentrics-admin.min.css
r2834137 r2922465 1 textarea.termageddon-embed-code{width:100%;height:250px}.tu-section-settings,.tu-toggle-section{margin-top:2rem}.tu-toggle-section .tu-section-title{font-size:125%;font-weight:800}.tu-toggle-section .tu-section-title-helper{padding:1rem;color:#6c6c6c;font-style:italic}.tu-toggle-section input[readonly]{opacity:50%;pointer-events:none}.tu-toggle-section .form-table{margin-left:2rem}.tu-toggle-section .form-table td,.tu-toggle-section .form-table th{padding:.5rem 0}.tu-toggle-section.slim-section .form-table th{width:125px}.tu-settings-section .form-table th{width:300px}.tu-section-hidden{display:none} input[type=checkbox].wppd-ui-toggle{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;width:auto;height:auto;vertical-align:middle;position:relative;border:0;outline:0;cursor:pointer;margin:0 4px;background:0 0;box-shadow:none}input[type=checkbox].wppd-ui-toggle:focus{box-shadow:none}input[type=checkbox].wppd-ui-toggle:after{content:"";font-size:6px;font-weight:400;line-height:18px;text-indent:-14px;color:#fff;width:36px;height:18px;display:inline-block;background-color:#a7aaad;border-radius:72px;box-shadow:0 0 12px rgb(0 0 0 / 15%) inset}input[type=checkbox].wppd-ui-toggle:before{content:"";width:14px;height:14px;display:block;position:absolute;top:2px;left:2px;margin:0;border-radius:50%;background-color:#fff}input[type=checkbox].wppd-ui-toggle:checked:before{left:20px;margin:0;background-color:#fff}input[type=checkbox].wppd-ui-toggle,input[type=checkbox].wppd-ui-toggle:after,input[type=checkbox].wppd-ui-toggle:before,input[type=checkbox].wppd-ui-toggle:checked:after,input[type=checkbox].wppd-ui-toggle:checked:before{transition:ease .15s}input[type=checkbox].wppd-ui-toggle:checked:after{content:"ON";background-color:#2271b1}input[type=checkbox].wppd-ui-toggle.label-hidden:after{width:48px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:before{left:32px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:after{content:"HIDDEN"}input[type=checkbox].wppd-ui-toggle.label-enabled:after{font-size:8px;width:60px;content:"DISABLED";text-indent:15px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:before{left:44px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:after{background-color:#1ed14b;content:"ENABLED";text-indent:-14px}1 textarea.termageddon-embed-code{width:100%;height:250px}.tu-section-settings,.tu-toggle-section{margin-top:2rem}.tu-toggle-section .tu-section-title{font-size:125%;font-weight:800}.tu-toggle-section .tu-section-title-helper{padding:1rem;color:#6c6c6c;font-style:italic}.tu-toggle-section input[readonly]{opacity:50%;pointer-events:none}.tu-toggle-section .form-table{margin-left:2rem}.tu-toggle-section .form-table td,.tu-toggle-section .form-table th{padding:.5rem 0}.tu-toggle-section.slim-section .form-table th{width:125px}.tu-settings-section .form-table th{width:300px}.tu-section-hidden{display:none}.tu-label-warning{background-color:orange;color:#fff;padding:3px 5px;border-radius:5px;font-size:60%}input[type=checkbox].wppd-ui-toggle{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;width:auto;height:auto;vertical-align:middle;position:relative;border:0;outline:0;cursor:pointer;margin:0 4px;background:0 0;box-shadow:none}input[type=checkbox].wppd-ui-toggle:focus{box-shadow:none}input[type=checkbox].wppd-ui-toggle:after{content:"";font-size:6px;font-weight:400;line-height:18px;text-indent:-14px;color:#fff;width:36px;height:18px;display:inline-block;background-color:#a7aaad;border-radius:72px;box-shadow:0 0 12px rgb(0 0 0 / 15%) inset}input[type=checkbox].wppd-ui-toggle:before{content:"";width:14px;height:14px;display:block;position:absolute;top:2px;left:2px;margin:0;border-radius:50%;background-color:#fff}input[type=checkbox].wppd-ui-toggle:checked:before{left:20px;margin:0;background-color:#fff}input[type=checkbox].wppd-ui-toggle,input[type=checkbox].wppd-ui-toggle:after,input[type=checkbox].wppd-ui-toggle:before,input[type=checkbox].wppd-ui-toggle:checked:after,input[type=checkbox].wppd-ui-toggle:checked:before{transition:ease .15s}input[type=checkbox].wppd-ui-toggle:checked:after{content:"ON";background-color:#2271b1}input[type=checkbox].wppd-ui-toggle.label-hidden:after{width:48px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:before{left:32px}input[type=checkbox].wppd-ui-toggle.label-hidden:checked:after{content:"HIDDEN"}input[type=checkbox].wppd-ui-toggle.label-enabled:after{font-size:8px;width:60px;content:"DISABLED";text-indent:15px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:before{left:44px}input[type=checkbox].wppd-ui-toggle.label-enabled:checked:after{background-color:#1ed14b;content:"ENABLED";text-indent:-14px} -
termageddon-usercentrics/trunk/includes/class-termageddon-usercentrics.php
r2890756 r2922465 312 312 return $execution_time; 313 313 } 314 315 316 /** 317 * Generate a random string with specified paramaters 318 * 319 * @param int $length The length of string to generate. 320 * @param array $options The various options to pass in. 'type' is a valid option. 321 * @return string $randomString - The randomized string 322 */ 323 public static function generate_random_string(int $length=10, array $options=[]) { 324 $type = (isset($options['type']) ? $options['type'] : null); 325 switch (strtolower($type)) { 326 case 'letters': 327 $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 328 break; 329 case 'numbers': 330 $characters = '0123456789'; 331 break; 332 default: 333 $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 334 break; 335 } 336 337 //Generate String 338 $charactersLength = strlen($characters); 339 $randomString = ''; 340 for ($i = 0; $i < $length; $i++) { 341 $randomString .= $characters[rand(0, $charactersLength - 1)]; 342 } 343 344 return $randomString; 345 346 } 347 314 348 315 349 … … 827 861 $show_in_virginia = get_option( 'termageddon_usercentrics_show_in_virginia', false ) ? true : false; 828 862 return ( $show_in_eu || $show_in_uk || $show_in_canada || $show_in_california || $show_in_virginia ); 863 } 864 865 /** Identifies if any geoip location is enabled. 866 * 867 * @return bool 868 */ 869 public static function is_integration_enabled( string $int ) { 870 return get_option( 'termageddon_usercentrics_integration_'.$int, false ) ? true : false; 829 871 } 830 872 -
termageddon-usercentrics/trunk/public/class-termageddon-usercentrics-public.php
r2890756 r2922465 195 195 </script>'; 196 196 } 197 198 // Presto Player Integration Javascript. 199 if ( Termageddon_Usercentrics::is_integration_enabled('presto_player') ) { 200 $script .= '<script type="application/javascript" id="uc-integration-presto-player"> 201 function uc_integration_setup(iID,service) { 202 uc.blockElements({[iID] : \'figure.presto-block-video.presto-provider-\'+service}); 203 uc.reloadOnOptIn(iID); 204 uc.reloadOnOptOut(iID); 205 } 206 uc_integration_setup("BJz7qNsdj-7","youtube"); // Youtube 207 uc_integration_setup("HyEX5Nidi-m","vimeo"); // Vimeo 208 </script>'; 209 } 197 210 198 211 // Output to HTML HEAD. -
termageddon-usercentrics/trunk/termageddon-usercentrics.php
r2890756 r2922465 15 15 * Plugin Name: Termageddon + Usercentrics 16 16 * Description: Easily integrate the Usercentrics consent solution into your website while controlling visibility for logged in users and admins. 17 * Version: 1.3. 217 * Version: 1.3.3 18 18 * Author: Termageddon 19 19 * Author URI: https://termageddon.com … … 34 34 * Rename this for your plugin and update it as you release new versions. 35 35 */ 36 define( 'TERMAGEDDON_COOKIE_VERSION', '1.3. 2' );36 define( 'TERMAGEDDON_COOKIE_VERSION', '1.3.3' ); 37 37 38 38 define( 'TERMAGEDDON_COOKIE_PLUGIN_PATH', dirname( __FILE__ ) );// No trailing slash.
Note: See TracChangeset
for help on using the changeset viewer.