Clicky by Yoast - Version 1.7

Version Description

Released February 26th, 2019

  • Other improvements:
    • Updates the Clicky tracking code to support the new format. Props to drkskwlkr.
Download this release

Release Info

Developer joostdevalk
Plugin Icon 128x128 Clicky by Yoast
Version 1.7
Comparing to
See all releases

Code changes from version 1.6 to 1.7

clicky.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package Yoast/Clicky
4
  *
5
  * Plugin Name: Clicky for WordPress
6
- * Version: 1.6
7
  * Plugin URI: https://yoast.com/wordpress/plugins/clicky/
8
  * Description: The Clicky for WordPress plugin by Yoast makes it easy for you to add your Clicky analytics tracking code to your WordPress install, while also giving you some advanced tracking options.
9
  * Author: Team Yoast
3
  * @package Yoast/Clicky
4
  *
5
  * Plugin Name: Clicky for WordPress
6
+ * Version: 1.7
7
  * Plugin URI: https://yoast.com/wordpress/plugins/clicky/
8
  * Description: The Clicky for WordPress plugin by Yoast makes it easy for you to add your Clicky analytics tracking code to your WordPress install, while also giving you some advanced tracking options.
9
  * Author: Team Yoast
frontend/class-clicky-frontend.php CHANGED
@@ -25,12 +25,12 @@ class Clicky_Frontend {
25
  return;
26
  }
27
 
28
- add_action( 'wp_footer', array( $this, 'script' ), 90 );
29
  add_action( 'comment_post', array( $this, 'track_comment' ), 10, 2 );
30
  }
31
 
32
  /**
33
- * Add Clicky scripts to footer
34
  */
35
  public function script() {
36
  if ( is_preview() ) {
25
  return;
26
  }
27
 
28
+ add_action( 'wp_head', array( $this, 'script' ), 90 );
29
  add_action( 'comment_post', array( $this, 'track_comment' ), 10, 2 );
30
  }
31
 
32
  /**
33
+ * Add Clicky scripts to header.
34
  */
