Google Analytics for WordPress by MonsterInsights - Version 5.4.9

Version Description

Release Date: April 15th, 2015

  • Bugfixes:

    • Fixes issue with eCommerce addon (also requires user to update eCommerce addon)
    • Fixes issue with 2 dashboard links
    • A bug in pre-existing code caused the menu of the plugin to skyrocket unintentionally. This has been corrected.
  • Enhancements:

    • New font based dashboard icon
    • The "MonsterInsights" menu item name has been renamed to just "Insights"
Download this release

Release Info

Developer smub
Plugin Icon 128x128 Google Analytics for WordPress by MonsterInsights
Version 5.4.9
Comparing to
See all releases

Code changes from version 5.4.6 to 5.4.9

Files changed (91) hide show
  1. CONTRIBUTING.md +0 -44
  2. README.md +11 -12
  3. admin/class-admin-menu.php +42 -52
  4. admin/class-admin.php +24 -48
  5. admin/dashboards/class-admin-dashboards-collector.php +1 -1
  6. admin/pages/dashboard.php +3 -3
  7. admin/pages/extensions.php +2 -2
  8. admin/pages/settings.php +3 -3
  9. admin/views/content-footer.php +1 -1
  10. assets/css/yoast_ga_styles.css +11 -1
  11. assets/css/yoast_ga_styles.min.css +1 -1
  12. assets/img/banner-ga-ecommerce.png +0 -0
  13. assets/img/banner-premium-ga.png +0 -0
  14. assets/img/banner-website-review.png +0 -0
  15. assets/img/eBook_261x130.png +0 -0
  16. assets/img/eComm_130x100.png +0 -0
  17. assets/img/ga-premium-banner.png +0 -0
  18. assets/img/omupsell.png +0 -0
  19. assets/img/upgradetopro.png +0 -0
  20. assets/img/wpbeginnerupsell.png +0 -0
  21. assets/img/wpformsupsell.png +0 -0
  22. frontend/abstract-class-tracking.php +9 -12
  23. frontend/views/tracking-debug.php +2 -2
  24. frontend/views/tracking-ga-js.php +2 -2
  25. frontend/views/tracking-universal.php +2 -2
  26. googleanalytics.php +28 -7
  27. includes/ecommerce-addon-license-fix.php +83 -0
  28. languages/google-analytics-for-wordpress-ca.mo +0 -0
  29. languages/google-analytics-for-wordpress-da_DK.mo +0 -0
  30. languages/google-analytics-for-wordpress-de_DE.mo +0 -0
  31. languages/google-analytics-for-wordpress-en_AU.mo +0 -0
  32. languages/google-analytics-for-wordpress-en_CA.mo +0 -0
  33. languages/google-analytics-for-wordpress-en_GB.mo +0 -0
  34. languages/google-analytics-for-wordpress-es_ES.mo +0 -0
  35. languages/google-analytics-for-wordpress-es_MX.mo +0 -0
  36. languages/google-analytics-for-wordpress-fa_IR.mo +0 -0
  37. languages/google-analytics-for-wordpress-fr_FR.mo +0 -0
  38. languages/google-analytics-for-wordpress-he_IL.mo +0 -0
  39. languages/google-analytics-for-wordpress-it_IT.mo +0 -0
  40. languages/google-analytics-for-wordpress-ja.mo +0 -0
  41. languages/google-analytics-for-wordpress-nb_NO.mo +0 -0
  42. languages/google-analytics-for-wordpress-nl_NL.mo +0 -0
  43. languages/google-analytics-for-wordpress-pl_PL.mo +0 -0
  44. languages/google-analytics-for-wordpress-pt_PT.mo +0 -0
  45. languages/google-analytics-for-wordpress-ru_RU.mo +0 -0
  46. languages/google-analytics-for-wordpress-sv_SE.mo +0 -0
  47. languages/google-analytics-for-wordpress-tr_TR.mo +0 -0
  48. languages/google-analytics-for-wordpress.pot +355 -139
  49. phpcs.xml +0 -14
  50. readme.txt +75 -31
  51. vendor/composer/autoload_classmap.php +18 -11
  52. vendor/yoast/api-libs/class-api-libs.php +2 -2
  53. vendor/yoast/i18n-module/LICENSE +0 -675
  54. vendor/yoast/i18n-module/README.md +0 -28
  55. vendor/yoast/i18n-module/composer.json +0 -20
  56. vendor/yoast/i18n-module/i18n-module.php +0 -278
  57. vendor/yoast/license-manager-2/.gitigore +2 -0
  58. vendor/yoast/license-manager-2/.travis.yml +54 -0
  59. vendor/yoast/license-manager-2/README.md +21 -0
  60. vendor/yoast/license-manager-2/class-api-request.php +140 -0
  61. vendor/yoast/license-manager-2/class-license-manager.php +619 -0
  62. vendor/yoast/license-manager-2/class-plugin-license-manager.php +90 -0
  63. vendor/yoast/license-manager-2/class-plugin-update-manager.php +102 -0
  64. vendor/yoast/license-manager-2/class-product.php +228 -0
  65. vendor/yoast/license-manager-2/class-theme-license-manager.php +53 -0
  66. vendor/yoast/license-manager-2/class-theme-update-manager.php +149 -0
  67. vendor/yoast/license-manager-2/class-update-manager.php +211 -0
  68. vendor/yoast/license-manager-2/composer.json +29 -0
  69. vendor/yoast/license-manager-2/index.php +2 -0
  70. vendor/yoast/license-manager-2/phpunit.xml +23 -0
  71. vendor/yoast/license-manager-2/samples/index.php +2 -0
  72. vendor/yoast/license-manager-2/samples/sample-plugin.php +74 -0
  73. vendor/yoast/license-manager-2/samples/sample-product.php +23 -0
  74. vendor/yoast/license-manager-2/samples/sample-theme-functions.php +11 -0
  75. vendor/yoast/license-manager-2/views/form.php +102 -0
  76. vendor/yoast/license-manager-2/views/index.php +2 -0
  77. vendor/yoast/license-manager-2/views/script.php +67 -0
  78. vendor/yoast/license-manager/class-api-request.php +2 -2
  79. vendor/yoast/license-manager/class-license-manager.php +10 -10
  80. vendor/yoast/license-manager/class-plugin-license-manager.php +5 -5
  81. vendor/yoast/license-manager/class-plugin-update-manager.php +3 -3
  82. vendor/yoast/license-manager/class-product.php +3 -3
  83. vendor/yoast/license-manager/class-theme-license-manager.php +3 -3
  84. vendor/yoast/license-manager/class-theme-update-manager.php +3 -3
  85. vendor/yoast/license-manager/class-update-manager.php +7 -7
  86. vendor/yoast/license-manager/samples/sample-plugin.php +5 -5
  87. vendor/yoast/license-manager/samples/sample-product.php +4 -4
  88. vendor/yoast/license-manager/samples/sample-theme-functions.php +1 -1
  89. vendor/yoast/license-manager/tests/test-class-yoast-license-manager.php +7 -7
  90. vendor/yoast/license-manager/views/form.php +1 -1
  91. vendor/yoast/license-manager/views/script.php +3 -3
