Version Description
Download this release
Release Info
Developer | wpautoterms |
Plugin | Auto Terms of Service and Privacy Policy |
Version | 2.4.3 |
Comparing to | |
See all releases |
Code changes from version 2.4.2 to 2.4.3
- README.txt +11 -2
- auto-terms-of-service-privacy-policy.php +2 -2
- includes/admin/admin.php +4 -4
- includes/admin/page/compliancekits.php +1 -1
- includes/admin/page/legacy-settings.php +1 -1
- includes/admin/page/license-settings.php +2 -2
- includes/box/box.php +1 -1
- includes/box/links-box.php +1 -1
- includes/countries.php +2 -2
- includes/frontend/notice/update-notice.php +12 -2
- templates/review-banner.php +3 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: privacy policy, terms and conditions, cookie consent, cookie notice, ccpa,
|
|
4 |
Requires at least: 4.2
|
5 |
Tested up to: 5.5.1
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 2.4.
|
8 |
License: GPL version 3 or any later version
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -119,9 +119,18 @@ Installing the plugin is easy. Just follow these steps:
|
|
119 |
|
120 |
== Changelog ==
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
= Version 2.4.2 =
|
123 |
* Oct 1, 2020
|
124 |
-
* Fix:
|
125 |
* Fix: Remove alert('error') from showing when a caching plugin & Compliance Kit are enabled
|
126 |
|
127 |
= Version 2.4.1 =
|
4 |
Requires at least: 4.2
|
5 |
Tested up to: 5.5.1
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 2.4.3
|
8 |
License: GPL version 3 or any later version
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
119 |
|
120 |
== Changelog ==
|
121 |
|
122 |
+
= Version 2.4.3 =
|
123 |
+
* Oct 23, 2020
|
124 |
+
* Fix: Fix older PHP version error: Constants may only evaluate to scalar values
|
125 |
+
|
126 |
+
= Version 2.4.2 =
|
127 |
+
* Oct 1, 2020
|
128 |
+
* Fix: Fix older PHP version error: Constants may only evaluate to scalar values
|
129 |
+
* Fix: Fix header already sent error on Update Notice kit
|
130 |
+
|
131 |
= Version 2.4.2 =
|
132 |
* Oct 1, 2020
|
133 |
+
* Fix: Fix jQuery issues that prevented Add a New Legal Page wizards from being displayed
|
134 |
* Fix: Remove alert('error') from showing when a caching plugin & Compliance Kit are enabled
|
135 |
|
136 |
= Version 2.4.1 =
|
auto-terms-of-service-privacy-policy.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://wpautoterms.com
|
|
5 |
Description: Create Privacy Policy, GDPR Privacy Policy, Terms & Conditions, Disclaimers. Cookie Consent Banner. More Compliance Kits to help you get compliant with the law.
|
6 |
Author: WP AutoTerms
|
7 |
Author URI: https://wpautoterms.com
|
8 |
-
Version: 2.4.
|
9 |
License: GPLv2 or later
|
10 |
Text Domain: wpautoterms
|
11 |
Domain Path: /languages
|
@@ -58,7 +58,7 @@ define( 'WPAUTOTERMS_LEGAL_PAGES_DIR', 'legal-pages' . DIRECTORY_SEPARATOR );
|
|
58 |
define( 'WPAUTOTERMS_OPTION_ACTIVATED', 'activated' );
|
59 |
define( 'WPAUTOTERMS_LICENSE_RECHECK_TIME', 24 * 60 * 60 );
|
60 |
define( 'WPAUTOTERMS_JS_BASE', WPAUTOTERMS_SLUG . '_base' );
|
61 |
-
|
62 |
|
63 |
function get_version( $file_name ) {
|
64 |
|
5 |
Description: Create Privacy Policy, GDPR Privacy Policy, Terms & Conditions, Disclaimers. Cookie Consent Banner. More Compliance Kits to help you get compliant with the law.
|
6 |
Author: WP AutoTerms
|
7 |
Author URI: https://wpautoterms.com
|
8 |
+
Version: 2.4.3
|
9 |
License: GPLv2 or later
|
10 |
Text Domain: wpautoterms
|
11 |
Domain Path: /languages
|
58 |
define( 'WPAUTOTERMS_OPTION_ACTIVATED', 'activated' );
|
59 |
define( 'WPAUTOTERMS_LICENSE_RECHECK_TIME', 24 * 60 * 60 );
|
60 |
define( 'WPAUTOTERMS_JS_BASE', WPAUTOTERMS_SLUG . '_base' );
|
61 |
+
|
62 |
|
63 |
function get_version( $file_name ) {
|
64 |
|
includes/admin/admin.php
CHANGED
@@ -195,11 +195,11 @@ abstract class Admin {
|
|
195 |
}
|
196 |
if ( $page == 'edit.php' ) {
|
197 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_row_actions', WPAUTOTERMS_PLUGIN_URL . 'js/row-actions.js',
|
198 |
-
|
199 |
}
|
200 |
if ( $page == 'post-new.php' && $post->post_status == 'auto-draft' ) {
|
201 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_post_new', WPAUTOTERMS_PLUGIN_URL . 'js/post-new.js',
|
202 |
-
|
203 |
$hidden = array();
|
204 |
$dependencies = array();
|
205 |
/**
|
@@ -223,7 +223,7 @@ abstract class Admin {
|
|
223 |
}
|
224 |
wp_register_style( WPAUTOTERMS_SLUG . '_admin_css', WPAUTOTERMS_PLUGIN_URL . 'css/admin.css', WPAUTOTERMS_VERSION );
|
225 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_admin_css', array(), WPAUTOTERMS_VERSION );
|
226 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_common', WPAUTOTERMS_PLUGIN_URL . 'js/common.js',
|
227 |
WPAUTOTERMS_VERSION, true );
|
228 |
$nonce = array();
|
229 |
/**
|
@@ -238,7 +238,7 @@ abstract class Admin {
|
|
238 |
$prefix = WPAUTOTERMS_SLUG . '_';
|
239 |
if ( strncmp( $page, $prefix, strlen( $prefix ) ) === 0 ) {
|
240 |
Countries::enqueue_scripts();
|
241 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_admin', WPAUTOTERMS_PLUGIN_URL . 'js/kits.js',
|
242 |
WPAUTOTERMS_VERSION, true );
|
243 |
}
|
244 |
}
|
195 |
}
|
196 |
if ( $page == 'edit.php' ) {
|
197 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_row_actions', WPAUTOTERMS_PLUGIN_URL . 'js/row-actions.js',
|
198 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
199 |
}
|
200 |
if ( $page == 'post-new.php' && $post->post_status == 'auto-draft' ) {
|
201 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_post_new', WPAUTOTERMS_PLUGIN_URL . 'js/post-new.js',
|
202 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
203 |
$hidden = array();
|
204 |
$dependencies = array();
|
205 |
/**
|
223 |
}
|
224 |
wp_register_style( WPAUTOTERMS_SLUG . '_admin_css', WPAUTOTERMS_PLUGIN_URL . 'css/admin.css', WPAUTOTERMS_VERSION );
|
225 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_admin_css', array(), WPAUTOTERMS_VERSION );
|
226 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_common', WPAUTOTERMS_PLUGIN_URL . 'js/common.js', array( WPAUTOTERMS_JS_BASE ),
|
227 |
WPAUTOTERMS_VERSION, true );
|
228 |
$nonce = array();
|
229 |
/**
|
238 |
$prefix = WPAUTOTERMS_SLUG . '_';
|
239 |
if ( strncmp( $page, $prefix, strlen( $prefix ) ) === 0 ) {
|
240 |
Countries::enqueue_scripts();
|
241 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_admin', WPAUTOTERMS_PLUGIN_URL . 'js/kits.js', array( WPAUTOTERMS_JS_BASE ),
|
242 |
WPAUTOTERMS_VERSION, true );
|
243 |
}
|
244 |
}
|
includes/admin/page/compliancekits.php
CHANGED
@@ -66,7 +66,7 @@ class Compliancekits extends Settings_Base {
|
|
66 |
function enqueue_scripts() {
|
67 |
if ( ! $this->_box ) {
|
68 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_compliancekits_page', WPAUTOTERMS_PLUGIN_URL . 'js/compliancekits-page.js',
|
69 |
-
|
70 |
wp_localize_script( WPAUTOTERMS_SLUG . '_compliancekits_page', 'wpautotermsComplianceKits', array(
|
71 |
'boxData' => array_reduce( $this->_boxes, function ( $acc, Box $x ) {
|
72 |
$acc[ $x->enable_action_id() ] = array(
|
66 |
function enqueue_scripts() {
|
67 |
if ( ! $this->_box ) {
|
68 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_compliancekits_page', WPAUTOTERMS_PLUGIN_URL . 'js/compliancekits-page.js',
|
69 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
70 |
wp_localize_script( WPAUTOTERMS_SLUG . '_compliancekits_page', 'wpautotermsComplianceKits', array(
|
71 |
'boxData' => array_reduce( $this->_boxes, function ( $acc, Box $x ) {
|
72 |
$acc[ $x->enable_action_id() ] = array(
|
includes/admin/page/legacy-settings.php
CHANGED
@@ -132,7 +132,7 @@ class Legacy_Settings extends Settings_Base {
|
|
132 |
|
133 |
public function enqueue_scripts() {
|
134 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_legacy_on_off', WPAUTOTERMS_PLUGIN_URL . 'js/legacy-on-off.js',
|
135 |
-
|
136 |
wp_localize_script( WPAUTOTERMS_SLUG . '_legacy_on_off', 'wpautotermsLegacy', array(
|
137 |
'required' => __( 'required', WPAUTOTERMS_SLUG ),
|
138 |
'onOffNotice' => __( 'please, fill all required fields to enable', WPAUTOTERMS_SLUG ),
|
132 |
|
133 |
public function enqueue_scripts() {
|
134 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_legacy_on_off', WPAUTOTERMS_PLUGIN_URL . 'js/legacy-on-off.js',
|
135 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
136 |
wp_localize_script( WPAUTOTERMS_SLUG . '_legacy_on_off', 'wpautotermsLegacy', array(
|
137 |
'required' => __( 'required', WPAUTOTERMS_SLUG ),
|
138 |
'onOffNotice' => __( 'please, fill all required fields to enable', WPAUTOTERMS_SLUG ),
|
includes/admin/page/license-settings.php
CHANGED
@@ -43,7 +43,7 @@ class License_Settings extends Settings_Base {
|
|
43 |
|
44 |
public function enqueue_scripts() {
|
45 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_license_settings', WPAUTOTERMS_PLUGIN_URL . 'js/license-settings.js',
|
46 |
-
|
47 |
wp_localize_script( WPAUTOTERMS_SLUG . '_license_settings', 'wpautotermsLicenseSettings', array(
|
48 |
'nonce' => wp_create_nonce( Recheck_License::NAME ),
|
49 |
'action' => Recheck_License::NAME,
|
@@ -51,7 +51,7 @@ class License_Settings extends Settings_Base {
|
|
51 |
'status' => $this->_license->info()->status,
|
52 |
) );
|
53 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_license_transfer', WPAUTOTERMS_PLUGIN_URL . 'js/license-transfer.js',
|
54 |
-
|
55 |
wp_localize_script( WPAUTOTERMS_SLUG . '_license_transfer', 'wpautotermsLicenseTransfer', array(
|
56 |
'nonce' => wp_create_nonce( Transfer_License::NAME ),
|
57 |
'action' => Transfer_License::NAME,
|
43 |
|
44 |
public function enqueue_scripts() {
|
45 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_license_settings', WPAUTOTERMS_PLUGIN_URL . 'js/license-settings.js',
|
46 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
47 |
wp_localize_script( WPAUTOTERMS_SLUG . '_license_settings', 'wpautotermsLicenseSettings', array(
|
48 |
'nonce' => wp_create_nonce( Recheck_License::NAME ),
|
49 |
'action' => Recheck_License::NAME,
|
51 |
'status' => $this->_license->info()->status,
|
52 |
) );
|
53 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_license_transfer', WPAUTOTERMS_PLUGIN_URL . 'js/license-transfer.js',
|
54 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
55 |
wp_localize_script( WPAUTOTERMS_SLUG . '_license_transfer', 'wpautotermsLicenseTransfer', array(
|
56 |
'nonce' => wp_create_nonce( Transfer_License::NAME ),
|
57 |
'action' => Transfer_License::NAME,
|
includes/box/box.php
CHANGED
@@ -125,7 +125,7 @@ abstract class Box {
|
|
125 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror_hint', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/hint/show-hint.css' );
|
126 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror_matchesonscrollbar', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/matchesonscrollbar.css' );
|
127 |
|
128 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_css_hint', WPAUTOTERMS_PLUGIN_URL . 'js/css-hints.js',
|
129 |
WPAUTOTERMS_VERSION, true );
|
130 |
}
|
131 |
|
125 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror_hint', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/hint/show-hint.css' );
|
126 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror_matchesonscrollbar', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/matchesonscrollbar.css' );
|
127 |
|
128 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_css_hint', WPAUTOTERMS_PLUGIN_URL . 'js/css-hints.js', array( WPAUTOTERMS_JS_BASE ),
|
129 |
WPAUTOTERMS_VERSION, true );
|
130 |
}
|
131 |
|
includes/box/links-box.php
CHANGED
@@ -77,7 +77,7 @@ class Links_Box extends Box {
|
|
77 |
parent::enqueue_scripts();
|
78 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
79 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_links_box_page', WPAUTOTERMS_PLUGIN_URL . 'js/links-box-page.js',
|
80 |
-
|
81 |
}
|
82 |
|
83 |
protected function _page_args( \wpautoterms\admin\page\Base $page ) {
|
77 |
parent::enqueue_scripts();
|
78 |
wp_enqueue_script( 'jquery-ui-sortable' );
|
79 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_links_box_page', WPAUTOTERMS_PLUGIN_URL . 'js/links-box-page.js',
|
80 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
81 |
}
|
82 |
|
83 |
protected function _page_args( \wpautoterms\admin\page\Base $page ) {
|
includes/countries.php
CHANGED
@@ -96,12 +96,12 @@ abstract class Countries {
|
|
96 |
$lang = $ret[1];
|
97 |
$locale = $ret[0];
|
98 |
$locale = WPAUTOTERMS_PLUGIN_URL . substr( $locale, strlen( WPAUTOTERMS_PLUGIN_DIR ) );
|
99 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_countries_locale', $locale,
|
100 |
} else {
|
101 |
$lang = static::DEFAULT_LOCALE;
|
102 |
}
|
103 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_states_js', WPAUTOTERMS_PLUGIN_URL . 'js/data/states.js',
|
104 |
-
|
105 |
|
106 |
wp_localize_script( WPAUTOTERMS_SLUG . '_countries', 'wpautotermsCountry', array(
|
107 |
'country' => Options::get_option( Options::COUNTRY ),
|
96 |
$lang = $ret[1];
|
97 |
$locale = $ret[0];
|
98 |
$locale = WPAUTOTERMS_PLUGIN_URL . substr( $locale, strlen( WPAUTOTERMS_PLUGIN_DIR ) );
|
99 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_countries_locale', $locale, array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
100 |
} else {
|
101 |
$lang = static::DEFAULT_LOCALE;
|
102 |
}
|
103 |
wp_enqueue_script( WPAUTOTERMS_SLUG . '_states_js', WPAUTOTERMS_PLUGIN_URL . 'js/data/states.js',
|
104 |
+
array( WPAUTOTERMS_JS_BASE ), WPAUTOTERMS_VERSION, true );
|
105 |
|
106 |
wp_localize_script( WPAUTOTERMS_SLUG . '_countries', 'wpautotermsCountry', array(
|
107 |
'country' => Options::get_option( Options::COUNTRY ),
|
includes/frontend/notice/update-notice.php
CHANGED
@@ -26,6 +26,17 @@ class Update_Notice extends Base_Notice {
|
|
26 |
return $a;
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
protected function _print_box() {
|
30 |
\wpautoterms\print_template( 'update-notice', array(
|
31 |
'class_escaped' => esc_attr( static::BLOCK_CLASS ),
|
@@ -41,9 +52,8 @@ class Update_Notice extends Base_Notice {
|
|
41 |
$ret['data'] = $posts->transform();
|
42 |
$ret['ajaxurl'] = admin_url( 'admin-ajax.php' );
|
43 |
$ret['action'] = WPAUTOTERMS_SLUG . static::ACTION_NAME;
|
44 |
-
$ret['cache_detector_cookie'] =
|
45 |
$ret['cache_detected'] = 1;
|
46 |
-
setcookie( $ret['cache_detector_cookie'], 0, 0, COOKIEPATH, COOKIE_DOMAIN );
|
47 |
|
48 |
return $ret;
|
49 |
}
|
26 |
return $a;
|
27 |
}
|
28 |
|
29 |
+
public function init() {
|
30 |
+
parent::init();
|
31 |
+
if ( $this->_is_enabled() ) {
|
32 |
+
setcookie( static::cookie_name(), 0, 0, COOKIEPATH, COOKIE_DOMAIN );
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
public static function cookie_name() {
|
37 |
+
return WPAUTOTERMS_SLUG . '_cache_detector';
|
38 |
+
}
|
39 |
+
|
40 |
protected function _print_box() {
|
41 |
\wpautoterms\print_template( 'update-notice', array(
|
42 |
'class_escaped' => esc_attr( static::BLOCK_CLASS ),
|
52 |
$ret['data'] = $posts->transform();
|
53 |
$ret['ajaxurl'] = admin_url( 'admin-ajax.php' );
|
54 |
$ret['action'] = WPAUTOTERMS_SLUG . static::ACTION_NAME;
|
55 |
+
$ret['cache_detector_cookie'] = static::cookie_name();
|
56 |
$ret['cache_detected'] = 1;
|
|
|
57 |
|
58 |
return $ret;
|
59 |
}
|
templates/review-banner.php
CHANGED
@@ -12,4 +12,7 @@ esc_attr_e( 'Don\'t show this again', WPAUTOTERMS_SLUG ); ?>"
|
|
12 |
<?php esc_html_e( 'OK, I\'ll leave a review', WPAUTOTERMS_SLUG ); ?>
|
13 |
</a>
|
14 |
</p>
|
|
|
|
|
|
|
15 |
</div>
|
12 |
<?php esc_html_e( 'OK, I\'ll leave a review', WPAUTOTERMS_SLUG ); ?>
|
13 |
</a>
|
14 |
</p>
|
15 |
+
<p>
|
16 |
+
<?php esc_html_e( 'Errors? If you experience any errors or issues with WP AutoTerms, please contact us directly from WP AutoTerms > Help > Send us a message.', WPAUTOTERMS_SLUG ); ?>
|
17 |
+
</p>
|
18 |
</div>
|