Version Description
Download this release
Release Info
Developer | wpautoterms |
Plugin | Auto Terms of Service and Privacy Policy |
Version | 2.2.8 |
Comparing to | |
See all releases |
Code changes from version 2.2.7 to 2.2.8
- README.txt +10 -5
- auto-terms-of-service-privacy-policy.php +1 -1
- includes/admin/admin.php +9 -11
- includes/admin/form/legal-page.php +3 -3
- includes/admin/page/compliancekits.php +2 -7
- includes/admin/page/help.php +5 -6
- includes/admin/page/legacy-settings.php +1 -2
- includes/admin/page/license-settings.php +1 -2
- includes/box/box.php +14 -27
- includes/box/links-box.php +1 -2
- includes/countries.php +3 -5
- includes/cpt/cpt.php +12 -4
- includes/frontend.php +1 -1
- includes/frontend/notice/base-notice.php +1 -5
- js/post-new.js +2 -2
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gdpr, privacy policy, terms and conditions, cookie consent, terms of servi
|
|
4 |
Requires at least: 4.2
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPL version 3 or any later version
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -119,12 +119,17 @@ Installing the plugin is easy. Just follow these steps:
|
|
119 |
|
120 |
== Changelog ==
|
121 |
|
|
|
|
|
|
|
|
|
|
|
122 |
= Version 2.2.7 =
|
123 |
* Nov 4, 2019
|
124 |
-
* Feature: Compatibility support
|
125 |
-
* Feature:
|
126 |
-
* Feature: Allow for Legal Page slug to be editable from the
|
127 |
-
* Feature: Drag
|
128 |
* Fix: Update to Legal Pages notice incorrectly sets the cookie as `undefined`
|
129 |
* Fix: Bugfix for Legal Pages Widget
|
130 |
* Fix: Added National Capital Region (Metro Manila) for Philippines
|
4 |
Requires at least: 4.2
|
5 |
Tested up to: 5.3
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 2.2.8
|
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.2.8 =
|
123 |
+
* Nov 10, 2019
|
124 |
+
* Fix: Fixed use case when GDPR Privacy Policy couldn't be created
|
125 |
+
* Fix: Fix custom query category page interferance with other plugins
|
126 |
+
|
127 |
= Version 2.2.7 =
|
128 |
* Nov 4, 2019
|
129 |
+
* Feature: Compatibility support with various caching plugins for Cookie Notice and Update to Legal Pages kits
|
130 |
+
* Feature: Allow Post Excerpt for Legal Pages
|
131 |
+
* Feature: Allow for the Legal Page slug to be editable from the Edit page directly
|
132 |
+
* Feature: Drag-to-order links for the Links to Legal Pages kit
|
133 |
* Fix: Update to Legal Pages notice incorrectly sets the cookie as `undefined`
|
134 |
* Fix: Bugfix for Legal Pages Widget
|
135 |
* Fix: Added National Capital Region (Metro Manila) for Philippines
|
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.2.
|
9 |
License: GPLv2 or later
|
10 |
Text Domain: wpautoterms
|
11 |
Domain Path: /languages
|
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.2.8
|
9 |
License: GPLv2 or later
|
10 |
Text Domain: wpautoterms
|
11 |
Domain Path: /languages
|
includes/admin/admin.php
CHANGED
@@ -191,12 +191,10 @@ abstract class Admin {
|
|
191 |
}
|
192 |
}
|
193 |
if ( $page == 'edit.php' ) {
|
194 |
-
|
195 |
-
false, false, true );
|
196 |
}
|
197 |
if ( $page == 'post-new.php' && $post->post_status == 'auto-draft' ) {
|
198 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_post_new', WPAUTOTERMS_PLUGIN_URL . 'js/post-new.js',
|
199 |
-
false, false, true );
|
200 |
$hidden = array();
|
201 |
$dependencies = array();
|
202 |
/**
|
@@ -212,15 +210,15 @@ abstract class Admin {
|
|
212 |
'dependencies' => $dependencies,
|
213 |
'page_id' => $page_id
|
214 |
) );
|
215 |
-
wp_register_style( WPAUTOTERMS_SLUG . '_post_new_css', WPAUTOTERMS_PLUGIN_URL . 'css/post-new.css',
|
216 |
-
|
|
|
217 |
}
|
218 |
|
219 |
}
|
220 |
-
wp_register_style( WPAUTOTERMS_SLUG . '_admin_css', WPAUTOTERMS_PLUGIN_URL . 'css/admin.css',
|
221 |
-
wp_enqueue_style( WPAUTOTERMS_SLUG . '_admin_css' );
|
222 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_common', WPAUTOTERMS_PLUGIN_URL . 'js/common.js',
|
223 |
-
false, false, true );
|
224 |
$nonce = array();
|
225 |
/**
|
226 |
* @var Action_Base $action
|
@@ -234,7 +232,7 @@ abstract class Admin {
|
|
234 |
$prefix = WPAUTOTERMS_SLUG . '_';
|
235 |
if ( strncmp( $page, $prefix, strlen( $prefix ) ) === 0 ) {
|
236 |
Countries::enqueue_scripts();
|
237 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_admin', WPAUTOTERMS_PLUGIN_URL . 'js/kits.js', false,
|
238 |
}
|
239 |
}
|
240 |
}
|
191 |
}
|
192 |
}
|
193 |
if ( $page == 'edit.php' ) {
|
194 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_row_actions', WPAUTOTERMS_PLUGIN_URL . 'js/row-actions.js', false, WPAUTOTERMS_VERSION, true );
|
|
|
195 |
}
|
196 |
if ( $page == 'post-new.php' && $post->post_status == 'auto-draft' ) {
|
197 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_post_new', WPAUTOTERMS_PLUGIN_URL . 'js/post-new.js', false, WPAUTOTERMS_VERSION, true );
|
|
|
198 |
$hidden = array();
|
199 |
$dependencies = array();
|
200 |
/**
|
210 |
'dependencies' => $dependencies,
|
211 |
'page_id' => $page_id
|
212 |
) );
|
213 |
+
wp_register_style( WPAUTOTERMS_SLUG . '_post_new_css', WPAUTOTERMS_PLUGIN_URL . 'css/post-new.css',
|
214 |
+
WPAUTOTERMS_VERSION );
|
215 |
+
wp_enqueue_style( WPAUTOTERMS_SLUG . '_post_new_css', array(), WPAUTOTERMS_VERSION );
|
216 |
}
|
217 |
|
218 |
}
|
219 |
+
wp_register_style( WPAUTOTERMS_SLUG . '_admin_css', WPAUTOTERMS_PLUGIN_URL . 'css/admin.css', WPAUTOTERMS_VERSION );
|
220 |
+
wp_enqueue_style( WPAUTOTERMS_SLUG . '_admin_css', array(), WPAUTOTERMS_VERSION );
|
221 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_common', WPAUTOTERMS_PLUGIN_URL . 'js/common.js', false, WPAUTOTERMS_VERSION, true );
|
|
|
222 |
$nonce = array();
|
223 |
/**
|
224 |
* @var Action_Base $action
|
232 |
$prefix = WPAUTOTERMS_SLUG . '_';
|
233 |
if ( strncmp( $page, $prefix, strlen( $prefix ) ) === 0 ) {
|
234 |
Countries::enqueue_scripts();
|
235 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_admin', WPAUTOTERMS_PLUGIN_URL . 'js/kits.js', false, WPAUTOTERMS_VERSION, true );
|
236 |
}
|
237 |
}
|
238 |
}
|
includes/admin/form/legal-page.php
CHANGED
@@ -39,14 +39,14 @@ class Legal_Page {
|
|
39 |
return;
|
40 |
}
|
41 |
Section::init();
|
42 |
-
$this->_wizard = $this->_wizard_text()
|
|
|
43 |
$this->_hidden = Section::get_start_hidden();
|
44 |
$this->_dependencies = Section::get_dependencies();
|
45 |
}
|
46 |
|
47 |
protected function _wizard_text() {
|
48 |
-
return \wpautoterms\print_template( WPAUTOTERMS_LEGAL_PAGES_DIR . 'admin/' . $this->id(),
|
49 |
-
array(), true ) . \wpautoterms\print_template( WPAUTOTERMS_LEGAL_PAGES_DIR . 'common', array(), true );
|
50 |
}
|
51 |
|
52 |
public function wizard() {
|
39 |
return;
|
40 |
}
|
41 |
Section::init();
|
42 |
+
$this->_wizard = $this->_wizard_text() . \wpautoterms\print_template( WPAUTOTERMS_LEGAL_PAGES_DIR . 'common',
|
43 |
+
array(), true );
|
44 |
$this->_hidden = Section::get_start_hidden();
|
45 |
$this->_dependencies = Section::get_dependencies();
|
46 |
}
|
47 |
|
48 |
protected function _wizard_text() {
|
49 |
+
return \wpautoterms\print_template( WPAUTOTERMS_LEGAL_PAGES_DIR . 'admin/' . $this->id(), array(), true );
|
|
|
50 |
}
|
51 |
|
52 |
public function wizard() {
|
includes/admin/page/compliancekits.php
CHANGED
@@ -65,8 +65,7 @@ class Compliancekits extends Settings_Base {
|
|
65 |
|
66 |
function enqueue_scripts() {
|
67 |
if ( ! $this->_box ) {
|
68 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_compliancekits_page',
|
69 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/compliancekits-page.js', false, false, 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(
|
@@ -83,11 +82,7 @@ class Compliancekits extends Settings_Base {
|
|
83 |
) );
|
84 |
} else {
|
85 |
wp_enqueue_style( 'wp-color-picker' );
|
86 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_box_page',
|
87 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/box-page.js',
|
88 |
-
array( 'wp-color-picker' ),
|
89 |
-
false,
|
90 |
-
true );
|
91 |
$this->_box->enqueue_scripts();
|
92 |
}
|
93 |
}
|
65 |
|
66 |
function enqueue_scripts() {
|
67 |
if ( ! $this->_box ) {
|
68 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_compliancekits_page', WPAUTOTERMS_PLUGIN_URL . 'js/compliancekits-page.js', false, WPAUTOTERMS_VERSION, true );
|
|
|
69 |
wp_localize_script( WPAUTOTERMS_SLUG . '_compliancekits_page', 'wpautotermsComplianceKits', array(
|
70 |
'boxData' => array_reduce( $this->_boxes, function ( $acc, Box $x ) {
|
71 |
$acc[ $x->enable_action_id() ] = array(
|
82 |
) );
|
83 |
} else {
|
84 |
wp_enqueue_style( 'wp-color-picker' );
|
85 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_box_page', WPAUTOTERMS_PLUGIN_URL . 'js/box-page.js', array( 'wp-color-picker' ), WPAUTOTERMS_VERSION, true );
|
|
|
|
|
|
|
|
|
86 |
$this->_box->enqueue_scripts();
|
87 |
}
|
88 |
}
|
includes/admin/page/help.php
CHANGED
@@ -19,12 +19,11 @@ class Help extends Base {
|
|
19 |
public function enqueue_scripts() {
|
20 |
parent::enqueue_scripts();
|
21 |
wp_enqueue_script( 'jquery-ui-accordion' );
|
22 |
-
wp_enqueue_style( 'wpautoterms-page-help', WPAUTOTERMS_PLUGIN_URL . 'css/page-help.css' );
|
23 |
-
wp_enqueue_style( 'jquery-ui-structure', WPAUTOTERMS_PLUGIN_URL . 'css/jquery-ui.structure.css' );
|
24 |
-
wp_enqueue_style( 'jquery-ui-theme', WPAUTOTERMS_PLUGIN_URL . 'css/jquery-ui-themes/base/theme.css' );
|
25 |
-
wp_enqueue_style( 'jquery-ui-accordion', WPAUTOTERMS_PLUGIN_URL . 'css/jquery-ui-accordion.css', array( 'wp-jquery-ui-dialog' ) );
|
26 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_contact_form', WPAUTOTERMS_PLUGIN_URL . 'js/contact-form.js',
|
27 |
-
array( 'underscore', 'wp-util' ), false, true );
|
28 |
wp_localize_script( WPAUTOTERMS_SLUG . '_contact_form', 'wpautotermsContact', array(
|
29 |
'nonce' => $this->action->nonce(),
|
30 |
'id' => $this->action->name(),
|
19 |
public function enqueue_scripts() {
|
20 |
parent::enqueue_scripts();
|
21 |
wp_enqueue_script( 'jquery-ui-accordion' );
|
22 |
+
wp_enqueue_style( 'wpautoterms-page-help', WPAUTOTERMS_PLUGIN_URL . 'css/page-help.css', array(), WPAUTOTERMS_VERSION );
|
23 |
+
wp_enqueue_style( 'jquery-ui-structure', WPAUTOTERMS_PLUGIN_URL . 'css/jquery-ui.structure.css', array(), WPAUTOTERMS_VERSION );
|
24 |
+
wp_enqueue_style( 'jquery-ui-theme', WPAUTOTERMS_PLUGIN_URL . 'css/jquery-ui-themes/base/theme.css', array(), WPAUTOTERMS_VERSION );
|
25 |
+
wp_enqueue_style( 'jquery-ui-accordion', WPAUTOTERMS_PLUGIN_URL . 'css/jquery-ui-accordion.css', array( 'wp-jquery-ui-dialog' ), WPAUTOTERMS_VERSION );
|
26 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_contact_form', WPAUTOTERMS_PLUGIN_URL . 'js/contact-form.js', array( 'underscore', 'wp-util' ), WPAUTOTERMS_VERSION, true );
|
|
|
27 |
wp_localize_script( WPAUTOTERMS_SLUG . '_contact_form', 'wpautotermsContact', array(
|
28 |
'nonce' => $this->action->nonce(),
|
29 |
'id' => $this->action->name(),
|
includes/admin/page/legacy-settings.php
CHANGED
@@ -131,8 +131,7 @@ class Legacy_Settings extends Settings_Base {
|
|
131 |
}
|
132 |
|
133 |
public function enqueue_scripts() {
|
134 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_legacy_on_off', WPAUTOTERMS_PLUGIN_URL . 'js/legacy-on-off.js',
|
135 |
-
false, false, 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 ),
|
131 |
}
|
132 |
|
133 |
public function enqueue_scripts() {
|
134 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_legacy_on_off', WPAUTOTERMS_PLUGIN_URL . 'js/legacy-on-off.js', false, WPAUTOTERMS_VERSION, true );
|
|
|
135 |
wp_localize_script( WPAUTOTERMS_SLUG . '_legacy_on_off', 'wpautotermsLegacy', array(
|
136 |
'required' => __( 'required', WPAUTOTERMS_SLUG ),
|
137 |
'onOffNotice' => __( 'please, fill all required fields to enable', WPAUTOTERMS_SLUG ),
|
includes/admin/page/license-settings.php
CHANGED
@@ -39,8 +39,7 @@ class License_Settings extends Settings_Base {
|
|
39 |
}
|
40 |
|
41 |
public function enqueue_scripts() {
|
42 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_license_settings', WPAUTOTERMS_PLUGIN_URL . 'js/license-settings.js',
|
43 |
-
false, false, true );
|
44 |
wp_localize_script( WPAUTOTERMS_SLUG . '_license_settings', 'wpautotermsLicenseSettings', array(
|
45 |
'nonce' => wp_create_nonce( Recheck_License::NAME ),
|
46 |
'lastCheck' => $this->_license->timestamp(),
|
39 |
}
|
40 |
|
41 |
public function enqueue_scripts() {
|
42 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_license_settings', WPAUTOTERMS_PLUGIN_URL . 'js/license-settings.js', false, WPAUTOTERMS_VERSION, true );
|
|
|
43 |
wp_localize_script( WPAUTOTERMS_SLUG . '_license_settings', 'wpautotermsLicenseSettings', array(
|
44 |
'nonce' => wp_create_nonce( Recheck_License::NAME ),
|
45 |
'lastCheck' => $this->_license->timestamp(),
|
includes/box/box.php
CHANGED
@@ -110,35 +110,22 @@ abstract class Box {
|
|
110 |
}
|
111 |
|
112 |
public function enqueue_scripts() {
|
113 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror',
|
114 |
-
|
115 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '
|
116 |
-
|
117 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '
|
118 |
-
|
119 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '
|
120 |
-
|
121 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '
|
122 |
-
|
123 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '
|
124 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/edit/closebrackets.js', false, false, true );
|
125 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_active_line',
|
126 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/selection/active-line.js', false, false, true );
|
127 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_annotatescrollbar',
|
128 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/scroll/annotatescrollbar.js', false, false, true );
|
129 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_matchesonscrollbar',
|
130 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/matchesonscrollbar.js', false, false, true );
|
131 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_search_cursor',
|
132 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/searchcursor.js', false, false, true );
|
133 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_match_highlight',
|
134 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/match-highlighter.js', false, false, true );
|
135 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/codemirror.css' );
|
136 |
-
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror_hint',
|
137 |
-
|
138 |
-
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror_matchesonscrollbar',
|
139 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/matchesonscrollbar.css' );
|
140 |
|
141 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_css_hint', WPAUTOTERMS_PLUGIN_URL . 'js/css-hints.js', false,
|
142 |
}
|
143 |
|
144 |
public function _render_revert_message($option) {
|
110 |
}
|
111 |
|
112 |
public function enqueue_scripts() {
|
113 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/codemirror.js', false, false, true );
|
114 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_css', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/css.js', false, false, true );
|
115 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_hint', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/hint/show-hint.js', false, false, true );
|
116 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_css_hint', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/hint/css-hint.js', false, false, true );
|
117 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_matchbrackets', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/edit/matchbrackets.js', false, false, true );
|
118 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_closebrackets', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/edit/closebrackets.js', false, false, true );
|
119 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_active_line', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/selection/active-line.js', false, false, true );
|
120 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_annotatescrollbar', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/scroll/annotatescrollbar.js', false, false, true );
|
121 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_matchesonscrollbar', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/matchesonscrollbar.js', false, false, true );
|
122 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_search_cursor', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/searchcursor.js', false, false, true );
|
123 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_codemirror_match_highlight', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/addon/search/match-highlighter.js', false, false, true );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_codemirror', WPAUTOTERMS_PLUGIN_URL . 'js/codemirror-5.42.0/codemirror.css' );
|
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', false, WPAUTOTERMS_VERSION, true );
|
129 |
}
|
130 |
|
131 |
public function _render_revert_message($option) {
|
includes/box/links-box.php
CHANGED
@@ -76,8 +76,7 @@ class Links_Box extends Box {
|
|
76 |
public function enqueue_scripts() {
|
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 |
-
false, false, true );
|
81 |
}
|
82 |
|
83 |
protected function _page_args( \wpautoterms\admin\page\Base $page ) {
|
76 |
public function enqueue_scripts() {
|
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', false, WPAUTOTERMS_VERSION, true );
|
|
|
80 |
}
|
81 |
|
82 |
protected function _page_args( \wpautoterms\admin\page\Base $page ) {
|
includes/countries.php
CHANGED
@@ -89,19 +89,17 @@ abstract class Countries {
|
|
89 |
}
|
90 |
|
91 |
public static function enqueue_scripts() {
|
92 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_countries', WPAUTOTERMS_PLUGIN_URL . 'js/countries.js',
|
93 |
-
array( 'underscore', 'wp-util' ), false, true );
|
94 |
$ret = static::select_locale( static::LOCALE_PATH );
|
95 |
if ( $ret !== false ) {
|
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, false,
|
100 |
} else {
|
101 |
$lang = static::DEFAULT_LOCALE;
|
102 |
}
|
103 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_states_js', WPAUTOTERMS_PLUGIN_URL . 'js/data/states.js',
|
104 |
-
false, false, true );
|
105 |
|
106 |
wp_localize_script( WPAUTOTERMS_SLUG . '_countries', 'wpautotermsCountry', array(
|
107 |
'country' => Options::get_option( Options::COUNTRY ),
|
89 |
}
|
90 |
|
91 |
public static function enqueue_scripts() {
|
92 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_countries', WPAUTOTERMS_PLUGIN_URL . 'js/countries.js', array( 'underscore', 'wp-util' ), WPAUTOTERMS_VERSION, true );
|
|
|
93 |
$ret = static::select_locale( static::LOCALE_PATH );
|
94 |
if ( $ret !== false ) {
|
95 |
$lang = $ret[1];
|
96 |
$locale = $ret[0];
|
97 |
$locale = WPAUTOTERMS_PLUGIN_URL . substr( $locale, strlen( WPAUTOTERMS_PLUGIN_DIR ) );
|
98 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_countries_locale', $locale, false, WPAUTOTERMS_VERSION, true );
|
99 |
} else {
|
100 |
$lang = static::DEFAULT_LOCALE;
|
101 |
}
|
102 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_states_js', WPAUTOTERMS_PLUGIN_URL . 'js/data/states.js', false, WPAUTOTERMS_VERSION, true );
|
|
|
103 |
|
104 |
wp_localize_script( WPAUTOTERMS_SLUG . '_countries', 'wpautotermsCountry', array(
|
105 |
'country' => Options::get_option( Options::COUNTRY ),
|
includes/cpt/cpt.php
CHANGED
@@ -185,11 +185,19 @@ abstract class CPT {
|
|
185 |
}
|
186 |
|
187 |
public static function _extend_query_for_category( \WP_Query $query ) {
|
|
|
|
|
|
|
188 |
if ( is_category() && $query->is_archive() ) {
|
189 |
-
$query->
|
190 |
-
'
|
191 |
-
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
}
|
195 |
}
|
185 |
}
|
186 |
|
187 |
public static function _extend_query_for_category( \WP_Query $query ) {
|
188 |
+
if ( ! $query->is_main_query() ) {
|
189 |
+
return;
|
190 |
+
}
|
191 |
if ( is_category() && $query->is_archive() ) {
|
192 |
+
if ( isset( $query->query_vars['post_type'] ) ) {
|
193 |
+
$pt = $query->query_vars['post_type'];
|
194 |
+
} else {
|
195 |
+
$pt = array(
|
196 |
+
'post'
|
197 |
+
);
|
198 |
+
}
|
199 |
+
$pt[] = static::type();
|
200 |
+
$query->set( 'post_type', $pt );
|
201 |
}
|
202 |
}
|
203 |
}
|
includes/frontend.php
CHANGED
@@ -87,7 +87,7 @@ abstract class Frontend {
|
|
87 |
}
|
88 |
|
89 |
public static function enqueue_scripts() {
|
90 |
-
wp_register_style( WPAUTOTERMS_SLUG . '_css', WPAUTOTERMS_PLUGIN_URL . 'css/wpautoterms.css',
|
91 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_css' );
|
92 |
}
|
93 |
|
87 |
}
|
88 |
|
89 |
public static function enqueue_scripts() {
|
90 |
+
wp_register_style( WPAUTOTERMS_SLUG . '_css', WPAUTOTERMS_PLUGIN_URL . 'css/wpautoterms.css', WPAUTOTERMS_VERSION );
|
91 |
wp_enqueue_style( WPAUTOTERMS_SLUG . '_css' );
|
92 |
}
|
93 |
|
includes/frontend/notice/base-notice.php
CHANGED
@@ -50,11 +50,7 @@ abstract class Base_Notice {
|
|
50 |
}
|
51 |
|
52 |
public function enqueue_scripts() {
|
53 |
-
wp_enqueue_script( WPAUTOTERMS_SLUG . '_js',
|
54 |
-
WPAUTOTERMS_PLUGIN_URL . 'js/wpautoterms.js',
|
55 |
-
array( 'jquery', 'wp-util' ),
|
56 |
-
false,
|
57 |
-
true );
|
58 |
wp_localize_script( WPAUTOTERMS_SLUG . '_js', 'wpautoterms_js_' . $this->id(), $this->_localize_args() );
|
59 |
}
|
60 |
|
50 |
}
|
51 |
|
52 |
public function enqueue_scripts() {
|
53 |
+
wp_enqueue_script( WPAUTOTERMS_SLUG . '_js', WPAUTOTERMS_PLUGIN_URL . 'js/wpautoterms.js', array( 'jquery', 'wp-util' ), WPAUTOTERMS_VERSION, true );
|
|
|
|
|
|
|
|
|
54 |
wp_localize_script( WPAUTOTERMS_SLUG . '_js', 'wpautoterms_js_' . $this->id(), $this->_localize_args() );
|
55 |
}
|
56 |
|
js/post-new.js
CHANGED
@@ -66,7 +66,7 @@ jQuery(document).ready(function ($) {
|
|
66 |
}).join(",")).hide();
|
67 |
CONTAINER.find("input[type=radio],input[type=checkbox]").click(updateDependencies);
|
68 |
CONTAINER.find("input[type=radio]:visible").prop("required", true);
|
69 |
-
CONTAINER.find("input[type='submit']").click(function (e) {
|
70 |
CONTAINER.find("input[type=radio]").each(function () {
|
71 |
var t = $(this);
|
72 |
var v = t.val();
|
@@ -76,10 +76,10 @@ jQuery(document).ready(function ($) {
|
|
76 |
t.val("legal-page-radio-no");
|
77 |
}
|
78 |
});
|
79 |
-
$("input[name=post_title]:not([data-wpautoterms])").remove();
|
80 |
return true;
|
81 |
});
|
82 |
wpautotermsCountry.initCountrySelector();
|
83 |
updateDependencies();
|
|
|
84 |
}
|
85 |
});
|
66 |
}).join(",")).hide();
|
67 |
CONTAINER.find("input[type=radio],input[type=checkbox]").click(updateDependencies);
|
68 |
CONTAINER.find("input[type=radio]:visible").prop("required", true);
|
69 |
+
CONTAINER.find("input[type='submit'],button[type='submit']").click(function (e) {
|
70 |
CONTAINER.find("input[type=radio]").each(function () {
|
71 |
var t = $(this);
|
72 |
var v = t.val();
|
76 |
t.val("legal-page-radio-no");
|
77 |
}
|
78 |
});
|
|
|
79 |
return true;
|
80 |
});
|
81 |
wpautotermsCountry.initCountrySelector();
|
82 |
updateDependencies();
|
83 |
+
$("input[name=post_title]:not([data-wpautoterms])").remove();
|
84 |
}
|
85 |
});
|