CONTRIBUTING.md DELETED
@@ -1,44 +0,0 @@
1
- #Contribute To Google Analytics for WordPress
2
-
3
- Community made patches, localisations, bug reports and contributions are very welcome and help make Google Analytics for WordPress the #1 GA plugin for WordPress.
4
-
5
- When contributing please ensure you follow the guidelines below so that we can keep on top of things.
6
-
7
- __Please Note:__ GitHub is for bug reports and contributions only - if you have a support question or a request for a customisation don't post here, go to our [Support Forum](http://wordpress.org/support/plugin/google-analytics-for-wordpress) instead.
8
-
9
- For localization, please refer to [translate.yoast.com](http://translate.yoast.com/projects/google-analytics-for-wordpress), though bugs with strings that can't be translated are welcome here.
10
-
11
- ## Getting Started
12
-
13
- * Submit a ticket for your issue, assuming one does not already exist.
14
- * Raise it on our [Issue Tracker](https://github.com/Yoast/google-analytics-for-wordpress/issues)
15
- * Clearly describe the issue including steps to reproduce the bug.
16
- * Make sure you fill in the earliest version that you know has the issue as well as the version of WordPress you're using.
17
-
18
- _Note:_ do **not** report security issues here. Email them to security at yoast dot com so we can deal with them swiftly and securely.
19
-
20
- ## Making Changes
21
-
22
- * Fork the repository on GitHub
23
- * Make the changes to your forked repository
24
- * Ensure you stick to the [WordPress Coding Standards](http://codex.wordpress.org/WordPress_Coding_Standards) and have properly documented any new functions.
25
- * When committing, reference your issue (if present) and include a note about the fix.
26
- * Push the changes to your fork and submit a pull request to the 'master' branch of the Google Analytics for WordPress repository.
27
-
28
- ## Code Documentation
29
-
30
- * We ensure that every Google Analytics for WordPress function is documented well and follows the standards set by phpDoc.
31
- * An example function can be found [here](https://gist.github.com/jdevalk/5574677)
32
- * Please make sure that every function is documented so that when we update our API Documentation things don't go awry!
33
- * Finally, please use tabs and not spaces. The tab indent size should be 8 for all Google Analytics for WordPress code.
34
-
35
- At this point you're waiting on us to merge your pull request. We'll review all pull requests, and make suggestions and changes if necessary.
36
-
37
- <a name="patch-welcome"></a>
38
- ## "Patch welcome" issues
39
-
40
- Some issues are [labeled "Patch-welcome"](https://github.com/Yoast/google-analytics-for-wordpress/issues?q=is%3Aopen+is%3Aissue+label%3APatch-Welcome). This means we see the value in the particular enhancement being suggested but have decided for now not to prioritize it. If you however decide to write a patch for it we'll gladly include it after some code review.
41
-
42
- # Additional Resources
43
- * [General GitHub Documentation](http://help.github.com/)
44
- * [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -9,47 +9,46 @@ Add Google Analytics to WordPress and be able to use all the powerful functions
9
  Welcome to the Google Analytics for WordPress Github repository
10
  ----------------------------------------------
11
 
12
- While the documentation for the [Google Analytics for WordPress plugin](http://yoast.com/wordpress/google-analytics/) can be found on yoast.com, here
13
  you can browse the source of the project, find and discuss open issues and even
14
- [contribute yourself](https://github.com/Yoast/google-analytics-for-wordpress/blob/master/CONTRIBUTING.md).
15
 
16
  Installation
17
  ------------
18
 
19
- Here's a [guide on how to install Google Analytics for WordPress in your WordPress site](http://yoast.com/wordpress/google-analytics/installation/).
20
 
21
  If you want to run the Git version for development though, you can set it up with [Composer](https://getcomposer.org/):
22
 
23
  ```bash
24
- composer create-project yoast/google-analytics:dev-trunk --prefer-source --keep-vcs
25
  ```
26
 
27
- This will download the latest development version of Google Analytics for WordPress by Yoast. While this version is usually stable,
28
  it is not recommended for use in a production environment.
29
 
30
  Bugs
31
  ----
32
- If you find an issue, [let us know here](https://github.com/Yoast/google-analytics-for-wordpress/issues/new)!
33
 
34
- Please report security issues privately to **security@yoast.com**.
35
 
36
  Support
37
  -------
38
- This is a developer's portal for Google Analytics for WordPress by Yoast and should not be used for support. Please visit the
39
  [support forums](http://wordpress.org/support/plugin/google-analytics-for-wordpress).
40
 
41
  Contributions
42
  -------------
43
  Anyone is welcome to contribute to Google Analytics for WordPress. Please
44
- [read the guidelines](https://github.com/Yoast/google-analytics-for-wordpress/blob/master/CONTRIBUTING.md) for contributing to this
45
  repository.
46
 
47
  There are various ways you can contribute:
48
 
49
- * [Raise an issue](https://github.com/Yoast/google-analytics-for-wordpress/issues) on GitHub.
50
  * Send us a Pull Request with your bug fixes and/or new features.
51
- * [Translate Google Analytics for WordPress by Yoast into different languages](http://translate.yoast.com/projects/google-analytics-for-wordpress).
52
- * Provide feedback and [suggestions on enhancements](https://github.com/Yoast/google-analytics-for-wordpress/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open).
53
 
54
  Changelog
55
  =========
9
  Welcome to the Google Analytics for WordPress Github repository
10
  ----------------------------------------------
11
 
12
+ While the documentation for the [Google Analytics for WordPress plugin](http://www.monsterinsights.com/docs/) can be found on monsterinsights.com, here
13
  you can browse the source of the project, find and discuss open issues and even
14
+ [contribute yourself](https://github.com/awesomemotive/google-analytics-for-wordpress/blob/master/CONTRIBUTING.md).
15
 
16
  Installation
17
  ------------
18
 
19
+ Here's a [guide on how to install Google Analytics for WordPress in your WordPress site](http://www.monsterinsights.com/docs/getting-started/).
20
 
21
  If you want to run the Git version for development though, you can set it up with [Composer](https://getcomposer.org/):
22
 
23
  ```bash
24
+ composer create-project awesomemotive/google-analytics:dev-trunk --prefer-source --keep-vcs
25
  ```
26
 
27
+ This will download the latest development version of Google Analytics for WordPress by MonsterInsights. While this version is usually stable,
28
  it is not recommended for use in a production environment.
29
 
30
  Bugs
31
  ----
32
+ If you find an issue, [let us know here](https://github.com/monsterinsights/google-analytics-for-wordpress/issues/new)!
33
 
34
+ Please report security issues privately to **support@monsterinsights.com**.
35
 
36
  Support
37
  -------
38
+ This is a developer's portal for Google Analytics for WordPress by MonsterInsights and should not be used for support. Please visit the
39
  [support forums](http://wordpress.org/support/plugin/google-analytics-for-wordpress).
40
 
41
  Contributions
42
  -------------
43
  Anyone is welcome to contribute to Google Analytics for WordPress. Please
44
+ [read the guidelines](https://github.com/awesomemotive/google-analytics-for-wordpress/blob/master/CONTRIBUTING.md) for contributing to this
45
  repository.
46
 
47
  There are various ways you can contribute:
48
 
49
+ * [Raise an issue](https://github.com/awesomemotive/google-analytics-for-wordpress/issues) on GitHub.
50
  * Send us a Pull Request with your bug fixes and/or new features.
51
+ * Provide feedback and [suggestions on enhancements](https://github.com/awesomemotive/google-analytics-for-wordpress/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open).
 
52
 
53
  Changelog
54
  =========
admin/class-admin-menu.php CHANGED
@@ -35,6 +35,7 @@ class Yoast_GA_Admin_Menu {
35
  $this->target_object = $target_object;
36
 
37
  add_action( 'admin_menu', array( $this, 'create_admin_menu' ), 10 );
 
38
 
39
  if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
40
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
@@ -48,19 +49,46 @@ class Yoast_GA_Admin_Menu {
48
  $this->parent_slug = ( ( $this->dashboards_disabled ) ? 'yst_ga_settings' : 'yst_ga_dashboard' );
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  /**
52
  * Create the admin menu
53
  */
54
  public function create_admin_menu() {
55
- /**
56
- * Filter: 'wpga_menu_on_top' - Allows filtering of menu location of the GA plugin, if false is returned, it moves to bottom.
57
- *
58
- * @api book unsigned
59
- */
60
-
61
- // Base 64 encoded SVG image
62
- $icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCIgWw0KCTwhRU5USVRZIG5zX2Zsb3dzICJodHRwOi8vbnMuYWRvYmUuY29tL0Zsb3dzLzEuMC8iPg0KCTwhRU5USVRZIG5zX2V4dGVuZCAiaHR0cDovL25zLmFkb2JlLmNvbS9FeHRlbnNpYmlsaXR5LzEuMC8iPg0KCTwhRU5USVRZIG5zX2FpICJodHRwOi8vbnMuYWRvYmUuY29tL0Fkb2JlSWxsdXN0cmF0b3IvMTAuMC8iPg0KCTwhRU5USVRZIG5zX2dyYXBocyAiaHR0cDovL25zLmFkb2JlLmNvbS9HcmFwaHMvMS4wLyI+DQpdPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYWFnXzEiIHhtbG5zOng9IiZuc19leHRlbmQ7IiB4bWxuczppPSImbnNfYWk7IiB4bWxuczpncmFwaD0iJm5zX2dyYXBoczsiDQoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOmE9Imh0dHA6Ly9ucy5hZG9iZS5jb20vQWRvYmVTVkdWaWV3ZXJFeHRlbnNpb25zLzMuMC8iDQoJIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDAgMzEuODkiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDQwIDMxLjg5IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTQwLDEyLjUyNEM0MCw1LjYwOCwzMS40NjksMCwyMCwwQzguNTMsMCwwLDUuNjA4LDAsMTIuNTI0YzAsNS41Niw1LjI0MywxMC4yNzIsMTMuNTU3LDExLjkwN3YtNC4wNjUNCgljMCwwLDAuMDQtMS0wLjI4LTEuOTJjLTAuMzItMC45MjEtMS43Ni0zLjAwMS0xLjc2LTUuMTIxYzAtMi4xMjEsMi41NjEtOS41NjMsNS4xMjItMTAuNDQ0Yy0wLjQsMS4yMDEtMC4zMiw3LjY4My0wLjMyLDcuNjgzDQoJczEuNCwyLjcyLDQuNjQxLDIuNzJjMy4yNDIsMCw0LjUxMS0xLjc2LDQuNzE1LTIuMmMwLjIwNi0wLjQ0LDAuODQ2LTguNzIzLDAuODQ2LTguNzIzczQuMDgyLDQuNDAyLDMuNjgyLDkuMzYzDQoJYy0wLjQwMSw0Ljk2Mi00LjQ4Miw3LjIwMy02LjEyMiw5LjEyM2MtMS4yODYsMS41MDUtMi4yMjQsMy4xMy0yLjYyOSw0LjE2OGMwLjgwMS0wLjAzNCwxLjU4Ny0wLjA5OCwyLjM2MS0wLjE4NGw5LjE1MSw3LjA1OQ0KCWwtNC44ODQtNy44M0MzNS41MzUsMjIuMTYxLDQwLDE3LjcxMyw0MCwxMi41MjR6Ii8+DQo8L2c+DQo8L3N2Zz4=';
63
-
64
  $menu_name = is_network_admin() ? 'extensions' : 'dashboard';
65
 
66
  if ( $this->dashboards_disabled ) {
@@ -69,55 +97,17 @@ class Yoast_GA_Admin_Menu {
69
 
70
  // Add main page
71
  add_menu_page(
72
- __( 'Yoast Google Analytics:', 'google-analytics-for-wordpress' ) . ' ' . __( 'General settings', 'google-analytics-for-wordpress' ), __( 'Analytics', 'google-analytics-for-wordpress' ), 'manage_options', 'yst_ga_' . $menu_name,
73
  array(
74
  $this->target_object,
75
  'load_page',
76
  ),
77
- $icon_svg,
78
- $this->get_menu_position()
79
  );
80
 
81
- $this->add_submenu_pages();
82
- }
83
-
84
- /**
85
- * Get the menu position of the Analytics item
86
- *
87
- * @return string
88
- */
89
- private function get_menu_position() {
90
- $on_top = apply_filters( 'wpga_menu_on_top', true );
91
 
92
- if ( $on_top ) {
93
- $position = $this->get_menu_position_value( 'top' );
94
-
95
- }
96
- else {
97
- $position = $this->get_menu_position_value( 'bottom' );
98
- }
99
-
100
- // If the dashboards are disabled, force the menu item to stay at the bottom of the menu
101
- if ( $this->dashboards_disabled ) {
102
- $position = $this->get_menu_position_value( 'bottom' );
103
- }
104
-
105
- return $position;
106
- }
107
-
108
- /**
109
- * Get the top or bottom menu location number
110
- *
111
- * @param string $location
112
- *
113
- * @return string
114
- */
115
- private function get_menu_position_value( $location ) {
116
- if ( $location == 'top' ) {
117
- return '2.00013467543';
118
- }
119
-
120
- return '100.00013467543';
121
  }
122
 
123
  /**
@@ -132,7 +122,7 @@ class Yoast_GA_Admin_Menu {
132
  private function prepare_submenu_page( $submenu_name, $submenu_slug, $font_color = '' ) {
133
  return array(
134
  'parent_slug' => $this->parent_slug,
135
- 'page_title' => __( 'Yoast Google Analytics:', 'google-analytics-for-wordpress' ) . ' ' . $submenu_name,
136
  'menu_title' => $this->parse_menu_title( $submenu_name, $font_color ),
137
  'capability' => 'manage_options',
138
  'menu_slug' => 'yst_ga_' . $submenu_slug,
35
  $this->target_object = $target_object;
36
 
37
  add_action( 'admin_menu', array( $this, 'create_admin_menu' ), 10 );
38
+ add_action('admin_head', array( $this, 'mi_add_styles_for_menu' ) );
39
 
40
  if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
41
  require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
49
  $this->parent_slug = ( ( $this->dashboards_disabled ) ? 'yst_ga_settings' : 'yst_ga_dashboard' );
50
  }
51
 
52
+ public function mi_add_styles_for_menu() {
53
+ ?>
54
+ <style type="text/css">
55
+ @font-face {
56
+ font-family: 'MonsterInsights';
57
+ src: url('data:application/octet-stream;base64,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') format('woff'),
58
+ url('data:application/octet-stream;base64,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') format('truetype');
59
+ font-weight: normal;
60
+ font-style: normal;
61
+ }
62
+
63
+ #toplevel_page_yst_ga_dashboard .wp-menu-image:before,
64
+ .yst_ga_dashboard-menu-icon:before {
65
+
66
+ font-family: "MonsterInsights" !important;
67
+ content: '\61';
68
+ font-style: normal !important;
69
+ font-weight: normal !important;
70
+ font-variant: normal !important;
71
+ text-transform: none !important;
72
+ speak: none;
73
+ line-height: 1;
74
+ -webkit-font-smoothing: antialiased;
75
+ -moz-osx-font-smoothing: grayscale;
76
+ color: #fff;
77
+ }
78
+ #toplevel_page_yst_ga_dashboard .wp-menu-image:before {
79
+ font-size: 1.5em;
80
+ padding-top: 4px;
81
+ padding-bottom: 2px;
82
+ font-size: 22px;
83
+ }
84
+ </style>
85
+ <?php
86
+ }
87
+
88
  /**
89
  * Create the admin menu
90
  */
91
  public function create_admin_menu() {
 
 
 
 
 
 
 
 
 
92
  $menu_name = is_network_admin() ? 'extensions' : 'dashboard';
93
 
94
  if ( $this->dashboards_disabled ) {
97
 
98
  // Add main page
99
  add_menu_page(
100
+ __( 'Google Analytics by MonsterInsights:', 'google-analytics-for-wordpress' ) . ' ' . __( 'General settings', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'manage_options', 'yst_ga_' . $menu_name,
101
  array(
102
  $this->target_object,
103
  'load_page',
104
  ),
105
+ '',
106
+ '100.00013467543'
107
  );
108
 
 
 
 
 
 
 
 
 
 
 
109
 
110
+ $this->add_submenu_pages();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
112
 
113
  /**
122
  private function prepare_submenu_page( $submenu_name, $submenu_slug, $font_color = '' ) {
123
  return array(
124
  'parent_slug' => $this->parent_slug,
125
+ 'page_title' => __( 'Google Analytics by MonsterInsights:', 'google-analytics-for-wordpress' ) . ' ' . $submenu_name,
126
  'menu_title' => $this->parse_menu_title( $submenu_name, $font_color ),
127
  'capability' => 'manage_options',
128
  'menu_slug' => 'yst_ga_' . $submenu_slug,
admin/class-admin.php CHANGED
@@ -47,7 +47,7 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
47
 
48
  try {
49
  // Loading Google Api Libs with minimal version 2.0.
50
- new Yoast_Api_Libs( '2.0' );
51
  }
52
  catch( Exception $exception ) {
53
  if ( $exception->getMessage() === 'required_version' ) {
@@ -88,7 +88,7 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
88
  * There is an error with the API libs. So show a notice.
89
  */
90
  public function set_api_libs_error() {
91
- echo '<div class="error notice"><p>' . __( 'Yoast plugins share some code between them to make your site faster. As a result of that, we need all Yoast plugins to be up to date. We\'ve detected this isn\'t the case, so please update the Yoast plugins that aren\'t up to date yet.', 'google-analytics-for-wordpress' ) . '</p></div>';
92
  }
93
 
94
  /**
@@ -320,7 +320,7 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
320
  public function add_action_links( $links ) {
321
  // add link to knowledgebase
322
  // @todo UTM link fix
323
- $faq_link = '<a title="Yoast Knowledge Base" href="http://kb.yoast.com/category/43-google-analytics-for-wordpress">' . __( 'FAQ', 'google-analytics-for-wordpress' ) . '</a>';
324
  array_unshift( $links, $faq_link );
325
 
326
  $settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=yst_ga_settings' ) ) . '">' . __( 'Settings', 'google-analytics-for-wordpress' ) . '</a>';
@@ -335,42 +335,18 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
335
  public function premium_promo() {
336
  echo '<div class="ga-promote">';
337
  echo '<p>';
338
- printf( __( 'If you want to track custom dimensions like page views per author or post type, you should upgrade to the %1$spremium version of Google Analytics by Yoast%2$s.', 'google-analytics-for-wordpress' ), '<a href="https://yoast.com/wordpress/plugins/google-analytics/#utm_medium=text-link&utm_source=gawp-config&utm_campaign=wpgaplugin&utm_content=custom_dimensions_tab">', '</a>' );
339
  echo ' ';
340
- _e( 'This will also give you email access to the support team at Yoast, who will provide support on the plugin 24/7.', 'google-analytics-for-wordpress' );
341
  echo '</p>';
342
  echo '</div>';
343
  }
344
 
345
- /**
346
- * Initialize the promo class for our translate site
347
- *
348
- * @return yoast_i18n
349
- */
350
- public function translate_promo() {
351
- $yoast_ga_i18n = new yoast_i18n(
352
- array(
353
- 'textdomain' => 'google-analytics-for-wordpress',
354
- 'project_slug' => 'google-analytics-for-wordpress',
355
- 'plugin_name' => 'Google Analytics by Yoast',
356
- 'hook' => 'yoast_ga_admin_footer',
357
- 'glotpress_url' => 'https://translate.yoast.com',
358
- 'glotpress_name' => 'Yoast Translate',
359
- 'glotpress_logo' => 'https://cdn.yoast.com/wp-content/uploads/i18n-images/Yoast_Translate.svg',
360
- 'register_url ' => 'https://translate.yoast.com/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=yoast-ga-i18n-promo',
361
- )
362
- );
363
-
364
- return $yoast_ga_i18n;
365
- }
366
-
367
  /**
368
  * Load the page of a menu item in the GA plugin
369
  */
370
  public function load_page() {
371
 
372
- $this->translate_promo();
373
-
374
  if ( ! has_action( 'yst_ga_custom_dimensions_tab-content' ) ) {
375
  add_action( 'yst_ga_custom_dimensions_tab-content', array( $this, 'premium_promo' ) );
376
  }
@@ -513,8 +489,8 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
513
  echo '</pre></div></div>';
514
  }
515
 
516
- if ( class_exists( 'Yoast_Product_GA_Premium' ) ) {
517
- $license_manager = new Yoast_Plugin_License_Manager( new Yoast_Product_GA_Premium() );
518
  if ( $license_manager->license_is_valid() ) {
519
  return;
520
  }
@@ -522,24 +498,24 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
522
 
523
  $banners = array();
524
  $banners[] = array(
525
- 'url' => 'https://yoast.com/hire-us/website-review/#utm_medium=banner&utm_source=gawp-config&utm_campaign=wpgaplugin',
526
- 'banner' => $this->plugin_url . 'assets/img/banner-website-review.png',
527
- 'title' => 'Get a website review by Yoast',
528
  );
529
  $banners[] = array(
530
- 'url' => 'https://yoast.com/wordpress/plugins/google-analytics/#utm_medium=banner&utm_source=gawp-config&utm_campaign=wpgaplugin',
531
- 'banner' => $this->plugin_url . 'assets/img/banner-premium-ga.png',
532
- 'title' => 'Get the premium version of Google Analytics by Yoast!',
533
  );
534
  $banners[] = array(
535
- 'url' => 'https://yoast.com/ebook-optimize-wordpress-site/#utm_medium=banner&utm_source=gawp-config&utm_campaign=wpgaplugin',
536
- 'banner' => $this->plugin_url . 'assets/img/eBook_261x130.png',
537
- 'title' => 'Get the Yoast ebook!',
538
  );
539
  $banners[] = array(
540
- 'url' => 'https://yoast.com/wordpress/plugins/ga-ecommerce/#utm_medium=banner&utm_source=gawp-config&utm_campaign=wpgaplugin',
541
- 'banner' => $this->plugin_url . 'assets/img/banner-ga-ecommerce.png',
542
- 'title' => 'Get advanced eCommerce tracking for WooCommerce and Easy Digital Downloads!',
543
  );
544
 
545
  shuffle( $banners );
@@ -556,14 +532,14 @@ class Yoast_GA_Admin extends Yoast_GA_Options {
556
  public function get_extensions() {
557
  $extensions = array(
558
  'ga_premium' => (object) array(
559
- 'url' => 'https://yoast.com/wordpress/plugins/google-analytics/',
560
- 'title' => __( 'Google Analytics by Yoast Premium', 'google-analytics-for-wordpress' ),
561
- 'desc' => __( 'The premium version of Google Analytics by Yoast with more features and support.', 'google-analytics-for-wordpress' ),
562
  'status' => 'uninstalled',
563
  ),
564
  'ecommerce' => (object) array(
565
- 'url' => 'https://yoast.com/wordpress/plugins/ga-ecommerce/',
566
- 'title' => __( 'Google Analytics by Yoast', 'google-analytics-for-wordpress' ) . '<br />' . __( 'eCommerce tracking', 'google-analytics-for-wordpress' ),
567
  'desc' => __( 'Track your eCommerce data and transactions with this eCommerce extension for Google Analytics.', 'google-analytics-for-wordpress' ),
568
  'status' => 'uninstalled',
569
  ),
47
 
48
  try {
49
  // Loading Google Api Libs with minimal version 2.0.
50
+ new MI_Api_Libs( '2.0' );
51
  }
52
  catch( Exception $exception ) {
53
  if ( $exception->getMessage() === 'required_version' ) {
88
  * There is an error with the API libs. So show a notice.
89
  */
90
  public function set_api_libs_error() {
91
+ echo '<div class="error notice"><p>' . __( 'MonsterInsights plugins share some code between them to make your site faster. As a result of that, we need all MonsterInsights plugins to be up to date. We\'ve detected this isn\'t the case, so please update the MonsterInsights plugins that aren\'t up to date yet.', 'google-analytics-for-wordpress' ) . '</p></div>';
92
  }
93
 
94
  /**
320
  public function add_action_links( $links ) {
321
  // add link to knowledgebase
322
  // @todo UTM link fix
323
+ $faq_link = '<a title="MonsterInsights Knowledge Base" href="http://www.monsterinsights.com/docs/">' . __( 'FAQ', 'google-analytics-for-wordpress' ) . '</a>';
324
  array_unshift( $links, $faq_link );
325
 
326
  $settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=yst_ga_settings' ) ) . '">' . __( 'Settings', 'google-analytics-for-wordpress' ) . '</a>';
335
  public function premium_promo() {
336
  echo '<div class="ga-promote">';
337
  echo '<p>';
338
+ printf( __( 'If you want to track custom dimensions like page views per author or post type, you should upgrade to the %1$spremium version of Google Analytics by MonsterInsights%2$s.', 'google-analytics-for-wordpress' ), '<a href="https://www.monsterinsights.com/pricing/#utm_medium=text-link&utm_source=gawp-config&utm_campaign=wpgaplugin&utm_content=custom_dimensions_tab">', '</a>' );
339
  echo ' ';
340
+ _e( 'This will also give you access to the support team at MonsterInsights, who will provide support on the plugin 24/7.', 'google-analytics-for-wordpress' );
341
  echo '</p>';
342
  echo '</div>';
343
  }
344
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  /**
346
  * Load the page of a menu item in the GA plugin
347
  */
348
  public function load_page() {
349
 
 
 
350
  if ( ! has_action( 'yst_ga_custom_dimensions_tab-content' ) ) {
351
  add_action( 'yst_ga_custom_dimensions_tab-content', array( $this, 'premium_promo' ) );
352
  }
489
  echo '</pre></div></div>';
490
  }
491
 
492
+ if ( class_exists( 'MI_Product_GA_Premium' ) ) {
493
+ $license_manager = new MI_Plugin_License_Manager( new MI_Product_GA_Premium() );
494
  if ( $license_manager->license_is_valid() ) {
495
  return;
496
  }
498
 
499
  $banners = array();
500
  $banners[] = array(
501
+ 'url' => 'https://www.optinmonster.com/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin',
502
+ 'banner' => $this->plugin_url . 'assets/img/omupsell.png',
503
+ 'title' => 'Convert Visitors into Subscribers',
504
  );
505
  $banners[] = array(
506
+ 'url' => 'https://www.monsterinsights.com/pricing/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin',
507
+ 'banner' => $this->plugin_url . 'assets/img/upgradetopro.png',
508
+ 'title' => 'Get the premium version of Google Analytics by MonsterInsights!',
509
  );
510
  $banners[] = array(
511
+ 'url' => 'http://www.wpbeginner.net/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin',
512
+ 'banner' => $this->plugin_url . 'assets/img/wpbeginnerupsell.png',
513
+ 'title' => 'The best collection of free beginner WordPress resources!',
514
  );
515
  $banners[] = array(
516
+ 'url' => 'https://wpforms.com/pricing/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin',
517
+ 'banner' => $this->plugin_url . 'assets/img/wpformsupsell.png',
518
+ 'title' => 'Get the most beginner friendly WordPress contact form plugin in the market!',
519
  );
520
 
521
  shuffle( $banners );
532
  public function get_extensions() {
533
  $extensions = array(
534
  'ga_premium' => (object) array(
535
+ 'url' => 'https://www.monsterinsights.com/pricing/',
536
+ 'title' => __( 'Google Analytics by MonsterInsights Pro', 'google-analytics-for-wordpress' ),
537
+ 'desc' => __( 'The premium version of Google Analytics by MonsterInsights with more features and support.', 'google-analytics-for-wordpress' ),
538
  'status' => 'uninstalled',
539
  ),
540
  'ecommerce' => (object) array(
541
+ 'url' => 'https://www.monsterinsights.com/pricing/',
542
+ 'title' => __( 'Google Analytics by MonsterInsights', 'google-analytics-for-wordpress' ) . '<br />' . __( 'eCommerce tracking', 'google-analytics-for-wordpress' ),
543
  'desc' => __( 'Track your eCommerce data and transactions with this eCommerce extension for Google Analytics.', 'google-analytics-for-wordpress' ),
544
  'status' => 'uninstalled',
545
  ),
admin/dashboards/class-admin-dashboards-collector.php CHANGED
@@ -456,7 +456,7 @@ class Yoast_GA_Dashboards_Collector {
456
  private function log_error( $error ) {
457
  if ( true == WP_DEBUG ) {
458
  if ( function_exists( 'error_log' ) ) {
459
- error_log( 'Google Analytics by Yoast (Dashboard API): ' . $error );
460
  }
461
  }
462
  }
456
  private function log_error( $error ) {
457
  if ( true == WP_DEBUG ) {
458
  if ( function_exists( 'error_log' ) ) {
459
+ error_log( 'Google Analytics by MonsterInsights (Dashboard API): ' . $error );
460
  }
461
  }
462
  }
admin/pages/dashboard.php CHANGED
@@ -11,7 +11,7 @@ $tracking_code = $options_class->get_tracking_code();
11
 
12
  echo $yoast_ga_admin->content_head();
13
  ?>
14
- <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by Yoast: ', 'google-analytics-for-wordpress' ) . __( 'Dashboard', 'google-analytics-for-wordpress' ); ?> <?php do_action( 'yst_ga_dashboard_title' ); ?></h2>
15
 
16
  <h2 class="nav-tab-wrapper" id="ga-tabs">
17
  <a class="nav-tab" id="general-tab" href="#top#general"><?php _e( 'Overview', 'google-analytics-for-wordpress' ); ?></a>
@@ -62,7 +62,7 @@ echo $yoast_ga_admin->content_head();
62
  else {
63
  echo '<div class="ga-promote"><p>';
64
  echo sprintf(
65
- __( 'You have not yet finished setting up Google Analytics for Wordpress by Yoast. Please %sadd your Analytics profile here%s to enable tracking.', 'google-analytics-for-wordpress' ),
66
  '<a href=" ' . admin_url( 'admin.php?page=yst_ga_settings#top#general' ) . '">',
67
  '</a>'
68
  );
@@ -108,7 +108,7 @@ echo $yoast_ga_admin->content_head();
108
  else {
109
  echo '<div class="ga-promote"><p>';
110
  echo sprintf(
111
- __( 'You have not yet finished setting up Google Analytics for Wordpress by Yoast. Please %sadd your Analytics profile here%s to enable tracking.', 'google-analytics-for-wordpress' ),
112
  '<a href=" ' . admin_url( 'admin.php?page=yst_ga_settings#top#general' ) . '">',
113
  '</a>'
114
  );
11
 
12
  echo $yoast_ga_admin->content_head();
13
  ?>
14
+ <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by MonsterInsights: ', 'google-analytics-for-wordpress' ) . __( 'Dashboard', 'google-analytics-for-wordpress' ); ?> <?php do_action( 'yst_ga_dashboard_title' ); ?></h2>
15
 
16
  <h2 class="nav-tab-wrapper" id="ga-tabs">
17
  <a class="nav-tab" id="general-tab" href="#top#general"><?php _e( 'Overview', 'google-analytics-for-wordpress' ); ?></a>
62
  else {
63
  echo '<div class="ga-promote"><p>';
64
  echo sprintf(
65
+ __( 'You have not yet finished setting up Google Analytics for Wordpress by MonsterInsights. Please %sadd your Analytics profile here%s to enable tracking.', 'google-analytics-for-wordpress' ),
66
  '<a href=" ' . admin_url( 'admin.php?page=yst_ga_settings#top#general' ) . '">',
67
  '</a>'
68
  );
108
  else {
109
  echo '<div class="ga-promote"><p>';
110
  echo sprintf(
111
+ __( 'You have not yet finished setting up Google Analytics for Wordpress by MonsterInsights. Please %sadd your Analytics profile here%s to enable tracking.', 'google-analytics-for-wordpress' ),
112
  '<a href=" ' . admin_url( 'admin.php?page=yst_ga_settings#top#general' ) . '">',
113
  '</a>'
114
  );
admin/pages/extensions.php CHANGED
@@ -11,7 +11,7 @@ $has_extensions = false;
11
 
12
  $extensions = $yoast_ga_admin->get_extensions();
13
  ?>
14
- <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by Yoast: ', 'google-analytics-for-wordpress' ) . __( 'Extensions', 'google-analytics-for-wordpress' ); ?></h2>
15
 
16
  <h2 class="nav-tab-wrapper" id="ga-tabs">
17
  <a class="nav-tab active" id="extensions-tab" href="#top#extensions"><?php _e( 'Extensions', 'google-analytics-for-wordpress' ); ?></a>
@@ -48,7 +48,7 @@ $extensions = $yoast_ga_admin->get_extensions();
48
  <div id="licenses" class="wpseotab gatab">
49
  <?php
50
  if ( ! $has_extensions ) {
51
- echo '<p>' . __( 'You have not installed any extensions for Google Analytics by Yoast, so there are no licenses to activate.', 'google-analytics-for-wordpress' ) . '</p>';
52
  }
53
  else {
54
  do_action( 'yst_ga_show_license_form' );
11
 
12
  $extensions = $yoast_ga_admin->get_extensions();
13
  ?>
14
+ <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by MonsterInsights: ', 'google-analytics-for-wordpress' ) . __( 'Extensions', 'google-analytics-for-wordpress' ); ?></h2>
15
 
16
  <h2 class="nav-tab-wrapper" id="ga-tabs">
17
  <a class="nav-tab active" id="extensions-tab" href="#top#extensions"><?php _e( 'Extensions', 'google-analytics-for-wordpress' ); ?></a>
48
  <div id="licenses" class="wpseotab gatab">
49
  <?php
50
  if ( ! $has_extensions ) {
51
+ echo '<p>' . __( 'You have not installed any extensions for Google Analytics by MonsterInsights, so there are no licenses to activate.', 'google-analytics-for-wordpress' ) . '</p>';
52
  }
53
  else {
54
  do_action( 'yst_ga_show_license_form' );
admin/pages/settings.php CHANGED
@@ -7,7 +7,7 @@ global $yoast_ga_admin;
7
 
8
  echo $yoast_ga_admin->content_head();
9
  ?>
10
- <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by Yoast: ', 'google-analytics-for-wordpress' ) . __( 'Settings', 'google-analytics-for-wordpress' ); ?></h2>
11
 
12
  <?php
13
  settings_errors( 'yoast_google_analytics' );
@@ -107,7 +107,7 @@ echo Yoast_GA_Admin_Form::create_form( 'settings' );
107
  <div id="universal" class="gatab">
108
  <?php
109
  echo '<h2>' . __( 'Universal settings', 'google-analytics-for-wordpress' ) . '</h2>';
110
- echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable Universal tracking', 'google-analytics-for-wordpress' ), 'enable_universal', null, sprintf( __( 'First enable Universal tracking in your Google Analytics account. Please read %1$sthis guide%2$s to learn how to do that.', 'google-analytics-for-wordpress' ), '<a href="http://kb.yoast.com/article/125-universal-analytics#utm_medium=kb-link&utm_source=gawp-config&utm_campaign=wpgaplugin" target="_blank">', '</a>' ) );
111
  echo Yoast_GA_Admin_Form::input(
112
  'checkbox',
113
  __( 'Enable Demographics and Interests Reports for Remarketing and Advertising', 'google-analytics-for-wordpress' ),
@@ -116,7 +116,7 @@ echo Yoast_GA_Admin_Form::create_form( 'settings' );
116
  /* Transators: %1$s contains the link to a knowledge base article, %2$s contains the the closing tag for both links, %3$s contains a link to Google documentation about remarketing. */
117
  sprintf(
118
  __( 'Check this setting to add the Demographics and Remarketing features to your Google Analytics tracking code. We\'ve written an article in our %1$sknowledge base%2$s about Demographics and Interest reports. For more information about Remarketing, we refer you to %3$sGoogle\'s documentation%2$s.', 'google-analytics-for-wordpress' ),
119
- '<a href="http://kb.yoast.com/article/154-enable-demographics-and-interests-report-in-google-analytics/#utm_medium=kb-link&amp;utm_source=gawp-config&amp;utm_campaign=wpgaplugin" target="_blank">',
120
  '</a>',
121
  '<a href="https://support.google.com/analytics/answer/2444872?hl=' . get_locale() . '" target="_blank">'
122
  )
7
 
8
  echo $yoast_ga_admin->content_head();
9
  ?>
10
+ <h2 id="yoast_ga_title"><?php echo __( 'Google Analytics by MonsterInsights: ', 'google-analytics-for-wordpress' ) . __( 'Settings', 'google-analytics-for-wordpress' ); ?></h2>
11
 
12
  <?php
13
  settings_errors( 'yoast_google_analytics' );
107
  <div id="universal" class="gatab">
108
  <?php
109
  echo '<h2>' . __( 'Universal settings', 'google-analytics-for-wordpress' ) . '</h2>';
110
+ echo Yoast_GA_Admin_Form::input( 'checkbox', __( 'Enable Universal tracking', 'google-analytics-for-wordpress' ), 'enable_universal', null, sprintf( __( 'First enable Universal tracking in your Google Analytics account. Please read %1$sthis guide%2$s to learn how to do that.', 'google-analytics-for-wordpress' ), '<a href="https://www.monsterinsights.com/docs/enable-demographics-and-interests-report-in-google-analytics/#utm_medium=kb-link&utm_source=gawp-config&utm_campaign=wpgaplugin" target="_blank">', '</a>' ) );
111
  echo Yoast_GA_Admin_Form::input(
112
  'checkbox',
113
  __( 'Enable Demographics and Interests Reports for Remarketing and Advertising', 'google-analytics-for-wordpress' ),
116
  /* Transators: %1$s contains the link to a knowledge base article, %2$s contains the the closing tag for both links, %3$s contains a link to Google documentation about remarketing. */
117
  sprintf(
118
  __( 'Check this setting to add the Demographics and Remarketing features to your Google Analytics tracking code. We\'ve written an article in our %1$sknowledge base%2$s about Demographics and Interest reports. For more information about Remarketing, we refer you to %3$sGoogle\'s documentation%2$s.', 'google-analytics-for-wordpress' ),
119
+ '<a href="https://www.monsterinsights.com/docs/enable-demographics-and-interests-report-in-google-analytics/#utm_medium=kb-link&amp;utm_source=gawp-config&amp;utm_campaign=wpgaplugin" target="_blank">',
120
  '</a>',
121
  '<a href="https://support.google.com/analytics/answer/2444872?hl=' . get_locale() . '" target="_blank">'
122
  )
admin/views/content-footer.php CHANGED
@@ -12,6 +12,6 @@
12
  </a></p>
13
  <?php endforeach; ?>
14
  <?php _e( 'Remove these ads?', 'google-analytics-for-wordpress' ); ?><br />
15
- <a href="https://yoast.com/wordpress/plugins/google-analytics/#utm_medium=text-link&utm_source=gawp-config&utm_campaign=wpgaplugin" target="_blank"><?php _e( 'Upgrade to Google Analytics By Yoast Premium »', 'google-analytics-for-wordpress' ); ?></a>
16
  </div>
17
  </div>
12
  </a></p>
13
  <?php endforeach; ?>
14
  <?php _e( 'Remove these ads?', 'google-analytics-for-wordpress' ); ?><br />
15
+ <a href="https://www.monsterinsights.com/pricing/#utm_medium=text-link&utm_source=gawp-config&utm_campaign=wpgaplugin" target="_blank"><?php _e( 'Upgrade to Google Analytics By MonsterInsights Pro »', 'google-analytics-for-wordpress' ); ?></a>
16
  </div>
17
  </div>
assets/css/yoast_ga_styles.css CHANGED
@@ -179,7 +179,9 @@ select.ga-multiple {
179
  padding: 20px 10px 0 120px;
180
  border-bottom: 1px solid #ccc;
181
  background: #fff no-repeat left 10px;
182
- background-size: 130px 100px;
 
 
183
  }
184
 
185
  .wpseotab .extension button.installed {
@@ -191,6 +193,8 @@ select.ga-multiple {
191
  .wpseotab .extension .button-primary.activate-link {
192
  border-color: #f06000;
193
  background-color: #f18500;
 
 
194
  }
195
 
196
  .extension a {
@@ -199,10 +203,16 @@ select.ga-multiple {
199
 
200
  .ecommerce h3 {
201
  background-image: url(../img/eComm_130x100.png) !important;
 
 
 
202
  }
203
 
204
  .ga_premium h3 {
205
  background-image: url(../img/ga-premium-banner.png) !important;
 
 
 
206
  }
207
 
208
  #ga-debug-info h3 {
179
  padding: 20px 10px 0 120px;
180
  border-bottom: 1px solid #ccc;
181
  background: #fff no-repeat left 10px;
182
+ background-repeat: no-repeat;
183
+ background-size: 84px 84px;
184
+ background-position-x: 5%;
185
  }
186
 
187
  .wpseotab .extension button.installed {
193
  .wpseotab .extension .button-primary.activate-link {
194
  border-color: #f06000;
195
  background-color: #f18500;
196
+ box-shadow: none;
197
+ text-shadow: none;
198
  }
199
 
200
  .extension a {
203
 
204
  .ecommerce h3 {
205
  background-image: url(../img/eComm_130x100.png) !important;
206
+ background-repeat: no-repeat;
207
+ background-size: 84px 84px;
208
+ background-position-x: 5%;
209
  }
210
 
211
  .ga_premium h3 {
212
  background-image: url(../img/ga-premium-banner.png) !important;
213
+ background-repeat: no-repeat;
214
+ background-size: 84px 84px;
215
+ background-position-x: 5%;
216
  }
217
 
218
  #ga-debug-info h3 {
assets/css/yoast_ga_styles.min.css CHANGED
@@ -1 +1 @@
1
- h2#yoast_ga_title{padding:9px 15px 4px 0;font-size:23px;font-weight:400;line-height:29px}.nav-tab-wrapper{margin-bottom:20px}.gatab{display:none}.gatab.active{display:block;padding:.5em .9em;border:1px solid #ddd;border-radius:0 3px 3px;background-color:#fff}.tabwrapper .gatab{padding:0;border:none;background:0 0}.tabwrapper .gatab h2{padding:9px 15px 4px 0;font-size:23px;font-weight:400}.ga-form-submit{margin-top:20px}.ga-form-label-left{float:left;width:250px;margin:0 0 0 5px;font-size:14px;font-weight:700}#yoast-ga-displayfeatures-warning{float:right;width:63%;color:red}.ga-form-input{margin-top:10px}#yoast-ga-wrapper{display:table;width:auto;max-width:1150px}.yoast-ga-content{display:table-cell;min-width:850px;height:500px;margin:0;padding:0;vertical-align:top}.yoast-ga-banners{display:table-cell;width:261px;height:500px;margin:0;padding:20px;vertical-align:top}.ga-form-input{display:table;margin-bottom:20px}.ga-form-table{display:table-cell}.ga-form-description{display:block;float:right;max-width:325px;color:#999}p.ga-topdescription{max-width:600px}#ga-promote,.ga-promote{max-width:600px;padding-left:10px;border:1px solid #ccc;background-color:#fff}.ga-promote{margin-bottom:10px}#ga-promote p,.ga-promote p{margin:0;padding:1em 1em 1em 0}#yoast-ga-form-settings input[type=text]{width:325px}#yoast-ga-form-settings #oauth_code{padding:20px}#yoast-ga-form-settings #oauth_code div{margin:0 0 0 5px}#yoast-ga-form-settings #oauth_code input[type=text]{width:275px}.ga-form .chosen-search input[type=text]{width:100%!important}.yoast-ga-content .chosen-container{width:325px!important}#enter_ua{display:none;margin-top:10px;padding-top:10px}#yoast-ga-form-text-settings-ga_general-manual_ua_code_field{margin-top:-30px}select.ga-multiple{width:300px;height:150px!important}.wpseotab .extension{float:left;box-sizing:border-box;width:350px;height:230px;margin:10px 20px 10px 0;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:left 10px/130px 100px no-repeat #fff}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}.wpseotab .extension .button-primary.activate-link{border-color:#f06000;background-color:#f18500}.extension a{text-decoration:none}.ecommerce h3{background-image:url(../img/eComm_130x100.png)!important}.ga_premium h3{background-image:url(../img/ga-premium-banner.png)!important}#ga-debug-info h3{height:30px;margin-top:10px;padding-left:16px;font-size:14px}.yoast_help{margin:2px 5px 0}#enter_ua div{display:inline-block;margin:0}
1
+ h2#yoast_ga_title{padding:9px 15px 4px 0;font-size:23px;font-weight:400;line-height:29px}.nav-tab-wrapper{margin-bottom:20px}.gatab{display:none}.gatab.active{display:block;padding:.5em .9em;border:1px solid #ddd;border-radius:0 3px 3px;background-color:#fff}.tabwrapper .gatab{padding:0;border:none;background:0 0}.tabwrapper .gatab h2{padding:9px 15px 4px 0;font-size:23px;font-weight:400}.ga-form-submit{margin-top:20px}.ga-form-label-left{float:left;width:250px;margin:0 0 0 5px;font-size:14px;font-weight:700}#yoast-ga-displayfeatures-warning{float:right;width:63%;color:red}.ga-form-input{margin-top:10px}#yoast-ga-wrapper{display:table;width:auto;max-width:1150px}.yoast-ga-banners,.yoast-ga-content{display:table-cell;height:500px;margin:0;vertical-align:top}.yoast-ga-content{min-width:850px;padding:0}.yoast-ga-banners{width:261px;padding:20px}.ga-form-input{display:table;margin-bottom:20px}.ga-form-table{display:table-cell}.ga-form-description{display:block;float:right;max-width:325px;color:#999}p.ga-topdescription{max-width:600px}#ga-promote,.ga-promote{max-width:600px;padding-left:10px;border:1px solid #ccc;background-color:#fff}.ga-promote{margin-bottom:10px}#ga-promote p,.ga-promote p{margin:0;padding:1em 1em 1em 0}#yoast-ga-form-settings input[type=text]{width:325px}#yoast-ga-form-settings #oauth_code{padding:20px}#yoast-ga-form-settings #oauth_code div{margin:0 0 0 5px}#yoast-ga-form-settings #oauth_code input[type=text]{width:275px}.ga-form .chosen-search input[type=text]{width:100%!important}.yoast-ga-content .chosen-container{width:325px!important}#enter_ua{display:none;margin-top:10px;padding-top:10px}#yoast-ga-form-text-settings-ga_general-manual_ua_code_field{margin-top:-30px}select.ga-multiple{width:300px;height:150px!important}.wpseotab .extension{float:left;box-sizing:border-box;width:350px;height:230px;margin:10px 20px 10px 0;border:1px solid #ccc}.wpseotab .extension p{margin:0;padding:10px}.wpseotab .extension h3{box-sizing:border-box;height:110px;margin:0;padding:20px 10px 0 120px;border-bottom:1px solid #ccc;background:left 10px no-repeat #fff;background-size:84px 84px;background-position-x:5%}.ecommerce h3,.ga_premium h3{background-repeat:no-repeat;background-size:84px 84px;background-position-x:5%}.wpseotab .extension button.installed{border-color:#00a000;background-color:#00a000;cursor:default}.wpseotab .extension .button-primary.activate-link{border-color:#f06000;background-color:#f18500;box-shadow:none;text-shadow:none}.extension a{text-decoration:none}.ecommerce h3{background-image:url(../img/eComm_130x100.png)!important}.ga_premium h3{background-image:url(../img/ga-premium-banner.png)!important}#ga-debug-info h3{height:30px;margin-top:10px;padding-left:16px;font-size:14px}.yoast_help{margin:2px 5px 0}#enter_ua div{display:inline-block;margin:0}
assets/img/banner-ga-ecommerce.png DELETED
Binary file
assets/img/banner-premium-ga.png DELETED
Binary file
assets/img/banner-website-review.png DELETED
Binary file
assets/img/eBook_261x130.png DELETED
Binary file
assets/img/eComm_130x100.png CHANGED
Binary file
assets/img/ga-premium-banner.png CHANGED
Binary file
assets/img/omupsell.png ADDED
Binary file
assets/img/upgradetopro.png ADDED
Binary file
assets/img/wpbeginnerupsell.png ADDED
Binary file
assets/img/wpformsupsell.png ADDED
Binary file
frontend/abstract-class-tracking.php CHANGED
@@ -301,14 +301,11 @@ abstract class Yoast_GA_Tracking {
301
  */
302
  public function do_tracking() {
303
  if ( $this->do_tracking === null ) {
304
- global $current_user;
305
-
306
- get_currentuserinfo();
307
-
308
  $this->do_tracking = true;
309
 
310
- if ( 0 != $current_user->ID && isset( $this->options['ignore_users'] ) ) {
311
- if ( ! empty( $current_user->roles ) && in_array( $current_user->roles[0], $this->options['ignore_users'] ) ) {
312
  $this->do_tracking = false;
313
  }
314
  }
@@ -454,8 +451,8 @@ abstract class Yoast_GA_Tracking {
454
  * When a usergroup is disabled, show a message in the source to notify the user they are in a disabled user group.
455
  */
456
  protected function disabled_usergroup() {
457
- /* translators %1$s is the product name 'Google Analytics by Yoast'. %2$s displays the plugin version the website uses and a link to the plugin on Yoast.com */
458
- echo '<!-- ' . sprintf( __( 'This site uses the %1$s plugin version %2$s', 'google-analytics-for-wordpress' ), 'Google Analytics by Yoast', GAWP_VERSION . ' - https://yoast.com/wordpress/plugins/google-analytics/' ) . ' -->';
459
 
460
  if ( current_user_can( 'manage_options' ) ) {
461
  echo '<!-- ' . __( '@Webmaster, normally you will find the Google Analytics tracking code here, but you are in the disabled user groups. To change this, navigate to Analytics -> Settings (Ignore usergroups)', 'google-analytics-for-wordpress' ) . ' -->';
@@ -465,7 +462,7 @@ abstract class Yoast_GA_Tracking {
465
  }
466
 
467
  // Do not make this translatable, as this is the product name.
468
- echo '<!-- / Google Analytics by Yoast -->';
469
  }
470
 
471
  /**
@@ -475,8 +472,8 @@ abstract class Yoast_GA_Tracking {
475
  */
476
  protected function debug_mode() {
477
  if ( $this->options['debug_mode'] === 1 ) {
478
- /* translators %1$s is the product name 'Google Analytics by Yoast'. %2$s displays the plugin version the website uses and a link to the plugin on Yoast.com */
479
- echo '<!-- ' . sprintf( __( 'This site uses the %1$s plugin version %2$s', 'google-analytics-for-wordpress' ), 'Google Analytics by Yoast', GAWP_VERSION . ' - https://yoast.com/wordpress/plugins/google-analytics/' ) . ' -->';
480
 
481
  if ( current_user_can( 'manage_options' ) ) {
482
  echo '<!-- ' . __( '@Webmaster, normally you will find the Google Analytics tracking code here, but the Debug Mode is enabled. To change this, navigate to Analytics -> Settings -> (Tab) Debug Mode and disable Debug Mode to enable tracking of your site.', 'google-analytics-for-wordpress' ) . ' -->';
@@ -486,7 +483,7 @@ abstract class Yoast_GA_Tracking {
486
  }
487
 
488
  // Do not make this translatable, as this is the product name.
489
- echo '<!-- / Google Analytics by Yoast -->';
490
 
491
  return true;
492
  }
301
  */
302
  public function do_tracking() {
303
  if ( $this->do_tracking === null ) {
304
+ $user = wp_get_current_user();
 
 
 
305
  $this->do_tracking = true;
306
 
307
+ if ( 0 != $user->ID && isset( $this->options['ignore_users'] ) ) {
308
+ if ( ! empty( $user->roles ) && in_array( $user->roles[0], $this->options['ignore_users'] ) ) {
309
  $this->do_tracking = false;
310
  }
311
  }
451
  * When a usergroup is disabled, show a message in the source to notify the user they are in a disabled user group.
452
  */
453
  protected function disabled_usergroup() {
454
+ /* translators %1$s is the product name 'Google Analytics by MonsterInsights'. %2$s displays the plugin version the website uses and a link to the plugin on MonsterInsights.com */
455
+ echo '<!-- ' . sprintf( __( 'This site uses the %1$s plugin version %2$s', 'google-analytics-for-wordpress' ), 'Google Analytics by MonsterInsights', GAWP_VERSION . ' - https://www.monsterinsights.com/' ) . ' -->';
456
 
457
  if ( current_user_can( 'manage_options' ) ) {
458
  echo '<!-- ' . __( '@Webmaster, normally you will find the Google Analytics tracking code here, but you are in the disabled user groups. To change this, navigate to Analytics -> Settings (Ignore usergroups)', 'google-analytics-for-wordpress' ) . ' -->';
462
  }
463
 
464
  // Do not make this translatable, as this is the product name.
465
+ echo '<!-- / Google Analytics by MonsterInsights -->';
466
  }
467
 
468
  /**
472
  */
473
  protected function debug_mode() {
474
  if ( $this->options['debug_mode'] === 1 ) {
475
+ /* translators %1$s is the product name 'Google Analytics by MonsterInsights'. %2$s displays the plugin version the website uses and a link to the plugin on MonsterInsights.com */
476
+ echo '<!-- ' . sprintf( __( 'This site uses the %1$s plugin version %2$s', 'google-analytics-for-wordpress' ), 'Google Analytics by MonsterInsights', GAWP_VERSION . ' - https://www.monsterinsights.com/' ) . ' -->';
477
 
478
  if ( current_user_can( 'manage_options' ) ) {
479
  echo '<!-- ' . __( '@Webmaster, normally you will find the Google Analytics tracking code here, but the Debug Mode is enabled. To change this, navigate to Analytics -> Settings -> (Tab) Debug Mode and disable Debug Mode to enable tracking of your site.', 'google-analytics-for-wordpress' ) . ' -->';
483
  }
484
 
485
  // Do not make this translatable, as this is the product name.
486
+ echo '<!-- / Google Analytics by MonsterInsights -->';
487
 
488
  return true;
489
  }
frontend/views/tracking-debug.php CHANGED
@@ -4,6 +4,6 @@
4
  */
5
 
6
  ?>
7
- <!-- This site uses the Google Analytics by Yoast plugin v<?php echo GAWP_VERSION; ?> - https://yoast.com/wordpress/plugins/google-analytics/ -->
8
  <!-- @Webmaster, normally you will find the Google Analytics tracking code here, but you have enabled the Debug Mode. Change that in Analytics -> (Tab) Debug mode and disable Debug Mode to enable the tracking of your site. -->
9
- <!-- / Google Analytics by Yoast -->
4
  */
5
 
6
  ?>
7
+ <!-- This site uses the Google Analytics by MonsterInsights plugin v<?php echo GAWP_VERSION; ?> - https://www.monsterinsights.com/ -->
8
  <!-- @Webmaster, normally you will find the Google Analytics tracking code here, but you have enabled the Debug Mode. Change that in Analytics -> (Tab) Debug mode and disable Debug Mode to enable the tracking of your site. -->
9
+ <!-- / Google Analytics by MonsterInsights -->
frontend/views/tracking-ga-js.php CHANGED
@@ -4,7 +4,7 @@
4
  */
5
 
6
  ?>
7
- <!-- This site uses the Google Analytics by Yoast plugin v<?php echo GAWP_VERSION; ?> - Universal disabled - https://yoast.com/wordpress/plugins/google-analytics/ -->
8
  <script type="text/javascript">
9
 
10
  var _gaq = _gaq || [];
@@ -32,4 +32,4 @@ if ( count( $gaq_push ) >= 1 ) {
32
  })();
33
 
34
  </script>
35
- <!-- / Google Analytics by Yoast -->
4
  */
5
 
6
  ?>
7
+ <!-- This site uses the Google Analytics by MonsterInsights plugin v<?php echo GAWP_VERSION; ?> - Universal disabled - https://www.monsterinsights.com/ -->
8
  <script type="text/javascript">
9
 
10
  var _gaq = _gaq || [];
32
  })();
33
 
34
  </script>
35
+ <!-- / Google Analytics by MonsterInsights -->
frontend/views/tracking-universal.php CHANGED
@@ -4,7 +4,7 @@
4
  */
5
 
6
  ?>
7
- <!-- This site uses the Google Analytics by Yoast plugin v<?php echo GAWP_VERSION; ?> - Universal enabled - https://yoast.com/wordpress/plugins/google-analytics/ -->
8
  <script type="text/javascript">
9
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
10
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -26,4 +26,4 @@ if ( count( $gaq_push ) >= 1 ) {
26
  ?>
27
 
28
  </script>
29
- <!-- / Google Analytics by Yoast -->
4
  */
5
 
6
  ?>
7
+ <!-- This site uses the Google Analytics by MonsterInsights plugin v<?php echo GAWP_VERSION; ?> - Universal enabled - https://www.monsterinsights.com/ -->
8
  <script type="text/javascript">
9
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
10
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
26
  ?>
27
 
28
  </script>
29
+ <!-- / Google Analytics by MonsterInsights -->
googleanalytics.php CHANGED
@@ -5,19 +5,19 @@
5
  */
6
 
7
  /**
8
- * Plugin Name: Google Analytics by Yoast
9
- * Plugin URI: https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v504
10
  * Description: This plugin makes it simple to add Google Analytics to your WordPress site, adding lots of features, e.g. error page, search result and automatic outgoing links and download tracking.
11
- * Author: Team Yoast
12
- * Version: 5.4.6
13
  * Requires at least: 3.9
14
- * Author URI: https://yoast.com/
15
  * License: GPL v3
16
  * Text Domain: google-analytics-for-wordpress
17
  * Domain Path: /languages
18
  *
19
  * Google Analytics for WordPress
20
- * Copyright (C) 2008-2015, Team Yoast, support@yoast.com
21
  *
22
  * This program is free software: you can redistribute it and/or modify
23
  * it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@
35
 
36
  // This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
37
 
38
- define( 'GAWP_VERSION', '5.4.6' );
39
 
40
  define( 'GAWP_FILE', __FILE__ );
41
 
@@ -43,6 +43,27 @@ define( 'GAWP_PATH', plugin_basename( __FILE__ ) );
43
 
44
  define( 'GAWP_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  if ( file_exists( dirname( GAWP_FILE ) . '/vendor/autoload_52.php' ) ) {
47
  require dirname( GAWP_FILE ) . '/vendor/autoload_52.php';
48
  }
5
  */
6
 
7
  /**
8
+ * Plugin Name: Google Analytics by MonsterInsights
9
+ * Plugin URI: https://www.monsterinsights.com/pricing/#utm_source=wordpress&utm_medium=plugin&utm_campaign=wpgaplugin&utm_content=v504
10
  * Description: This plugin makes it simple to add Google Analytics to your WordPress site, adding lots of features, e.g. error page, search result and automatic outgoing links and download tracking.
11
+ * Author: MonsterInsights
12
+ * Version: 5.4.9
13
  * Requires at least: 3.9
14
+ * Author URI: https://www.monsterinsights.com/
15
  * License: GPL v3
16
  * Text Domain: google-analytics-for-wordpress
17
  * Domain Path: /languages
18
  *
19
  * Google Analytics for WordPress
20
+ * Copyright (C) 2008-2016, MonsterInsights, support@monsterinsights.com
21
  *
22
  * This program is free software: you can redistribute it and/or modify
23
  * it under the terms of the GNU General Public License as published by
35
 
36
  // This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
37
 
38
+ define( 'GAWP_VERSION', '5.4.9' );
39
 
40
  define( 'GAWP_FILE', __FILE__ );
41
 
43
 
44
  define( 'GAWP_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
45
 
46
+ function monsterinsights_needs_manual_update_check(){
47
+ require_once 'includes/ecommerce-addon-license-fix.php';
48
+ }
49
+ add_action( 'plugins_loaded', 'monsterinsights_needs_manual_update_check');
50
+
51
+ function welcome_to_monsterinsights_admin_notice() {
52
+ $user = get_current_user_id();
53
+ if ( !current_user_can('manage_options' ) ) {
54
+ return;
55
+ }
56
+ if ( ! get_option( 'monsterinsights_welcome_' . $user, false ) ) { ?>
57
+ <div class="updated notice is-dismissible">
58
+ <p><?php echo sprintf(__( 'Google Analytics By Yoast is now MonsterInsights. Read about this transition %s here %s', 'google-analytics-for-wordpress'), '<a href="https://monsterinsights.com/welcome-to-monsterinsights">', '</a>' ); ?></p>
59
+ </div>
60
+ <?php
61
+ update_option( 'monsterinsights_welcome_' . $user, true );
62
+ }
63
+
64
+ }
65
+ add_action( 'admin_notices', 'welcome_to_monsterinsights_admin_notice' );
66
+
67
  if ( file_exists( dirname( GAWP_FILE ) . '/vendor/autoload_52.php' ) ) {
68
  require dirname( GAWP_FILE ) . '/vendor/autoload_52.php';
69
  }
includes/ecommerce-addon-license-fix.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! class_exists( 'MI_Product_GA_eCommerce', false ) && class_exists( 'MI_Product' ) ){
3
+
4
+ /**
5
+ * Class MI_Product_GA_eCommerce
6
+ *
7
+ * @since 3.0
8
+ */
9
+ class MI_Product_GA_eCommerce extends MI_Product {
10
+
11
+ /**
12
+ * Contains the license manager object
13
+ *
14
+ * @var object MI_Plugin_License_Manager
15
+ */
16
+ protected $license_manager;
17
+
18
+
19
+ public function __construct() {
20
+ parent::__construct(
21
+ 'https://www.monsterinsights.com',
22
+ 'eCommerce Addon',
23
+ plugin_basename( Yoast_GA_eCommerce_Tracking::PLUGIN_FILE ),
24
+ Yoast_GA_eCommerce_Tracking::VERSION,
25
+ 'https://www.monsterinsights.com/pricing/',
26
+ 'admin.php?page=yst_ga_extensions#top#licenses',
27
+ 'yoast-ga-ecommerce',
28
+ 'MonsterInsights'
29
+ );
30
+
31
+ $this->setup_license_manager();
32
+ }
33
+
34
+ /**
35
+ * Setting up the license manager
36
+ *
37
+ * @since 3.0
38
+ */
39
+ protected function setup_license_manager() {
40
+
41
+ $license_manager = new MI_Plugin_License_Manager( $this );
42
+ $license_manager->setup_hooks();
43
+
44
+ add_filter( 'yst_ga_extension_status', array( $this, 'filter_extension_is_active' ), 10, 1 );
45
+ add_action( 'yst_ga_show_license_form', array( $this, 'action_show_license_form' ) );
46
+
47
+ $this->license_manager = $license_manager;
48
+ }
49
+
50
+ /**
51
+ * If extension is active, it should be check if its license is valid
52
+ *
53
+ * @since 3.0
54
+ *
55
+ * @param $extensions
56
+ *
57
+ * @return mixed
58
+ */
59
+ public function filter_extension_is_active( $extensions ) {
60
+ if ( $this->license_manager->license_is_valid() ) {
61
+ $extensions['ecommerce']->status = 'active';
62
+ } else {
63
+ $extensions['ecommerce']->status = 'inactive';
64
+ }
65
+
66
+ return $extensions;
67
+ }
68
+
69
+ /**
70
+ * This method will echo the license form for the extension
71
+ *
72
+ * @since 3.0
73
+ */
74
+ public function action_show_license_form() {
75
+ echo $this->license_manager->show_license_form( false );
76
+ }
77
+
78
+ }
79
+ // Setting up the license manager
80
+ if ( defined( 'GAWP_ECOMMERCE_PATH' ) && defined( 'Yoast_GA_eCommerce_Tracking::VERSION' ) && Yoast_GA_eCommerce_Tracking::VERSION === '5.4.8' ) {
81
+ new MI_Product_GA_eCommerce();
82
+ }
83
+ }
languages/google-analytics-for-wordpress-ca.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-da_DK.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-de_DE.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-en_AU.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-en_CA.mo ADDED
Binary file
languages/google-analytics-for-wordpress-en_GB.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-es_ES.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-es_MX.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-fa_IR.mo ADDED
Binary file
languages/google-analytics-for-wordpress-fr_FR.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-he_IL.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-it_IT.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-ja.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-nb_NO.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-nl_NL.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-pl_PL.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-pt_PT.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-ru_RU.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-sv_SE.mo CHANGED
Binary file
languages/google-analytics-for-wordpress-tr_TR.mo CHANGED
Binary file
languages/google-analytics-for-wordpress.pot CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: Google Analytics by Yoast 5.4.6\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/yoast/google-analytics-for-wordpress/issues\n"
8
- "POT-Creation-Date: 2015-08-25 13:38:43+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -25,7 +25,7 @@ msgstr ""
25
  "X-Poedit-Bookmarks: \n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
- #: admin/class-admin-form.php:46 admin/pages/settings.php:176
29
  msgid "Save changes"
30
  msgstr ""
31
 
@@ -33,7 +33,7 @@ msgstr ""
33
  msgid "Yoast Google Analytics:"
34
  msgstr ""
35
 
36
- #: admin/class-admin-menu.php:72 admin/pages/settings.php:32
37
  msgid "General settings"
38
  msgstr ""
39
 
@@ -41,12 +41,13 @@ msgstr ""
41
  msgid "Analytics"
42
  msgstr ""
43
 
44
- #: admin/class-admin-menu.php:236 admin/pages/dashboard.php:14
 
45
  msgid "Dashboard"
46
  msgstr ""
47
 
48
- #: admin/class-admin-menu.php:242 admin/class-admin.php:326
49
- #: admin/pages/settings.php:10
50
  msgid "Settings"
51
  msgstr ""
52
 
@@ -55,7 +56,7 @@ msgstr ""
55
  msgid "Extensions"
56
  msgstr ""
57
 
58
- #: admin/class-admin.php:91
59
  msgid ""
60
  "Yoast plugins share some code between them to make your site faster. As a "
61
  "result of that, we need all Yoast plugins to be up to date. We've detected "
@@ -63,94 +64,261 @@ msgid ""
63
  "date yet."
64
  msgstr ""
65
 
66
- #: admin/class-admin.php:134
67
  msgid "Settings saved."
68
  msgstr ""
69
 
70
- #: admin/class-admin.php:141
71
  msgid "There were no changes to save, please try again."
72
  msgstr ""
73
 
74
- #: admin/class-admin.php:185
75
  msgid "The UA code needs to follow UA-XXXXXXXX-X format."
76
  msgstr ""
77
 
78
- #: admin/class-admin.php:323
79
  msgid "FAQ"
80
  msgstr ""
81
 
82
- #: admin/class-admin.php:338
 
 
83
  msgid ""
84
  "If you want to track custom dimensions like page views per author or post "
85
- "type, you should upgrade to the %1$spremium version of Google Analytics by "
86
- "Yoast%2$s."
 
87
  msgstr ""
88
 
89
- #: admin/class-admin.php:340
90
- msgid ""
91
- "This will also give you email access to the support team at Yoast, who will "
92
- "provide support on the plugin 24/7."
93
- msgstr ""
94
-
95
- #: admin/class-admin.php:478
96
  msgid "Event"
97
  msgstr ""
98
 
99
- #: admin/class-admin.php:479
100
  msgid "Pageview"
101
  msgstr ""
102
 
103
- #: admin/class-admin.php:490
104
  msgid "Just the domain"
105
  msgstr ""
106
 
107
- #: admin/class-admin.php:491
108
  msgid "Full links"
109
  msgstr ""
110
 
111
- #: admin/class-admin.php:511
112
  msgid "Debug information"
113
  msgstr ""
114
 
115
- #: admin/class-admin.php:560
116
- msgid "Google Analytics by Yoast Premium"
 
117
  msgstr ""
118
 
119
- #: admin/class-admin.php:561
120
- msgid ""
121
- "The premium version of Google Analytics by Yoast with more features and "
122
- "support."
123
- msgstr ""
124
-
125
- #. Plugin Name of the plugin/theme
126
- msgid "Google Analytics by Yoast"
127
- msgstr ""
128
-
129
- #: admin/class-admin.php:566
130
  msgid "eCommerce tracking"
131
  msgstr ""
132
 
133
- #: admin/class-admin.php:567
134
  msgid ""
135
  "Track your eCommerce data and transactions with this eCommerce extension "
136
  "for Google Analytics."
137
  msgstr ""
138
 
139
- #: admin/class-google-analytics.php:323
140
- msgid "Please configure your %sGoogle Analytics settings%s!"
 
 
141
  msgstr ""
142
 
143
- #: admin/class-google-analytics.php:336
 
 
144
  msgid ""
145
  "It seems the authentication for the plugin has expired, please "
146
- "%sre-authenticate%s with Google Analytics to allow the plugin to fetch data."
 
147
  msgstr ""
148
 
149
- #: admin/class-google-analytics.php:349
 
 
150
  msgid ""
151
  "Data is not up-to-date, there was an error in retrieving the data from "
152
  "Google Analytics. This error could be caused by several issues. If the "
153
- "error persists, please see %sthis page%s."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  msgstr ""
155
 
156
  #: admin/dashboards/class-admin-dashboards.php:135
@@ -181,14 +349,6 @@ msgstr ""
181
  msgid "Last"
182
  msgstr ""
183
 
184
- #: admin/dashboards/class-admin-dashboards.php:145
185
- msgid "Next"
186
- msgstr ""
187
-
188
- #: admin/dashboards/class-admin-dashboards.php:146
189
- msgid "Previous"
190
- msgstr ""
191
-
192
  #: admin/dashboards/class-admin-dashboards.php:147
193
  msgid "Processing..."
194
  msgstr ""
@@ -210,9 +370,9 @@ msgid "Custom dimension reports"
210
  msgstr ""
211
 
212
  #: admin/dashboards/class-admin-dashboards.php:191
213
- #: admin/dashboards/class-admin-dashboards.php:208
214
- #: admin/dashboards/class-admin-dashboards.php:217
215
- #: admin/dashboards/class-admin-dashboards.php:226
216
  msgid "Sessions"
217
  msgstr ""
218
 
@@ -226,10 +386,18 @@ msgid ""
226
  msgstr ""
227
 
228
  #: admin/dashboards/class-admin-dashboards.php:197
229
- msgid "Bounce rate"
230
  msgstr ""
231
 
232
  #: admin/dashboards/class-admin-dashboards.php:198
 
 
 
 
 
 
 
 
233
  msgid ""
234
  "Bounce Rate is the percentage of single-page sessions (i.e. sessions in "
235
  "which the person left your site from the entrance page without interacting "
@@ -237,11 +405,11 @@ msgid ""
237
  "more]</a>"
238
  msgstr ""
239
 
240
- #: admin/dashboards/class-admin-dashboards.php:204
241
  msgid "Traffic sources"
242
  msgstr ""
243
 
244
- #: admin/dashboards/class-admin-dashboards.php:205
245
  msgid ""
246
  "Every referral to a web site has an origin, or (traffic) source. Possible "
247
  "sources include: “google” (the name of a search engine), “facebook.com” "
@@ -251,19 +419,19 @@ msgid ""
251
  "href=\"http://yoa.st/gabnce\" target=\"_blank\">[Learn more]</a>"
252
  msgstr ""
253
 
254
- #: admin/dashboards/class-admin-dashboards.php:213
255
  msgid "Popular pages"
256
  msgstr ""
257
 
258
- #: admin/dashboards/class-admin-dashboards.php:214
259
  msgid "Pages by url."
260
  msgstr ""
261
 
262
- #: admin/dashboards/class-admin-dashboards.php:222
263
  msgid "Countries"
264
  msgstr ""
265
 
266
- #: admin/dashboards/class-admin-dashboards.php:223
267
  msgid ""
268
  "The country or territory from which visits originated. <a "
269
  "href=\"http://yoa.st/gacountry\" target=\"_blank\">[Learn more]</a>"
@@ -273,8 +441,7 @@ msgstr ""
273
  msgid "Last month"
274
  msgstr ""
275
 
276
- #: admin/pages/dashboard.php:14 admin/pages/extensions.php:14
277
- #: admin/pages/settings.php:10
278
  msgid "Google Analytics by Yoast: "
279
  msgstr ""
280
 
@@ -282,28 +449,41 @@ msgstr ""
282
  msgid "Overview"
283
  msgstr ""
284
 
285
- #: admin/pages/dashboard.php:43 admin/pages/dashboard.php:82
 
 
 
 
286
  msgid ""
287
  "We need you to authenticate with Google Analytics to use this "
288
  "functionality. If you set your UA-code manually, this won't work. You can "
289
- "%sauthenticate your Google Analytics profile here%s to enable dashboards."
 
290
  msgstr ""
291
 
292
- #: admin/pages/dashboard.php:52 admin/pages/dashboard.php:91
 
 
 
 
293
  msgid ""
294
  "Because we've switched to a newer version of the Google Analytics API, "
295
  "you'll need to re-authenticate with Google Analytics. We're sorry for the "
296
- "inconvenience. You can %sre-authenticate your Google Analytics profile "
297
- "here%s."
298
  msgstr ""
299
 
300
- #: admin/pages/dashboard.php:65 admin/pages/dashboard.php:111
 
 
 
 
301
  msgid ""
302
  "You have not yet finished setting up Google Analytics for Wordpress by "
303
- "Yoast. Please %sadd your Analytics profile here%s to enable tracking."
304
  msgstr ""
305
 
306
- #: admin/pages/dashboard.php:100
307
  msgid "Select a dimension"
308
  msgstr ""
309
 
@@ -323,10 +503,11 @@ msgstr ""
323
  msgid "Installed"
324
  msgstr ""
325
 
326
- #: admin/pages/extensions.php:51
 
327
  msgid ""
328
- "You have not installed any extensions for Google Analytics by Yoast, so "
329
- "there are no licenses to activate."
330
  msgstr ""
331
 
332
  #: admin/pages/settings.php:17
@@ -349,153 +530,172 @@ msgstr ""
349
  msgid "Debug mode"
350
  msgstr ""
351
 
352
- #: admin/pages/settings.php:46
353
  msgid "Paste your Google authentication code"
354
  msgstr ""
355
 
356
- #: admin/pages/settings.php:51
357
  msgid "Google profile"
358
  msgstr ""
359
 
360
- #: admin/pages/settings.php:52
361
  msgid "Authenticate with your Google account"
362
  msgstr ""
363
 
364
- #: admin/pages/settings.php:55
365
  msgid "Current UA-profile"
366
  msgstr ""
367
 
368
- #: admin/pages/settings.php:60
369
  msgid "Analytics profile"
370
  msgstr ""
371
 
372
- #: admin/pages/settings.php:60
373
  msgid "Select a profile"
374
  msgstr ""
375
 
376
- #: admin/pages/settings.php:64
377
  msgid "Re-authenticate with your Google account"
378
  msgstr ""
379
 
380
- #: admin/pages/settings.php:70
381
  msgid "Paste your Google code here"
382
  msgstr ""
383
 
384
- #: admin/pages/settings.php:74
385
  msgid "Save authentication code"
386
  msgstr ""
387
 
388
- #: admin/pages/settings.php:78
389
  msgid "Cannot connect to Google"
390
  msgstr ""
391
 
392
- #: admin/pages/settings.php:80
393
  msgid ""
394
  "Your server is blocking requests to Google, to fix this, add "
395
  "<code>*.googleapis.com</code> to the <code>WP_ACCESSIBLE_HOSTS</code> "
396
  "constant in your <em>wp-config.php</em> or ask your webhost to do this."
397
  msgstr ""
398
 
399
- #: admin/pages/settings.php:83
400
  msgid ""
401
  "Your firewall or webhost is blocking requests to Google, please ask your "
402
  "webhost company to fix this."
403
  msgstr ""
404
 
405
- #: admin/pages/settings.php:85
406
  msgid ""
407
  "Until this is fixed, you can only use the manual authentication method and "
408
  "cannot use the dashboards feature."
409
  msgstr ""
410
 
411
- #: admin/pages/settings.php:89
412
  msgid "Manually enter your UA code"
413
  msgstr ""
414
 
415
- #: admin/pages/settings.php:93
416
  msgid ""
417
  "Warning: If you use a manual UA code, you won't be able to use the "
418
  "dashboards."
419
  msgstr ""
420
 
421
- #: admin/pages/settings.php:99
422
  msgid "Track outbound click and downloads"
423
  msgstr ""
424
 
425
- #: admin/pages/settings.php:99
426
  msgid ""
427
  "Clicks and downloads will be tracked as events, you can find these under "
428
  "Content &#xBB; Event Tracking in your Google Analytics reports."
429
  msgstr ""
430
 
431
- #: admin/pages/settings.php:100
432
  msgid "Allow tracking of anonymous data"
433
  msgstr ""
434
 
435
- #: admin/pages/settings.php:100
436
  msgid ""
437
  "By allowing us to track anonymous data we can better help you, because we "
438
  "know with which WordPress configurations, themes and plugins we should "
439
  "test. No personal data will be submitted."
440
  msgstr ""
441
 
442
- #: admin/pages/settings.php:101
 
 
443
  msgid "Anonymize IPs"
444
  msgstr ""
445
 
446
- #: admin/pages/settings.php:101
447
  msgid ""
448
  "This adds %1$s, telling Google Analytics to anonymize the information sent "
449
  "by the tracker objects by removing the last octet of the IP address prior "
450
  "to its storage."
451
  msgstr ""
452
 
453
- #: admin/pages/settings.php:102
454
  msgid "Ignore users"
455
  msgstr ""
456
 
457
- #: admin/pages/settings.php:102
458
  msgid ""
459
  "Users of the role you select will be ignored, so if you select Editor, all "
460
  "Editors will be ignored."
461
  msgstr ""
462
 
463
- #: admin/pages/settings.php:103
464
  msgid "Disable analytics dashboard"
465
  msgstr ""
466
 
467
- #: admin/pages/settings.php:103
468
  msgid ""
469
  "This will completely disable the dashboard and stop the plugin from "
470
  "fetching the latest analytics data."
471
  msgstr ""
472
 
473
- #: admin/pages/settings.php:109
 
 
 
 
 
 
 
 
 
 
 
 
474
  msgid "Universal settings"
475
  msgstr ""
476
 
477
- #: admin/pages/settings.php:110
 
 
478
  msgid "Enable Universal tracking"
479
  msgstr ""
480
 
481
- #: admin/pages/settings.php:110
482
  msgid ""
483
  "First enable Universal tracking in your Google Analytics account. Please "
484
  "read %1$sthis guide%2$s to learn how to do that."
485
  msgstr ""
486
 
487
- #: admin/pages/settings.php:113
488
  msgid "Enable Demographics and Interests Reports for Remarketing and Advertising"
489
  msgstr ""
490
 
491
- #: admin/pages/settings.php:115
492
  msgid ""
493
  "Note that usage of this function is affected by privacy and cookie laws "
494
  "around the world. Be sure to follow the laws that affect your target "
495
  "audience."
496
  msgstr ""
497
 
498
- #: admin/pages/settings.php:118
 
 
 
499
  msgid ""
500
  "Check this setting to add the Demographics and Remarketing features to your "
501
  "Google Analytics tracking code. We've written an article in our "
@@ -504,66 +704,72 @@ msgid ""
504
  "documentation%2$s."
505
  msgstr ""
506
 
507
- #: admin/pages/settings.php:124
 
 
508
  msgid "Enhanced Link Attribution"
509
  msgstr ""
510
 
511
- #: admin/pages/settings.php:124
512
  msgid "Add %1$sEnhanced Link Attribution%2$s to your tracking code."
513
  msgstr ""
514
 
515
- #: admin/pages/settings.php:134
516
  msgid "Advanced settings"
517
  msgstr ""
518
 
519
- #: admin/pages/settings.php:135
520
  msgid "Track downloads as"
521
  msgstr ""
522
 
523
- #: admin/pages/settings.php:135
524
  msgid ""
525
  "Not recommended, as this would skew your statistics, but it does make it "
526
  "possible to track downloads as goals."
527
  msgstr ""
528
 
529
- #: admin/pages/settings.php:136
530
  msgid "Extensions of files to track as downloads"
531
  msgstr ""
532
 
533
- #: admin/pages/settings.php:137
534
  msgid "Track full URL of outbound clicks or just the domain"
535
  msgstr ""
536
 
537
- #: admin/pages/settings.php:138
 
 
538
  msgid "Subdomain tracking"
539
  msgstr ""
540
 
541
- #: admin/pages/settings.php:138
542
  msgid ""
543
  "This allows you to set the domain that's set by %1$s for tracking "
544
  "subdomains.<br/>If empty, this will not be set."
545
  msgstr ""
546
 
547
- #: admin/pages/settings.php:140
 
 
548
  msgid "Set path for internal links to track as outbound links"
549
  msgstr ""
550
 
551
- #: admin/pages/settings.php:140
552
  msgid ""
553
  "If you want to track all internal links that begin with %1$s, enter %1$s in "
554
  "the box above. If you have multiple prefixes you can separate them with "
555
  "comma's: %2$s"
556
  msgstr ""
557
 
558
- #: admin/pages/settings.php:141
559
  msgid "Label for those links"
560
  msgstr ""
561
 
562
- #: admin/pages/settings.php:143
563
  msgid "Tag links in RSS feed with campaign variables"
564
  msgstr ""
565
 
566
- #: admin/pages/settings.php:143
567
  msgid ""
568
  "Do not use this feature if you use FeedBurner, as FeedBurner can do this "
569
  "automatically and better than this plugin can. Check <a "
@@ -572,60 +778,66 @@ msgid ""
572
  "enable this feature in FeedBurner."
573
  msgstr ""
574
 
575
- #: admin/pages/settings.php:144
 
 
576
  msgid "Allow anchor"
577
  msgstr ""
578
 
579
- #: admin/pages/settings.php:144
580
  msgid ""
581
  "This adds a %1$s call to your tracking code, and makes RSS link tagging use "
582
  "a %2$s as well."
583
  msgstr ""
584
 
585
- #: admin/pages/settings.php:145
 
 
586
  msgid "Add <code>_setAllowLinker</code>"
587
  msgstr ""
588
 
589
- #: admin/pages/settings.php:145
590
  msgid ""
591
  "This adds a %1$s call to your tracking code, allowing you to use %2$s and "
592
  "related functions."
593
  msgstr ""
594
 
595
- #: admin/pages/settings.php:147
 
 
596
  msgid "Custom code"
597
  msgstr ""
598
 
599
- #: admin/pages/settings.php:147
600
  msgid ""
601
  "Not for the average user: this allows you to add a line of code, to be "
602
  "added before the %1$s call."
603
  msgstr ""
604
 
605
- #: admin/pages/settings.php:158
606
  msgid "Custom dimensions"
607
  msgstr ""
608
 
609
- #: admin/pages/settings.php:165
610
  msgid "Debug"
611
  msgstr ""
612
 
613
- #: admin/pages/settings.php:168
614
  msgid ""
615
  "If you want to confirm that tracking on your blog is working as it should, "
616
  "enable this option and check the console of your browser. Be absolutely "
617
  "sure to disable debugging afterwards, as it is slower than normal tracking."
618
  msgstr ""
619
 
620
- #: admin/pages/settings.php:169
621
  msgid "<strong>Note</strong> the debugging is only loaded for administrators."
622
  msgstr ""
623
 
624
- #: admin/pages/settings.php:171
625
  msgid "Enable debug mode"
626
  msgstr ""
627
 
628
- #: admin/pages/settings.php:185
629
  msgid "Select the users to ignore"
630
  msgstr ""
631
 
@@ -637,25 +849,25 @@ msgstr ""
637
  msgid "Upgrade to Google Analytics By Yoast Premium »"
638
  msgstr ""
639
 
640
- #: frontend/abstract-class-tracking.php:458
641
- #: frontend/abstract-class-tracking.php:479
642
  msgid "This site uses the %1$s plugin version %2$s"
643
  msgstr ""
644
 
645
- #: frontend/abstract-class-tracking.php:461
646
  msgid ""
647
  "@Webmaster, normally you will find the Google Analytics tracking code here, "
648
  "but you are in the disabled user groups. To change this, navigate to "
649
  "Analytics -> Settings (Ignore usergroups)"
650
  msgstr ""
651
 
652
- #: frontend/abstract-class-tracking.php:464
653
  msgid ""
654
  "Normally you will find the Google Analytics tracking code here, but the "
655
  "webmaster disabled your user group."
656
  msgstr ""
657
 
658
- #: frontend/abstract-class-tracking.php:482
659
  msgid ""
660
  "@Webmaster, normally you will find the Google Analytics tracking code here, "
661
  "but the Debug Mode is enabled. To change this, navigate to Analytics -> "
@@ -663,7 +875,7 @@ msgid ""
663
  "your site."
664
  msgstr ""
665
 
666
- #: frontend/abstract-class-tracking.php:485
667
  msgid ""
668
  "Normally you will find the Google Analytics tracking code here, but the "
669
  "webmaster has enabled the Debug Mode."
@@ -870,6 +1082,10 @@ msgstr ""
870
  msgid "%sRenew your license now%s."
871
  msgstr ""
872
 
 
 
 
 
873
  #. Plugin URI of the plugin/theme
874
  msgid ""
875
  "https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&"
5
  "Project-Id-Version: Google Analytics by Yoast 5.4.6\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://github.com/yoast/google-analytics-for-wordpress/issues\n"
8
+ "POT-Creation-Date: 2015-11-17 15:10:19+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
25
  "X-Poedit-Bookmarks: \n"
26
  "X-Textdomain-Support: yes\n"
27
 
28
+ #: admin/class-admin-form.php:46 admin/pages/settings.php:220
29
  msgid "Save changes"
30
  msgstr ""
31
 
33
  msgid "Yoast Google Analytics:"
34
  msgstr ""
35
 
36
+ #: admin/class-admin-menu.php:72 admin/pages/settings.php:33
37
  msgid "General settings"
38
  msgstr ""
39
 
41
  msgid "Analytics"
42
  msgstr ""
43
 
44
+ #: admin/class-admin-menu.php:236 admin/class-pointers.php:240
45
+ #: admin/pages/dashboard.php:14
46
  msgid "Dashboard"
47
  msgstr ""
48
 
49
+ #: admin/class-admin-menu.php:242 admin/class-admin.php:328
50
+ #: admin/class-pointers.php:207 admin/pages/settings.php:10
51
  msgid "Settings"
52
  msgstr ""
53
 
56
  msgid "Extensions"
57
  msgstr ""
58
 
59
+ #: admin/class-admin.php:93
60
  msgid ""
61
  "Yoast plugins share some code between them to make your site faster. As a "
62
  "result of that, we need all Yoast plugins to be up to date. We've detected "
64
  "date yet."
65
  msgstr ""
66
 
67
+ #: admin/class-admin.php:136
68
  msgid "Settings saved."
69
  msgstr ""
70
 
71
+ #: admin/class-admin.php:143
72
  msgid "There were no changes to save, please try again."
73
  msgstr ""
74
 
75
+ #: admin/class-admin.php:187
76
  msgid "The UA code needs to follow UA-XXXXXXXX-X format."
77
  msgstr ""
78
 
79
+ #: admin/class-admin.php:325
80
  msgid "FAQ"
81
  msgstr ""
82
 
83
+ #: admin/class-admin.php:341
84
+ #. translators: 1: link to the Google Analytics product page on Yoast.com. 2:
85
+ #. product name: 'Google Analytics by Yoast Premium' 3: closing tag for link.
86
  msgid ""
87
  "If you want to track custom dimensions like page views per author or post "
88
+ "type, you should %1$supgrade to %2$s%3$s. This will also give you email "
89
+ "access to the support team at Yoast, who will provide support on the plugin "
90
+ "24/7."
91
  msgstr ""
92
 
93
+ #: admin/class-admin.php:479
 
 
 
 
 
 
94
  msgid "Event"
95
  msgstr ""
96
 
97
+ #: admin/class-admin.php:480
98
  msgid "Pageview"
99
  msgstr ""
100
 
101
+ #: admin/class-admin.php:491
102
  msgid "Just the domain"
103
  msgstr ""
104
 
105
+ #: admin/class-admin.php:492
106
  msgid "Full links"
107
  msgstr ""
108
 
109
+ #: admin/class-admin.php:512
110
  msgid "Debug information"
111
  msgstr ""
112
 
113
+ #: admin/class-admin.php:563
114
+ #. translators: %s stands for 'Google Analytics by Yoast'.
115
+ msgid "The premium version of %s with more features and support."
116
  msgstr ""
117
 
118
+ #: admin/class-admin.php:568
 
 
 
 
 
 
 
 
 
 
119
  msgid "eCommerce tracking"
120
  msgstr ""
121
 
122
+ #: admin/class-admin.php:569
123
  msgid ""
124
  "Track your eCommerce data and transactions with this eCommerce extension "
125
  "for Google Analytics."
126
  msgstr ""
127
 
128
+ #: admin/class-google-analytics.php:324
129
+ #. translators: 1: link to Google Analytics by Yoast settings page. 2: closing
130
+ #. of the link.
131
+ msgid "Please configure your %1$sGoogle Analytics settings%2$s!"
132
  msgstr ""
133
 
134
+ #: admin/class-google-analytics.php:338
135
+ #. translators: 1: link to Google Analytics by Yoast settings page. 2: closing
136
+ #. of the link
137
  msgid ""
138
  "It seems the authentication for the plugin has expired, please "
139
+ "%1$sre-authenticate%2$s with Google Analytics to allow the plugin to fetch "
140
+ "data."
141
  msgstr ""
142
 
143
+ #: admin/class-google-analytics.php:352
144
+ #. translators: 1: link to knowledge base article about authentication issues.
145
+ #. 2: closing of the link.
146
  msgid ""
147
  "Data is not up-to-date, there was an error in retrieving the data from "
148
  "Google Analytics. This error could be caused by several issues. If the "
149
+ "error persists, please %1$sread this article about authentication "
150
+ "issues%2$s."
151
+ msgstr ""
152
+
153
+ #: admin/class-pointers.php:76 tests/test-class-pointers.php:185
154
+ msgid "Close"
155
+ msgstr ""
156
+
157
+ #: admin/class-pointers.php:140 admin/dashboards/class-admin-dashboards.php:145
158
+ msgid "Next"
159
+ msgstr ""
160
+
161
+ #: admin/class-pointers.php:144 admin/dashboards/class-admin-dashboards.php:146
162
+ msgid "Previous"
163
+ msgstr ""
164
+
165
+ #: admin/class-pointers.php:168 tests/test-class-pointers.php:161
166
+ msgid "Congratulations!"
167
+ msgstr ""
168
+
169
+ #: admin/class-pointers.php:169 tests/test-class-pointers.php:162
170
+ msgid ""
171
+ "You've just installed Google Analytics by Yoast! Click \"Start tour\" to "
172
+ "view a quick introduction of this plugin's core functionality."
173
+ msgstr ""
174
+
175
+ #: admin/class-pointers.php:181 tests/test-class-pointers.php:172
176
+ msgid "Start tour"
177
+ msgstr ""
178
+
179
+ #: admin/class-pointers.php:208
180
+ msgid "Tab: General"
181
+ msgstr ""
182
+
183
+ #: admin/class-pointers.php:210
184
+ #. translators: %s is the product name 'Google Analytics by Yoast'
185
+ msgid ""
186
+ "These are the general settings for %s. Here you can authenticate and "
187
+ "connect your Google Analytics profile, enable general tracking features and "
188
+ "restart this tour."
189
+ msgstr ""
190
+
191
+ #: admin/class-pointers.php:211
192
+ msgid "Tab: Universal"
193
+ msgstr ""
194
+
195
+ #: admin/class-pointers.php:212
196
+ msgid ""
197
+ "Enable Universal tracking and tracking features related to Universal "
198
+ "tracking."
199
+ msgstr ""
200
+
201
+ #: admin/class-pointers.php:213
202
+ msgid "Tab: Advanced"
203
+ msgstr ""
204
+
205
+ #: admin/class-pointers.php:214
206
+ msgid ""
207
+ "The section where you can find the advanced settings of this plugin. Here "
208
+ "you can alter how you track certain things and add custom code if "
209
+ "necessary. Only use this if you know what you’re doing."
210
+ msgstr ""
211
+
212
+ #: admin/class-pointers.php:215
213
+ msgid "Tab: Custom dimensions"
214
+ msgstr ""
215
+
216
+ #: admin/class-pointers.php:217
217
+ #. translators: %s links to
218
+ #. `https:yoast.com/wordpress/plugins/google-analytics/`
219
+ msgid ""
220
+ "You can only use this functionality if you have %s. Custom dimensions allow "
221
+ "for much more powerful and specific tracking."
222
+ msgstr ""
223
+
224
+ #: admin/class-pointers.php:218
225
+ msgid "Tab: Debug mode"
226
+ msgstr ""
227
+
228
+ #: admin/class-pointers.php:219
229
+ msgid ""
230
+ "Only use this if you know what you’re doing. Here you can check what could "
231
+ "be hindering your tracking."
232
+ msgstr ""
233
+
234
+ #: admin/class-pointers.php:220
235
+ msgid "Subscribe to our Newsletter"
236
+ msgstr ""
237
+
238
+ #: admin/class-pointers.php:221
239
+ msgid ""
240
+ "If you would like us to keep you up-to-date regarding Google Analytics and "
241
+ "other plugins by Yoast, subscribe to our newsletter:"
242
+ msgstr ""
243
+
244
+ #: admin/class-pointers.php:224
245
+ msgid "Email"
246
+ msgstr ""
247
+
248
+ #: admin/class-pointers.php:226
249
+ msgid "Subscribe"
250
+ msgstr ""
251
+
252
+ #: admin/class-pointers.php:241
253
+ msgid "Tab: Overview"
254
+ msgstr ""
255
+
256
+ #: admin/class-pointers.php:242
257
+ msgid ""
258
+ "View your website’s last month’s analytics, such as sessions and bounce "
259
+ "rate."
260
+ msgstr ""
261
+
262
+ #: admin/class-pointers.php:243
263
+ msgid "Tab: Reports"
264
+ msgstr ""
265
+
266
+ #: admin/class-pointers.php:244
267
+ msgid ""
268
+ "View specific reports of your site’s analytics, such as traffic sources, "
269
+ "your site’s popular pages and countries where your visitors come from."
270
+ msgstr ""
271
+
272
+ #: admin/class-pointers.php:245
273
+ msgid "Tab: Custom dimension reports"
274
+ msgstr ""
275
+
276
+ #: admin/class-pointers.php:246
277
+ msgid ""
278
+ "View basic reports of your custom dimensions, such as traffic per author, "
279
+ "per category, etc."
280
+ msgstr ""
281
+
282
+ #: admin/class-pointers.php:259
283
+ msgid "Extensions and Licenses"
284
+ msgstr ""
285
+
286
+ #: admin/class-pointers.php:260
287
+ msgid "Tab: Extensions"
288
+ msgstr ""
289
+
290
+ #: admin/class-pointers.php:262
291
+ #. translators: %s links to `https:yoast.com/wordpress/plugins/`.
292
+ msgid ""
293
+ "See which extensions you have installed and which you haven’t installed "
294
+ "yet. You can find extensions to our Google Analytics plugin %shere%s."
295
+ msgstr ""
296
+
297
+ #: admin/class-pointers.php:263
298
+ msgid "Tab: Licenses"
299
+ msgstr ""
300
+
301
+ #: admin/class-pointers.php:264
302
+ msgid "Here you can activate, deactivate and renew your licenses."
303
+ msgstr ""
304
+
305
+ #: admin/class-pointers.php:265
306
+ msgid "Like this plugin?"
307
+ msgstr ""
308
+
309
+ #: admin/class-pointers.php:267
310
+ #. translators: %s links to
311
+ #. `https:wordpress.org/plugins/google-analytics-for-wordpress/`
312
+ msgid ""
313
+ "So, we&#8217;ve come to the end of the tour. If you like the plugin, please "
314
+ "%srate it 5 stars on WordPress.org%s!"
315
+ msgstr ""
316
+
317
+ #: admin/class-pointers.php:269
318
+ #. translators: %s links to `https:yoast.com`
319
+ msgid ""
320
+ "Thank you for using our plugin and good luck with your "
321
+ "Analytics!<br/><br/>Best,<br/>Team Yoast - %sYoast.com%s"
322
  msgstr ""
323
 
324
  #: admin/dashboards/class-admin-dashboards.php:135
349
  msgid "Last"
350
  msgstr ""
351
 
 
 
 
 
 
 
 
 
352
  #: admin/dashboards/class-admin-dashboards.php:147
353
  msgid "Processing..."
354
  msgstr ""
370
  msgstr ""
371
 
372
  #: admin/dashboards/class-admin-dashboards.php:191
373
+ #: admin/dashboards/class-admin-dashboards.php:214
374
+ #: admin/dashboards/class-admin-dashboards.php:223
375
+ #: admin/dashboards/class-admin-dashboards.php:232
376
  msgid "Sessions"
377
  msgstr ""
378
 
386
  msgstr ""
387
 
388
  #: admin/dashboards/class-admin-dashboards.php:197
389
+ msgid "Pageviews"
390
  msgstr ""
391
 
392
  #: admin/dashboards/class-admin-dashboards.php:198
393
+ msgid "The total number of pageviews per day."
394
+ msgstr ""
395
+
396
+ #: admin/dashboards/class-admin-dashboards.php:203
397
+ msgid "Bounce rate"
398
+ msgstr ""
399
+
400
+ #: admin/dashboards/class-admin-dashboards.php:204
401
  msgid ""
402
  "Bounce Rate is the percentage of single-page sessions (i.e. sessions in "
403
  "which the person left your site from the entrance page without interacting "
405
  "more]</a>"
406
  msgstr ""
407
 
408
+ #: admin/dashboards/class-admin-dashboards.php:210
409
  msgid "Traffic sources"
410
  msgstr ""
411
 
412
+ #: admin/dashboards/class-admin-dashboards.php:211
413
  msgid ""
414
  "Every referral to a web site has an origin, or (traffic) source. Possible "
415
  "sources include: “google” (the name of a search engine), “facebook.com” "
419
  "href=\"http://yoa.st/gabnce\" target=\"_blank\">[Learn more]</a>"
420
  msgstr ""
421
 
422
+ #: admin/dashboards/class-admin-dashboards.php:219
423
  msgid "Popular pages"
424
  msgstr ""
425
 
426
+ #: admin/dashboards/class-admin-dashboards.php:220
427
  msgid "Pages by url."
428
  msgstr ""
429
 
430
+ #: admin/dashboards/class-admin-dashboards.php:228
431
  msgid "Countries"
432
  msgstr ""
433
 
434
+ #: admin/dashboards/class-admin-dashboards.php:229
435
  msgid ""
436
  "The country or territory from which visits originated. <a "
437
  "href=\"http://yoa.st/gacountry\" target=\"_blank\">[Learn more]</a>"
441
  msgid "Last month"
442
  msgstr ""
443
 
444
+ #: admin/pages/dashboard.php:14
 
445
  msgid "Google Analytics by Yoast: "
446
  msgstr ""
447
 
449
  msgid "Overview"
450
  msgstr ""
451
 
452
+ #: admin/pages/dashboard.php:44 admin/pages/dashboard.php:86
453
+ #. translators: 1: links to the Google Analytics by Yoast admin settings page.
454
+ #. 2: closing of the link.
455
+ #. translators: 1: link to the Google Analytics by Yoast admin settings page.
456
+ #. 2: closing of the link.
457
  msgid ""
458
  "We need you to authenticate with Google Analytics to use this "
459
  "functionality. If you set your UA-code manually, this won't work. You can "
460
+ "%1$sauthenticate your Google Analytics profile here%2$s to enable "
461
+ "dashboards."
462
  msgstr ""
463
 
464
+ #: admin/pages/dashboard.php:54 admin/pages/dashboard.php:96
465
+ #. translators: 1: links to the Google Analytics by Yoast admin settings page.
466
+ #. 2: closing of the link.
467
+ #. translators: 1: link to the Google Analytics by Yoast admin settings page.
468
+ #. 2: closing of the link.
469
  msgid ""
470
  "Because we've switched to a newer version of the Google Analytics API, "
471
  "you'll need to re-authenticate with Google Analytics. We're sorry for the "
472
+ "inconvenience. You can %1$sre-authenticate your Google Analytics profile "
473
+ "here%2$s."
474
  msgstr ""
475
 
476
+ #: admin/pages/dashboard.php:68 admin/pages/dashboard.php:117
477
+ #. translators: 1: links to the Google Analytics by Yoast admin settings page.
478
+ #. 2: closing of the link.
479
+ #. translators: 1: link to the Google Analytics by Yoast admin settings page.
480
+ #. 2: closing of the link.
481
  msgid ""
482
  "You have not yet finished setting up Google Analytics for Wordpress by "
483
+ "Yoast. Please %1$sadd your Analytics profile here%2$s to enable tracking."
484
  msgstr ""
485
 
486
+ #: admin/pages/dashboard.php:105
487
  msgid "Select a dimension"
488
  msgstr ""
489
 
503
  msgid "Installed"
504
  msgstr ""
505
 
506
+ #: admin/pages/extensions.php:52
507
+ #. translators: %s stands for 'Google Analytics by Yoast'.
508
  msgid ""
509
+ "You have not installed any extensions for %s, so there are no licenses to "
510
+ "activate."
511
  msgstr ""
512
 
513
  #: admin/pages/settings.php:17
530
  msgid "Debug mode"
531
  msgstr ""
532
 
533
+ #: admin/pages/settings.php:58
534
  msgid "Paste your Google authentication code"
535
  msgstr ""
536
 
537
+ #: admin/pages/settings.php:63
538
  msgid "Google profile"
539
  msgstr ""
540
 
541
+ #: admin/pages/settings.php:64
542
  msgid "Authenticate with your Google account"
543
  msgstr ""
544
 
545
+ #: admin/pages/settings.php:67
546
  msgid "Current UA-profile"
547
  msgstr ""
548
 
549
+ #: admin/pages/settings.php:71
550
  msgid "Analytics profile"
551
  msgstr ""
552
 
553
+ #: admin/pages/settings.php:71
554
  msgid "Select a profile"
555
  msgstr ""
556
 
557
+ #: admin/pages/settings.php:75
558
  msgid "Re-authenticate with your Google account"
559
  msgstr ""
560
 
561
+ #: admin/pages/settings.php:81
562
  msgid "Paste your Google code here"
563
  msgstr ""
564
 
565
+ #: admin/pages/settings.php:85
566
  msgid "Save authentication code"
567
  msgstr ""
568
 
569
+ #: admin/pages/settings.php:88
570
  msgid "Cannot connect to Google"
571
  msgstr ""
572
 
573
+ #: admin/pages/settings.php:91
574
  msgid ""
575
  "Your server is blocking requests to Google, to fix this, add "
576
  "<code>*.googleapis.com</code> to the <code>WP_ACCESSIBLE_HOSTS</code> "
577
  "constant in your <em>wp-config.php</em> or ask your webhost to do this."
578
  msgstr ""
579
 
580
+ #: admin/pages/settings.php:93
581
  msgid ""
582
  "Your firewall or webhost is blocking requests to Google, please ask your "
583
  "webhost company to fix this."
584
  msgstr ""
585
 
586
+ #: admin/pages/settings.php:95
587
  msgid ""
588
  "Until this is fixed, you can only use the manual authentication method and "
589
  "cannot use the dashboards feature."
590
  msgstr ""
591
 
592
+ #: admin/pages/settings.php:99
593
  msgid "Manually enter your UA code"
594
  msgstr ""
595
 
596
+ #: admin/pages/settings.php:103
597
  msgid ""
598
  "Warning: If you use a manual UA code, you won't be able to use the "
599
  "dashboards."
600
  msgstr ""
601
 
602
+ #: admin/pages/settings.php:110
603
  msgid "Track outbound click and downloads"
604
  msgstr ""
605
 
606
+ #: admin/pages/settings.php:110
607
  msgid ""
608
  "Clicks and downloads will be tracked as events, you can find these under "
609
  "Content &#xBB; Event Tracking in your Google Analytics reports."
610
  msgstr ""
611
 
612
+ #: admin/pages/settings.php:111
613
  msgid "Allow tracking of anonymous data"
614
  msgstr ""
615
 
616
+ #: admin/pages/settings.php:111
617
  msgid ""
618
  "By allowing us to track anonymous data we can better help you, because we "
619
  "know with which WordPress configurations, themes and plugins we should "
620
  "test. No personal data will be submitted."
621
  msgstr ""
622
 
623
+ #: admin/pages/settings.php:113
624
+ #. translators: %s is a link to the Google Analytics help page on Google.com
625
+ #. for _anonymizeIp
626
  msgid "Anonymize IPs"
627
  msgstr ""
628
 
629
+ #: admin/pages/settings.php:113
630
  msgid ""
631
  "This adds %1$s, telling Google Analytics to anonymize the information sent "
632
  "by the tracker objects by removing the last octet of the IP address prior "
633
  "to its storage."
634
  msgstr ""
635
 
636
+ #: admin/pages/settings.php:114
637
  msgid "Ignore users"
638
  msgstr ""
639
 
640
+ #: admin/pages/settings.php:114
641
  msgid ""
642
  "Users of the role you select will be ignored, so if you select Editor, all "
643
  "Editors will be ignored."
644
  msgstr ""
645
 
646
+ #: admin/pages/settings.php:115
647
  msgid "Disable analytics dashboard"
648
  msgstr ""
649
 
650
+ #: admin/pages/settings.php:115
651
  msgid ""
652
  "This will completely disable the dashboard and stop the plugin from "
653
  "fetching the latest analytics data."
654
  msgstr ""
655
 
656
+ #: admin/pages/settings.php:121
657
+ msgid "Introduction Tour"
658
+ msgstr ""
659
+
660
+ #: admin/pages/settings.php:124
661
+ msgid "Take this tour to quickly learn about the use of this plugin."
662
+ msgstr ""
663
+
664
+ #: admin/pages/settings.php:127
665
+ msgid "Start Tour"
666
+ msgstr ""
667
+
668
+ #: admin/pages/settings.php:138
669
  msgid "Universal settings"
670
  msgstr ""
671
 
672
+ #: admin/pages/settings.php:141
673
+ #. translators: %s is a link to the Google Analytics help page on Google.com to
674
+ #. enable Universal tracking
675
  msgid "Enable Universal tracking"
676
  msgstr ""
677
 
678
+ #: admin/pages/settings.php:141
679
  msgid ""
680
  "First enable Universal tracking in your Google Analytics account. Please "
681
  "read %1$sthis guide%2$s to learn how to do that."
682
  msgstr ""
683
 
684
+ #: admin/pages/settings.php:144
685
  msgid "Enable Demographics and Interests Reports for Remarketing and Advertising"
686
  msgstr ""
687
 
688
+ #: admin/pages/settings.php:146
689
  msgid ""
690
  "Note that usage of this function is affected by privacy and cookie laws "
691
  "around the world. Be sure to follow the laws that affect your target "
692
  "audience."
693
  msgstr ""
694
 
695
+ #: admin/pages/settings.php:149
696
+ #. translators: 1: contains the link to a knowledge base article, 2: contains
697
+ #. the the closing tag for both links, 3: contains a link to Google
698
+ #. documentation about remarketing.
699
  msgid ""
700
  "Check this setting to add the Demographics and Remarketing features to your "
701
  "Google Analytics tracking code. We've written an article in our "
704
  "documentation%2$s."
705
  msgstr ""
706
 
707
+ #: admin/pages/settings.php:156
708
+ #. translators: 1: links to the Google Analytics help page on Google.com to
709
+ #. enable link attribution, 2: closing tag for the link
710
  msgid "Enhanced Link Attribution"
711
  msgstr ""
712
 
713
+ #: admin/pages/settings.php:156
714
  msgid "Add %1$sEnhanced Link Attribution%2$s to your tracking code."
715
  msgstr ""
716
 
717
+ #: admin/pages/settings.php:168
718
  msgid "Advanced settings"
719
  msgstr ""
720
 
721
+ #: admin/pages/settings.php:170
722
  msgid "Track downloads as"
723
  msgstr ""
724
 
725
+ #: admin/pages/settings.php:170
726
  msgid ""
727
  "Not recommended, as this would skew your statistics, but it does make it "
728
  "possible to track downloads as goals."
729
  msgstr ""
730
 
731
+ #: admin/pages/settings.php:171
732
  msgid "Extensions of files to track as downloads"
733
  msgstr ""
734
 
735
+ #: admin/pages/settings.php:172
736
  msgid "Track full URL of outbound clicks or just the domain"
737
  msgstr ""
738
 
739
+ #: admin/pages/settings.php:174
740
+ #. translators: 1: link to the Google Analytics help page on Google.com to set
741
+ #. subdomain tracking.
742
  msgid "Subdomain tracking"
743
  msgstr ""
744
 
745
+ #: admin/pages/settings.php:174
746
  msgid ""
747
  "This allows you to set the domain that's set by %1$s for tracking "
748
  "subdomains.<br/>If empty, this will not be set."
749
  msgstr ""
750
 
751
+ #: admin/pages/settings.php:176
752
+ #. translators: 1: will output `<code>/out/</code>`. 2: will output
753
+ #. `<code>/out/,/recommends/</code>`
754
  msgid "Set path for internal links to track as outbound links"
755
  msgstr ""
756
 
757
+ #: admin/pages/settings.php:176
758
  msgid ""
759
  "If you want to track all internal links that begin with %1$s, enter %1$s in "
760
  "the box above. If you have multiple prefixes you can separate them with "
761
  "comma's: %2$s"
762
  msgstr ""
763
 
764
+ #: admin/pages/settings.php:177
765
  msgid "Label for those links"
766
  msgstr ""
767
 
768
+ #: admin/pages/settings.php:179
769
  msgid "Tag links in RSS feed with campaign variables"
770
  msgstr ""
771
 
772
+ #: admin/pages/settings.php:179
773
  msgid ""
774
  "Do not use this feature if you use FeedBurner, as FeedBurner can do this "
775
  "automatically and better than this plugin can. Check <a "
778
  "enable this feature in FeedBurner."
779
  msgstr ""
780
 
781
+ #: admin/pages/settings.php:181
782
+ #. translators: 1: link to the Google Analytics help page on Google.com to
783
+ #. enable link attribution. 2: code tag - <code>#</a>
784
  msgid "Allow anchor"
785
  msgstr ""
786
 
787
+ #: admin/pages/settings.php:181
788
  msgid ""
789
  "This adds a %1$s call to your tracking code, and makes RSS link tagging use "
790
  "a %2$s as well."
791
  msgstr ""
792
 
793
+ #: admin/pages/settings.php:183
794
+ #. translators: 1: link to the Google Analytics help page on Google.com add the
795
+ #. allow linker tag. 2: code tag - <code>_link</code>
796
  msgid "Add <code>_setAllowLinker</code>"
797
  msgstr ""
798
 
799
+ #: admin/pages/settings.php:183
800
  msgid ""
801
  "This adds a %1$s call to your tracking code, allowing you to use %2$s and "
802
  "related functions."
803
  msgstr ""
804
 
805
+ #: admin/pages/settings.php:187
806
+ #. translators: 1: is a link to the Google Analytics help page on Google.com to
807
+ #. add custom code for the tracking
808
  msgid "Custom code"
809
  msgstr ""
810
 
811
+ #: admin/pages/settings.php:187
812
  msgid ""
813
  "Not for the average user: this allows you to add a line of code, to be "
814
  "added before the %1$s call."
815
  msgstr ""
816
 
817
+ #: admin/pages/settings.php:200
818
  msgid "Custom dimensions"
819
  msgstr ""
820
 
821
+ #: admin/pages/settings.php:209
822
  msgid "Debug"
823
  msgstr ""
824
 
825
+ #: admin/pages/settings.php:211
826
  msgid ""
827
  "If you want to confirm that tracking on your blog is working as it should, "
828
  "enable this option and check the console of your browser. Be absolutely "
829
  "sure to disable debugging afterwards, as it is slower than normal tracking."
830
  msgstr ""
831
 
832
+ #: admin/pages/settings.php:212
833
  msgid "<strong>Note</strong> the debugging is only loaded for administrators."
834
  msgstr ""
835
 
836
+ #: admin/pages/settings.php:214
837
  msgid "Enable debug mode"
838
  msgstr ""
839
 
840
+ #: admin/pages/settings.php:229
841
  msgid "Select the users to ignore"
842
  msgstr ""
843
 
849
  msgid "Upgrade to Google Analytics By Yoast Premium »"
850
  msgstr ""
851
 
852
+ #: frontend/abstract-class-tracking.php:360
853
+ #: frontend/abstract-class-tracking.php:381
854
  msgid "This site uses the %1$s plugin version %2$s"
855
  msgstr ""
856
 
857
+ #: frontend/abstract-class-tracking.php:363
858
  msgid ""
859
  "@Webmaster, normally you will find the Google Analytics tracking code here, "
860
  "but you are in the disabled user groups. To change this, navigate to "
861
  "Analytics -> Settings (Ignore usergroups)"
862
  msgstr ""
863
 
864
+ #: frontend/abstract-class-tracking.php:366
865
  msgid ""
866
  "Normally you will find the Google Analytics tracking code here, but the "
867
  "webmaster disabled your user group."
868
  msgstr ""
869
 
870
+ #: frontend/abstract-class-tracking.php:384
871
  msgid ""
872
  "@Webmaster, normally you will find the Google Analytics tracking code here, "
873
  "but the Debug Mode is enabled. To change this, navigate to Analytics -> "
875
  "your site."
876
  msgstr ""
877
 
878
+ #: frontend/abstract-class-tracking.php:387
879
  msgid ""
880
  "Normally you will find the Google Analytics tracking code here, but the "
881
  "webmaster has enabled the Debug Mode."
1082
  msgid "%sRenew your license now%s."
1083
  msgstr ""
1084
 
1085
+ #. Plugin Name of the plugin/theme
1086
+ msgid "Google Analytics by Yoast"
1087
+ msgstr ""
1088
+
1089
  #. Plugin URI of the plugin/theme
1090
  msgid ""
1091
  "https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wordpress&"
phpcs.xml DELETED
@@ -1,14 +0,0 @@
1
- <?xml version="1.0"?>
2
- <ruleset name="WordPress SEO">
3
- <description>Google Analytics by Yoast rules for PHP_CodeSniffer</description>
4
-
5
- <file>.</file>
6
-
7
- <exclude-pattern>tests/*</exclude-pattern>
8
- <exclude-pattern>vendor/*</exclude-pattern>
9
-
10
- <arg name="extensions" value="php"/>
11
- <arg value="nsp"/>
12
-
13
- <rule ref="Yoast"/>
14
- </ruleset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,20 +1,24 @@
1
- === Google Analytics by Yoast ===
2
- Contributors: joostdevalk
3
- Donate link: https://yoast.com/donate/
4
- Tags: analytics, google analytics, statistics, tracking, stats, google, yoast
5
  Requires at least: 3.9
6
- Tested up to: 4.3
7
- Stable tag: 5.4.6
8
  License: GPL v3
9
 
10
- Track your WordPress site easily with the latest tracking codes and lots added data for search result pages and error pages.
11
 
12
  == Description ==
13
 
14
- The Google Analytics by Yoast plugin for WordPress allows you to track your blog easily and always stays up to date with the newest features in Google Analytics.
15
 
16
- > <strong>Upgrade to GA by Yoast Premium</strong><br>
17
- > If you need support or want to use custom dimensions, upgrade to [Google Analytics by Yoast Premium](https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wporg&utm_medium=readme&utm_campaign=wpgaplugin) today!
 
 
 
 
18
 
19
  Full list of features:
20
 
@@ -23,34 +27,75 @@ Full list of features:
23
  * Gives you incredibly nice visitor metric dashboards right in your WordPress install.
24
  * Option to enable demographics and interest reports.
25
  * Outbound link & downloads tracking.
26
- * Configurable options to track outbound links either as pageviews or as events.
27
- * Option to track just downloads as pageviews or events in Google Analytics.
28
- * Option to track internal links with a particular format as outbound links, very useful for affiliate links that start with /out/, for instance.
29
  * Possibility to ignore any user level and up, so all editors and higher for instance.
30
  * Option to anonymize IP's for use in countries with stricter privacy regulations.
31
  * Tracking of your search result pages and 404 pages.
32
  * Full [debug mode](http://yoast.com/google-analytics-debug-mode/), including Firebug lite and ga_debug.js for debugging Google Analytics issues.
33
-
34
  > <strong>Development on GitHub</strong><br>
35
- > The development of Google Analytics by Yoast [takes place on GitHub](https://github.com/Yoast/google-analytics-for-wordpress). Bugs and pull requests are welcomed there. For support, you have two options: either [buy the premium version of Google Analytics by Yoast on Yoast.com](https://yoast.com/wordpress/plugins/google-analytics/), this will give you access to our support team, or refer to the forums.
36
 
37
- Other interesting stuff:
38
 
39
- * Check out the other [WordPress Plugins](https://yoast.com/wordpress/plugins/) by the same team.
40
- * Want to increase traffic to your WordPress blog? Check out the [WordPress SEO](https://yoast.com/articles/wordpress-seo/) Guide!
41
- * Check out the authors [WordPress Hosting](https://yoast.com/articles/wordpress-hosting/) experience. Good hosting is hard to come by, but it doesn't have to be expensive, Joost tells you why!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
- == Installation ==
44
 
45
- This section describes how to install the plugin and get it working.
46
 
47
- 1. Delete any existing `gapp` or `google-analytics-for-wordpress` folder from the `/wp-content/plugins/` directory
48
- 1. Upload `google-analytics-for-wordpress` folder to the `/wp-content/plugins/` directory
49
- 1. Activate the plugin through the 'Plugins' menu in WordPress
50
- 1. Go to the options panel under the 'Settings' menu and add your Analytics account number and set the settings you want.
51
 
52
  == Changelog ==
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  = 5.4.6 =
55
 
56
  Release Date: August 25th, 2015
@@ -154,7 +199,7 @@ Release Date: February 18th, 2015
154
  Release Date: February 11th, 2015
155
 
156
  * Enhancements:
157
- * Added a filter (`yst-ga-filter-api-end-date`) to enable our [premium plugin](https://yoast.com/wordpress/plugins/google-analytics/) to show more recent data in the dashboards.
158
 
159
  * Features:
160
  * Added [Enhanced link attribution](https://support.google.com/analytics/answer/2558867) for Universal tracking.
@@ -729,13 +774,12 @@ This version fixes several issues related to your site's security. Update immedi
729
 
730
  == Frequently Asked Questions ==
731
 
732
- For all frequently asked questions, and their answers, check the [Yoast Knowledge base](http://kb.yoast.com/category/43-google-analytics-for-wordpress).
733
 
734
  == Screenshots ==
735
 
736
- 1. Screenshot of the dashboards this plugin generates. To get dashboards for custom dimensions, upgrade to [GA by Yoast Premium](https://yoast.com/wordpress/plugins/google-analytics/#utm_source=wporg&utm_medium=readme&utm_campaign=wpgaplugin&utm_content=screenshot).
737
  2. Screenshot of the general settings panel for this plugin.
738
- 3. Screenshot of the universal settings panel.
739
- 4. Screenshot of the advanced settings panel.
740
- 5. Screenshot of the account selection drop down.
741
 
1
+ === Google Analytics by MonsterInsights ===
2
+ Contributors: chriscct7, smub
3
+ Donate link: http://www.wpbeginner.com/wpbeginner-needs-your-help/
4
+ Tags: analytics, analytics dashboard, google analytics, google analytics dashboard, google analytics widget, universal google analytics, statistics, tracking, stats, google, yoast, google analytics by yoast, ga, monster insights, monsterinsights
5
  Requires at least: 3.9
6
+ Tested up to: 4.5
7
+ Stable tag: 5.4.9
8
  License: GPL v3
9
 
10
+ Connect Google Analytics with WordPress by adding your Google Analytics tracking code. Get the stats that matter.
11
 
12
  == Description ==
13
 
14
+ = Google Analytics Plugin for WordPress =
15
 
16
+ The Google Analytics for WordPress by MonsterInsights allows you to track your blog easily and always stays up to date with the newest features in Google Analytics.
17
+
18
+ MonsterInsights is the most popular Google Analytics plugin for WordPress with roughly 11 million downloads.
19
+
20
+ > <strong>Upgrade to MonsterInsights Premium</strong><br>
21
+ > If you need support or want to use custom dimensions, upgrade to <a href="https://monsterinsights.com/pricing/?utm_source=wporg&utm_medium=readme&utm_campaign=wpgaplugin" rel="friend">Google Analytics by MonsterInsights Pro today!</a>
22
 
23
  Full list of features:
24
 
27
  * Gives you incredibly nice visitor metric dashboards right in your WordPress install.
28
  * Option to enable demographics and interest reports.
29
  * Outbound link & downloads tracking.
30
+ * Configurable options to track outbound links either as pageviews or as events.
31
+ * Option to track just downloads as pageviews or events in Google Analytics.
32
+ * Option to track internal links with a particular format as outbound links, very useful for affiliate links that start with /out/, for instance.
33
  * Possibility to ignore any user level and up, so all editors and higher for instance.
34
  * Option to anonymize IP's for use in countries with stricter privacy regulations.
35
  * Tracking of your search result pages and 404 pages.
36
  * Full [debug mode](http://yoast.com/google-analytics-debug-mode/), including Firebug lite and ga_debug.js for debugging Google Analytics issues.
 
37
  > <strong>Development on GitHub</strong><br>
38
+ > The development of Google Analytics by MonsterInsights [takes place on GitHub](https://github.com/Yoast/google-analytics-for-wordpress). Bugs and pull requests are welcomed there. For support, you have two options: either <a href="https://monsterinsights.com/pricing/?utm_source=wporg&utm_medium=readme&utm_campaign=wpgaplugin" rel="friend">buy the premium version of Google Analytics by MonsterInsights</a>, this will give you access to our support team, or refer to the forums.
39
 
40
+ = Note for Beginners =
41
 
42
+ Like all WordPress plugins, Google Analytics by MonsterInsights is only available for self-hosted WordPress sites. This means you will need to <a href="http://www.wpbeginner.com/wp-tutorials/how-to-properly-move-your-blog-from-wordpress-com-to-wordpress-org/" rel="friend" title="How to properly move from WordPress.com to WordPress.org">switch from WordPress.com to WordPress.org</a> if you want to use this plugin on your WordPress site.
43
+
44
+ For more details, see this infographic on <a href="http://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/" rel="friend" title="Self Hosted WordPress.org vs Free WordPress.com">self hosted WordPress.org vs free WordPress.com</a>
45
+
46
+ = Credits =
47
+
48
+ This plugin is created by <a href="https://twitter.com/chriscct7" rel="friend" title="Chris Christoff">Chris Christoff</a> and <a href="https://syedbalkhi.com/" rel="friend" title="Syed Balkhi">Syed Balkhi</a> with sponsorship from <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a>.
49
+
50
+ = What's Next =
51
+
52
+ If you like this plugin, then consider checking out our other projects:
53
+
54
+ * <a href="http://optinmonster.com/" rel="friend" title="OptinMonster">OptinMonster</a> - Get More Email Subscribers
55
+ * <a href="http://soliloquywp.com/" rel="friend" title="Soliloquy">Soliloquy</a> - Best WordPress Slider Plugin
56
+ * <a href="http://enviragallery.com/" rel="friend" title="Envira Gallery">Envira Gallery</a> - Best WordPress Gallery Plugin
57
+ * <a href="https://wpforms.com/" rel="friend" title="WPForms">WPForms</a> - Best WordPress Contact Form Plugin
58
+
59
+ This plugin would not be possible without the help and support of <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a>, the largest WordPress resource site. You can learn from our <a href="http://www.wpbeginner.com/category/wp-tutorials/" rel="friend" title="WordPress Tutorials">free WordPress Tutorials</a> like <a href="http://www.wpbeginner.com/how-to-install-wordpress/" rel="friend" title="How to Install WordPress - Step by Step">how to install WordPress</a>, <a href="http://www.wpbeginner.com/wordpress-hosting/" rel="friend" title="How to choose the best WordPress hosting">choose the best WordPress hosting</a>, <a href="http://www.wpbeginner.com/glossary/" rel="friend" title="WordPress Glossary Terms for Beginners">WordPress glossary</a>, and more.
60
+
61
+ You can also learn about other <a href="http://www.wpbeginner.com/category/plugins/" rel="friend" title="Best WordPress Plugins">best WordPress plugins</a>.
62
 
 
63
 
64
+ == Installation ==
65
 
66
+ 1. Install Google Analytics by MonsterInsights either via the WordPress.org plugin repository or by uploading the files to your server. (See instructions on <a href="http://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/" rel="friend">how to install a WordPress plugin</a>)
67
+ 2. Activate Google Analytics by MonsterInsights.
68
+ 3. Navigate to the Analytics tab in your admin menu and configure the plugin.
69
+ 4. Want more features? <a href="https://monsterinsights.com/?utm_source=wporg&utm_medium=readme&utm_campaign=wpgaplugin" rel="friend" title="MonsterInsights">Purchase the premium version of MonsterInsights</a>!
70
 
71
  == Changelog ==
72
 
73
+ = 5.4.9 =
74
+
75
+ Release Date: April 15th, 2015
76
+
77
+ * Bugfixes:
78
+ * Fixes issue with eCommerce addon (also requires user to update eCommerce addon)
79
+ * Fixes issue with 2 dashboard links
80
+ * A bug in pre-existing code caused the menu of the plugin to skyrocket unintentionally. This has been corrected.
81
+
82
+ * Enhancements:
83
+ * New font based dashboard icon
84
+ * The "MonsterInsights" menu item name has been renamed to just "Insights"
85
+
86
+ = 5.4.8 =
87
+
88
+ Release Date: April 14th, 2015
89
+
90
+ * Bugfixes:
91
+ * Fixes compatibility issue with WordPress 4.5
92
+
93
+ * Annoucements:
94
+ * Google Analytics by Yoast is now MonsterInsights.
95
+
96
+ * Enhancements:
97
+ * Adds ground work for new features coming soon.
98
+
99
  = 5.4.6 =
100
 
101
  Release Date: August 25th, 2015
199
  Release Date: February 11th, 2015
200
 
201
  * Enhancements:
202
+ * Added a filter (`yst-ga-filter-api-end-date`) to enable our [premium plugin](https://www.monsterinsights.com/) to show more recent data in the dashboards.
203
 
204
  * Features:
205
  * Added [Enhanced link attribution](https://support.google.com/analytics/answer/2558867) for Universal tracking.
774
 
775
  == Frequently Asked Questions ==
776
 
777
+ For all frequently asked questions, and their answers, check the [MonsterInsights Knowledge base](https://www.monsterinsights.com/docs/).
778
 
779
  == Screenshots ==
780
 
781
+ 1. Screenshot of the dashboards this plugin generates. To get dashboards for custom dimensions, upgrade to [GA by MonsterInsights Pro](https://www.monsterinsights.com/#utm_source=wporg&utm_medium=readme&utm_campaign=wpgaplugin&utm_content=screenshot).
782
  2. Screenshot of the general settings panel for this plugin.
783
+ 3. Screenshot of the advanced settings panel.
784
+
 
785
 
vendor/composer/autoload_classmap.php CHANGED
@@ -6,8 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Yoast_API_Request' => $vendorDir . '/yoast/license-manager/class-api-request.php',
10
- 'Yoast_Api_Libs' => $vendorDir . '/yoast/api-libs/class-api-libs.php',
11
  'Yoast_GA_Admin' => $baseDir . '/admin/class-admin.php',
12
  'Yoast_GA_Admin_Assets' => $baseDir . '/admin/class-admin-assets.php',
13
  'Yoast_GA_Admin_Form' => $baseDir . '/admin/class-admin-form.php',
@@ -33,13 +33,20 @@ return array(
33
  'Yoast_Google_Analytics' => $baseDir . '/admin/class-google-analytics.php',
34
  'Yoast_Google_Analytics_Notice' => $baseDir . '/admin/class-google-analytics.php',
35
  'Yoast_Googleanalytics_Reporting' => $baseDir . '/admin/class-googleanalytics-reporting.php',
36
- 'Yoast_License_Manager' => $vendorDir . '/yoast/license-manager/class-license-manager.php',
37
- 'Yoast_Plugin_License_Manager' => $vendorDir . '/yoast/license-manager/class-plugin-license-manager.php',
38
- 'Yoast_Plugin_Update_Manager' => $vendorDir . '/yoast/license-manager/class-plugin-update-manager.php',
39
- 'Yoast_Product' => $vendorDir . '/yoast/license-manager/class-product.php',
40
- 'Yoast_Theme_License_Manager' => $vendorDir . '/yoast/license-manager/class-theme-license-manager.php',
41
- 'Yoast_Theme_Update_Manager' => $vendorDir . '/yoast/license-manager/class-theme-update-manager.php',
42
- 'Yoast_Update_Manager' => $vendorDir . '/yoast/license-manager/class-update-manager.php',
43
- 'iYoast_License_Manager' => $vendorDir . '/yoast/license-manager/class-license-manager.php',
44
- 'yoast_i18n' => $vendorDir . '/yoast/i18n-module/i18n-module.php',
 
 
 
 
 
 
 
45
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
+ 'MI_API_Request' => $vendorDir . '/yoast/license-manager/class-api-request.php',
10
+ 'MI_Api_Libs' => $vendorDir . '/yoast/api-libs/class-api-libs.php',
11
  'Yoast_GA_Admin' => $baseDir . '/admin/class-admin.php',
12
  'Yoast_GA_Admin_Assets' => $baseDir . '/admin/class-admin-assets.php',
13
  'Yoast_GA_Admin_Form' => $baseDir . '/admin/class-admin-form.php',
33
  'Yoast_Google_Analytics' => $baseDir . '/admin/class-google-analytics.php',
34
  'Yoast_Google_Analytics_Notice' => $baseDir . '/admin/class-google-analytics.php',
35
  'Yoast_Googleanalytics_Reporting' => $baseDir . '/admin/class-googleanalytics-reporting.php',
36
+ 'MI_License_Manager' => $vendorDir . '/yoast/license-manager/class-license-manager.php',
37
+ 'MI_Plugin_License_Manager' => $vendorDir . '/yoast/license-manager/class-plugin-license-manager.php',
38
+ 'MI_Plugin_Update_Manager' => $vendorDir . '/yoast/license-manager/class-plugin-update-manager.php',
39
+ 'MI_Product' => $vendorDir . '/yoast/license-manager/class-product.php',
40
+ 'MI_Theme_License_Manager' => $vendorDir . '/yoast/license-manager/class-theme-license-manager.php',
41
+ 'MI_Theme_Update_Manager' => $vendorDir . '/yoast/license-manager/class-theme-update-manager.php',
42
+ 'MI_Update_Manager' => $vendorDir . '/yoast/license-manager/class-update-manager.php',
43
+ 'iMI_License_Manager' => $vendorDir . '/yoast/license-manager/class-license-manager.php',
44
+ 'Yoast_License_Manager' => $vendorDir . '/yoast/license-manager-2/class-license-manager.php',
45
+ 'Yoast_Plugin_License_Manager' => $vendorDir . '/yoast/license-manager-2/class-plugin-license-manager.php',
46
+ 'Yoast_Plugin_Update_Manager' => $vendorDir . '/yoast/license-manager-2/class-plugin-update-manager.php',
47
+ 'Yoast_Product' => $vendorDir . '/yoast/license-manager-2/class-product.php',
48
+ 'Yoast_Theme_License_Manager' => $vendorDir . '/yoast/license-manager-2/class-theme-license-manager.php',
49
+ 'Yoast_Theme_Update_Manager' => $vendorDir . '/yoast/license-manager-2/class-theme-update-manager.php',
50
+ 'Yoast_Update_Manager' => $vendorDir . '/yoast/license-manager-2/class-update-manager.php',
51
+ 'iYoast_License_Manager' => $vendorDir . '/yoast/license-manager-2/class-license-manager.php'
52
  );
vendor/yoast/api-libs/class-api-libs.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * Include this class to use the Yoast_Api_Libs, you can include this as a submodule in your project
5
  * and you just have to autoload this class
6
  *
7
  *
@@ -11,7 +11,7 @@
11
  * - Create file 'class-api-oauth.php'
12
  * - Class name should be 'Yoast_Api_Oauth'
13
  */
14
- class Yoast_Api_Libs {
15
 
16
  /**
17
  * Current version number of the API-libs
1
  <?php
2
 
3
  /**
4
+ * Include this class to use the MI_Api_Libs, you can include this as a submodule in your project
5
  * and you just have to autoload this class
6
  *
7
  *
11
  * - Create file 'class-api-oauth.php'
12
  * - Class name should be 'Yoast_Api_Oauth'
13
  */
14
+ class MI_Api_Libs {
15
 
16
  /**
17
  * Current version number of the API-libs
vendor/yoast/i18n-module/LICENSE DELETED
@@ -1,675 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
- Preamble
9
-
10
- The GNU General Public License is a free, copyleft license for
11
- software and other kinds of works.
12
-
13
- The licenses for most software and other practical works are designed
14
- to take away your freedom to share and change the works. By contrast,
15
- the GNU General Public License is intended to guarantee your freedom to
16
- share and change all versions of a program--to make sure it remains free
17
- software for all its users. We, the Free Software Foundation, use the
18
- GNU General Public License for most of our software; it applies also to
19
- any other work released this way by its authors. You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- them if you wish), that you receive source code or can get it if you
26
- want it, that you can change the software or use pieces of it in new
27
- free programs, and that you know you can do these things.
28
-
29
- To protect your rights, we need to prevent others from denying you
30
- these rights or asking you to surrender the rights. Therefore, you have
31
- certain responsibilities if you distribute copies of the software, or if
32
- you modify it: responsibilities to respect the freedom of others.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must pass on to the recipients the same
36
- freedoms that you received. You must make sure that they, too, receive
37
- or can get the source code. And you must show them these terms so they
38
- know their rights.
39
-
40
- Developers that use the GNU GPL protect your rights with two steps:
41
- (1) assert copyright on the software, and (2) offer you this License
42
- giving you legal permission to copy, distribute and/or modify it.
43
-
44
- For the developers' and authors' protection, the GPL clearly explains
45
- that there is no warranty for this free software. For both users' and
46
- authors' sake, the GPL requires that modified versions be marked as
47
- changed, so that their problems will not be attributed erroneously to
48
- authors of previous versions.
49
-
50
- Some devices are designed to deny users access to install or run
51
- modified versions of the software inside them, although the manufacturer
52
- can do so. This is fundamentally incompatible with the aim of
53
- protecting users' freedom to change the software. The systematic
54
- pattern of such abuse occurs in the area of products for individuals to
55
- use, which is precisely where it is most unacceptable. Therefore, we
56
- have designed this version of the GPL to prohibit the practice for those
57
- products. If such problems arise substantially in other domains, we
58
- stand ready to extend this provision to those domains in future versions
59
- of the GPL, as needed to protect the freedom of users.
60
-
61
- Finally, every program is threatened constantly by software patents.
62
- States should not allow patents to restrict development and use of
63
- software on general-purpose computers, but in those that do, we wish to
64
- avoid the special danger that patents applied to a free program could
65
- make it effectively proprietary. To prevent this, the GPL assures that
66
- patents cannot be used to render the program non-free.
67
-
68
- The precise terms and conditions for copying, distribution and
69
- modification follow.
70
-
71
- TERMS AND CONDITIONS
72
-
73
- 0. Definitions.
74
-
75
- "This License" refers to version 3 of the GNU General Public License.
76
-
77
- "Copyright" also means copyright-like laws that apply to other kinds of
78
- works, such as semiconductor masks.
79
-
80
- "The Program" refers to any copyrightable work licensed under this
81
- License. Each licensee is addressed as "you". "Licensees" and
82
- "recipients" may be individuals or organizations.
83
-
84
- To "modify" a work means to copy from or adapt all or part of the work
85
- in a fashion requiring copyright permission, other than the making of an
86
- exact copy. The resulting work is called a "modified version" of the
87
- earlier work or a work "based on" the earlier work.
88
-
89
- A "covered work" means either the unmodified Program or a work based
90
- on the Program.
91
-
92
- To "propagate" a work means to do anything with it that, without
93
- permission, would make you directly or secondarily liable for
94
- infringement under applicable copyright law, except executing it on a
95
- computer or modifying a private copy. Propagation includes copying,
96
- distribution (with or without modification), making available to the
97
- public, and in some countries other activities as well.
98
-
99
- To "convey" a work means any kind of propagation that enables other
100
- parties to make or receive copies. Mere interaction with a user through
101
- a computer network, with no transfer of a copy, is not conveying.
102
-
103
- An interactive user interface displays "Appropriate Legal Notices"
104
- to the extent that it includes a convenient and prominently visible
105
- feature that (1) displays an appropriate copyright notice, and (2)
106
- tells the user that there is no warranty for the work (except to the
107
- extent that warranties are provided), that licensees may convey the
108
- work under this License, and how to view a copy of this License. If
109
- the interface presents a list of user commands or options, such as a
110
- menu, a prominent item in the list meets this criterion.
111
-
112
- 1. Source Code.
113
-
114
- The "source code" for a work means the preferred form of the work
115
- for making modifications to it. "Object code" means any non-source
116
- form of a work.
117
-
118
- A "Standard Interface" means an interface that either is an official
119
- standard defined by a recognized standards body, or, in the case of
120
- interfaces specified for a particular programming language, one that
121
- is widely used among developers working in that language.
122
-
123
- The "System Libraries" of an executable work include anything, other
124
- than the work as a whole, that (a) is included in the normal form of
125
- packaging a Major Component, but which is not part of that Major
126
- Component, and (b) serves only to enable use of the work with that
127
- Major Component, or to implement a Standard Interface for which an
128
- implementation is available to the public in source code form. A
129
- "Major Component", in this context, means a major essential component
130
- (kernel, window system, and so on) of the specific operating system
131
- (if any) on which the executable work runs, or a compiler used to
132
- produce the work, or an object code interpreter used to run it.
133
-
134
- The "Corresponding Source" for a work in object code form means all
135
- the source code needed to generate, install, and (for an executable
136
- work) run the object code and to modify the work, including scripts to
137
- control those activities. However, it does not include the work's
138
- System Libraries, or general-purpose tools or generally available free
139
- programs which are used unmodified in performing those activities but
140
- which are not part of the work. For example, Corresponding Source
141
- includes interface definition files associated with source files for
142
- the work, and the source code for shared libraries and dynamically
143
- linked subprograms that the work is specifically designed to require,
144
- such as by intimate data communication or control flow between those
145
- subprograms and other parts of the work.
146
-
147
- The Corresponding Source need not include anything that users
148
- can regenerate automatically from other parts of the Corresponding
149
- Source.
150
-
151
- The Corresponding Source for a work in source code form is that
152
- same work.
153
-
154
- 2. Basic Permissions.
155
-
156
- All rights granted under this License are granted for the term of
157
- copyright on the Program, and are irrevocable provided the stated
158
- conditions are met. This License explicitly affirms your unlimited
159
- permission to run the unmodified Program. The output from running a
160
- covered work is covered by this License only if the output, given its
161
- content, constitutes a covered work. This License acknowledges your
162
- rights of fair use or other equivalent, as provided by copyright law.
163
-
164
- You may make, run and propagate covered works that you do not
165
- convey, without conditions so long as your license otherwise remains
166
- in force. You may convey covered works to others for the sole purpose
167
- of having them make modifications exclusively for you, or provide you
168
- with facilities for running those works, provided that you comply with
169
- the terms of this License in conveying all material for which you do
170
- not control copyright. Those thus making or running the covered works
171
- for you must do so exclusively on your behalf, under your direction
172
- and control, on terms that prohibit them from making any copies of
173
- your copyrighted material outside their relationship with you.
174
-
175
- Conveying under any other circumstances is permitted solely under
176
- the conditions stated below. Sublicensing is not allowed; section 10
177
- makes it unnecessary.
178
-
179
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
-
181
- No covered work shall be deemed part of an effective technological
182
- measure under any applicable law fulfilling obligations under article
183
- 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
- similar laws prohibiting or restricting circumvention of such
185
- measures.
186
-
187
- When you convey a covered work, you waive any legal power to forbid
188
- circumvention of technological measures to the extent such circumvention
189
- is effected by exercising rights under this License with respect to
190
- the covered work, and you disclaim any intention to limit operation or
191
- modification of the work as a means of enforcing, against the work's
192
- users, your or third parties' legal rights to forbid circumvention of
193
- technological measures.
194
-
195
- 4. Conveying Verbatim Copies.
196
-
197
- You may convey verbatim copies of the Program's source code as you
198
- receive it, in any medium, provided that you conspicuously and
199
- appropriately publish on each copy an appropriate copyright notice;
200
- keep intact all notices stating that this License and any
201
- non-permissive terms added in accord with section 7 apply to the code;
202
- keep intact all notices of the absence of any warranty; and give all
203
- recipients a copy of this License along with the Program.
204
-
205
- You may charge any price or no price for each copy that you convey,
206
- and you may offer support or warranty protection for a fee.
207
-
208
- 5. Conveying Modified Source Versions.
209
-
210
- You may convey a work based on the Program, or the modifications to
211
- produce it from the Program, in the form of source code under the
212
- terms of section 4, provided that you also meet all of these conditions:
213
-
214
- a) The work must carry prominent notices stating that you modified
215
- it, and giving a relevant date.
216
-
217
- b) The work must carry prominent notices stating that it is
218
- released under this License and any conditions added under section
219
- 7. This requirement modifies the requirement in section 4 to
220
- "keep intact all notices".
221
-
222
- c) You must license the entire work, as a whole, under this
223
- License to anyone who comes into possession of a copy. This
224
- License will therefore apply, along with any applicable section 7
225
- additional terms, to the whole of the work, and all its parts,
226
- regardless of how they are packaged. This License gives no
227
- permission to license the work in any other way, but it does not
228
- invalidate such permission if you have separately received it.
229
-
230
- d) If the work has interactive user interfaces, each must display
231
- Appropriate Legal Notices; however, if the Program has interactive
232
- interfaces that do not display Appropriate Legal Notices, your
233
- work need not make them do so.
234
-
235
- A compilation of a covered work with other separate and independent
236
- works, which are not by their nature extensions of the covered work,
237
- and which are not combined with it such as to form a larger program,
238
- in or on a volume of a storage or distribution medium, is called an
239
- "aggregate" if the compilation and its resulting copyright are not
240
- used to limit the access or legal rights of the compilation's users
241
- beyond what the individual works permit. Inclusion of a covered work
242
- in an aggregate does not cause this License to apply to the other
243
- parts of the aggregate.
244
-
245
- 6. Conveying Non-Source Forms.
246
-
247
- You may convey a covered work in object code form under the terms
248
- of sections 4 and 5, provided that you also convey the
249
- machine-readable Corresponding Source under the terms of this License,
250
- in one of these ways:
251
-
252
- a) Convey the object code in, or embodied in, a physical product
253
- (including a physical distribution medium), accompanied by the
254
- Corresponding Source fixed on a durable physical medium
255
- customarily used for software interchange.
256
-
257
- b) Convey the object code in, or embodied in, a physical product
258
- (including a physical distribution medium), accompanied by a
259
- written offer, valid for at least three years and valid for as
260
- long as you offer spare parts or customer support for that product
261
- model, to give anyone who possesses the object code either (1) a
262
- copy of the Corresponding Source for all the software in the
263
- product that is covered by this License, on a durable physical
264
- medium customarily used for software interchange, for a price no
265
- more than your reasonable cost of physically performing this
266
- conveying of source, or (2) access to copy the
267
- Corresponding Source from a network server at no charge.
268
-
269
- c) Convey individual copies of the object code with a copy of the
270
- written offer to provide the Corresponding Source. This
271
- alternative is allowed only occasionally and noncommercially, and
272
- only if you received the object code with such an offer, in accord
273
- with subsection 6b.
274
-
275
- d) Convey the object code by offering access from a designated
276
- place (gratis or for a charge), and offer equivalent access to the
277
- Corresponding Source in the same way through the same place at no
278
- further charge. You need not require recipients to copy the
279
- Corresponding Source along with the object code. If the place to
280
- copy the object code is a network server, the Corresponding Source
281
- may be on a different server (operated by you or a third party)
282
- that supports equivalent copying facilities, provided you maintain
283
- clear directions next to the object code saying where to find the
284
- Corresponding Source. Regardless of what server hosts the
285
- Corresponding Source, you remain obligated to ensure that it is
286
- available for as long as needed to satisfy these requirements.
287
-
288
- e) Convey the object code using peer-to-peer transmission, provided
289
- you inform other peers where the object code and Corresponding
290
- Source of the work are being offered to the general public at no
291
- charge under subsection 6d.
292
-
293
- A separable portion of the object code, whose source code is excluded
294
- from the Corresponding Source as a System Library, need not be
295
- included in conveying the object code work.
296
-
297
- A "User Product" is either (1) a "consumer product", which means any
298
- tangible personal property which is normally used for personal, family,
299
- or household purposes, or (2) anything designed or sold for incorporation
300
- into a dwelling. In determining whether a product is a consumer product,
301
- doubtful cases shall be resolved in favor of coverage. For a particular
302
- product received by a particular user, "normally used" refers to a
303
- typical or common use of that class of product, regardless of the status
304
- of the particular user or of the way in which the particular user
305
- actually uses, or expects or is expected to use, the product. A product
306
- is a consumer product regardless of whether the product has substantial
307
- commercial, industrial or non-consumer uses, unless such uses represent
308
- the only significant mode of use of the product.
309
-
310
- "Installation Information" for a User Product means any methods,
311
- procedures, authorization keys, or other information required to install
312
- and execute modified versions of a covered work in that User Product from
313
- a modified version of its Corresponding Source. The information must
314
- suffice to ensure that the continued functioning of the modified object
315
- code is in no case prevented or interfered with solely because
316
- modification has been made.
317
-
318
- If you convey an object code work under this section in, or with, or
319
- specifically for use in, a User Product, and the conveying occurs as
320
- part of a transaction in which the right of possession and use of the
321
- User Product is transferred to the recipient in perpetuity or for a
322
- fixed term (regardless of how the transaction is characterized), the
323
- Corresponding Source conveyed under this section must be accompanied
324
- by the Installation Information. But this requirement does not apply
325
- if neither you nor any third party retains the ability to install
326
- modified object code on the User Product (for example, the work has
327
- been installed in ROM).
328
-
329
- The requirement to provide Installation Information does not include a
330
- requirement to continue to provide support service, warranty, or updates
331
- for a work that has been modified or installed by the recipient, or for
332
- the User Product in which it has been modified or installed. Access to a
333
- network may be denied when the modification itself materially and
334
- adversely affects the operation of the network or violates the rules and
335
- protocols for communication across the network.
336
-
337
- Corresponding Source conveyed, and Installation Information provided,
338
- in accord with this section must be in a format that is publicly
339
- documented (and with an implementation available to the public in
340
- source code form), and must require no special password or key for
341
- unpacking, reading or copying.
342
-
343
- 7. Additional Terms.
344
-
345
- "Additional permissions" are terms that supplement the terms of this
346
- License by making exceptions from one or more of its conditions.
347
- Additional permissions that are applicable to the entire Program shall
348
- be treated as though they were included in this License, to the extent
349
- that they are valid under applicable law. If additional permissions
350
- apply only to part of the Program, that part may be used separately
351
- under those permissions, but the entire Program remains governed by
352
- this License without regard to the additional permissions.
353
-
354
- When you convey a copy of a covered work, you may at your option
355
- remove any additional permissions from that copy, or from any part of
356
- it. (Additional permissions may be written to require their own
357
- removal in certain cases when you modify the work.) You may place
358
- additional permissions on material, added by you to a covered work,
359
- for which you have or can give appropriate copyright permission.
360
-
361
- Notwithstanding any other provision of this License, for material you
362
- add to a covered work, you may (if authorized by the copyright holders of
363
- that material) supplement the terms of this License with terms:
364
-
365
- a) Disclaiming warranty or limiting liability differently from the
366
- terms of sections 15 and 16 of this License; or
367
-
368
- b) Requiring preservation of specified reasonable legal notices or
369
- author attributions in that material or in the Appropriate Legal
370
- Notices displayed by works containing it; or
371
-
372
- c) Prohibiting misrepresentation of the origin of that material, or
373
- requiring that modified versions of such material be marked in
374
- reasonable ways as different from the original version; or
375
-
376
- d) Limiting the use for publicity purposes of names of licensors or
377
- authors of the material; or
378
-
379
- e) Declining to grant rights under trademark law for use of some
380
- trade names, trademarks, or service marks; or
381
-
382
- f) Requiring indemnification of licensors and authors of that
383
- material by anyone who conveys the material (or modified versions of
384
- it) with contractual assumptions of liability to the recipient, for
385
- any liability that these contractual assumptions directly impose on
386
- those licensors and authors.
387
-
388
- All other non-permissive additional terms are considered "further
389
- restrictions" within the meaning of section 10. If the Program as you
390
- received it, or any part of it, contains a notice stating that it is
391
- governed by this License along with a term that is a further
392
- restriction, you may remove that term. If a license document contains
393
- a further restriction but permits relicensing or conveying under this
394
- License, you may add to a covered work material governed by the terms
395
- of that license document, provided that the further restriction does
396
- not survive such relicensing or conveying.
397
-
398
- If you add terms to a covered work in accord with this section, you
399
- must place, in the relevant source files, a statement of the
400
- additional terms that apply to those files, or a notice indicating
401
- where to find the applicable terms.
402
-
403
- Additional terms, permissive or non-permissive, may be stated in the
404
- form of a separately written license, or stated as exceptions;
405
- the above requirements apply either way.
406
-
407
- 8. Termination.
408
-
409
- You may not propagate or modify a covered work except as expressly
410
- provided under this License. Any attempt otherwise to propagate or
411
- modify it is void, and will automatically terminate your rights under
412
- this License (including any patent licenses granted under the third
413
- paragraph of section 11).
414
-
415
- However, if you cease all violation of this License, then your
416
- license from a particular copyright holder is reinstated (a)
417
- provisionally, unless and until the copyright holder explicitly and
418
- finally terminates your license, and (b) permanently, if the copyright
419
- holder fails to notify you of the violation by some reasonable means
420
- prior to 60 days after the cessation.
421
-
422
- Moreover, your license from a particular copyright holder is
423
- reinstated permanently if the copyright holder notifies you of the
424
- violation by some reasonable means, this is the first time you have
425
- received notice of violation of this License (for any work) from that
426
- copyright holder, and you cure the violation prior to 30 days after
427
- your receipt of the notice.
428
-
429
- Termination of your rights under this section does not terminate the
430
- licenses of parties who have received copies or rights from you under
431
- this License. If your rights have been terminated and not permanently
432
- reinstated, you do not qualify to receive new licenses for the same
433
- material under section 10.
434
-
435
- 9. Acceptance Not Required for Having Copies.
436
-
437
- You are not required to accept this License in order to receive or
438
- run a copy of the Program. Ancillary propagation of a covered work
439
- occurring solely as a consequence of using peer-to-peer transmission
440
- to receive a copy likewise does not require acceptance. However,
441
- nothing other than this License grants you permission to propagate or
442
- modify any covered work. These actions infringe copyright if you do
443
- not accept this License. Therefore, by modifying or propagating a
444
- covered work, you indicate your acceptance of this License to do so.
445
-
446
- 10. Automatic Licensing of Downstream Recipients.
447
-
448
- Each time you convey a covered work, the recipient automatically
449
- receives a license from the original licensors, to run, modify and
450
- propagate that work, subject to this License. You are not responsible
451
- for enforcing compliance by third parties with this License.
452
-
453
- An "entity transaction" is a transaction transferring control of an
454
- organization, or substantially all assets of one, or subdividing an
455
- organization, or merging organizations. If propagation of a covered
456
- work results from an entity transaction, each party to that
457
- transaction who receives a copy of the work also receives whatever
458
- licenses to the work the party's predecessor in interest had or could
459
- give under the previous paragraph, plus a right to possession of the
460
- Corresponding Source of the work from the predecessor in interest, if
461
- the predecessor has it or can get it with reasonable efforts.
462
-
463
- You may not impose any further restrictions on the exercise of the
464
- rights granted or affirmed under this License. For example, you may
465
- not impose a license fee, royalty, or other charge for exercise of
466
- rights granted under this License, and you may not initiate litigation
467
- (including a cross-claim or counterclaim in a lawsuit) alleging that
468
- any patent claim is infringed by making, using, selling, offering for
469
- sale, or importing the Program or any portion of it.
470
-
471
- 11. Patents.
472
-
473
- A "contributor" is a copyright holder who authorizes use under this
474
- License of the Program or a work on which the Program is based. The
475
- work thus licensed is called the contributor's "contributor version".
476
-
477
- A contributor's "essential patent claims" are all patent claims
478
- owned or controlled by the contributor, whether already acquired or
479
- hereafter acquired, that would be infringed by some manner, permitted
480
- by this License, of making, using, or selling its contributor version,
481
- but do not include claims that would be infringed only as a
482
- consequence of further modification of the contributor version. For
483
- purposes of this definition, "control" includes the right to grant
484
- patent sublicenses in a manner consistent with the requirements of
485
- this License.
486
-
487
- Each contributor grants you a non-exclusive, worldwide, royalty-free
488
- patent license under the contributor's essential patent claims, to
489
- make, use, sell, offer for sale, import and otherwise run, modify and
490
- propagate the contents of its contributor version.
491
-
492
- In the following three paragraphs, a "patent license" is any express
493
- agreement or commitment, however denominated, not to enforce a patent
494
- (such as an express permission to practice a patent or covenant not to
495
- sue for patent infringement). To "grant" such a patent license to a
496
- party means to make such an agreement or commitment not to enforce a
497
- patent against the party.
498
-
499
- If you convey a covered work, knowingly relying on a patent license,
500
- and the Corresponding Source of the work is not available for anyone
501
- to copy, free of charge and under the terms of this License, through a
502
- publicly available network server or other readily accessible means,
503
- then you must either (1) cause the Corresponding Source to be so
504
- available, or (2) arrange to deprive yourself of the benefit of the
505
- patent license for this particular work, or (3) arrange, in a manner
506
- consistent with the requirements of this License, to extend the patent
507
- license to downstream recipients. "Knowingly relying" means you have
508
- actual knowledge that, but for the patent license, your conveying the
509
- covered work in a country, or your recipient's use of the covered work
510
- in a country, would infringe one or more identifiable patents in that
511
- country that you have reason to believe are valid.
512
-
513
- If, pursuant to or in connection with a single transaction or
514
- arrangement, you convey, or propagate by procuring conveyance of, a
515
- covered work, and grant a patent license to some of the parties
516
- receiving the covered work authorizing them to use, propagate, modify
517
- or convey a specific copy of the covered work, then the patent license
518
- you grant is automatically extended to all recipients of the covered
519
- work and works based on it.
520
-
521
- A patent license is "discriminatory" if it does not include within
522
- the scope of its coverage, prohibits the exercise of, or is
523
- conditioned on the non-exercise of one or more of the rights that are
524
- specifically granted under this License. You may not convey a covered
525
- work if you are a party to an arrangement with a third party that is
526
- in the business of distributing software, under which you make payment
527
- to the third party based on the extent of your activity of conveying
528
- the work, and under which the third party grants, to any of the
529
- parties who would receive the covered work from you, a discriminatory
530
- patent license (a) in connection with copies of the covered work
531
- conveyed by you (or copies made from those copies), or (b) primarily
532
- for and in connection with specific products or compilations that
533
- contain the covered work, unless you entered into that arrangement,
534
- or that patent license was granted, prior to 28 March 2007.
535
-
536
- Nothing in this License shall be construed as excluding or limiting
537
- any implied license or other defenses to infringement that may
538
- otherwise be available to you under applicable patent law.
539
-
540
- 12. No Surrender of Others' Freedom.
541
-
542
- If conditions are imposed on you (whether by court order, agreement or
543
- otherwise) that contradict the conditions of this License, they do not
544
- excuse you from the conditions of this License. If you cannot convey a
545
- covered work so as to satisfy simultaneously your obligations under this
546
- License and any other pertinent obligations, then as a consequence you may
547
- not convey it at all. For example, if you agree to terms that obligate you
548
- to collect a royalty for further conveying from those to whom you convey
549
- the Program, the only way you could satisfy both those terms and this
550
- License would be to refrain entirely from conveying the Program.
551
-
552
- 13. Use with the GNU Affero General Public License.
553
-
554
- Notwithstanding any other provision of this License, you have
555
- permission to link or combine any covered work with a work licensed
556
- under version 3 of the GNU Affero General Public License into a single
557
- combined work, and to convey the resulting work. The terms of this
558
- License will continue to apply to the part which is the covered work,
559
- but the special requirements of the GNU Affero General Public License,
560
- section 13, concerning interaction through a network will apply to the
561
- combination as such.
562
-
563
- 14. Revised Versions of this License.
564
-
565
- The Free Software Foundation may publish revised and/or new versions of
566
- the GNU General Public License from time to time. Such new versions will
567
- be similar in spirit to the present version, but may differ in detail to
568
- address new problems or concerns.
569
-
570
- Each version is given a distinguishing version number. If the
571
- Program specifies that a certain numbered version of the GNU General
572
- Public License "or any later version" applies to it, you have the
573
- option of following the terms and conditions either of that numbered
574
- version or of any later version published by the Free Software
575
- Foundation. If the Program does not specify a version number of the
576
- GNU General Public License, you may choose any version ever published
577
- by the Free Software Foundation.
578
-
579
- If the Program specifies that a proxy can decide which future
580
- versions of the GNU General Public License can be used, that proxy's
581
- public statement of acceptance of a version permanently authorizes you
582
- to choose that version for the Program.
583
-
584
- Later license versions may give you additional or different
585
- permissions. However, no additional obligations are imposed on any
586
- author or copyright holder as a result of your choosing to follow a
587
- later version.
588
-
589
- 15. Disclaimer of Warranty.
590
-
591
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
- APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
- HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
- OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
- IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
- ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
-
600
- 16. Limitation of Liability.
601
-
602
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
- THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
- GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
- USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
- PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
- EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
- SUCH DAMAGES.
611
-
612
- 17. Interpretation of Sections 15 and 16.
613
-
614
- If the disclaimer of warranty and limitation of liability provided
615
- above cannot be given local legal effect according to their terms,
616
- reviewing courts shall apply local law that most closely approximates
617
- an absolute waiver of all civil liability in connection with the
618
- Program, unless a warranty or assumption of liability accompanies a
619
- copy of the Program in return for a fee.
620
-
621
- END OF TERMS AND CONDITIONS
622
-
623
- How to Apply These Terms to Your New Programs
624
-
625
- If you develop a new program, and you want it to be of the greatest
626
- possible use to the public, the best way to achieve this is to make it
627
- free software which everyone can redistribute and change under these terms.
628
-
629
- To do so, attach the following notices to the program. It is safest
630
- to attach them to the start of each source file to most effectively
631
- state the exclusion of warranty; and each file should have at least
632
- the "copyright" line and a pointer to where the full notice is found.
633
-
634
- {one line to give the program's name and a brief idea of what it does.}
635
- Copyright (C) {year} {name of author}
636
-
637
- This program is free software: you can redistribute it and/or modify
638
- it under the terms of the GNU General Public License as published by
639
- the Free Software Foundation, either version 3 of the License, or
640
- (at your option) any later version.
641
-
642
- This program is distributed in the hope that it will be useful,
643
- but WITHOUT ANY WARRANTY; without even the implied warranty of
644
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
- GNU General Public License for more details.
646
-
647
- You should have received a copy of the GNU General Public License
648
- along with this program. If not, see <http://www.gnu.org/licenses/>.
649
-
650
- Also add information on how to contact you by electronic and paper mail.
651
-
652
- If the program does terminal interaction, make it output a short
653
- notice like this when it starts in an interactive mode:
654
-
655
- {project} Copyright (C) {year} {fullname}
656
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
- This is free software, and you are welcome to redistribute it
658
- under certain conditions; type `show c' for details.
659
-
660
- The hypothetical commands `show w' and `show c' should show the appropriate
661
- parts of the General Public License. Of course, your program's commands
662
- might be different; for a GUI interface, you would use an "about box".
663
-
664
- You should also get your employer (if you work as a programmer) or school,
665
- if any, to sign a "copyright disclaimer" for the program, if necessary.
666
- For more information on this, and how to apply and follow the GNU GPL, see
667
- <http://www.gnu.org/licenses/>.
668
-
669
- The GNU General Public License does not permit incorporating your program
670
- into proprietary programs. If your program is a subroutine library, you
671
- may consider it more useful to permit linking proprietary applications with
672
- the library. If this is what you want to do, use the GNU Lesser General
673
- Public License instead of this License. But first, please read
674
- <http://www.gnu.org/philosophy/why-not-lgpl.html>.
675
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/yoast/i18n-module/README.md DELETED
@@ -1,28 +0,0 @@
1
- [![Code Climate](https://codeclimate.com/github/Yoast/i18n-module/badges/gpa.svg)](https://codeclimate.com/github/Yoast/i18n-module)
2
-
3
- # Yoast i18n module
4
- Promote your own translation site for people who are using your plugin in another language than `en_US`.
5
-
6
- ## Example of the rendered promo box
7
-
8
- ![Example promo box](http://uploads.yoast.nl/i18n-promo-box_1A1B3FFF.png)
9
-
10
- The image, the name of your plugin and the name of your translation project are all configurable (see example below). The name of the language is retrieved from your GlotPress install, as is the percentage translated. The box doesn't display when a language has been translated for 90% or more.
11
-
12
- ## How to use this module
13
- Just include the library as a submodule, make sure the class is loaded and instantiate it like this:
14
-
15
- ```php
16
- $wpseo_i18n = new yoast_i18n(
17
- array(
18
- 'textdomain' => 'wordpress-seo',
19
- 'project_slug' => 'wordpress-seo',
20
- 'plugin_name' => 'WordPress SEO by Yoast',
21
- 'hook' => 'wpseo_admin_footer',
22
- 'glotpress_url' => 'http://translate.yoast.com',
23
- 'glotpress_name' => 'Yoast Translate',
24
- 'glotpress_logo' => 'https://cdn.yoast.com/wp-content/uploads/i18n-images/Yoast_Translate.svg',
25
- 'register_url ' => 'http://translate.yoast.com/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=i18n-promo',
26
- )
27
- );
28
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/yoast/i18n-module/composer.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "name" : "yoast/i18n-module",
3
- "description": "Handle i18n for WordPress plugins.",
4
- "keywords" : ["wordpress"],
5
- "homepage" : "https://github.com/Yoast/i18n-module",
6
- "license" : "GPL-2.0+",
7
- "authors" : [
8
- {
9
- "name" : "Team Yoast",
10
- "email" : "support@yoast.com",
11
- "homepage": "https://yoast.com"
12
- }
13
- ],
14
- "support" : {
15
- "issues": "https://github.com/Yoast/i18n-module/issues"
16
- },
17
- "autoload" : {
18
- "classmap": ["i18n-module.php"]
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/yoast/i18n-module/i18n-module.php DELETED
@@ -1,278 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * This class defines a promo box and checks your translation site's API for stats about it, then shows them to the user.
5
- */
6
- class yoast_i18n {
7
-
8
- /**
9
- * Your translation site's logo
10
- *
11
- * @var string
12
- */
13
- private $glotpress_logo;
14
-
15
- /**
16
- * Your translation site's name
17
- *
18
- * @var string
19
- */
20
- private $glotpress_name;
21
-
22
- /**
23
- * Your translation site's URL
24
- *
25
- * @var string
26
- */
27
- private $glotpress_url;
28
-
29
- /**
30
- * Hook where you want to show the promo box
31
- *
32
- * @var string
33
- */
34
- private $hook;
35
-
36
- /**
37
- * Will contain the site's locale
38
- *
39
- * @access private
40
- * @var string
41
- */
42
- private $locale;
43
-
44
- /**
45
- * Will contain the locale's name, obtained from yoru translation site
46
- *
47
- * @access private
48
- * @var string
49
- */
50
- private $locale_name;
51
-
52
- /**
53
- * Will contain the percentage translated for the plugin translation project in the locale
54
- *
55
- * @access private
56
- * @var int
57
- */
58
- private $percent_translated;
59
-
60
- /**
61
- * Name of your plugin
62
- *
63
- * @var string
64
- */
65
- private $plugin_name;
66
-
67
- /**
68
- * Project slug for the project on your translation site
69
- *
70
- * @var string
71
- */
72
- private $project_slug;
73
-
74
- /**
75
- * URL to point to for registration links
76
- *
77
- * @var string
78
- */
79
- private $register_url;
80
-
81
- /**
82
- * Your plugins textdomain
83
- *
84
- * @var string
85
- */
86
- private $textdomain;
87
-
88
- /**
89
- * Indicates whether there's a translation available at all.
90
- *
91
- * @access private
92
- * @var bool
93
- */
94
- private $translation_exists;
95
-
96
- /**
97
- * Indicates whether the translation's loaded.
98
- *
99
- * @access private
100
- * @var bool
101
- */
102
- private $translation_loaded;
103
-
104
- /**
105
- * Class constructor
106
- *
107
- * @param array $args Contains the settings for the class.
108
- */
109
- public function __construct( $args ) {
110
- if ( ! is_admin() ) {
111
- return;
112
- }
113
-
114
- $this->locale = get_locale();
115
- if ( 'en_US' === $this->locale ) {
116
- return;
117
- }
118
-
119
- $this->init( $args );
120
-
121
- if ( ! $this->hide_promo() ) {
122
- add_action( $this->hook, array( $this, 'promo' ) );
123
- }
124
- }
125
-
126
- /**
127
- * This is where you decide where to display the messages and where you set the plugin specific variables.
128
- *
129
- * @access private
130
- *
131
- * @param array $args
132
- */
133
- private function init( $args ) {
134
- foreach ( $args as $key => $arg ) {
135
- $this->$key = $arg;
136
- }
137
- }
138
-
139
- /**
140
- * Check whether the promo should be hidden or not
141
- *
142
- * @access private
143
- *
144
- * @return bool
145
- */
146
- private function hide_promo() {
147
- $hide_promo = get_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide' );
148
- if ( ! $hide_promo ) {
149
- if ( filter_input( INPUT_GET, 'remove_i18n_promo', FILTER_VALIDATE_INT ) === 1 ) {
150
- // No expiration time, so this would normally not expire, but it wouldn't be copied to other sites etc.
151
- set_transient( 'yoast_i18n_' . $this->project_slug . '_promo_hide', true );
152
- $hide_promo = true;
153
- }
154
- }
155
-
156
- return $hide_promo;
157
- }
158
-
159
- /**
160
- * Generates a promo message
161
- *
162
- * @access private
163
- *
164
- * @return bool|string $message
165
- */
166
- private function promo_message() {
167
- $message = false;
168
-
169
- if ( $this->translation_exists && $this->translation_loaded && $this->percent_translated < 90 ) {
170
- $message = __( 'As you can see, there is a translation of this plugin in %1$s. This translation is currently %3$d%% complete. We need your help to make it complete and to fix any errors. Please register at %4$s to help complete the translation to %1$s!', $this->textdomain );
171
- } else if ( ! $this->translation_loaded && $this->translation_exists ) {
172
- $message = __( 'You\'re using WordPress in %1$s. While %2$s has been translated to %1$s for %3$d%%, it\'s not been shipped with the plugin yet. You can help! Register at %4$s to help complete the translation to %1$s!', $this->textdomain );
173
- } else if ( ! $this->translation_exists ) {
174
- $message = __( 'You\'re using WordPress in a language we don\'t support yet. We\'d love for %2$s to be translated in that language too, but unfortunately, it isn\'t right now. You can change that! Register at %4$s to help translate it!', $this->textdomain );
175
- }
176
-
177
- $registration_link = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $this->register_url ), esc_html( $this->glotpress_name ) );
178
- $message = sprintf( $message, esc_html( $this->locale_name ), esc_html( $this->plugin_name ), $this->percent_translated, $registration_link );
179
-
180
- return $message;
181
- }
182
-
183
- /**
184
- * Outputs a promo box
185
- */
186
- public function promo() {
187
- $this->translation_details();
188
-
189
- $message = $this->promo_message();
190
-
191
- if ( $message ) {
192
- echo '<div id="i18n_promo_box" style="border:1px solid #ccc;background-color:#fff;padding:10px;max-width:650px;">';
193
- echo '<a href="' . esc_url( add_query_arg( array( 'remove_i18n_promo' => '1' ) ) ) . '" style="color:#333;text-decoration:none;font-weight:bold;font-size:16px;border:1px solid #ccc;padding:1px 4px;" class="alignright">X</a>';
194
- echo '<h2>' . sprintf( __( 'Translation of %s', $this->textdomain ), $this->plugin_name ) . '</h2>';
195
- if ( isset( $this->glotpress_logo ) && '' != $this->glotpress_logo ) {
196
- echo '<a href="' . $this->register_url . '"><img class="alignright" style="margin:15px 5px 5px 5px;width:200px;" src="' . $this->glotpress_logo . '" alt="' . $this->glotpress_name . '"/></a>';
197
- }
198
- echo '<p>' . $message . '</p>';
199
- echo '<p><a href="' . $this->register_url . '">' . __( 'Register now &raquo;', $this->textdomain ) . '</a></p>';
200
- echo '</div>';
201
- }
202
- }
203
-
204
- /**
205
- * Try to find the transient for the translation set or retrieve them.
206
- *
207
- * @access private
208
- *
209
- * @return object|null
210
- */
211
- private function find_or_initialize_translation_details() {
212
- $set = get_transient( 'yoast_i18n_' . $this->project_slug . '_' . $this->locale );
213
-
214
- if ( ! $set ) {
215
- $set = $this->retrieve_translation_details();
216
- set_transient( 'yoast_i18n_' . $this->project_slug . '_' . $this->locale, $set, DAY_IN_SECONDS );
217
- }
218
-
219
- return $set;
220
- }
221
-
222
- /**
223
- * Try to get translation details from cache, otherwise retrieve them, then parse them.
224
- *
225
- * @access private
226
- */
227
- private function translation_details() {
228
- $set = $this->find_or_initialize_translation_details();
229
-
230
- $this->translation_exists = ! is_null( $set );
231
- $this->translation_loaded = is_textdomain_loaded( $this->textdomain );
232
-
233
- $this->parse_translation_set( $set );
234
- }
235
-
236
- /**
237
- * Retrieve the translation details from Yoast Translate
238
- *
239
- * @access private
240
- *
241
- * @return object|null
242
- */
243
- private function retrieve_translation_details() {
244
- $api_url = trailingslashit( $this->glotpress_url ) . 'api/projects/' . $this->project_slug;
245
-
246
- $resp = wp_remote_get( $api_url );
247
- $body = wp_remote_retrieve_body( $resp );
248
- unset( $resp );
249
-
250
- if ( $body ) {
251
- $body = json_decode( $body );
252
- foreach ( $body->translation_sets as $set ) {
253
- if ( $this->locale == $set->wp_locale ) {
254
- return $set;
255
- }
256
- }
257
- }
258
-
259
- return null;
260
- }
261
-
262
- /**
263
- * Set the needed private variables based on the results from Yoast Translate
264
- *
265
- * @param object $set The translation set
266
- *
267
- * @access private
268
- */
269
- private function parse_translation_set( $set ) {
270
- if ( $this->translation_exists && is_object( $set ) ) {
271
- $this->locale_name = $set->name;
272
- $this->percent_translated = $set->percent_translated;
273
- } else {
274
- $this->locale_name = '';
275
- $this->percent_translated = '';
276
- }
277
- }
278
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/yoast/license-manager-2/.gitigore ADDED
@@ -0,0 +1,2 @@
 
 
1
+ .idea/
2
+ .idea/*
vendor/yoast/license-manager-2/.travis.yml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ language: php
2
+
3
+ php: '5.5'
4
+
5
+ sudo: false
6
+
7
+ env:
8
+ - WP_VERSION=master WP_MULTISITE=0 PHPLINT=1
9
+
10
+ matrix:
11
+ include:
12
+ - php: '5.5'
13
+ env: WP_VERSION=4.0 WP_MULTISITE=1
14
+ - php: '5.4'
15
+ env: WP_VERSION=4.0 WP_MULTISITE=0
16
+ - php: '5.4'
17
+ env: WP_VERSION=4.0 WP_MULTISITE=1
18
+ - php: '5.5'
19
+ env: WP_VERSION=4.0 WP_MULTISITE=0
20
+ - php: '5.5'
21
+ env: WP_VERSION=3.9 WP_MULTISITE=1
22
+ - php: '5.3'
23
+ env: WP_VERSION=3.9 WP_MULTISITE=0
24
+ - php: '5.2'
25
+ env: WP_VERSION=master WP_MULTISITE=1 PHPLINT=1
26
+
27
+ before_script:
28
+ - phpenv local 5.6
29
+ - composer selfupdate --no-interaction
30
+ - composer install --no-interaction
31
+ - phpenv local --unset
32
+ - PLUGIN_SLUG=$(basename $(pwd))
33
+ - export WP_DEVELOP_DIR=/tmp/wordpress/
34
+ - git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ /tmp/wordpress
35
+ - cd ..
36
+ - cp -r "$PLUGIN_SLUG" "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
37
+ - cd /tmp/wordpress/
38
+ - cp wp-tests-config-sample.php wp-tests-config.php
39
+ - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php
40
+ - sed -i "s/yourusernamehere/travis/" wp-tests-config.php
41
+ - sed -i "s/yourpasswordhere//" wp-tests-config.php
42
+ - mysql -e "CREATE DATABASE wordpress_tests;" -uroot
43
+ - git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs
44
+ - git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
45
+ wpcs
46
+ - cd phpcs
47
+ - scripts/phpcs --config-set installed_paths ../wpcs
48
+ - cd "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
49
+ - phpenv rehash
50
+
51
+ script:
52
+ - if [[ "$PHPLINT" == "1" ]]; then find -L . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l; fi
53
+ - if [[ "$PHPLINT" == "1" ]]; then /tmp/wordpress/phpcs/scripts/phpcs -p -s -v -n . --standard=./codesniffer.xml --extensions=php; fi
54
+ - phpunit -c phpunit.xml
vendor/yoast/license-manager-2/README.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Yoast License Manager
2
+ =====================
3
+
4
+ This library will take care of the following.
5
+
6
+ - Managing license related options
7
+ - Setting license key from a constant
8
+ - Obfuscasting (valid) license keys
9
+ - Remote license activation / deactivation
10
+ - Checking for plugin or theme updates
11
+
12
+ ## Usage
13
+
14
+ ### Inside Plugins
15
+
16
+ A sample plugin is included, [have a look at its source](https://github.com/Yoast/License-Manager/blob/master/samples/sample-plugin.php).
17
+
18
+ ### Inside Themes
19
+
20
+ A sample theme `functions.php` file is included, [have a look here](https://github.com/Yoast/License-Manager/blob/master/samples/sample-theme-functions.php).
21
+
vendor/yoast/license-manager-2/class-api-request.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( ! class_exists( "Yoast_API_Request", false ) ) {
4
+
5
+ /**
6
+ * Handles requests to the Yoast EDD API
7
+ */
8
+ class Yoast_API_Request {
9
+
10
+ /**
11
+ * @var string Request URL
12
+ */
13
+ private $url = '';
14
+
15
+ /**
16
+ * @var array Request parameters
17
+ */
18
+ private $args = array(
19
+ 'method' => 'GET',
20
+ 'timeout' => 10,
21
+ 'sslverify' => false,
22
+ 'headers' => array(
23
+ 'Accept-Encoding' => '*',
24
+ 'X-Yoast-EDD' => '1'
25
+ )
26
+ );
27
+
28
+ /**
29
+ * @var boolean
30
+ */
31
+ private $success = false;
32
+
33
+ /**
34
+ * @var mixed
35
+ */
36
+ private $response;
37
+
38
+ /**
39
+ * @var string
40
+ */
41
+ private $error_message = '';
42
+
43
+ /**
44
+ * Constructor
45
+ *
46
+ * @param string url
47
+ * @param array $args
48
+ */
49
+ public function __construct( $url, array $args = array() ) {
50
+
51
+ // set api url
52
+ $this->url = $url;
53
+
54
+ // set request args (merge with defaults)
55
+ $this->args = wp_parse_args( $args, $this->args );
56
+
57
+ // fire the request
58
+ $this->success = $this->fire();
59
+ }
60
+
61
+ /**
62
+ * Fires the request, automatically called from constructor
63
+ *
64
+ * @return boolean
65
+ */
66
+ private function fire() {
67
+
68
+ // fire request to shop
69
+ $response = wp_remote_request( $this->url, $this->args );
70
+
71
+ // validate raw response
72
+ if( $this->validate_raw_response( $response ) === false ) {
73
+ return false;
74
+ }
75
+
76
+ // decode the response
77
+ $this->response = json_decode( wp_remote_retrieve_body( $response ) );
78
+
79
+ // response should be an object
80
+ if( ! is_object( $this->response ) ) {
81
+ $this->error_message = 'No JSON object was returned.';
82
+ return false;
83
+ }
84
+
85
+ return true;
86
+ }
87
+
88
+ /**
89
+ * @param object $response
90
+ * @return boolean
91
+ */
92
+ private function validate_raw_response( $response ) {
93
+
94
+ // make sure response came back okay
95
+ if( is_wp_error( $response ) ) {
96
+ $this->error_message = $response->get_error_message();
97
+ return false;
98
+ }
99
+
100
+ // check response code, should be 200
101
+ $response_code = wp_remote_retrieve_response_code( $response );
102
+
103
+ if( false === strstr( $response_code, '200' ) ) {
104
+
105
+ $response_message = wp_remote_retrieve_response_message( $response );
106
+ $this->error_message = "{$response_code} {$response_message}";
107
+
108
+ return false;
109
+ }
110
+
111
+ return true;
112
+ }
113
+
114
+ /**
115
+ * Was a valid response returned?
116
+ *
117
+ * @return boolean
118
+ */
119
+ public function is_valid() {
120
+ return ( $this->success === true );
121
+ }
122
+
123
+ /**
124
+ * @return string
125
+ */
126
+ public function get_error_message() {
127
+ return $this->error_message;
128
+ }
129
+
130
+ /**
131
+ * @return object
132
+ */
133
+ public function get_response() {
134
+ return $this->response;
135
+ }
136
+
137
+ }
138
+
139
+ }
140
+
vendor/yoast/license-manager-2/class-license-manager.php ADDED
@@ -0,0 +1,619 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! interface_exists( 'iYoast_License_Manager', false ) ) {
4
+
5
+ interface iYoast_License_Manager {
6
+
7
+ public function specific_hooks();
8
+
9
+ public function setup_auto_updater();
10
+
11
+ }
12
+
13
+ }
14
+
15
+
16
+ if ( ! class_exists( 'Yoast_License_Manager', false ) ) {
17
+
18
+ /**
19
+ * Class Yoast_License_Manager
20
+ *
21
+ * @todo Maybe create a license class that contains key and option
22
+ * @todo Not sure if Yoast_License_Manager is a good name for this class, it's more managing the product (plugin or theme)
23
+ */
24
+ abstract class Yoast_License_Manager implements iYoast_License_Manager {
25
+
26
+ /**
27
+ * @const VERSION The version number of the License_Manager class
28
+ */
29
+ const VERSION = 1;
30
+
31
+ /**
32
+ * @var Yoast_License The license
33
+ */
34
+ protected $product;
35
+
36
+ /**
37
+ * @var string
38
+ */
39
+ private $license_constant_name = '';
40
+
41
+ /**
42
+ * @var boolean True if license is defined with a constant
43
+ */
44
+ private $license_constant_is_defined = false;
45
+
46
+ /**
47
+ * @var boolean True if remote license activation just failed
48
+ */
49
+ private $remote_license_activation_failed = false;
50
+
51
+ /**
52
+ * @var array Array of license related options
53
+ */
54
+ private $options = array();
55
+
56
+ /**
57
+ * @var string Used to prefix ID's, option names, etc..
58
+ */
59
+ protected $prefix;
60
+
61
+ /**
62
+ * @var bool Boolean indicating whether this plugin is network activated
63
+ */
64
+ protected $is_network_activated = false;
65
+
66
+ /**
67
+ * Constructor
68
+ *
69
+ * @param Yoast_Product $product
70
+ */
71
+ public function __construct( Yoast_Product $product ) {
72
+
73
+ // Set the license
74
+ $this->product = $product;
75
+
76
+ // set prefix
77
+ $this->prefix = sanitize_title_with_dashes( $this->product->get_item_name() . '_', null, 'save' );
78
+
79
+ // maybe set license key from constant
80
+ $this->maybe_set_license_key_from_constant();
81
+ }
82
+
83
+ /**
84
+ * Setup hooks
85
+ *
86
+ */
87
+ public function setup_hooks() {
88
+
89
+ // show admin notice if license is not active
90
+ add_action( 'admin_notices', array( $this, 'display_admin_notices' ) );
91
+
92
+ // catch POST requests from license form
93
+ add_action( 'admin_init', array( $this, 'catch_post_request' ) );
94
+
95
+ // setup item type (plugin|theme) specific hooks
96
+ $this->specific_hooks();
97
+
98
+ // setup the auto updater
99
+ $this->setup_auto_updater();
100
+
101
+ }
102
+
103
+ /**
104
+ * Display license specific admin notices, namely:
105
+ *
106
+ * - License for the product isn't activated
107
+ * - External requests are blocked through WP_HTTP_BLOCK_EXTERNAL
108
+ */
109
+ public function display_admin_notices() {
110
+
111
+ if ( ! current_user_can( 'manage_options' ) ) {
112
+ return;
113
+ }
114
+
115
+ // show notice if license is invalid
116
+ if ( ! $this->license_is_valid() ) {
117
+ if ( $this->get_license_key() == '' ) {
118
+ $message = '<b>Warning!</b> You didn\'t set your %s license key yet, which means you\'re missing out on updates and support! <a href="%s">Enter your license key</a> or <a href="%s" target="_blank">get a license here</a>.';
119
+ } else {
120
+ $message = '<b>Warning!</b> Your %s license is inactive which means you\'re missing out on updates and support! <a href="%s">Activate your license</a> or <a href="%s" target="_blank">get a license here</a>.';
121
+ }
122
+ ?>
123
+ <div class="error">
124
+ <p><?php printf( __( $message, $this->product->get_text_domain() ), $this->product->get_item_name(), $this->product->get_license_page_url(), $this->product->get_tracking_url( 'activate-license-notice' ) ); ?></p>
125
+ </div>
126
+ <?php
127
+ }
128
+
129
+ // show notice if external requests are blocked through the WP_HTTP_BLOCK_EXTERNAL constant
130
+ if ( defined( "WP_HTTP_BLOCK_EXTERNAL" ) && WP_HTTP_BLOCK_EXTERNAL === true ) {
131
+
132
+ // check if our API endpoint is in the allowed hosts
133
+ $host = parse_url( $this->product->get_api_url(), PHP_URL_HOST );
134
+
135
+ if ( ! defined( "WP_ACCESSIBLE_HOSTS" ) || stristr( WP_ACCESSIBLE_HOSTS, $host ) === false ) {
136
+ ?>
137
+ <div class="error">
138
+ <p><?php printf( __( '<b>Warning!</b> You\'re blocking external requests which means you won\'t be able to get %s updates. Please add %s to %s.', $this->product->get_text_domain() ), $this->product->get_item_name(), '<strong>' . $host . '</strong>', '<code>WP_ACCESSIBLE_HOSTS</code>' ); ?></p>
139
+ </div>
140
+ <?php
141
+ }
142
+
143
+ }
144
+ }
145
+
146
+ /**
147
+ * Set a notice to display in the admin area
148
+ *
149
+ * @param string $type error|updated
150
+ * @param string $message The message to display
151
+ */
152
+ protected function set_notice( $message, $success = true ) {
153
+ $css_class = ( $success ) ? 'updated' : 'error';
154
+ add_settings_error( $this->prefix . 'license', 'license-notice', $message, $css_class );
155
+ }
156
+
157
+ /**
158
+ * Remotely activate License
159
+ * @return boolean True if the license is now activated, false if not
160
+ */
161
+ public function activate_license() {
162
+
163
+ $result = $this->call_license_api( 'activate' );
164
+
165
+
166
+ if ( $result ) {
167
+
168
+ // story expiry date
169
+ if ( isset( $result->expires ) ) {
170
+ $this->set_license_expiry_date( $result->expires );
171
+ $expiry_date = strtotime( $result->expires );
172
+ } else {
173
+ $expiry_date = false;
174
+ }
175
+
176
+ // show success notice if license is valid
177
+ if ( $result->license === 'valid' ) {
178
+
179
+ $message = sprintf( __( "Your %s license has been activated. ", $this->product->get_text_domain() ), $this->product->get_item_name() );
180
+
181
+ // show a custom notice if users have an unlimited license
182
+ if ( $result->license_limit == 0 ) {
183
+ $message .= __( "You have an unlimited license. ", $this->product->get_text_domain() );
184
+ } else {
185
+ $message .= sprintf( __( "You have used %d/%d activations. ", $this->product->get_text_domain() ), $result->site_count, $result->license_limit );
186
+ }
187
+
188
+ // add upgrade notice if user has less than 3 activations left
189
+ if ( $result->license_limit > 0 && ( $result->license_limit - $result->site_count ) <= 3 ) {
190
+ $message .= sprintf( __( '<a href="%s">Did you know you can upgrade your license?</a>', $this->product->get_text_domain() ), $this->product->get_tracking_url( 'license-nearing-limit-notice' ) );
191
+ // add extend notice if license is expiring in less than 1 month
192
+ } elseif ( $expiry_date !== false && $expiry_date < strtotime( "+1 month" ) ) {
193
+ $days_left = round( ( $expiry_date - strtotime( "now" ) ) / 86400 );
194
+ $message .= sprintf( __( '<a href="%s">Your license is expiring in %d days, would you like to extend it?</a>', $this->product->get_text_domain() ), $this->product->get_tracking_url( 'license-expiring-notice' ), $days_left );
195
+ }
196
+
197
+ $this->set_notice( $message, true );
198
+
199
+ } else {
200
+
201
+ if ( isset( $result->error ) && $result->error === 'no_activations_left' ) {
202
+ // show notice if user is at their activation limit
203
+ $this->set_notice( sprintf( __( 'You\'ve reached your activation limit. You must <a href="%s">upgrade your license</a> to use it on this site.', $this->product->get_text_domain() ), $this->product->get_tracking_url( 'license-at-limit-notice' ) ), false );
204
+ } elseif ( isset( $result->error ) && $result->error == "expired" ) {
205
+ // show notice if the license is expired
206
+ $this->set_notice( sprintf( __( 'Your license has expired. You must <a href="%s">extend your license</a> in order to use it again.', $this->product->get_text_domain() ), $this->product->get_tracking_url( 'license-expired-notice' ) ), false );
207
+ } else {
208
+ // show a general notice if it's any other error
209
+ $this->set_notice( __( "Failed to activate your license, your license key seems to be invalid.", $this->product->get_text_domain() ), false );
210
+ }
211
+
212
+ $this->remote_license_activation_failed = true;
213
+ }
214
+
215
+ $this->set_license_status( $result->license );
216
+ }
217
+
218
+ return ( $this->license_is_valid() );
219
+ }
220
+
221
+ /**
222
+ * Remotely deactivate License
223
+ * @return boolean True if the license is now deactivated, false if not
224
+ */
225
+ public function deactivate_license() {
226
+
227
+ $result = $this->call_license_api( 'deactivate' );
228
+
229
+ if ( $result ) {
230
+
231
+ // show notice if license is deactivated
232
+ if ( $result->license === 'deactivated' ) {
233
+ $this->set_notice( sprintf( __( "Your %s license has been deactivated.", $this->product->get_text_domain() ), $this->product->get_item_name() ) );
234
+ } else {
235
+ $this->set_notice( sprintf( __( "Failed to deactivate your %s license.", $this->product->get_text_domain() ), $this->product->get_item_name() ), false );
236
+ }
237
+
238
+ $this->set_license_status( $result->license );
239
+ }
240
+
241
+ return ( $this->get_license_status() === 'deactivated' );
242
+ }
243
+
244
+ /**
245
+ * @param string $action activate|deactivate
246
+ *
247
+ * @return mixed
248
+ */
249
+ protected function call_license_api( $action ) {
250
+
251
+ // don't make a request if license key is empty
252
+ if ( $this->get_license_key() === '' ) {
253
+ return false;
254
+ }
255
+
256
+ // data to send in our API request
257
+ $api_params = array(
258
+ 'edd_action' => $action . '_license',
259
+ 'license' => $this->get_license_key(),
260
+ 'item_name' => urlencode( trim( $this->product->get_item_name() ) ),
261
+ 'url' => get_option( 'home' ) // grab the URL straight from the option to prevent filters from breaking it.
262
+ );
263
+
264
+ // create api request url
265
+ $url = add_query_arg( $api_params, $this->product->get_api_url() );
266
+
267
+ require_once dirname( __FILE__ ) . '/class-api-request.php';
268
+ $request = new Yoast_API_Request( $url );
269
+
270
+ if ( $request->is_valid() !== true ) {
271
+ $this->set_notice( sprintf( __( "Request error: \"%s\" (%scommon license notices%s)", $this->product->get_text_domain() ), $request->get_error_message(), '<a href="http://kb.yoast.com/article/13-license-activation-notices">', '</a>' ), false );
272
+ }
273
+
274
+ // get response
275
+ $response = $request->get_response();
276
+
277
+ // update license status
278
+ $license_data = $response;
279
+
280
+ return $license_data;
281
+ }
282
+
283
+
284
+ /**
285
+ * Set the license status
286
+ *
287
+ * @param string $license_status
288
+ */
289
+ public function set_license_status( $license_status ) {
290
+ $this->set_option( 'status', $license_status );
291
+ }
292
+
293
+ /**
294
+ * Get the license status
295
+ *
296
+ * @return string $license_status;
297
+ */
298
+ public function get_license_status() {
299
+ $license_status = $this->get_option( 'status' );
300
+
301
+ return trim( $license_status );
302
+ }
303
+
304
+ /**
305
+ * Set the license key
306
+ *
307
+ * @param string $license_key
308
+ */
309
+ public function set_license_key( $license_key ) {
310
+ $this->set_option( 'key', $license_key );
311
+ }
312
+
313
+ /**
314
+ * Gets the license key from constant or option
315
+ *
316
+ * @return string $license_key
317
+ */
318
+ public function get_license_key() {
319
+ $license_key = $this->get_option( 'key' );
320
+
321
+ return trim( $license_key );
322
+ }
323
+
324
+ /**
325
+ * Gets the license expiry date
326
+ *
327
+ * @return string
328
+ */
329
+ public function get_license_expiry_date() {
330
+ return $this->get_option( 'expiry_date' );
331
+ }
332
+
333
+ /**
334
+ * Stores the license expiry date
335
+ */
336
+ public function set_license_expiry_date( $expiry_date ) {
337
+ $this->set_option( 'expiry_date', $expiry_date );
338
+ }
339
+
340
+ /**
341
+ * Checks whether the license status is active
342
+ *
343
+ * @return boolean True if license is active
344
+ */
345
+ public function license_is_valid() {
346
+ return ( $this->get_license_status() === 'valid' );
347
+ }
348
+
349
+ /**
350
+ * Get all license related options
351
+ *
352
+ * @return array Array of license options
353
+ */
354
+ protected function get_options() {
355
+
356
+ // create option name
357
+ $option_name = $this->prefix . 'license';
358
+
359
+ // get array of options from db
360
+ if ( $this->is_network_activated ) {
361
+ $options = get_site_option( $option_name, array() );
362
+ } else {
363
+ $options = get_option( $option_name, array() );
364
+ }
365
+
366
+ // setup array of defaults
367
+ $defaults = array(
368
+ 'key' => '',
369
+ 'status' => '',
370
+ 'expiry_date' => ''
371
+ );
372
+
373
+ // merge options with defaults
374
+ $this->options = wp_parse_args( $options, $defaults );
375
+
376
+ return $this->options;
377
+ }
378
+
379
+ /**
380
+ * Set license related options
381
+ *
382
+ * @param array $options Array of new license options
383
+ */
384
+ protected function set_options( array $options ) {
385
+ // create option name
386
+ $option_name = $this->prefix . 'license';
387
+
388
+ // update db
389
+ if ( $this->is_network_activated ) {
390
+ update_site_option( $option_name, $options );
391
+ } else {
392
+ update_option( $option_name, $options );
393
+ }
394
+
395
+ }
396
+
397
+ /**
398
+ * Gets a license related option
399
+ *
400
+ * @param string $name The option name
401
+ *
402
+ * @return mixed The option value
403
+ */
404
+ protected function get_option( $name ) {
405
+ $options = $this->get_options();
406
+
407
+ return $options[$name];
408
+ }
409
+
410
+ /**
411
+ * Set a license related option
412
+ *
413
+ * @param string $name The option name
414
+ * @param mixed $value The option value
415
+ */
416
+ protected function set_option( $name, $value ) {
417
+ // get options
418
+ $options = $this->get_options();
419
+
420
+ // update option
421
+ $options[$name] = $value;
422
+
423
+ // save options
424
+ $this->set_options( $options );
425
+ }
426
+
427
+ public function show_license_form_heading() {
428
+ ?>
429
+ <h3>
430
+ <?php printf( __( "%s: License Settings", $this->product->get_text_domain() ), $this->product->get_item_name() ); ?>&nbsp; &nbsp;
431
+ </h3>
432
+ <?php
433
+ }
434
+
435
+ /**
436
+ * Show a form where users can enter their license key
437
+ *
438
+ * @param boolean $embedded Boolean indicating whether this form is embedded in another form?
439
+ */
440
+ public function show_license_form( $embedded = true ) {
441
+ $key_name = $this->prefix . 'license_key';
442
+ $nonce_name = $this->prefix . 'license_nonce';
443
+ $action_name = $this->prefix . 'license_action';
444
+
445
+ $api_host_available = $this->get_api_availability();
446
+
447
+ $visible_license_key = $this->get_license_key();
448
+
449
+ // obfuscate license key
450
+ $obfuscate = ( strlen( $this->get_license_key() ) > 5 && ( $this->license_is_valid() || ! $this->remote_license_activation_failed ) );
451
+
452
+ if ( $obfuscate ) {
453
+ $visible_license_key = str_repeat( '*', strlen( $this->get_license_key() ) - 4 ) . substr( $this->get_license_key(), - 4 );
454
+ }
455
+
456
+ // make license key readonly when license key is valid or license is defined with a constant
457
+ $readonly = ( $this->license_is_valid() || $this->license_constant_is_defined );
458
+
459
+ require dirname( __FILE__ ) . '/views/form.php';
460
+
461
+ // enqueue script in the footer
462
+ add_action( 'admin_footer', array( $this, 'output_script' ), 99 );
463
+ }
464
+
465
+ /**
466
+ * Check if the license form has been submitted
467
+ */
468
+ public function catch_post_request() {
469
+
470
+ $name = $this->prefix . 'license_key';
471
+
472
+ // check if license key was posted and not empty
473
+ if ( ! isset( $_POST[$name] ) ) {
474
+ return;
475
+ }
476
+
477
+ // run a quick security check
478
+ $nonce_name = $this->prefix . 'license_nonce';
479
+
480
+ if ( ! check_admin_referer( $nonce_name, $nonce_name ) ) {
481
+ return;
482
+ }
483
+
484
+ // @TODO: check for user cap?
485
+
486
+ // get key from posted value
487
+ $license_key = $_POST[$name];
488
+
489
+ // check if license key doesn't accidentally contain asterisks
490
+ if ( strstr( $license_key, '*' ) === false ) {
491
+
492
+ // sanitize key
493
+ $license_key = trim( sanitize_key( $_POST[$name] ) );
494
+
495
+ // save license key
496
+ $this->set_license_key( $license_key );
497
+ }
498
+
499
+ // does user have an activated valid license
500
+ if ( ! $this->license_is_valid() ) {
501
+
502
+ // try to auto-activate license
503
+ return $this->activate_license();
504
+
505
+ }
506
+
507
+ $action_name = $this->prefix . 'license_action';
508
+
509
+ // was one of the action buttons clicked?
510
+ if ( isset( $_POST[$action_name] ) ) {
511
+
512
+ $action = trim( $_POST[$action_name] );
513
+
514
+ switch ( $action ) {
515
+
516
+ case 'activate':
517
+ return $this->activate_license();
518
+ break;
519
+
520
+ case 'deactivate':
521
+ return $this->deactivate_license();
522
+ break;
523
+ }
524
+
525
+ }
526
+
527
+ }
528
+
529
+ /**
530
+ * Output the script containing the YoastLicenseManager JS Object
531
+ *
532
+ * This takes care of disabling the 'activate' and 'deactivate' buttons
533
+ */
534
+ public function output_script() {
535
+ require_once dirname( __FILE__ ) . '/views/script.php';
536
+ }
537
+
538
+ /**
539
+ * Set the constant used to define the license
540
+ *
541
+ * @param string $license_constant_name The license constant name
542
+ */
543
+ public function set_license_constant_name( $license_constant_name ) {
544
+ $this->license_constant_name = trim( $license_constant_name );
545
+ $this->maybe_set_license_key_from_constant();
546
+ }
547
+
548
+ /**
549
+ * Get the API availability information
550
+ *
551
+ * @return array
552
+ */
553
+ protected function get_api_availability(){
554
+ return array(
555
+ 'url' => $this->product->get_api_url(),
556
+ 'availability' => $this->check_api_host_availability(),
557
+ 'curl_version' => $this->get_curl_version(),
558
+ );
559
+ }
560
+
561
+ /**
562
+ * Check if the API host address is available from this server
563
+ *
564
+ * @return bool
565
+ */
566
+ private function check_api_host_availability() {
567
+ $wp_http = new WP_Http();
568
+ if ( $wp_http->block_request( $this->product->get_api_url() ) === false ) {
569
+ return true;
570
+ }
571
+
572
+ return false;
573
+ }
574
+
575
+ /**
576
+ * Get the current curl version, or false
577
+ *
578
+ * @return mixed
579
+ */
580
+ protected function get_curl_version() {
581
+ if ( function_exists( 'curl_version' ) ) {
582
+ $curl_version = curl_version();
583
+
584
+ if ( isset( $curl_version['version'] ) ) {
585
+ return $curl_version['version'];
586
+ }
587
+ }
588
+
589
+ return false;
590
+ }
591
+
592
+ /**
593
+ * Maybe set license key from a defined constant
594
+ */
595
+ private function maybe_set_license_key_from_constant() {
596
+
597
+ if ( empty( $this->license_constant_name ) ) {
598
+ // generate license constant name
599
+ $this->set_license_constant_name( strtoupper( str_replace( array( ' ', '-' ), '', sanitize_key( $this->product->get_item_name() ) ) ) . '_LICENSE' );
600
+ }
601
+
602
+ // set license key from constant
603
+ if ( defined( $this->license_constant_name ) ) {
604
+
605
+ $license_constant_value = constant( $this->license_constant_name );
606
+
607
+ // update license key value with value of constant
608
+ if ( $this->get_license_key() !== $license_constant_value ) {
609
+ $this->set_license_key( $license_constant_value );
610
+ }
611
+
612
+ $this->license_constant_is_defined = true;
613
+ }
614
+ }
615
+
616
+
617
+ }
618
+
619
+ }
vendor/yoast/license-manager-2/class-plugin-license-manager.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( class_exists( 'Yoast_License_Manager' ) && ! class_exists( "Yoast_Plugin_License_Manager", false ) ) {
4
+
5
+ class Yoast_Plugin_License_Manager extends Yoast_License_Manager {
6
+
7
+ /**
8
+ * Constructor
9
+ *
10
+ * @param Yoast_Product $product
11
+ */
12
+ public function __construct( Yoast_Product $product ) {
13
+
14
+ parent::__construct( $product );
15
+
16
+ // Check if plugin is network activated. We should use site(wide) options in that case.
17
+ if( is_admin() && is_multisite() ) {
18
+
19
+ if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
20
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
21
+ }
22
+
23
+ $this->is_network_activated = is_plugin_active_for_network( $product->get_slug() );
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Setup auto updater for plugins
29
+ */
30
+ public function setup_auto_updater() {
31
+ if ( $this->license_is_valid() ) {
32
+ // setup auto updater
33
+ require_once( dirname( __FILE__ ) . '/class-update-manager.php' );
34
+ require_once( dirname( __FILE__ ) . '/class-plugin-update-manager.php' );
35
+ new Yoast_Plugin_Update_Manager( $this->product, $this );
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Setup hooks
41
+ */
42
+ public function specific_hooks() {
43
+
44
+ // deactivate the license remotely on plugin deactivation
45
+ register_deactivation_hook( $this->product->get_slug(), array( $this, 'deactivate_license' ) );
46
+ }
47
+
48
+ /**
49
+ * Show a form where users can enter their license key
50
+ * Takes Multisites into account
51
+ *
52
+ * @param bool $embedded
53
+ * @return null
54
+ */
55
+ public function show_license_form( $embedded = true ) {
56
+
57
+ // For non-multisites, always show the license form
58
+ if( ! is_multisite() ) {
59
+ parent::show_license_form( $embedded );
60
+ return;
61
+ }
62
+
63
+ // Plugin is network activated
64
+ if( $this->is_network_activated ) {
65
+
66
+ // We're on the network admin
67
+ if( is_network_admin() ) {
68
+ parent::show_license_form( $embedded );
69
+ } else {
70
+ // We're not in the network admin area, show a notice
71
+ parent::show_license_form_heading();
72
+ if ( is_super_admin() ) {
73
+ echo "<p>" . sprintf( __( '%s is network activated, you can manage your license in the <a href="%s">network admin license page</a>.', $this->product->get_text_domain() ), $this->product->get_item_name(), $this->product->get_license_page_url() ) . "</p>";
74
+ } else {
75
+ echo "<p>" . sprintf( __( '%s is network activated, please contact your site administrator to manage the license.', $this->product->get_text_domain() ), $this->product->get_item_name() ) . "</p>";
76
+ }
77
+
78
+ }
79
+
80
+ } else {
81
+
82
+ if( false == is_network_admin() ) {
83
+ parent::show_license_form( $embedded );
84
+ }
85
+
86
+ }
87
+ }
88
+ }
89
+ }
90
+
vendor/yoast/license-manager-2/class-plugin-update-manager.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ //set_site_transient( 'update_plugins', null );
4
+
5
+ if( class_exists( 'Yoast_Update_Manager' ) && ! class_exists( "Yoast_Plugin_Update_Manager", false ) ) {
6
+
7
+ class Yoast_Plugin_Update_Manager extends Yoast_Update_Manager {
8
+
9
+ /**
10
+ * Constructor
11
+ *
12
+ * @param string $api_url
13
+ * @param string $item_name
14
+ * @param string $license_key
15
+ * @param string $slug The path to the main plugin file, relative to plugins dir
16
+ * @param string $version
17
+ * @param string $author (optional)
18
+ * @param string $text_domain
19
+ */
20
+ public function __construct( Yoast_Product $product, $license_key ) {
21
+ parent::__construct( $product, $license_key );
22
+
23
+ // setup hooks
24
+ $this->setup_hooks();
25
+
26
+ }
27
+
28
+ /**
29
+ * Setup hooks
30
+ */
31
+ private function setup_hooks() {
32
+
33
+ // check for updates
34
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'set_updates_available_data' ) );
35
+
36
+ // get correct plugin information (when viewing details)
37
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
38
+ }
39
+
40
+ /**
41
+ * Check for updates and if so, add to "updates available" data
42
+ *
43
+ * @param object $data
44
+ * @return object $data
45
+ */
46
+ public function set_updates_available_data( $data ) {
47
+
48
+ if ( empty( $data ) ) {
49
+ return $data;
50
+ }
51
+
52
+ // send of API request to check for updates
53
+ $remote_data = $this->get_remote_data();
54
+
55
+ // did we get a response?
56
+ if( $remote_data === false ) {
57
+ return $data;
58
+ }
59
+
60
+ // compare local version with remote version
61
+ if ( version_compare( $this->product->get_version(), $remote_data->new_version, '<' ) ) {
62
+
63
+ // remote version is newer, add to data
64
+ $data->response[ $this->product->get_slug() ] = $remote_data;
65
+
66
+ }
67
+
68
+ return $data;
69
+ }
70
+
71
+ /**
72
+ * Gets new plugin version details (view version x.x.x details)
73
+ *
74
+ * @uses api_request()
75
+ *
76
+ * @param object $data
77
+ * @param string $action
78
+ * @param object $args (optional)
79
+ *
80
+ * @return object $data
81
+ */
82
+ public function plugins_api_filter( $data, $action = '', $args = null ) {
83
+
84
+ // only do something if we're checking for our plugin
85
+ if ( $action !== 'plugin_information' || ! isset( $args->slug ) || $args->slug !== $this->product->get_slug() ) {
86
+ return $data;
87
+ }
88
+
89
+ $api_response = $this->get_remote_data();
90
+
91
+ // did we get a response?
92
+ if ( $api_response === false ) {
93
+ return $data;
94
+ }
95
+
96
+ // return api response
97
+ return $api_response;
98
+ }
99
+
100
+ }
101
+
102
+ }
vendor/yoast/license-manager-2/class-product.php ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( ! class_exists( "Yoast_Product", false ) ) {
4
+
5
+ /**
6
+ * Class Yoast_Product
7
+ *
8
+ * @todo create a license class and store an object of it in this class
9
+ */
10
+ class Yoast_Product {
11
+
12
+ /**
13
+ * @var string The URL of the shop running the EDD API.
14
+ */
15
+ protected $api_url;
16
+
17
+ /**
18
+ * @var string The item name in the EDD shop.
19
+ */
20
+ protected $item_name;
21
+
22
+ /**
23
+ * @var string The theme slug or plugin file
24
+ */
25
+ protected $slug;
26
+
27
+ /**
28
+ * @var string The version number of the item
29
+ */
30
+ protected $version;
31
+
32
+ /**
33
+ * @var string The absolute url on which users can purchase a license
34
+ */
35
+ protected $item_url;
36
+
37
+ /**
38
+ * @var string Absolute admin URL on which users can enter their license key.
39
+ */
40
+ protected $license_page_url;
41
+
42
+ /**
43
+ * @var string The text domain used for translating strings
44
+ */
45
+ protected $text_domain;
46
+
47
+ /**
48
+ * @var string The item author
49
+ */
50
+ protected $author;
51
+
52
+ public function __construct( $api_url, $item_name, $slug, $version, $item_url = '', $license_page_url = '#', $text_domain = 'yoast', $author = 'Yoast' ) {
53
+ $this->api_url = $api_url;
54
+ $this->item_name = $item_name;
55
+ $this->slug = $slug;
56
+ $this->version = $version;
57
+ $this->item_url = $item_url;
58
+ $this->license_page_url = admin_url( $license_page_url );
59
+ $this->text_domain = $text_domain;
60
+ $this->author = $author;
61
+
62
+ // Fix possible empty item url
63
+ if ( $this->item_url === '' ) {
64
+ $this->item_url = $this->api_url;
65
+ }
66
+
67
+ if( is_admin() && is_multisite() ) {
68
+
69
+ if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
70
+ require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
71
+ }
72
+
73
+ if( is_plugin_active_for_network( $slug ) ) {
74
+ $this->license_page_url = network_admin_url( $license_page_url );
75
+ }
76
+ }
77
+ }
78
+
79
+
80
+ /**
81
+ * @param string $api_url
82
+ */
83
+ public function set_api_url( $api_url ) {
84
+ $this->api_url = $api_url;
85
+ }
86
+
87
+ /**
88
+ * @return string
89
+ */
90
+ public function get_api_url() {
91
+ return $this->api_url;
92
+ }
93
+
94
+ /**
95
+ * @param string $author
96
+ */
97
+ public function set_author( $author ) {
98
+ $this->author = $author;
99
+ }
100
+
101
+ /**
102
+ * @return string
103
+ */
104
+ public function get_author() {
105
+ return $this->author;
106
+ }
107
+
108
+ /**
109
+ * @param string $item_name
110
+ */
111
+ public function set_item_name( $item_name ) {
112
+ $this->item_name = $item_name;
113
+ }
114
+
115
+ /**
116
+ * @return string
117
+ */
118
+ public function get_item_name() {
119
+ return $this->item_name;
120
+ }
121
+
122
+ /**
123
+ * @param string $item_url
124
+ */
125
+ public function set_item_url( $item_url ) {
126
+ $this->item_url = $item_url;
127
+ }
128
+
129
+ /**
130
+ * @return string
131
+ */
132
+ public function get_item_url() {
133
+ return $this->item_url;
134
+ }
135
+
136
+ /**
137
+ * @param string $license_page_url
138
+ */
139
+ public function set_license_page_url( $license_page_url ) {
140
+ $this->license_page_url = admin_page( $license_page_url );
141
+ }
142
+
143
+ /**
144
+ * @return string
145
+ */
146
+ public function get_license_page_url() {
147
+ return $this->license_page_url;
148
+ }
149
+
150
+ /**
151
+ * @param string $slug
152
+ */
153
+ public function set_slug( $slug ) {
154
+ $this->slug = $slug;
155
+ }
156
+
157
+ /**
158
+ * @return string
159
+ */
160
+ public function get_slug() {
161
+ return $this->slug;
162
+ }
163
+
164
+ /**
165
+ * Returns the dirname of the slug and limits it to 15 chars
166
+ *
167
+ * @return string
168
+ */
169
+ public function get_transient_prefix() {
170
+ return substr( dirname( $this->slug ), 0, 15 );
171
+ }
172
+
173
+ /**
174
+ * @param string $text_domain
175
+ */
176
+ public function set_text_domain( $text_domain ) {
177
+ $this->text_domain = $text_domain;
178
+ }
179
+
180
+ /**
181
+ * @return string
182
+ */
183
+ public function get_text_domain() {
184
+ return $this->text_domain;
185
+ }
186
+
187
+ /**
188
+ * @param string $version
189
+ */
190
+ public function set_version( $version ) {
191
+ $this->version = $version;
192
+ }
193
+
194
+ /**
195
+ * @return string
196
+ */
197
+ public function get_version() {
198
+ return $this->version;
199
+ }
200
+
201
+ /**
202
+ * Gets a Google Analytics Campaign url for this product
203
+ *
204
+ * @param string $link_identifier
205
+ * @return string The full URL
206
+ */
207
+ public function get_tracking_url( $link_identifier = '' ) {
208
+
209
+ $tracking_vars = array(
210
+ 'utm_campaign' => $this->get_item_name() . ' licensing',
211
+ 'utm_medium' => 'link',
212
+ 'utm_source' => $this->get_item_name(),
213
+ 'utm_content' => $link_identifier
214
+ );
215
+
216
+ // url encode tracking vars
217
+ $tracking_vars = urlencode_deep( $tracking_vars );
218
+
219
+ $query_string = build_query( $tracking_vars );
220
+
221
+
222
+ return $this->get_item_url() . '#' . $query_string;
223
+ }
224
+
225
+ }
226
+
227
+ }
228
+
vendor/yoast/license-manager-2/class-theme-license-manager.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( class_exists( 'Yoast_License_Manager' ) && ! class_exists( "Yoast_Theme_License_Manager", false ) ) {
4
+
5
+ class Yoast_Theme_License_Manager extends Yoast_License_Manager {
6
+
7
+ /**
8
+ * Setup auto updater for themes
9
+ */
10
+ public function setup_auto_updater() {
11
+ if ( $this->license_is_valid() ) {
12
+ // setup auto updater
13
+ require_once dirname( __FILE__ ) . '/class-update-manager.php';
14
+ require_once dirname( __FILE__ ) . '/class-theme-update-manager.php'; // @TODO: Autoload?
15
+ new Yoast_Theme_Update_Manager( $this->product, $this );
16
+ }
17
+ }
18
+
19
+ /**
20
+ * Setup hooks
21
+ */
22
+ public function specific_hooks() {
23
+ // remotely deactivate license upon switching away from this theme
24
+ add_action( 'switch_theme', array( $this, 'deactivate_license' ) );
25
+
26
+ // Add the license menu
27
+ add_action( 'admin_menu', array( $this, 'add_license_menu' ) );
28
+ }
29
+
30
+ /**
31
+ * Add license page and add it to Themes menu
32
+ */
33
+ public function add_license_menu() {
34
+ $theme_page = add_theme_page( sprintf( __( '%s License', $this->product->get_text_domain() ), $this->product->get_item_name() ), __( 'Theme License', $this->product->get_text_domain() ), 'manage_options', 'theme-license', array( $this, 'show_license_page' ) );
35
+ }
36
+
37
+ /**
38
+ * Shows license page
39
+ */
40
+ public function show_license_page() {
41
+ ?>
42
+ <div class="wrap">
43
+ <?php settings_errors(); ?>
44
+
45
+ <?php $this->show_license_form( false ); ?>
46
+ </div>
47
+ <?php
48
+ }
49
+
50
+
51
+ }
52
+
53
+ }
vendor/yoast/license-manager-2/class-theme-update-manager.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( class_exists( 'Yoast_Update_Manager' ) && ! class_exists( "Yoast_Theme_Update_Manager", false ) ) {
4
+
5
+ class Yoast_Theme_Update_Manager extends Yoast_Update_Manager {
6
+
7
+ /**
8
+ * Constructor
9
+ *
10
+ * @param string $api_url
11
+ * @param string $item_name
12
+ * @param string $license_key
13
+ * @param string $slug
14
+ * @param string $theme_version
15
+ * @param string $author (optional)
16
+ */
17
+ public function __construct( Yoast_Product $product, $license_key ) {
18
+
19
+ parent::__construct( $product, $license_key );
20
+
21
+ // setup hooks
22
+ $this->setup_hooks();
23
+ }
24
+
25
+ /**
26
+ * Get the current theme version
27
+ *
28
+ * @return string The version number
29
+ */
30
+ private function get_theme_version() {
31
+
32
+ // if version was not set, get it from the Theme stylesheet
33
+ if( $this->product->get_version() === '' ) {
34
+ $theme = wp_get_theme( $this->product->get_slug() );
35
+ return $theme->get( 'Version' );
36
+ }
37
+
38
+ return $this->product->get_version();
39
+ }
40
+
41
+ /**
42
+ * Setup hooks
43
+ */
44
+ private function setup_hooks() {
45
+ add_filter( 'site_transient_update_themes', array( $this, 'set_theme_update_transient' ) );
46
+ add_action( 'load-themes.php', array( $this, 'load_themes_screen' ) );
47
+ }
48
+
49
+ /**
50
+ * Set "updates available" transient
51
+ */
52
+ public function set_theme_update_transient( $value ) {
53
+
54
+ $update_data = $this->get_update_data();
55
+
56
+ if( $update_data === false ) {
57
+ return $value;
58
+ }
59
+
60
+ // add update data to "updates available" array. convert object to array.
61
+ $value->response[ $this->product->get_slug() ] = (array) $update_data;
62
+
63
+ return $value;
64
+ }
65
+
66
+ /**
67
+ * Add hooks and scripts to the Appearance > Themes screen
68
+ */
69
+ public function load_themes_screen() {
70
+
71
+ $update_data = $this->get_update_data();
72
+
73
+ // only do if an update is available
74
+ if( $update_data === false ) {
75
+ return;
76
+ }
77
+
78
+ add_thickbox();
79
+ add_action( 'admin_notices', array( $this, 'show_update_details' ) );
80
+ }
81
+
82
+ /**
83
+ * Show update link.
84
+ * Opens Thickbox with Changelog.
85
+ */
86
+ public function show_update_details() {
87
+
88
+ $update_data = $this->get_update_data();
89
+
90
+ // only show if an update is available
91
+ if( $update_data === false ) {
92
+ return;
93
+ }
94
+
95
+ $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $this->product->get_slug() ), 'upgrade-theme_' . $this->product->get_slug() );
96
+ $update_onclick = ' onclick="if ( confirm(\'' . esc_js( __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update." ) ) . '\') ) {return true;}return false;"';
97
+ ?>
98
+ <div id="update-nag">
99
+ <?php
100
+ printf(
101
+ __( '<strong>%s version %s</strong> is available. <a href="%s" class="thickbox" title="%s">Check out what\'s new</a> or <a href="%s" %s>update now</a>.' ),
102
+ $this->product->get_item_name(),
103
+ $update_data->new_version,
104
+ '#TB_inline?width=640&amp;inlineId=' . $this->product->get_slug() . '_changelog',
105
+ $this->get_item_name(),
106
+ $update_url,
107
+ $update_onclick
108
+ );
109
+ ?>
110
+ </div>
111
+ <div id="<?php echo $this->product->get_slug(); ?>_changelog" style="display: none;">
112
+ <?php echo wpautop( $update_data->sections['changelog'] ); ?>
113
+ </div>
114
+ <?php
115
+ }
116
+
117
+
118
+ /**
119
+ * Get update data
120
+ *
121
+ * This gets the update data from a transient (12 hours), if set.
122
+ * If not, it will make a remote request and get the update data.
123
+ *
124
+ * @return object $update_data Object containing the update data
125
+ */
126
+ public function get_update_data() {
127
+
128
+ $api_response = $this->get_remote_data();
129
+
130
+ if( false === $api_response ) {
131
+ return false;
132
+ }
133
+
134
+ $update_data = $api_response;
135
+
136
+ // check if a new version is available.
137
+ if ( version_compare( $this->get_theme_version(), $update_data->new_version, '>=' ) ) {
138
+ return false;
139
+ }
140
+
141
+
142
+ // an update is available
143
+ return $update_data;
144
+ }
145
+
146
+
147
+ }
148
+
149
+ }
vendor/yoast/license-manager-2/class-update-manager.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( ! class_exists( "Yoast_Update_Manager", false ) ) {
4
+
5
+ class Yoast_Update_Manager {
6
+
7
+ /**
8
+ * @var Yoast_Product
9
+ */
10
+ protected $product;
11
+
12
+ /**
13
+ * @var Yoast_License_Manager
14
+ */
15
+ protected $license_manager;
16
+
17
+ /**
18
+ * @var string
19
+ */
20
+ protected $error_message = '';
21
+
22
+ /**
23
+ * @var object
24
+ */
25
+ protected $update_response = null;
26
+
27
+ /**
28
+ * @var string The transient name storing the API response
29
+ */
30
+ private $response_transient_key = '';
31
+
32
+ /**
33
+ * @var string The transient name that stores failed request tries
34
+ */
35
+ private $request_failed_transient_key = '';
36
+
37
+ /**
38
+ * Constructor
39
+ *
40
+ * @param string $api_url The url to the EDD shop
41
+ * @param string $item_name The item name in the EDD shop
42
+ * @param string $license_key The (valid) license key
43
+ * @param string $slug The slug. This is either the plugin main file path or the theme slug.
44
+ * @param string $version The current plugin or theme version
45
+ * @param string $author (optional) The item author.
46
+ */
47
+ public function __construct( Yoast_Product $product, $license_manager ) {
48
+ $this->product = $product;
49
+ $this->license_manager = $license_manager;
50
+
51
+ // generate transient names
52
+ $this->response_transient_key = $this->product->get_transient_prefix() . '-update-response';
53
+ $this->request_failed_transient_key = $this->product->get_transient_prefix() . '-update-request-failed';
54
+
55
+ // maybe delete transient
56
+ $this->maybe_delete_transients();
57
+ }
58
+
59
+ /**
60
+ * Deletes the various transients
61
+ * If we're on the update-core.php?force-check=1 page
62
+ */
63
+ private function maybe_delete_transients() {
64
+ global $pagenow;
65
+
66
+ if( $pagenow === 'update-core.php' && isset( $_GET['force-check'] ) ) {
67
+ delete_transient( $this->response_transient_key );
68
+ delete_transient( $this->request_failed_transient_key );
69
+ }
70
+ }
71
+
72
+ /**
73
+ * If the update check returned a WP_Error, show it to the user
74
+ */
75
+ public function show_update_error() {
76
+
77
+ if ( $this->error_message === '' ) {
78
+ return;
79
+ }
80
+
81
+ ?>
82
+ <div class="error">
83
+ <p><?php printf( __( '%s failed to check for updates because of the following error: <em>%s</em>', $this->product->get_text_domain() ), $this->product->get_item_name(), $this->error_message ); ?></p>
84
+ </div>
85
+ <?php
86
+ }
87
+
88
+ /**
89
+ * Calls the API and, if successfull, returns the object delivered by the API.
90
+ *
91
+ * @uses get_bloginfo()
92
+ * @uses wp_remote_post()
93
+ * @uses is_wp_error()
94
+ *
95
+ * @return false||object
96
+ */
97
+ private function call_remote_api() {
98
+
99
+ // only check if the failed transient is not set (or if it's expired)
100
+ if( get_transient( $this->request_failed_transient_key ) !== false ) {
101
+ return false;
102
+ }
103
+
104
+ // start request process
105
+ global $wp_version;
106
+
107
+ // set a transient to prevent failed update checks on every page load
108
+ // this transient will be removed if a request succeeds
109
+ set_transient( $this->request_failed_transient_key, 'failed', 10800 );
110
+
111
+ // setup api parameters
112
+ $api_params = array(
113
+ 'edd_action' => 'get_version',
114
+ 'license' => $this->license_manager->get_license_key(),
115
+ 'item_name' => $this->product->get_item_name(),
116
+ 'wp_version' => $wp_version,
117
+ 'item_version' => $this->product->get_version(),
118
+ 'url' => home_url(),
119
+ 'slug' => $this->product->get_slug()
120
+ );
121
+
122
+ // setup request parameters
123
+ $request_params = array(
124
+ 'method' => 'POST',
125
+ 'body' => $api_params
126
+ );
127
+
128
+ require_once dirname( __FILE__ ) . '/class-api-request.php';
129
+ $request = new Yoast_API_Request( $this->product->get_api_url(), $request_params );
130
+
131
+ if( $request->is_valid() !== true ) {
132
+
133
+ // show error message
134
+ $this->error_message = $request->get_error_message();
135
+ add_action( 'admin_notices', array( $this, 'show_update_error' ) );
136
+
137
+ return false;
138
+ }
139
+
140
+ // request succeeded, delete transient indicating a request failed
141
+ delete_transient( $this->request_failed_transient_key );
142
+
143
+ // decode response
144
+ $response = $request->get_response();
145
+
146
+ // check if response returned that a given site was inactive
147
+ if( isset( $response->license_check ) && ! empty( $response->license_check ) && $response->license_check != 'valid' ) {
148
+
149
+ // deactivate local license
150
+ $this->license_manager->set_license_status( 'invalid' );
151
+
152
+ // show notice to let the user know we deactivated his/her license
153
+ $this->error_message = __( "This site has not been activated properly on yoast.com and thus cannot check for future updates. Please activate your site with a valid license key.", $this->product->get_text_domain() );
154
+ add_action( 'admin_notices', array( $this, 'show_update_error' ) );
155
+ }
156
+
157
+ $response->sections = maybe_unserialize( $response->sections );
158
+
159
+ // store response
160
+ set_transient( $this->response_transient_key, $response, 10800 );
161
+
162
+ return $response;
163
+ }
164
+
165
+ /**
166
+ * Gets the remote product data (from the EDD API)
167
+ *
168
+ * - If it was previously fetched in the current requests, this gets it from the instance property
169
+ * - Next, it tries the 3-hour transient
170
+ * - Next, it calls the remote API and stores the result
171
+ *
172
+ * @return object
173
+ */
174
+ protected function get_remote_data() {
175
+
176
+ // always use property if it's set
177
+ if( null !== $this->update_response ) {
178
+ return $this->update_response;
179
+ }
180
+
181
+ // get cached remote data
182
+ $data = $this->get_cached_remote_data();
183
+
184
+ // if cache is empty or expired, call remote api
185
+ if( $data === false ) {
186
+ $data = $this->call_remote_api();
187
+ }
188
+
189
+ $this->update_response = $data;
190
+ return $data;
191
+ }
192
+
193
+ /**
194
+ * Gets the remote product data from a 3-hour transient
195
+ *
196
+ * @return bool|mixed
197
+ */
198
+ private function get_cached_remote_data() {
199
+
200
+ $data = get_transient( $this->response_transient_key );
201
+
202
+ if( $data ) {
203
+ return $data;
204
+ }
205
+
206
+ return false;
207
+ }
208
+
209
+ }
210
+
211
+ }
vendor/yoast/license-manager-2/composer.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name" : "yoast/license-manager",
3
+ "description": "Yoast License Manager.",
4
+ "keywords" : ["wordpress"],
5
+ "homepage" : "https://github.com/Yoast/License-Manager",
6
+ "license" : "GPL-2.0+",
7
+ "authors" : [
8
+ {
9
+ "name" : "Team Yoast",
10
+ "email" : "support@yoast.com",
11
+ "homepage": "https://yoast.com"
12
+ }
13
+ ],
14
+ "support" : {
15
+ "issues": "https://github.com/Yoast/License-Manager/issues"
16
+ },
17
+ "autoload" : {
18
+ "classmap": [
19
+ "class-api-request.php",
20
+ "class-license-manager.php",
21
+ "class-plugin-license-manager.php",
22
+ "class-plugin-update-manager.php",
23
+ "class-product.php",
24
+ "class-theme-license-manager.php",
25
+ "class-theme-update-manager.php",
26
+ "class-update-manager.php"
27
+ ]
28
+ }
29
+ }
vendor/yoast/license-manager-2/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ //Nothing to see here
vendor/yoast/license-manager-2/phpunit.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <phpunit
2
+ backupGlobals="false"
3
+ backupStaticAttributes="false"
4
+ bootstrap="tests/bootstrap.php"
5
+ colors="true"
6
+ convertErrorsToExceptions="true"
7
+ convertNoticesToExceptions="true"
8
+ convertWarningsToExceptions="true"
9
+ processIsolation="false"
10
+ stopOnError="false"
11
+ stopOnFailure="false"
12
+ stopOnIncomplete="false"
13
+ stopOnSkipped="false"
14
+ strict="false"
15
+ syntaxCheck="false"
16
+ verbose="true"
17
+ >
18
+ <testsuites>
19
+ <testsuite>
20
+ <directory prefix="test-" suffix=".php">./tests/</directory>
21
+ </testsuite>
22
+ </testsuites>
23
+ </phpunit>
vendor/yoast/license-manager-2/samples/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ //Nothing to see here
vendor/yoast/license-manager-2/samples/sample-plugin.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Plugin Name: Sample Plugin
5
+ Version: 1.0
6
+ Plugin URI: https://yoast.com/
7
+ Description: A sample plugin to test the License Manager
8
+ Author: Yoast, DvanKooten
9
+ Author URI: http://yoast.com/
10
+ Text Domain: sample-plugin
11
+ */
12
+
13
+ /**
14
+ * Class Sample_Plugin
15
+ *
16
+ */
17
+ class Sample_Plugin {
18
+
19
+ public function __construct() {
20
+
21
+ // we only need license stuff inside the admin area
22
+ if ( is_admin() ) {
23
+
24
+ // add menu item
25
+ add_action( 'admin_menu', array( $this, 'add_license_menu' ) );
26
+
27
+ // load license class
28
+ $this->load_license_manager();
29
+ }
30
+
31
+
32
+ }
33
+
34
+ /**
35
+ * Loads the License_Plugin_Manager class
36
+ *
37
+ * The class will take care of the rest: notices, license (de)activations, updates, etc..
38
+ */
39
+ public function load_license_manager() {
40
+
41
+ // Instantiate license class
42
+ $license_manager = new Yoast_Plugin_License_Manager( new Sample_Product() );
43
+
44
+ // Setup the required hooks
45
+ $license_manager->setup_hooks();
46
+
47
+ }
48
+
49
+ /**
50
+ * Add license page and add it to Themes menu
51
+ */
52
+ public function add_license_menu() {
53
+ $theme_page = add_options_page( sprintf( __( '%s License', $this->text_domain ), $this->item_name ), sprintf( __( '%s License', $this->text_domain ), $this->item_name ), 'manage_options', $this->text_domain . '-license', array( $this, 'show_license_page' ) );
54
+ }
55
+
56
+ /**
57
+ * Shows license page
58
+ */
59
+ public function show_license_page() {
60
+
61
+ // Instantiate license class
62
+ $license_manager = new Yoast_Plugin_License_Manager( new Sample_Product() );
63
+
64
+ ?>
65
+ <div class="wrap">
66
+ <?php //settings_errors(); ?>
67
+
68
+ <?php $license_manager->show_license_form( false ); ?>
69
+ </div>
70
+ <?php
71
+ }
72
+ }
73
+
74
+ new Sample_Plugin();
vendor/yoast/license-manager-2/samples/sample-product.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class Sample_Product
5
+ *
6
+ * Our sample product class
7
+ */
8
+ class Sample_Product extends Yoast_Product {
9
+
10
+ public function __construct() {
11
+ parent::__construct(
12
+ 'https://yoast.com',
13
+ 'Sample Product',
14
+ 'sample-product',
15
+ '1.0',
16
+ 'https://yoast.com/wordpress/plugins/sample-product/',
17
+ 'admin.php?page=sample-product',
18
+ 'sample-product',
19
+ 'Yoast'
20
+ );
21
+ }
22
+
23
+ }
vendor/yoast/license-manager-2/samples/sample-theme-functions.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if( is_admin() ) {
4
+
5
+ // Instantiate license class
6
+ $license_manager = new Yoast_Theme_License_Manager( new Sample_Product() );
7
+
8
+ // Setup the required hooks
9
+ $license_manager->setup_hooks();
10
+
11
+ }
vendor/yoast/license-manager-2/views/form.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ header( 'HTTP/1.0 403 Forbidden' );
4
+ die;
5
+ }
6
+
7
+ /**
8
+ * @var Yoast_Product $product
9
+ */
10
+ $product = $this->product;
11
+
12
+ $this->show_license_form_heading();
13
+
14
+ if( $api_host_available['availability'] === false ){
15
+ echo '<p style="color: red; max-width: 600px;"><strong>' . sprintf( __( 'We couldn\'t create a connection to our API to verify your license key(s). Please ask your hosting company to allow outgoing connections from your server to %s.', $product->get_text_domain() ), $api_host_available['url'] ) . '</strong></p>';
16
+ }
17
+
18
+ if( $api_host_available['curl_version'] !== false && version_compare( $api_host_available['curl_version'], '7.20.0', '<')){
19
+ echo '<p style="color: red; max-width: 600px;"><strong>' . sprintf( __( 'Your server has an outdated version of the PHP module cURL (Version: %s). Please ask your hosting company to update this to a recent version of cURL. You can read more about that in our %sKnowledge base%s.', $product->get_text_domain() ), $api_host_available['curl_version'], '<a href="http://kb.yoast.com/article/90-is-my-curl-up-to-date" target="_blank">', '</a>' ) . '</strong></p>';
20
+ }
21
+
22
+ // Output form tags if we're not embedded in another form
23
+ if( ! $embedded ) {
24
+ echo '<form method="post" action="">';
25
+ }
26
+
27
+ wp_nonce_field( $nonce_name, $nonce_name ); ?>
28
+ <table class="form-table yoast-license-form">
29
+ <tbody>
30
+ <tr valign="top">
31
+ <th scope="row" valign="top"><?php _e( 'License status', $product->get_text_domain() ); ?></th>
32
+ <td>
33
+ <?php if( $this->license_is_valid() ) { ?>
34
+ <span style="color: white; background: limegreen; padding:3px 6px;">ACTIVE</span> &nbsp; - &nbsp; you are receiving updates.
35
+ <?php } else { ?>
36
+ <span style="color:white; background: red; padding: 3px 6px;">INACTIVE</span> &nbsp; - &nbsp; you are <strong>not</strong> receiving updates.
37
+ <?php } ?>
38
+ </td>
39
+ </tr>
40
+ <tr valign="top">
41
+ <th scope="row" valign="top"><?php _e('Toggle license status', $product->get_text_domain() ); ?></th>
42
+ <td class="yoast-license-toggler">
43
+
44
+ <?php if( $this->license_is_valid() ) { ?>
45
+ <button name="<?php echo esc_attr( $action_name ); ?>" type="submit" class="button-secondary yoast-license-deactivate" value="deactivate"><?php echo esc_html_e( 'Deactivate License', $product->get_text_domain() ); ?></button> &nbsp;
46
+ <small><?php _e( '(deactivate your license so you can activate it on another WordPress site)', $product->get_text_domain() ); ?></small>
47
+ <?php } else {
48
+
49
+ if( $this->get_license_key() !== '') { ?>
50
+ <button name="<?php echo esc_attr( $action_name ); ?>" type="submit" class="button-secondary yoast-license-activate" value="activate" /><?php echo esc_html_e('Activate License', $product->get_text_domain() ); ?></button> &nbsp;
51
+ <?php } else {
52
+ _e( 'Please enter a license key in the field below first.', $product->get_text_domain() );
53
+ }
54
+
55
+ } ?>
56
+
57
+ </td>
58
+ </tr>
59
+ <tr valign="top">
60
+ <th scope="row" valign="top"><?php _e( 'License Key', $product->get_text_domain() ); ?></th>
61
+ <td>
62
+ <input name="<?php echo esc_attr( $key_name ); ?>" type="text" class="regular-text yoast-license-key-field <?php if( $obfuscate ) { ?>yoast-license-obfuscate<?php } ?>" value="<?php echo esc_attr( $visible_license_key ); ?>" placeholder="<?php echo esc_attr( sprintf( __( 'Paste your %s license key here..', $product->get_text_domain() ), $product->get_item_name() ) ); ?>" <?php if( $readonly ) { echo 'readonly="readonly"'; } ?> />
63
+ <?php if( $this->license_constant_is_defined ) { ?>
64
+ <p class="help"><?php printf( __( "You defined your license key using the %s PHP constant.", $product->get_text_domain() ), '<code>' . $this->license_constant_name . '</code>' ); ?></p>
65
+ <?php } ?>
66
+ </td>
67
+ </tr>
68
+
69
+ </tbody>
70
+ </table>
71
+
72
+ <?php
73
+
74
+ if( $this->license_is_valid() ) {
75
+
76
+ $expiry_date = strtotime( $this->get_license_expiry_date() );
77
+
78
+ if( $expiry_date !== false ) {
79
+ echo '<p>';
80
+
81
+ printf( __( 'Your %s license will expire on %s.', $product->get_text_domain() ), $product->get_item_name(), date('F jS Y', $expiry_date ) );
82
+
83
+ if( strtotime( '+3 months' ) > $expiry_date ) {
84
+ printf( ' ' . __('%sRenew your license now%s.', $product->get_text_domain() ), '<a href="'. $this->product->get_tracking_url( 'renewal' ) .'">', '</a>' );
85
+ }
86
+
87
+ echo '</p>';
88
+ }
89
+ }
90
+
91
+ // Only show a "Save Changes" button and end form if we're not embedded in another form.
92
+ if( ! $embedded ) {
93
+
94
+ // only show "Save Changes" button if license is not activated and not defined with a constant
95
+ if( $readonly === false && $api_host_available['availability'] === true ) {
96
+ submit_button();
97
+ }
98
+
99
+ echo '</form>';
100
+ }
101
+
102
+ $product = null;
vendor/yoast/license-manager-2/views/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ //Nothing to see here
vendor/yoast/license-manager-2/views/script.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ header( 'HTTP/1.0 403 Forbidden' );
4
+ die;
5
+ }
6
+ ?><script type="text/javascript">
7
+ (function($) {
8
+
9
+ if( typeof YoastLicenseManager !== "undefined" ) {
10
+ return;
11
+ }
12
+
13
+ window.YoastLicenseManager = (function () {
14
+
15
+ function init() {
16
+ var $keyInputs = $(".yoast-license-key-field.yoast-license-obfuscate");
17
+ var $actionButtons = $('.yoast-license-toggler button');
18
+ var $submitButtons = $('input[type="submit"], button[type="submit"]');
19
+
20
+ $submitButtons.click( addDisableEvent );
21
+ $actionButtons.click( actOnLicense );
22
+ $keyInputs.click( setEmptyValue );
23
+ }
24
+
25
+ function setEmptyValue() {
26
+ if( ! $(this).is('[readonly]') ) {
27
+ $(this).val('');
28
+ }
29
+ }
30
+
31
+ function actOnLicense() {
32
+ var $formScope = $(this).closest('form');
33
+ var $actionButton = $formScope.find('.yoast-license-toggler button');
34
+
35
+ // fake input field with exact same name => value
36
+ $("<input />")
37
+ .attr('type', 'hidden')
38
+ .attr( 'name', $(this).attr('name') )
39
+ .val( $(this).val() )
40
+ .appendTo( $formScope );
41
+
42
+ // change button text to show we're working..
43
+ var text = ( $actionButton.hasClass('yoast-license-activate') ) ? "Activating..." : "Deactivating...";
44
+ $actionButton.text( text );
45
+ }
46
+
47
+ function addDisableEvent() {
48
+ var $formScope = $(this).closest('form');
49
+ $formScope.submit(disableButtons);
50
+ }
51
+
52
+ function disableButtons() {
53
+ var $formScope = $(this).closest('form');
54
+ var $submitButton = $formScope.find('input[type="submit"], button[type="submit"]');
55
+ $submitButton.prop( 'disabled', true );
56
+ }
57
+
58
+ return {
59
+ init: init
60
+ }
61
+
62
+ })();
63
+
64
+ YoastLicenseManager.init();
65
+
66
+ })(jQuery);
67
+ </script>
vendor/yoast/license-manager/class-api-request.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
 
3
- if( ! class_exists( "Yoast_API_Request", false ) ) {
4
 
5
  /**
6
  * Handles requests to the Yoast EDD API
7
  */
8
- class Yoast_API_Request {
9
 
10
  /**
11
  * @var string Request URL
1
  <?php
2
 
3
+ if( ! class_exists( "MI_API_Request", false ) ) {
4
 
5
  /**
6
  * Handles requests to the Yoast EDD API
7
  */
8
+ class MI_API_Request {
9
 
10
  /**
11
  * @var string Request URL
vendor/yoast/license-manager/class-license-manager.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
- if ( ! interface_exists( 'iYoast_License_Manager', false ) ) {
4
 
5
- interface iYoast_License_Manager {
6
 
7
  public function specific_hooks();
8
 
@@ -13,15 +13,15 @@ if ( ! interface_exists( 'iYoast_License_Manager', false ) ) {
13
  }
14
 
15
 
16
- if ( ! class_exists( 'Yoast_License_Manager', false ) ) {
17
 
18
  /**
19
- * Class Yoast_License_Manager
20
  *
21
  * @todo Maybe create a license class that contains key and option
22
- * @todo Not sure if Yoast_License_Manager is a good name for this class, it's more managing the product (plugin or theme)
23
  */
24
- abstract class Yoast_License_Manager implements iYoast_License_Manager {
25
 
26
  /**
27
  * @const VERSION The version number of the License_Manager class
@@ -66,9 +66,9 @@ if ( ! class_exists( 'Yoast_License_Manager', false ) ) {
66
  /**
67
  * Constructor
68
  *
69
- * @param Yoast_Product $product
70
  */
71
- public function __construct( Yoast_Product $product ) {
72
 
73
  // Set the license
74
  $this->product = $product;
@@ -265,7 +265,7 @@ if ( ! class_exists( 'Yoast_License_Manager', false ) ) {
265
  $url = add_query_arg( $api_params, $this->product->get_api_url() );
266
 
267
  require_once dirname( __FILE__ ) . '/class-api-request.php';
268
- $request = new Yoast_API_Request( $url );
269
 
270
  if ( $request->is_valid() !== true ) {
271
  $this->set_notice( sprintf( __( "Request error: \"%s\" (%scommon license notices%s)", $this->product->get_text_domain() ), $request->get_error_message(), '<a href="http://kb.yoast.com/article/13-license-activation-notices">', '</a>' ), false );
@@ -527,7 +527,7 @@ if ( ! class_exists( 'Yoast_License_Manager', false ) ) {
527
  }
528
 
529
  /**
530
- * Output the script containing the YoastLicenseManager JS Object
531
  *
532
  * This takes care of disabling the 'activate' and 'deactivate' buttons
533
  */
1
  <?php
2
 
3
+ if ( ! interface_exists( 'iMI_License_Manager', false ) ) {
4
 
5
+ interface iMI_License_Manager {
6
 
7
  public function specific_hooks();
8
 
13
  }
14
 
15
 
16
+ if ( ! class_exists( 'MI_License_Manager', false ) ) {
17
 
18
  /**
19
+ * Class MI_License_Manager
20
  *
21
  * @todo Maybe create a license class that contains key and option
22
+ * @todo Not sure if MI_License_Manager is a good name for this class, it's more managing the product (plugin or theme)
23
  */
24
+ abstract class MI_License_Manager implements iMI_License_Manager {
25
 
26
  /**
27
  * @const VERSION The version number of the License_Manager class
66
  /**
67
  * Constructor
68
  *
69
+ * @param MI_Product $product
70
  */
71
+ public function __construct( MI_Product $product ) {
72
 
73
  // Set the license
74
  $this->product = $product;
265
  $url = add_query_arg( $api_params, $this->product->get_api_url() );
266
 
267
  require_once dirname( __FILE__ ) . '/class-api-request.php';
268
+ $request = new MI_API_Request( $url );
269
 
270
  if ( $request->is_valid() !== true ) {
271
  $this->set_notice( sprintf( __( "Request error: \"%s\" (%scommon license notices%s)", $this->product->get_text_domain() ), $request->get_error_message(), '<a href="http://kb.yoast.com/article/13-license-activation-notices">', '</a>' ), false );
527
  }
528
 
529
  /**
530
+ * Output the script containing the MILicenseManager JS Object
531
  *
532
  * This takes care of disabling the 'activate' and 'deactivate' buttons
533
  */
vendor/yoast/license-manager/class-plugin-license-manager.php CHANGED
@@ -1,15 +1,15 @@
1
  <?php
2
 
3
- if ( class_exists( 'Yoast_License_Manager' ) && ! class_exists( "Yoast_Plugin_License_Manager", false ) ) {
4
 
5
- class Yoast_Plugin_License_Manager extends Yoast_License_Manager {
6
 
7
  /**
8
  * Constructor
9
  *
10
- * @param Yoast_Product $product
11
  */
12
- public function __construct( Yoast_Product $product ) {
13
 
14
  parent::__construct( $product );
15
 
@@ -32,7 +32,7 @@ if ( class_exists( 'Yoast_License_Manager' ) && ! class_exists( "Yoast_Plugin_Li
32
  // setup auto updater
33
  require_once( dirname( __FILE__ ) . '/class-update-manager.php' );
34
  require_once( dirname( __FILE__ ) . '/class-plugin-update-manager.php' );
35
- new Yoast_Plugin_Update_Manager( $this->product, $this );
36
  }
37
  }
38
 
1
  <?php
2
 
3
+ if ( class_exists( 'MI_License_Manager' ) && ! class_exists( "MI_Plugin_License_Manager", false ) ) {
4
 
5
+ class MI_Plugin_License_Manager extends MI_License_Manager {
6
 
7
  /**
8
  * Constructor
9
  *
10
+ * @param MI_Product $product
11
  */
12
+ public function __construct( MI_Product $product ) {
13
 
14
  parent::__construct( $product );
15
 
32
  // setup auto updater
33
  require_once( dirname( __FILE__ ) . '/class-update-manager.php' );
34
  require_once( dirname( __FILE__ ) . '/class-plugin-update-manager.php' );
35
+ new MI_Plugin_Update_Manager( $this->product, $this );
36
  }
37
  }
38
 
vendor/yoast/license-manager/class-plugin-update-manager.php CHANGED
@@ -2,9 +2,9 @@
2
 
3
  //set_site_transient( 'update_plugins', null );
4
 
5
- if( class_exists( 'Yoast_Update_Manager' ) && ! class_exists( "Yoast_Plugin_Update_Manager", false ) ) {
6
 
7
- class Yoast_Plugin_Update_Manager extends Yoast_Update_Manager {
8
 
9
  /**
10
  * Constructor
@@ -17,7 +17,7 @@ if( class_exists( 'Yoast_Update_Manager' ) && ! class_exists( "Yoast_Plugin_Upda
17
  * @param string $author (optional)
18
  * @param string $text_domain
19
  */
20
- public function __construct( Yoast_Product $product, $license_key ) {
21
  parent::__construct( $product, $license_key );
22
 
23
  // setup hooks
2
 
3
  //set_site_transient( 'update_plugins', null );
4
 
5
+ if( class_exists( 'MI_Update_Manager' ) && ! class_exists( "MI_Plugin_Update_Manager", false ) ) {
6
 
7
+ class MI_Plugin_Update_Manager extends MI_Update_Manager {
8
 
9
  /**
10
  * Constructor
17
  * @param string $author (optional)
18
  * @param string $text_domain
19
  */
20
+ public function __construct( MI_Product $product, $license_key ) {
21
  parent::__construct( $product, $license_key );
22
 
23
  // setup hooks
vendor/yoast/license-manager/class-product.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
 
3
- if( ! class_exists( "Yoast_Product", false ) ) {
4
 
5
  /**
6
- * Class Yoast_Product
7
  *
8
  * @todo create a license class and store an object of it in this class
9
  */
10
- class Yoast_Product {
11
 
12
  /**
13
  * @var string The URL of the shop running the EDD API.
1
  <?php
2
 
3
+ if( ! class_exists( "MI_Product", false ) ) {
4
 
5
  /**
6
+ * Class MI_Product
7
  *
8
  * @todo create a license class and store an object of it in this class
9
  */
10
+ class MI_Product {
11
 
12
  /**
13
  * @var string The URL of the shop running the EDD API.
vendor/yoast/license-manager/class-theme-license-manager.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
- if( class_exists( 'Yoast_License_Manager' ) && ! class_exists( "Yoast_Theme_License_Manager", false ) ) {
4
 
5
- class Yoast_Theme_License_Manager extends Yoast_License_Manager {
6
 
7
  /**
8
  * Setup auto updater for themes
@@ -12,7 +12,7 @@ if( class_exists( 'Yoast_License_Manager' ) && ! class_exists( "Yoast_Theme_Lic
12
  // setup auto updater
13
  require_once dirname( __FILE__ ) . '/class-update-manager.php';
14
  require_once dirname( __FILE__ ) . '/class-theme-update-manager.php'; // @TODO: Autoload?
15
- new Yoast_Theme_Update_Manager( $this->product, $this );
16
  }
17
  }
18
 
1
  <?php
2
 
3
+ if( class_exists( 'MI_License_Manager' ) && ! class_exists( "MI_Theme_License_Manager", false ) ) {
4
 
5
+ class MI_Theme_License_Manager extends MI_License_Manager {
6
 
7
  /**
8
  * Setup auto updater for themes
12
  // setup auto updater
13
  require_once dirname( __FILE__ ) . '/class-update-manager.php';
14
  require_once dirname( __FILE__ ) . '/class-theme-update-manager.php'; // @TODO: Autoload?
15
+ new MI_Theme_Update_Manager( $this->product, $this );
16
  }
17
  }
18
 
vendor/yoast/license-manager/class-theme-update-manager.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
 
3
- if( class_exists( 'Yoast_Update_Manager' ) && ! class_exists( "Yoast_Theme_Update_Manager", false ) ) {
4
 
5
- class Yoast_Theme_Update_Manager extends Yoast_Update_Manager {
6
 
7
  /**
8
  * Constructor
@@ -14,7 +14,7 @@ if( class_exists( 'Yoast_Update_Manager' ) && ! class_exists( "Yoast_Theme_Updat
14
  * @param string $theme_version
15
  * @param string $author (optional)
16
  */
17
- public function __construct( Yoast_Product $product, $license_key ) {
18
 
19
  parent::__construct( $product, $license_key );
20
 
1
  <?php
2
 
3
+ if( class_exists( 'MI_Update_Manager' ) && ! class_exists( "MI_Theme_Update_Manager", false ) ) {
4
 
5
+ class MI_Theme_Update_Manager extends MI_Update_Manager {
6
 
7
  /**
8
  * Constructor
14
  * @param string $theme_version
15
  * @param string $author (optional)
16
  */
17
+ public function __construct( MI_Product $product, $license_key ) {
18
 
19
  parent::__construct( $product, $license_key );
20
 
vendor/yoast/license-manager/class-update-manager.php CHANGED
@@ -1,16 +1,16 @@
1
  <?php
2
 
3
- if( ! class_exists( "Yoast_Update_Manager", false ) ) {
4
 
5
- class Yoast_Update_Manager {
6
 
7
  /**
8
- * @var Yoast_Product
9
  */
10
  protected $product;
11
 
12
  /**
13
- * @var Yoast_License_Manager
14
  */
15
  protected $license_manager;
16
 
@@ -44,7 +44,7 @@ if( ! class_exists( "Yoast_Update_Manager", false ) ) {
44
  * @param string $version The current plugin or theme version
45
  * @param string $author (optional) The item author.
46
  */
47
- public function __construct( Yoast_Product $product, $license_manager ) {
48
  $this->product = $product;
49
  $this->license_manager = $license_manager;
50
 
@@ -126,7 +126,7 @@ if( ! class_exists( "Yoast_Update_Manager", false ) ) {
126
  );
127
 
128
  require_once dirname( __FILE__ ) . '/class-api-request.php';
129
- $request = new Yoast_API_Request( $this->product->get_api_url(), $request_params );
130
 
131
  if( $request->is_valid() !== true ) {
132
 
@@ -150,7 +150,7 @@ if( ! class_exists( "Yoast_Update_Manager", false ) ) {
150
  $this->license_manager->set_license_status( 'invalid' );
151
 
152
  // show notice to let the user know we deactivated his/her license
153
- $this->error_message = __( "This site has not been activated properly on yoast.com and thus cannot check for future updates. Please activate your site with a valid license key.", $this->product->get_text_domain() );
154
  add_action( 'admin_notices', array( $this, 'show_update_error' ) );
155
  }
156
 
1
  <?php
2
 
3
+ if( ! class_exists( "MI_Update_Manager", false ) ) {
4
 
5
+ class MI_Update_Manager {
6
 
7
  /**
8
+ * @var MI_Product
9
  */
10
  protected $product;
11
 
12
  /**
13
+ * @var MI_License_Manager
14
  */
15
  protected $license_manager;
16
 
44
  * @param string $version The current plugin or theme version
45
  * @param string $author (optional) The item author.
46
  */
47
+ public function __construct( MI_Product $product, $license_manager ) {
48
  $this->product = $product;
49
  $this->license_manager = $license_manager;
50
 
126
  );
127
 
128
  require_once dirname( __FILE__ ) . '/class-api-request.php';
129
+ $request = new MI_API_Request( $this->product->get_api_url(), $request_params );
130
 
131
  if( $request->is_valid() !== true ) {
132
 
150
  $this->license_manager->set_license_status( 'invalid' );
151
 
152
  // show notice to let the user know we deactivated his/her license
153
+ $this->error_message = __( "This site has not been activated properly on monsterinsights.com and thus cannot check for future updates. Please activate your site with a valid license key.", $this->product->get_text_domain() );
154
  add_action( 'admin_notices', array( $this, 'show_update_error' ) );
155
  }
156
 
vendor/yoast/license-manager/samples/sample-plugin.php CHANGED
@@ -3,10 +3,10 @@
3
  /*
4
  Plugin Name: Sample Plugin
5
  Version: 1.0
6
- Plugin URI: https://yoast.com/
7
  Description: A sample plugin to test the License Manager
8
- Author: Yoast, DvanKooten
9
- Author URI: http://yoast.com/
10
  Text Domain: sample-plugin
11
  */
12
 
@@ -39,7 +39,7 @@ class Sample_Plugin {
39
  public function load_license_manager() {
40
 
41
  // Instantiate license class
42
- $license_manager = new Yoast_Plugin_License_Manager( new Sample_Product() );
43
 
44
  // Setup the required hooks
45
  $license_manager->setup_hooks();
@@ -59,7 +59,7 @@ class Sample_Plugin {
59
  public function show_license_page() {
60
 
61
  // Instantiate license class
62
- $license_manager = new Yoast_Plugin_License_Manager( new Sample_Product() );
63
 
64
  ?>
65
  <div class="wrap">
3
  /*
4
  Plugin Name: Sample Plugin
5
  Version: 1.0
6
+ Plugin URI: https://www.monsterinsights.com/
7
  Description: A sample plugin to test the License Manager
8
+ Author: chriscct7, msub, DvanKooten
9
+ Author URI: http://www.monsterinsights.com/
10
  Text Domain: sample-plugin
11
  */
12
 
39
  public function load_license_manager() {
40
 
41
  // Instantiate license class
42
+ $license_manager = new MI_Plugin_License_Manager( new Sample_Product() );
43
 
44
  // Setup the required hooks
45
  $license_manager->setup_hooks();
59
  public function show_license_page() {
60
 
61
  // Instantiate license class
62
+ $license_manager = new MI_Plugin_License_Manager( new Sample_Product() );
63
 
64
  ?>
65
  <div class="wrap">
vendor/yoast/license-manager/samples/sample-product.php CHANGED
@@ -5,18 +5,18 @@
5
  *
6
  * Our sample product class
7
  */
8
- class Sample_Product extends Yoast_Product {
9
 
10
  public function __construct() {
11
  parent::__construct(
12
- 'https://yoast.com',
13
  'Sample Product',
14
  'sample-product',
15
  '1.0',
16
- 'https://yoast.com/wordpress/plugins/sample-product/',
17
  'admin.php?page=sample-product',
18
  'sample-product',
19
- 'Yoast'
20
  );
21
  }
22
 
5
  *
6
  * Our sample product class
7
  */
8
+ class Sample_Product extends MI_Product {
9
 
10
  public function __construct() {
11
  parent::__construct(
12
+ 'https://www.monsterinsights.com',
13
  'Sample Product',
14
  'sample-product',
15
  '1.0',
16
+ 'https://www.monsterinsights.com/downloads/sample-product/',
17
  'admin.php?page=sample-product',
18
  'sample-product',
19
+ 'MonsterInsights'
20
  );
21
  }
22
 
vendor/yoast/license-manager/samples/sample-theme-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  if( is_admin() ) {
4
 
5
  // Instantiate license class
6
- $license_manager = new Yoast_Theme_License_Manager( new Sample_Product() );
7
 
8
  // Setup the required hooks
9
  $license_manager->setup_hooks();
3
  if( is_admin() ) {
4
 
5
  // Instantiate license class
6
+ $license_manager = new MI_Theme_License_Manager( new Sample_Product() );
7
 
8
  // Setup the required hooks
9
  $license_manager->setup_hooks();
vendor/yoast/license-manager/tests/test-class-yoast-license-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  include( dirname( __FILE__ ) . '../../class-product.php' );
4
  include( dirname( __FILE__ ) . '../../class-license-manager.php' );
5
 
6
- class Yoast_Product_Double extends Yoast_Product {
7
 
8
  /**
9
  * Construct the real Product class with our fake data
@@ -14,12 +14,12 @@ class Yoast_Product_Double extends Yoast_Product {
14
 
15
  }
16
 
17
- class Yoast_License_Manager_Double extends Yoast_License_Manager {
18
 
19
  public $product;
20
 
21
  public function __construct() {
22
- $this->product = new Yoast_Product_Double();
23
 
24
  parent::__construct( $this->product );
25
  }
@@ -43,18 +43,18 @@ class Yoast_License_Manager_Double extends Yoast_License_Manager {
43
 
44
  }
45
 
46
- class Test_Yoast_License_Manager extends Yst_License_Manager_UnitTestCase {
47
 
48
  private $class;
49
 
50
  public function setUp() {
51
- $this->class = new Yoast_License_Manager_Double();
52
  }
53
 
54
  /**
55
  * Make sure the API url is correct in the product
56
  *
57
- * @covers Yoast_License_Manager::get_api_url()
58
  */
59
  public function test_get_api_url(){
60
  $this->assertEquals( $this->class->product->get_api_url(), get_site_url() );
@@ -63,7 +63,7 @@ class Test_Yoast_License_Manager extends Yst_License_Manager_UnitTestCase {
63
  /**
64
  * Make sure the API url is correct in the product
65
  *
66
- * @covers Yoast_License_Manager::get_curl_version()
67
  */
68
  public function test_get_curl_version_WITH_curl_installed_on_test_server(){
69
  $curl_result = $this->class->double_get_curl_version();
3
  include( dirname( __FILE__ ) . '../../class-product.php' );
4
  include( dirname( __FILE__ ) . '../../class-license-manager.php' );
5
 
6
+ class MI_Product_Double extends MI_Product {
7
 
8
  /**
9
  * Construct the real Product class with our fake data
14
 
15
  }
16
 
17
+ class MI_License_Manager_Double extends MI_License_Manager {
18
 
19
  public $product;
20
 
21
  public function __construct() {
22
+ $this->product = new MI_Product_Double();
23
 
24
  parent::__construct( $this->product );
25
  }
43
 
44
  }
45
 
46
+ class Test_MI_License_Manager extends Yst_License_Manager_UnitTestCase {
47
 
48
  private $class;
49
 
50
  public function setUp() {
51
+ $this->class = new MI_License_Manager_Double();
52
  }
53
 
54
  /**
55
  * Make sure the API url is correct in the product
56
  *
57
+ * @covers MI_License_Manager::get_api_url()
58
  */
59
  public function test_get_api_url(){
60
  $this->assertEquals( $this->class->product->get_api_url(), get_site_url() );
63
  /**
64
  * Make sure the API url is correct in the product
65
  *
66
+ * @covers MI_License_Manager::get_curl_version()
67
  */
68
  public function test_get_curl_version_WITH_curl_installed_on_test_server(){
69
  $curl_result = $this->class->double_get_curl_version();
vendor/yoast/license-manager/views/form.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) {
5
  }
6
 
7
  /**
8
- * @var Yoast_Product $product
9
  */
10
  $product = $this->product;
11
 
5
  }
6
 
7
  /**
8
+ * @var MI_Product $product
9
  */
10
  $product = $this->product;
11
 
vendor/yoast/license-manager/views/script.php CHANGED
@@ -6,11 +6,11 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  ?><script type="text/javascript">
7
  (function($) {
8
 
9
- if( typeof YoastLicenseManager !== "undefined" ) {
10
  return;
11
  }
12
 
13
- window.YoastLicenseManager = (function () {
14
 
15
  function init() {
16
  var $keyInputs = $(".yoast-license-key-field.yoast-license-obfuscate");
@@ -61,7 +61,7 @@ if ( ! defined( 'ABSPATH' ) ) {
61
 
62
  })();
63
 
64
- YoastLicenseManager.init();
65
 
66
  })(jQuery);
67
  </script>
6
  ?><script type="text/javascript">
7
  (function($) {
8
 
9
+ if( typeof MILicenseManager !== "undefined" ) {
10
  return;
11
  }
12
 
13
+ window.MILicenseManager = (function () {
14
 
15
  function init() {
16
  var $keyInputs = $(".yoast-license-key-field.yoast-license-obfuscate");
61
 
62
  })();
63
 
64
+ MILicenseManager.init();
65
 
66
  })(jQuery);
67
  </script>