35
  public function script() {
36
  if ( is_preview() ) {
frontend/views/script.php CHANGED
@@ -3,17 +3,15 @@
3
  * @package Yoast/Clicky/View
4
  */
5
 
6
- ?><script type="text/javascript">
 
7
  <?php
8
  if ( ! empty( $clicky_extra ) ) {
9
  echo 'var clicky_custom = clicky_custom || {}; ';
10
  echo $clicky_extra;
11
  } ?>
12
- var clicky = { log : function () { return true; }, goal: function () { return true; } };
13
- var clicky_site_id = <?php echo $this->options['site_id']; ?>;
14
- (function () {
15
- var s = document.createElement('script');s.type = 'text/javascript';s.async = true;s.src = '//static.getclicky.com/js';
16
- ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild(s);
17
- })();
18
  </script>
19
- <noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/<?php echo $this->options['site_id']; ?>ns.gif" /></p></noscript>
3
  * @package Yoast/Clicky/View
4
  */
5
 
6
+ ?>
7
+ <script>
8
  <?php
9
  if ( ! empty( $clicky_extra ) ) {
10
  echo 'var clicky_custom = clicky_custom || {}; ';
11
  echo $clicky_extra;
12
  } ?>
13
+
14
+ var clicky_site_ids = clicky_site_ids || [];
15
+ clicky_site_ids.push(<?php echo $this->options['site_id']; ?>);
 
 
 
16
  </script>
17
+ <script async src="//static.getclicky.com/js"></script>
languages/clicky-bg_BG.mo CHANGED
Binary file
languages/clicky-en_CA.mo ADDED
Binary file
languages/clicky-en_GB.mo CHANGED
Binary file
languages/clicky-fa_IR.mo CHANGED
Binary file
languages/clicky-ja.mo CHANGED
Binary file
languages/clicky-ro_RO.mo CHANGED
Binary file
languages/clicky-sv_SE.mo CHANGED
Binary file
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Clicky by Yoast ===
2
  Contributors: joostdevalk
3
  Tags: analytics, statistics, clicky, getclicky, affiliate, outbound links, analysis, Joost de Valk, Yoast
4
- Requires at least: 4.0
5
- Tested up to: 4.5
6
- Stable tag: 1.6
7
  Text Domain: clicky
8
 
9
  Integrates the Clicky web analytics service into your blog and adds features for comment tracking & more.
@@ -39,6 +39,13 @@ Read the authors [review of Clicky Analytics](https://yoast.com/clicky-analytics
39
 
40
  == Changelog ==
41
 
 
 
 
 
 
 
 
42
  = 1.6 =
43
 
44
  Released June 30th, 2016
@@ -47,7 +54,7 @@ Released June 30th, 2016
47
  * Only allow expected characters in user settings thanks to a report by [Netsparker](https://netsparker.com).
48
  * Proper escaping of translated string in image attributes.
49
 
50
- Other improvements:
51
  * Only load the resources when required settings are entered.
52
  * Properly handle erroneous request responses.
53
  * Updated translations.
1
  === Clicky by Yoast ===
2
  Contributors: joostdevalk
3
  Tags: analytics, statistics, clicky, getclicky, affiliate, outbound links, analysis, Joost de Valk, Yoast
4
+ Requires at least: 4.9
5
+ Tested up to: 5.1
6
+ Stable tag: 1.7
7
  Text Domain: clicky
8
 
9
  Integrates the Clicky web analytics service into your blog and adds features for comment tracking & more.
39
 
40
  == Changelog ==
41
 
42
+ = 1.7 =
43
+
44
+ Released February 26th, 2019
45
+
46
+ * Other improvements:
47
+ * Updates the Clicky tracking code to support the new format. Props to [drkskwlkr](https://github.com/drkskwlkr).
48
+
49
  = 1.6 =
50
 
51
  Released June 30th, 2016
54
  * Only allow expected characters in user settings thanks to a report by [Netsparker](https://netsparker.com).
55
  * Proper escaping of translated string in image attributes.
56
 
57
+ * Other improvements:
58
  * Only load the resources when required settings are entered.
59
  * Properly handle erroneous request responses.
60
  * Updated translations.
vendor/autoload.php CHANGED
@@ -2,6 +2,6 @@
2
 
3
  // autoload.php @generated by Composer
4
 
5
- require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitfe413d7be7cd83a857010bbc3e257959::getLoader();
2
 
3
  // autoload.php @generated by Composer
4
 
5
+ require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit182c104cb065193973ccff7852167bd3::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit07e4ba9f1329fe81b2aaabcde16da31d::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit3ff08d72e29433f3143614168e23e699::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -53,8 +53,9 @@ class ClassLoader
53
 
54
  private $useIncludePath = false;
55
  private $classMap = array();
56
-
57
  private $classMapAuthoritative = false;
 
 
58
 
59
  public function getPrefixes()
60
  {
@@ -271,6 +272,26 @@ class ClassLoader
271
  return $this->classMapAuthoritative;
272
  }
273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  /**
275
  * Registers this instance as an autoloader.
276
  *
@@ -313,29 +334,34 @@ class ClassLoader
313
  */
314
  public function findFile($class)
315
  {
316
- // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317
- if ('\\' == $class[0]) {
318
- $class = substr($class, 1);
319
- }
320
-
321
  // class map lookup
322
  if (isset($this->classMap[$class])) {
323
  return $this->classMap[$class];
324
  }
325
- if ($this->classMapAuthoritative) {
326
  return false;
327
  }
 
 
 
 
 
 
328
 
329
  $file = $this->findFileWithExtension($class, '.php');
330
 
331
  // Search for Hack files if we are running on HHVM
332
- if ($file === null && defined('HHVM_VERSION')) {
333
  $file = $this->findFileWithExtension($class, '.hh');
334
  }
335
 
336
- if ($file === null) {
 
 
 
 
337
  // Remember that this class does not exist.
338
- return $this->classMap[$class] = false;
339
  }
340
 
341
  return $file;
@@ -348,10 +374,14 @@ class ClassLoader
348
 
349
  $first = $class[0];
350
  if (isset($this->prefixLengthsPsr4[$first])) {
351
- foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
- if (0 === strpos($class, $prefix)) {
353
- foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
 
 
 
 
355
  return $file;
356
  }
357
  }
@@ -399,6 +429,8 @@ class ClassLoader
399
  if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
400
  return $file;
401
  }
 
 
402
  }
403
  }
404
 
53
 
54
  private $useIncludePath = false;
55
  private $classMap = array();
 
56
  private $classMapAuthoritative = false;
57
+ private $missingClasses = array();
58
+ private $apcuPrefix;
59
 
60
  public function getPrefixes()
61
  {
272
  return $this->classMapAuthoritative;
273
  }
274
 
275
+ /**
276
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
277
+ *
278
+ * @param string|null $apcuPrefix
279
+ */
280
+ public function setApcuPrefix($apcuPrefix)
281
+ {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283
+ }
284
+
285
+ /**
286
+ * The APCu prefix in use, or null if APCu caching is not enabled.
287
+ *
288
+ * @return string|null
289
+ */
290
+ public function getApcuPrefix()
291
+ {
292
+ return $this->apcuPrefix;
293
+ }
294
+
295
  /**
296
  * Registers this instance as an autoloader.
297
  *
334
  */
335
  public function findFile($class)
336
  {
 
 
 
 
 
337
  // class map lookup
338
  if (isset($this->classMap[$class])) {
339
  return $this->classMap[$class];
340
  }
341
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
342
  return false;
343
  }
344
+ if (null !== $this->apcuPrefix) {
345
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
346
+ if ($hit) {
347
+ return $file;
348
+ }
349
+ }
350
 
351
  $file = $this->findFileWithExtension($class, '.php');
352
 
353
  // Search for Hack files if we are running on HHVM
354
+ if (false === $file && defined('HHVM_VERSION')) {
355
  $file = $this->findFileWithExtension($class, '.hh');
356
  }
357
 
358
+ if (null !== $this->apcuPrefix) {
359
+ apcu_add($this->apcuPrefix.$class, $file);
360
+ }
361
+
362
+ if (false === $file) {
363
  // Remember that this class does not exist.
364
+ $this->missingClasses[$class] = true;
365
  }
366
 
367
  return $file;
374
 
375
  $first = $class[0];
376
  if (isset($this->prefixLengthsPsr4[$first])) {
377
+ $subPath = $class;
378
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
379
+ $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath . '\\';
381
+ if (isset($this->prefixDirsPsr4[$search])) {
382
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
+ if (file_exists($file = $dir . $pathEnd)) {
385
  return $file;
386
  }
387
  }
429
  if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
430
  return $file;
431
  }
432
+
433
+ return false;
434
  }
435
  }
436
 
vendor/composer/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
 
2
- Copyright (c) 2016 Nils Adermann, Jordi Boggiano
3
 
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
  of this software and associated documentation files (the "Software"), to deal
1
 
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
3
 
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
  of this software and associated documentation files (the "Software"), to deal
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitfe413d7be7cd83a857010bbc3e257959
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitfe413d7be7cd83a857010bbc3e257959
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitfe413d7be7cd83a857010bbc3e257959', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitfe413d7be7cd83a857010bbc3e257959', 'loadClassLoader'));
25
 
