Version Description
Release Date: October 3rd, 2016
-
Bugfixes:
- Fixes issue with PHP compatibility scanner's bug
-
Enhancements:
- Announces MI 6.0 beta
Download this release
Release Info
Developer | chriscct7 |
Plugin | Google Analytics for WordPress by MonsterInsights |
Version | 5.5.3 |
Comparing to | |
See all releases |
Code changes from version 5.5.2 to 5.5.3
- admin/pages/dashboard.php +0 -1
- googleanalytics.php +9 -10
- readme.txt +50 -40
- vendor/yoast/license-manager-2/.gitigore +0 -2
- vendor/yoast/license-manager-2/.travis.yml +0 -54
- vendor/yoast/license-manager-2/README.md +0 -21
- vendor/yoast/license-manager-2/composer.json +0 -29
- vendor/yoast/license-manager-2/phpunit.xml +0 -23
- vendor/yoast/license-manager-2/samples/index.php +0 -2
- vendor/yoast/license-manager-2/samples/sample-plugin.php +0 -74
- vendor/yoast/license-manager-2/samples/sample-product.php +0 -23
- vendor/yoast/license-manager-2/samples/sample-theme-functions.php +0 -11
- vendor/yoast/license-manager/.gitigore +0 -2
- vendor/yoast/license-manager/.travis.yml +0 -54
- vendor/yoast/license-manager/README.md +0 -21
- vendor/yoast/license-manager/composer.json +0 -29
- vendor/yoast/license-manager/phpunit.xml +0 -23
- vendor/yoast/license-manager/samples/index.php +0 -2
- vendor/yoast/license-manager/samples/sample-plugin.php +0 -74
- vendor/yoast/license-manager/samples/sample-product.php +0 -23
- vendor/yoast/license-manager/samples/sample-theme-functions.php +0 -11
- vendor/yoast/license-manager/tests/bootstrap.php +0 -16
- vendor/yoast/license-manager/tests/framework/class-yst-license-manager-unit-test-case.php +0 -40
- vendor/yoast/license-manager/tests/index.php +0 -3
- vendor/yoast/license-manager/tests/test-class-yoast-license-manager.php +0 -81
admin/pages/dashboard.php
CHANGED
@@ -240,7 +240,6 @@ echo $yoast_ga_admin->content_head();
|
|
240 |
|
241 |
// PHP configs... now we're getting to the important stuff
|
242 |
$return .= "\n" . '-- PHP Configuration' . "\n\n";
|
243 |
-
$return .= 'Safe Mode: ' . ( ini_get( 'safe_mode' ) ? 'Enabled' : 'Disabled' . "\n" );
|
244 |
$return .= 'Memory Limit: ' . ini_get( 'memory_limit' ) . "\n";
|
245 |
$return .= 'Upload Max Size: ' . ini_get( 'upload_max_filesize' ) . "\n";
|
246 |
$return .= 'Post Max Size: ' . ini_get( 'post_max_size' ) . "\n";
|
240 |
|
241 |
// PHP configs... now we're getting to the important stuff
|
242 |
$return .= "\n" . '-- PHP Configuration' . "\n\n";
|
|
|
243 |
$return .= 'Memory Limit: ' . ini_get( 'memory_limit' ) . "\n";
|
244 |
$return .= 'Upload Max Size: ' . ini_get( 'upload_max_filesize' ) . "\n";
|
245 |
$return .= 'Post Max Size: ' . ini_get( 'post_max_size' ) . "\n";
|
googleanalytics.php
CHANGED
@@ -9,7 +9,7 @@
|
|
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.5.
|
13 |
* Requires at least: 3.9
|
14 |
* Author URI: https://www.monsterinsights.com/
|
15 |
* License: GPL v3
|
@@ -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.5.
|
39 |
|
40 |
define( 'GAWP_FILE', __FILE__ );
|
41 |
|
@@ -48,21 +48,20 @@ function monsterinsights_needs_manual_update_check(){
|
|
48 |
}
|
49 |
add_action( 'plugins_loaded', 'monsterinsights_needs_manual_update_check');
|
50 |
|
51 |
-
function
|
52 |
-
|
53 |
-
if ( !current_user_can('manage_options' ) ) {
|
54 |
return;
|
55 |
}
|
56 |
-
if ( ! get_option( '
|
57 |
<div class="updated notice is-dismissible">
|
58 |
-
<p><?php echo sprintf(__( '
|
59 |
</div>
|
60 |
-
|
61 |
-
|
62 |
}
|
63 |
|
64 |
}
|
65 |
-
add_action( 'admin_notices', '
|
66 |
|
67 |
if ( file_exists( dirname( GAWP_FILE ) . '/vendor/autoload_52.php' ) ) {
|
68 |
require dirname( GAWP_FILE ) . '/vendor/autoload_52.php';
|
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.5.3
|
13 |
* Requires at least: 3.9
|
14 |
* Author URI: https://www.monsterinsights.com/
|
15 |
* License: GPL v3
|
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.5.3' );
|
39 |
|
40 |
define( 'GAWP_FILE', __FILE__ );
|
41 |
|
48 |
}
|
49 |
add_action( 'plugins_loaded', 'monsterinsights_needs_manual_update_check');
|
50 |
|
51 |
+
function monsterinsights_lite_60_admin_notice() {
|
52 |
+
if ( ! current_user_can('manage_options' ) ) {
|
|
|
53 |
return;
|
54 |
}
|
55 |
+
if ( ! get_option( 'monsterinsights_60_beta' , false ) ) { ?>
|
56 |
<div class="updated notice is-dismissible">
|
57 |
+
<p><?php echo sprintf(__( 'MonsterInsights 6.0 is Coming Soon — %sCheck out the sneak peak%s — It’s going to be awesome', 'google-analytics-for-wordpress'), '<a href="https://www.monsterinsights.com/whats-coming-monsterinsights-6-0-sneak-peak/">', '</a>' ); ?></p>
|
58 |
</div>
|
59 |
+
<?php
|
60 |
+
update_option( 'monsterinsights_60_beta', true );
|
61 |
}
|
62 |
|
63 |
}
|
64 |
+
add_action( 'admin_notices', 'monsterinsights_lite_60_admin_notice' );
|
65 |
|
66 |
if ( file_exists( dirname( GAWP_FILE ) . '/vendor/autoload_52.php' ) ) {
|
67 |
require dirname( GAWP_FILE ) . '/vendor/autoload_52.php';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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, universal analytics, web stats, ecommerce, ecommerce tracking
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.6
|
7 |
-
Stable tag: 5.5.
|
8 |
License: GPL v3
|
9 |
|
10 |
Connect Google Analytics with WordPress by adding your Google Analytics tracking code. Get the stats that matter.
|
@@ -27,9 +27,9 @@ Full list of features:
|
|
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 |
-
|
31 |
-
|
32 |
-
|
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.
|
@@ -70,6 +70,16 @@ You can also learn about other <a href="http://www.wpbeginner.com/category/plugi
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
= 5.5.2 =
|
74 |
|
75 |
Release Date: July 7th, 2016
|
@@ -95,12 +105,12 @@ Release Date: May 1st, 2016
|
|
95 |
Release Date: April 15th, 2016
|
96 |
|
97 |
* Bugfixes:
|
98 |
-
|
99 |
* Fixes issue with 2 dashboard links
|
100 |
* A bug in pre-existing code caused the menu of the plugin to skyrocket unintentionally. This has been corrected.
|
101 |
|
102 |
* Enhancements:
|
103 |
-
|
104 |
* The "MonsterInsights" menu item name has been renamed to just "Insights"
|
105 |
|
106 |
= 5.4.8 =
|
@@ -108,98 +118,98 @@ Release Date: April 15th, 2016
|
|
108 |
Release Date: April 14th, 2016
|
109 |
|
110 |
* Bugfixes:
|
111 |
-
|
112 |
|
113 |
* Annoucements:
|
114 |
* Google Analytics by Yoast is now MonsterInsights.
|
115 |
|
116 |
* Enhancements:
|
117 |
-
|
118 |
|
119 |
= 5.4.6 =
|
120 |
|
121 |
Release Date: August 25th, 2015
|
122 |
|
123 |
* Bugfixes:
|
124 |
-
|
125 |
|
126 |
= 5.4.5 =
|
127 |
|
128 |
Release Date: August 5th, 2015
|
129 |
|
130 |
* Security:
|
131 |
-
|
132 |
|
133 |
* Enhancements:
|
134 |
-
|
135 |
-
|
136 |
|
137 |
= 5.4.4 =
|
138 |
|
139 |
Release Date: July 21st, 2015
|
140 |
|
141 |
* Enhancements:
|
142 |
-
|
143 |
|
144 |
= 5.4.3 =
|
145 |
|
146 |
Release Date: July 15th, 2015
|
147 |
|
148 |
* Enhancements:
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
|
153 |
* Bugfixes:
|
154 |
-
|
155 |
-
|
156 |
|
157 |
= 5.4.2 =
|
158 |
|
159 |
Release Date: April 21th, 2015
|
160 |
|
161 |
* Bugfixes:
|
162 |
-
|
163 |
-
|
164 |
|
165 |
= 5.4.1 =
|
166 |
|
167 |
Release Date: April 21th, 2015
|
168 |
|
169 |
* Bugfixes:
|
170 |
-
|
171 |
-
|
172 |
|
173 |
= 5.4 =
|
174 |
|
175 |
Release Date: April 20th, 2015
|
176 |
|
177 |
* Enhancements:
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
|
183 |
* Security:
|
184 |
-
|
185 |
-
|
186 |
|
187 |
* Bugfixes:
|
188 |
-
|
189 |
-
|
190 |
|
191 |
= 5.3.3 =
|
192 |
|
193 |
Release Date: March 19th, 2015
|
194 |
|
195 |
* Several security fixes:
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
* Other fixes:
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
|
204 |
Big thanks to [Jouko Pynnönen](http://klikki.fi) for responsibly disclosing security issues #2 and #3.
|
205 |
|
@@ -241,8 +251,8 @@ Release Date: January 27th, 2015
|
|
241 |
* Reduced the number of results retrieved from the Google Analytics API per call from 10,000 to 1,000. This is filterable through `yst-ga-filter-api-limit`.
|
242 |
|
243 |
* Bugfixes:
|
244 |
-
|
245 |
-
|
246 |
* Makes sure re-authentication notice is only shown when authentication has actually failed.
|
247 |
* Introduces a notice for when authentication isn't the problem but the plugin was somehow unable to fetch data from GA.
|
248 |
|
@@ -352,8 +362,8 @@ Release Date: December 2nd, 2014
|
|
352 |
* Removed firebug lite as it's rather obsolete with todays development consoles.
|
353 |
|
354 |
* i18n:
|
355 |
-
|
356 |
-
|
357 |
|
358 |
* Bugfixes:
|
359 |
* Fixes a bug where site admins for sites on a multisite setup would receive a notice when visiting another site on the same setup which they didn't administrate, props [nerrad](https://github.com/nerrad).
|
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, universal analytics, web stats, ecommerce, ecommerce tracking
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.6
|
7 |
+
Stable tag: 5.5.3
|
8 |
License: GPL v3
|
9 |
|
10 |
Connect Google Analytics with WordPress by adding your Google Analytics tracking code. Get the stats that matter.
|
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.
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 5.5.3 =
|
74 |
+
|
75 |
+
Release Date: October 3rd, 2016
|
76 |
+
|
77 |
+
* Bugfixes:
|
78 |
+
* Fixes issue with PHP compatibility scanner's bug
|
79 |
+
|
80 |
+
* Enhancements:
|
81 |
+
* Announces MI 6.0 beta
|
82 |
+
|
83 |
= 5.5.2 =
|
84 |
|
85 |
Release Date: July 7th, 2016
|
105 |
Release Date: April 15th, 2016
|
106 |
|
107 |
* Bugfixes:
|
108 |
+
* Fixes issue with eCommerce addon (also requires user to update eCommerce addon)
|
109 |
* Fixes issue with 2 dashboard links
|
110 |
* A bug in pre-existing code caused the menu of the plugin to skyrocket unintentionally. This has been corrected.
|
111 |
|
112 |
* Enhancements:
|
113 |
+
* New font based dashboard icon
|
114 |
* The "MonsterInsights" menu item name has been renamed to just "Insights"
|
115 |
|
116 |
= 5.4.8 =
|
118 |
Release Date: April 14th, 2016
|
119 |
|
120 |
* Bugfixes:
|
121 |
+
* Fixes compatibility issue with WordPress 4.5
|
122 |
|
123 |
* Annoucements:
|
124 |
* Google Analytics by Yoast is now MonsterInsights.
|
125 |
|
126 |
* Enhancements:
|
127 |
+
* Adds ground work for new features coming soon.
|
128 |
|
129 |
= 5.4.6 =
|
130 |
|
131 |
Release Date: August 25th, 2015
|
132 |
|
133 |
* Bugfixes:
|
134 |
+
* Fixes the dashboard tables which were broken in WordPress 4.3 because of a new version of jQuery that was introduced.
|
135 |
|
136 |
= 5.4.5 =
|
137 |
|
138 |
Release Date: August 5th, 2015
|
139 |
|
140 |
* Security:
|
141 |
+
* Fixes a small stored XSS issue (only exploitable by admins), thanks [Tom Adams](https://twitter.com/tom_dxw) from [dxw security](https://security.dxw.com/) for responsibly disclosing the issue.
|
142 |
|
143 |
* Enhancements:
|
144 |
+
* Only allows showing and saving the custom code field for users with the `unfiltered_html` capability.
|
145 |
+
* Improves JavaScript output escaping on the frontend.
|
146 |
|
147 |
= 5.4.4 =
|
148 |
|
149 |
Release Date: July 21st, 2015
|
150 |
|
151 |
* Enhancements:
|
152 |
+
* Makes sure core functionality is only loaded when needed, improving admin performance and preventing compatibility issues with the upcoming 2.3 release of Yoast SEO.
|
153 |
|
154 |
= 5.4.3 =
|
155 |
|
156 |
Release Date: July 15th, 2015
|
157 |
|
158 |
* Enhancements:
|
159 |
+
* Improved form labels for remarketing / demographics and interests reports.
|
160 |
+
* Improved the notice that is shown in the head to non-admin users when their usergroup has been excluded from tracking or debug mode is enabled.
|
161 |
+
* Adds 4 translations: ca, en_AU, ja, pt_PT
|
162 |
|
163 |
* Bugfixes:
|
164 |
+
* Fixes a bug where the plugin would fetch a refresh token from Google on every page request.
|
165 |
+
* Fixes an undefined index notice which was triggered when running WordPress using WP CLI.
|
166 |
|
167 |
= 5.4.2 =
|
168 |
|
169 |
Release Date: April 21th, 2015
|
170 |
|
171 |
* Bugfixes:
|
172 |
+
* Fixes a bug where our link tracking broke the content in case of multiline links.
|
173 |
+
* Fixes a bug where it was no longer possible to dismiss the i18n module.
|
174 |
|
175 |
= 5.4.1 =
|
176 |
|
177 |
Release Date: April 21th, 2015
|
178 |
|
179 |
* Bugfixes:
|
180 |
+
* Fixes a bug where GA API was being pinged too often.
|
181 |
+
* Fixes a bug where users were unable to authenticate with Google Analytics. It might take a while for authentication to work again, as the API key within the plugin has to be within its quota limits again. We’re very sorry for the inconvenience. Note that for Premium users everything still works.
|
182 |
|
183 |
= 5.4 =
|
184 |
|
185 |
Release Date: April 20th, 2015
|
186 |
|
187 |
* Enhancements:
|
188 |
+
* Complete technical overhaul of the way settings are being stored. Switched to WP Settings API and added input validation and sanitation for several settings.
|
189 |
+
* Made the settings more accessible by adding `for` attributes to the labels, connecting them with the corresponding form fields. Props to [Steve Repsher](https://github.com/steverep) for the awesome contribution!
|
190 |
+
* Made Universal tracking the default for new installs.
|
191 |
+
* Adds administrators to the default user roles to ignore for tracking.
|
192 |
|
193 |
* Security:
|
194 |
+
* Fixes several security issues that were discovered during an elaborate security review performed by our friends from [Sucuri](https://sucuri.net/).
|
195 |
+
* Fixes two other XSS issues. Thanks to [Johannes Schmitt](https://github.com/schmittjoh) from [Scrutinizer CI](https://scrutinizer-ci.com/) and [Jouko Pynnönen](http://klikki.fi) for discovering and responsibly disclosing these issues.
|
196 |
|
197 |
* Bugfixes:
|
198 |
+
* Fixes an issue where some GA dashboard style sheets and scripts were also loaded outside of the Google Analytics by Yoast dashboard, thereby unnecessarily slowing down the WP admin.
|
199 |
+
* Fixes a bug where a PHP warning could be raised on the dashboard when no data is available.
|
200 |
|
201 |
= 5.3.3 =
|
202 |
|
203 |
Release Date: March 19th, 2015
|
204 |
|
205 |
* Several security fixes:
|
206 |
+
1. Fix minor XSS issue where admins could XSS each other through an unescaped manual UA field.
|
207 |
+
1. Fix stored XSS issue where changing a property's name in Google Analytics to contain malicious JS would allow execution of that JS in the admin as the profile name was not escaped properly.
|
208 |
+
1. Fix un-authenticated change of the GA profile list, allowing the previous XSS to become a slightly bigger issue. Issues 2 and 3 combined lead to a [DREAD score](http://blog.sucuri.net/2015/03/understanding-wordpress-plugin-vulnerabilities.html) of 5.
|
209 |
* Other fixes:
|
210 |
+
* Small code style improvements.
|
211 |
+
* Throw an error and deactivate if either the PHP SPL or PHP filter libraries aren't loaded.
|
212 |
+
* Introduced a filter `yst_ga_track_super_admin` to allow disabling of super admin tracking on multi-site, defaulting to true.
|
213 |
|
214 |
Big thanks to [Jouko Pynnönen](http://klikki.fi) for responsibly disclosing security issues #2 and #3.
|
215 |
|
251 |
* Reduced the number of results retrieved from the Google Analytics API per call from 10,000 to 1,000. This is filterable through `yst-ga-filter-api-limit`.
|
252 |
|
253 |
* Bugfixes:
|
254 |
+
* When toggling checkbox the authentication token input was showing up.
|
255 |
+
* Fixed internal links that were being tracked as outbound-article- (with trailing dash).
|
256 |
* Makes sure re-authentication notice is only shown when authentication has actually failed.
|
257 |
* Introduces a notice for when authentication isn't the problem but the plugin was somehow unable to fetch data from GA.
|
258 |
|
362 |
* Removed firebug lite as it's rather obsolete with todays development consoles.
|
363 |
|
364 |
* i18n:
|
365 |
+
* Several string fixes for easier translation.
|
366 |
+
* Added en_GB and he_IL.
|
367 |
|
368 |
* Bugfixes:
|
369 |
* Fixes a bug where site admins for sites on a multisite setup would receive a notice when visiting another site on the same setup which they didn't administrate, props [nerrad](https://github.com/nerrad).
|
vendor/yoast/license-manager-2/.gitigore
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
.idea/
|
2 |
-
.idea/*
|
|
|
|
vendor/yoast/license-manager-2/.travis.yml
DELETED
@@ -1,54 +0,0 @@
|
|
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
DELETED
@@ -1,21 +0,0 @@
|
|
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/composer.json
DELETED
@@ -1,29 +0,0 @@
|
|
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/phpunit.xml
DELETED
@@ -1,23 +0,0 @@
|
|
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
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Nothing to see here
|
|
|
|
vendor/yoast/license-manager-2/samples/sample-plugin.php
DELETED
@@ -1,74 +0,0 @@
|
|
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
DELETED
@@ -1,23 +0,0 @@
|
|
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
DELETED
@@ -1,11 +0,0 @@
|
|
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/.gitigore
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
.idea/
|
2 |
-
.idea/*
|
|
|
|
vendor/yoast/license-manager/.travis.yml
DELETED
@@ -1,54 +0,0 @@
|
|
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/README.md
DELETED
@@ -1,21 +0,0 @@
|
|
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/composer.json
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name" : "yoast/license-manager",
|
3 |
-
"description": "MI License Manager.",
|
4 |
-
"keywords" : ["wordpress"],
|
5 |
-
"homepage" : "https://github.com/MI/License-Manager",
|
6 |
-
"license" : "GPL-2.0+",
|
7 |
-
"authors" : [
|
8 |
-
{
|
9 |
-
"name" : "Team MI",
|
10 |
-
"email" : "support@yoast.com",
|
11 |
-
"homepage": "https://yoast.com"
|
12 |
-
}
|
13 |
-
],
|
14 |
-
"support" : {
|
15 |
-
"issues": "https://github.com/MI/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/phpunit.xml
DELETED
@@ -1,23 +0,0 @@
|
|
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/samples/index.php
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Nothing to see here
|
|
|
|
vendor/yoast/license-manager/samples/sample-plugin.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
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 |
-
|
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 MI_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 MI_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/samples/sample-product.php
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class Sample_Product
|
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 |
-
|
23 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/yoast/license-manager/samples/sample-theme-functions.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
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();
|
10 |
-
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/yoast/license-manager/tests/bootstrap.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// disable xdebug backtrace
|
3 |
-
if ( function_exists( 'xdebug_disable' ) ) {
|
4 |
-
xdebug_disable();
|
5 |
-
}
|
6 |
-
|
7 |
-
echo 'Welcome to the License Manager Test Suite' . PHP_EOL;
|
8 |
-
echo 'Version: 1.0' . PHP_EOL . PHP_EOL;
|
9 |
-
|
10 |
-
if( false !== getenv( 'WP_DEVELOP_DIR' ) ) {
|
11 |
-
require getenv( 'WP_DEVELOP_DIR' ) . 'tests/phpunit/includes/bootstrap.php';
|
12 |
-
} else {
|
13 |
-
require '../../../../tests/phpunit/includes/bootstrap.php';
|
14 |
-
}
|
15 |
-
// include unit test base class
|
16 |
-
require_once dirname( __FILE__ ) . '/framework/class-yst-license-manager-unit-test-case.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/yoast/license-manager/tests/framework/class-yst-license-manager-unit-test-case.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* TestCase base class for convenience methods.
|
5 |
-
*/
|
6 |
-
class Yst_License_Manager_UnitTestCase extends WP_UnitTestCase {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @param string $key
|
10 |
-
* @param mixed $value
|
11 |
-
*/
|
12 |
-
protected function set_post( $key, $value ) {
|
13 |
-
$_POST[$key] = $_REQUEST[$key] = addslashes( $value );
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* @param string $key
|
18 |
-
*/
|
19 |
-
protected function unset_post( $key ) {
|
20 |
-
unset( $_POST[$key], $_REQUEST[$key] );
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Fake a request to the WP front page
|
25 |
-
*/
|
26 |
-
protected function go_to_home() {
|
27 |
-
$this->go_to( home_url( '/' ) );
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @param string $string
|
32 |
-
* @param mixed $function
|
33 |
-
*/
|
34 |
-
protected function expectOutput( $string, $function = null ) {
|
35 |
-
$output = ob_get_contents();
|
36 |
-
ob_clean();
|
37 |
-
$this->assertEquals( $output, $string );
|
38 |
-
}
|
39 |
-
|
40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/yoast/license-manager/tests/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
//Nothing to see here
|
3 |
-
header('HTTP/1.0 403 Forbidden');
|
|
|
|
|
|
vendor/yoast/license-manager/tests/test-class-yoast-license-manager.php
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
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
|
10 |
-
*/
|
11 |
-
public function __construct() {
|
12 |
-
parent::__construct( get_site_url(), 'test-product', 'slug-test-product', '1.0.0' );
|
13 |
-
}
|
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 |
-
}
|
26 |
-
|
27 |
-
public function specific_hooks() {
|
28 |
-
return $this->specific_hooks();
|
29 |
-
}
|
30 |
-
|
31 |
-
public function setup_auto_updater() {
|
32 |
-
return $this->setup_auto_updater();
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Wrapper for get_curl_version()
|
37 |
-
*
|
38 |
-
* @return mixed
|
39 |
-
*/
|
40 |
-
public function double_get_curl_version(){
|
41 |
-
return $this->get_curl_version();
|
42 |
-
}
|
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() );
|
61 |
-
}
|
62 |
-
|
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();
|
70 |
-
|
71 |
-
if( function_exists('curl_version') ){
|
72 |
-
$curl_version = curl_version();
|
73 |
-
|
74 |
-
$this->assertEquals( $curl_result, $curl_version['version'] );
|
75 |
-
}
|
76 |
-
else{
|
77 |
-
$this->assertFalse( $curl_result );
|
78 |
-
}
|
79 |
-
}
|
80 |
-
|
81 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|