26
- $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitfe413d7be7cd83a857010bbc3e257959::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit182c104cb065193973ccff7852167bd3
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit182c104cb065193973ccff7852167bd3', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit182c104cb065193973ccff7852167bd3', 'loadClassLoader'));
25
 
26
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit182c104cb065193973ccff7852167bd3::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit07e4ba9f1329fe81b2aaabcde16da31d {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit07e4ba9f1329fe81b2aaabcde16da31d {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit07e4ba9f1329fe81b2aaabcde16da31d', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit07e4ba9f1329fe81b2aaabcde16da31d', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit3ff08d72e29433f3143614168e23e699 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit3ff08d72e29433f3143614168e23e699', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit3ff08d72e29433f3143614168e23e699', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitfe413d7be7cd83a857010bbc3e257959
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
@@ -107,10 +107,10 @@ class ComposerStaticInitfe413d7be7cd83a857010bbc3e257959
107
  public static function getInitializer(ClassLoader $loader)
108
  {
109
  return \Closure::bind(function () use ($loader) {
110
- $loader->prefixLengthsPsr4 = ComposerStaticInitfe413d7be7cd83a857010bbc3e257959::$prefixLengthsPsr4;
111
- $loader->prefixDirsPsr4 = ComposerStaticInitfe413d7be7cd83a857010bbc3e257959::$prefixDirsPsr4;
112
- $loader->prefixesPsr0 = ComposerStaticInitfe413d7be7cd83a857010bbc3e257959::$prefixesPsr0;
113
- $loader->classMap = ComposerStaticInitfe413d7be7cd83a857010bbc3e257959::$classMap;
114
 
115
  }, null, ClassLoader::class);
116
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit182c104cb065193973ccff7852167bd3
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
107
  public static function getInitializer(ClassLoader $loader)
108
  {
109
  return \Closure::bind(function () use ($loader) {
110
+ $loader->prefixLengthsPsr4 = ComposerStaticInit182c104cb065193973ccff7852167bd3::$prefixLengthsPsr4;
111
+ $loader->prefixDirsPsr4 = ComposerStaticInit182c104cb065193973ccff7852167bd3::$prefixDirsPsr4;
112
+ $loader->prefixesPsr0 = ComposerStaticInit182c104cb065193973ccff7852167bd3::$prefixesPsr0;
113
+ $loader->classMap = ComposerStaticInit182c104cb065193973ccff7852167bd3::$classMap;
114
 
115
  }, null, ClassLoader::class);
116
  }