Changeset 2241664
- Timestamp:
- 02/10/2020 10:54:25 AM (6 years ago)
- Location:
- wplegalpages
- Files:
-
- 92 added
- 13 edited
-
tags/2.3.9 (added)
-
tags/2.3.9/LICENSE.txt (added)
-
tags/2.3.9/README.md (added)
-
tags/2.3.9/admin (added)
-
tags/2.3.9/admin/admin-settings.php (added)
-
tags/2.3.9/admin/class-wp-legal-pages-admin.php (added)
-
tags/2.3.9/admin/create-page.php (added)
-
tags/2.3.9/admin/css (added)
-
tags/2.3.9/admin/css/bootstrap.min.css (added)
-
tags/2.3.9/admin/css/minicolor (added)
-
tags/2.3.9/admin/css/minicolor/images (added)
-
tags/2.3.9/admin/css/minicolor/images/circle.gif (added)
-
tags/2.3.9/admin/css/minicolor/images/gradient.png (added)
-
tags/2.3.9/admin/css/minicolor/images/line.gif (added)
-
tags/2.3.9/admin/css/minicolor/images/rainbow.png (added)
-
tags/2.3.9/admin/css/minicolor/images/trigger.png (added)
-
tags/2.3.9/admin/css/minicolor/jquery.min.css (added)
-
tags/2.3.9/admin/css/minicolor/jquery.miniColors.min.css (added)
-
tags/2.3.9/admin/css/wp-legal-pages-admin.css (added)
-
tags/2.3.9/admin/css/wp-legal-pages-admin.min.css (added)
-
tags/2.3.9/admin/fonts (added)
-
tags/2.3.9/admin/fonts/glyphicons-halflings-regular.eot (added)
-
tags/2.3.9/admin/fonts/glyphicons-halflings-regular.svg (added)
-
tags/2.3.9/admin/fonts/glyphicons-halflings-regular.ttf (added)
-
tags/2.3.9/admin/fonts/glyphicons-halflings-regular.woff (added)
-
tags/2.3.9/admin/fonts/glyphicons-halflings-regular.woff2 (added)
-
tags/2.3.9/admin/images (added)
-
tags/2.3.9/admin/images/pro-setup-guide.png (added)
-
tags/2.3.9/admin/images/steps-to-upgrade.png (added)
-
tags/2.3.9/admin/images/upgrade-to-pro.jpg (added)
-
tags/2.3.9/admin/images/wplegalpages-addon-promotion.jpg (added)
-
tags/2.3.9/admin/js (added)
-
tags/2.3.9/admin/js/jquery.cookie.min.js (added)
-
tags/2.3.9/admin/js/jquery.miniColors.min.js (added)
-
tags/2.3.9/admin/js/jquery.validate.min.js (added)
-
tags/2.3.9/admin/js/tooltip.js (added)
-
tags/2.3.9/admin/js/tooltip.min.js (added)
-
tags/2.3.9/admin/show-pages.php (added)
-
tags/2.3.9/admin/update-eu-cookies.php (added)
-
tags/2.3.9/analytics (added)
-
tags/2.3.9/analytics/assets (added)
-
tags/2.3.9/analytics/assets/css (added)
-
tags/2.3.9/analytics/assets/css/admin (added)
-
tags/2.3.9/analytics/assets/css/admin/ask-for-review.css (added)
-
tags/2.3.9/analytics/assets/css/admin/dialog-boxes.css (added)
-
tags/2.3.9/analytics/assets/js (added)
-
tags/2.3.9/analytics/assets/js/admin (added)
-
tags/2.3.9/analytics/assets/js/admin/ask-for-review.js (added)
-
tags/2.3.9/analytics/config.php (added)
-
tags/2.3.9/analytics/includes (added)
-
tags/2.3.9/analytics/includes/analytics-core-functions.php (added)
-
tags/2.3.9/analytics/includes/analytics-essential-functions.php (added)
-
tags/2.3.9/analytics/includes/class-analytics.php (added)
-
tags/2.3.9/analytics/includes/sdk (added)
-
tags/2.3.9/analytics/includes/sdk/Exceptions (added)
-
tags/2.3.9/analytics/includes/sdk/Exceptions/Exception.php (added)
-
tags/2.3.9/analytics/require.php (added)
-
tags/2.3.9/analytics/start.php (added)
-
tags/2.3.9/analytics/templates (added)
-
tags/2.3.9/analytics/templates/forms (added)
-
tags/2.3.9/analytics/templates/forms/deactivation (added)
-
tags/2.3.9/analytics/templates/forms/deactivation/form.php (added)
-
tags/2.3.9/analytics/templates/forms/review (added)
-
tags/2.3.9/analytics/templates/forms/review/form.php (added)
-
tags/2.3.9/icon.png (added)
-
tags/2.3.9/includes (added)
-
tags/2.3.9/includes/class-wp-legal-pages-activator.php (added)
-
tags/2.3.9/includes/class-wp-legal-pages-deactivator.php (added)
-
tags/2.3.9/includes/class-wp-legal-pages-delete.php (added)
-
tags/2.3.9/includes/class-wp-legal-pages-i18n.php (added)
-
tags/2.3.9/includes/class-wp-legal-pages-loader.php (added)
-
tags/2.3.9/includes/class-wp-legal-pages.php (added)
-
tags/2.3.9/languages (added)
-
tags/2.3.9/languages/wplegalpages.pot (added)
-
tags/2.3.9/public (added)
-
tags/2.3.9/public/class-wp-legal-pages-public.php (added)
-
tags/2.3.9/readme.txt (added)
-
tags/2.3.9/screenshot-1.png (added)
-
tags/2.3.9/screenshot-2.png (added)
-
tags/2.3.9/screenshot-3.png (added)
-
tags/2.3.9/screenshot-4.png (added)
-
tags/2.3.9/style.css (added)
-
tags/2.3.9/templates (added)
-
tags/2.3.9/templates/CCPA.html (added)
-
tags/2.3.9/templates/Terms-latest.html (added)
-
tags/2.3.9/templates/Terms-of-use-de.html (added)
-
tags/2.3.9/templates/Terms-of-use-fr.html (added)
-
tags/2.3.9/templates/Terms-of-use.html (added)
-
tags/2.3.9/templates/dmca.html (added)
-
tags/2.3.9/templates/privacy.html (added)
-
tags/2.3.9/wpeka.png (added)
-
tags/2.3.9/wplegalpages.php (added)
-
trunk/README.md (modified) (2 diffs)
-
trunk/admin/admin-settings.php (modified) (3 diffs)
-
trunk/admin/class-wp-legal-pages-admin.php (modified) (3 diffs)
-
trunk/icon.png (modified) (previous)
-
trunk/includes/class-wp-legal-pages-activator.php (modified) (6 diffs)
-
trunk/includes/class-wp-legal-pages-deactivator.php (modified) (1 diff)
-
trunk/includes/class-wp-legal-pages.php (modified) (2 diffs)
-
trunk/public/class-wp-legal-pages-public.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/Terms-latest.html (modified) (1 diff)
-
trunk/templates/Terms-of-use.html (modified) (1 diff)
-
trunk/templates/privacy.html (modified) (1 diff)
-
trunk/wplegalpages.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wplegalpages/trunk/README.md
r2236364 r2241664 9 9 **Requires PHP:** 5.0 10 10 **Tested up to:** 5.3.2 11 **Stable tag:** 2.3. 811 **Stable tag:** 2.3.9 12 12 13 13 Easily generate privacy policy pages on your WordPress website in a few clicks. Legal Pages for blogs, ecommerce and marketing websites. … … 171 171 172 172 ## Changelog ## 173 ### 2.3.9 ### 174 * Update: Templates and minor plugin updates. 175 173 176 ### 2.3.8 ### 174 177 * Feature: Added Terms of use templates for French and German Translations. -
wplegalpages/trunk/admin/admin-settings.php
r2215516 r2241664 58 58 'niche' => '', 59 59 'pagefooter' => '', 60 'generate' => ' 1',60 'generate' => '', 61 61 ); 62 62 … … 82 82 'address' => isset( $_POST['lp-address'] ) ? sanitize_text_field( wp_unslash( $_POST['lp-address'] ) ) : '', 83 83 'niche' => isset( $_POST['lp-niche'] ) ? sanitize_text_field( wp_unslash( $_POST['lp-niche'] ) ) : '', 84 'generate' => '1',84 'generate' => isset( $_POST['lp-generate'] ) ? sanitize_text_field( wp_unslash( $_POST['lp-generate'] ) ) : '', 85 85 ); 86 86 $lp_general = apply_filters( 'wplegalpages_save_settings', $lp_general, $_POST ); … … 139 139 </tr> 140 140 <?php do_action( 'wplegalpages_admin_settings', $lp_general ); ?> 141 <tr> 142 <td><b> Give Credit : </b></td> 143 <td><label class="switch"><input type="checkbox" <?php echo ( isset( $lp_general['generate'] ) && '1' === $lp_general['generate'] ) ? 'checked="checked"' : ''; ?> name="lp-generate" value="1" > 144 <div class="slider round"></div> 145 </label> 146 </td> 147 </tr> 141 148 <tr align="center"> 142 149 <td colspan="3"><input type="submit" name="lp-gsubmit" class="btn btn-primary" value="Save" /> <input type="submit" class="btn btn-primary" name="lp-greset" value="Reset" /></td> -
wplegalpages/trunk/admin/class-wp-legal-pages-admin.php
r2236364 r2241664 122 122 */ 123 123 public function wplegal_admin_init() { 124 $lp_db_updated = get_option( '_lp_db_updated' ); 125 $lp_terms_updated = get_option( '_lp_terms_updated' ); 126 $lp_terms_fr_de_updated = get_option( '_lp_terms_fr_de_updated' ); 127 if ( '1' !== $lp_db_updated || '1' !== $lp_terms_updated || '1' !== $lp_terms_fr_de_updated ) { 124 delete_option( '_lp_db_updated' ); 125 delete_option( '_lp_terms_updated' ); 126 delete_option( '_lp_terms_fr_de_updated' ); 127 $lp_templates_updated = get_option( '_lp_templates_updated' ); 128 if ( '1' !== $lp_templates_updated ) { 128 129 global $wpdb; 129 130 $legal_pages = new WP_Legal_Pages(); 130 131 require_once ABSPATH . 'wp-admin/includes/upgrade.php'; 131 $terms_latest = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . '/templates/Terms-of-use.html' ); 132 $terms_fr = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . '/templates/Terms-of-use-fr.html' ); 133 $terms_de = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . '/templates/Terms-of-use-de.html' ); 134 $ccpa = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . '/templates/CCPA.html' ); 135 132 133 $privacy = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/privacy.html' ); 134 $dmca = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/dmca.html' ); 135 $terms_latest = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/Terms-of-use.html' ); 136 $ccpa = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/CCPA.html' ); 137 $terms_fr = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/Terms-of-use-fr.html' ); 138 $terms_de = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/Terms-of-use-de.html' ); 139 140 $privacy_policy_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'Privacy Policy' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 141 if ( '0' === $privacy_policy_count ) { 142 $wpdb->insert( 143 $legal_pages->tablename, 144 array( 145 'title' => 'Privacy Policy', 146 'content' => $privacy, 147 'contentfor' => 'kCjTeYOZxB', 148 'is_active' => '1', 149 ), 150 array( '%s', '%s', '%s', '%d' ) 151 ); // db call ok; no-cache ok. 152 } else { 153 $wpdb->update( 154 $legal_pages->tablename, 155 array( 156 'is_active' => '1', 157 'content' => $privacy, 158 'contentfor' => 'kCjTeYOZxB', 159 ), 160 array( 'title' => 'Privacy Policy' ), 161 array( '%d', '%s', '%s' ), 162 array( '%s' ) 163 ); // db call ok; no-cache ok. 164 } 165 $dmca_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'DMCA' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 166 if ( '0' === $dmca_count ) { 167 $wpdb->insert( 168 $legal_pages->tablename, 169 array( 170 'title' => 'DMCA', 171 'content' => $dmca, 172 'contentfor' => '1r4X6y8tssz0j', 173 'is_active' => '1', 174 ), 175 array( '%s', '%s', '%s', '%d' ) 176 ); // db call ok; no-cache ok. 177 } else { 178 $wpdb->update( 179 $legal_pages->tablename, 180 array( 181 'is_active' => '1', 182 'content' => $dmca, 183 'contentfor' => 'r4X6y8tssz', 184 ), 185 array( 'title' => 'DMCA' ), 186 array( '%d', '%s', '%s' ), 187 array( '%s' ) 188 ); // db call ok; no-cache ok. 189 } 136 190 $terms_of_use_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'Terms of Use' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 137 191 if ( '0' === $terms_of_use_count ) { … … 141 195 'title' => 'Terms of Use', 142 196 'content' => $terms_latest, 143 'contentfor' => '1a2b3c4d5e6f7g8h9i', 144 'is_active' => '1', 145 ), 146 array( '%s', '%s', '%s', '%d' ) 147 ); 148 } else { 149 $wpdb->update( 150 $legal_pages->tablename, 151 array( 152 'is_active' => '1', 153 'content' => $terms_latest, 197 'contentfor' => 'n1bmPjZ6Xj', 198 'is_active' => '1', 199 ), 200 array( '%s', '%s', '%s', '%d' ) 201 ); 202 } else { 203 $wpdb->update( 204 $legal_pages->tablename, 205 array( 206 'is_active' => '1', 207 'content' => $terms_latest, 208 'contentfor' => 'n1bmPjZ6Xj', 154 209 ), 155 210 array( 'title' => 'Terms of Use' ), 211 array( '%d', '%s', '%s' ), 212 array( '%s' ) 213 ); // db call ok; no-cache ok. 214 } 215 $terms_of_use_fr_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'Terms of Use - FR' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 216 if ( '0' === $terms_of_use_fr_count ) { 217 $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 218 $legal_pages->tablename, 219 array( 220 'title' => 'Terms of Use - FR', 221 'content' => $terms_fr, 222 'contentfor' => 'MMFqUJfC3m', 223 'is_active' => '1', 224 ), 225 array( '%s', '%s', '%s', '%d' ) 226 ); 227 } else { 228 $wpdb->update( 229 $legal_pages->tablename, 230 array( 231 'is_active' => '1', 232 'content' => $terms_fr, 233 'contentfor' => 'MMFqUJfC3m', 234 ), 235 array( 'title' => 'Terms of Use - FR' ), 236 array( '%d', '%s', '%s' ), 237 array( '%s' ) 238 ); // db call ok; no-cache ok. 239 } 240 $terms_of_use_de_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'Terms of Use - DE' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 241 if ( '0' === $terms_of_use_de_count ) { 242 $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 243 $legal_pages->tablename, 244 array( 245 'title' => 'Terms of Use - DE', 246 'content' => $terms_de, 247 'contentfor' => 'fbBlC5Y4yZ', 248 'is_active' => '1', 249 ), 250 array( '%s', '%s', '%s', '%d' ) 251 ); 252 } else { 253 $wpdb->update( 254 $legal_pages->tablename, 255 array( 256 'is_active' => '1', 257 'content' => $terms_de, 258 'contentfor' => 'fbBlC5Y4yZ', 259 ), 260 array( 'title' => 'Terms of Use - DE' ), 156 261 array( '%d', '%s' ), 157 262 array( '%s' ) … … 213 318 'title' => 'CCPA - California Consumer Privacy Act', 214 319 'content' => $ccpa, 215 'contentfor' => '5a5b5c5d5e', 216 'is_active' => '1', 217 ), 218 array( '%s', '%s', '%s', '%d' ) 219 ); 220 } else { 221 $wpdb->update( 222 $legal_pages->tablename, 223 array( 224 'is_active' => '1', 225 'content' => $ccpa, 320 'contentfor' => 'JRevVk8nkP', 321 'is_active' => '1', 322 ), 323 array( '%s', '%s', '%s', '%d' ) 324 ); 325 } else { 326 $wpdb->update( 327 $legal_pages->tablename, 328 array( 329 'is_active' => '1', 330 'content' => $ccpa, 331 'contentfor' => 'JRevVk8nkP', 226 332 ), 227 333 array( 'title' => 'CCPA - California Consumer Privacy Act' ), 228 array( '%d', '%s' ), 229 array( '%s' ) 230 ); // db call ok; no-cache ok. 231 } 232 $lp_general = get_option( 'lp_general' ); 233 if ( isset( $lp_general ) && ! empty( $lp_general ) ) { 234 $lp_general['generate'] = '1'; 235 } else { 236 $lp_general = array(); 237 $lp_general['generate'] = '1'; 238 } 239 update_option( 'lp_general', $lp_general ); 240 update_option( '_lp_db_updated', true ); 241 update_option( '_lp_terms_updated', true ); 242 update_option( '_lp_terms_fr_de_updated', true ); 334 array( '%d', '%s', '%s' ), 335 array( '%s' ) 336 ); // db call ok; no-cache ok. 337 } 338 update_option( '_lp_templates_updated', true ); 243 339 } 244 245 340 } 246 341 -
wplegalpages/trunk/includes/class-wp-legal-pages-activator.php
r2236364 r2241664 73 73 $privacy = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/privacy.html' ); 74 74 $dmca = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/dmca.html' ); 75 $terms_latest = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . ' /templates/Terms-of-use.html' );76 $ccpa = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . ' /templates/CCPA.html' );77 $terms_fr = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . ' /templates/Terms-of-use-fr.html' );78 $terms_de = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . ' /templates/Terms-of-use-de.html' );75 $terms_latest = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/Terms-of-use.html' ); 76 $ccpa = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/CCPA.html' ); 77 $terms_fr = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/Terms-of-use-fr.html' ); 78 $terms_de = file_get_contents( plugin_dir_path( dirname( __FILE__ ) ) . 'templates/Terms-of-use-de.html' ); 79 79 80 80 $privacy_policy_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'Privacy Policy' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching … … 85 85 'title' => 'Privacy Policy', 86 86 'content' => $privacy, 87 'contentfor' => '1a2b3c4d5e6f7g8h9i', 88 'is_active' => '1', 89 ), 90 array( '%s', '%s', '%s', '%d' ) 91 ); // db call ok; no-cache ok. 92 } else { 93 $wpdb->update( 94 $legal_pages->tablename, 95 array( 96 'is_active' => '1', 97 'content' => $privacy, 87 'contentfor' => 'kCjTeYOZxB', 88 'is_active' => '1', 89 ), 90 array( '%s', '%s', '%s', '%d' ) 91 ); // db call ok; no-cache ok. 92 } else { 93 $wpdb->update( 94 $legal_pages->tablename, 95 array( 96 'is_active' => '1', 97 'content' => $privacy, 98 'contentfor' => 'kCjTeYOZxB', 98 99 ), 99 100 array( 'title' => 'Privacy Policy' ), 100 array( '%d', '%s' ),101 array( '%d', '%s', '%s' ), 101 102 array( '%s' ) 102 103 ); // db call ok; no-cache ok. … … 109 110 'title' => 'DMCA', 110 111 'content' => $dmca, 111 'contentfor' => '10j', 112 'is_active' => '1', 113 ), 114 array( '%s', '%s', '%s', '%d' ) 115 ); // db call ok; no-cache ok. 116 } else { 117 $wpdb->update( 118 $legal_pages->tablename, 119 array( 120 'is_active' => '1', 121 'content' => $dmca, 112 'contentfor' => '1r4X6y8tssz0j', 113 'is_active' => '1', 114 ), 115 array( '%s', '%s', '%s', '%d' ) 116 ); // db call ok; no-cache ok. 117 } else { 118 $wpdb->update( 119 $legal_pages->tablename, 120 array( 121 'is_active' => '1', 122 'content' => $dmca, 123 'contentfor' => 'r4X6y8tssz', 122 124 ), 123 125 array( 'title' => 'DMCA' ), 124 array( '%d', '%s' ),126 array( '%d', '%s', '%s' ), 125 127 array( '%s' ) 126 128 ); // db call ok; no-cache ok. … … 133 135 'title' => 'Terms of Use', 134 136 'content' => $terms_latest, 135 'contentfor' => '1a2b3c4d5e6f7g8h9i', 136 'is_active' => '1', 137 ), 138 array( '%s', '%s', '%s', '%d' ) 139 ); 140 } else { 141 $wpdb->update( 142 $legal_pages->tablename, 143 array( 144 'is_active' => '1', 145 'content' => $terms_latest, 137 'contentfor' => 'n1bmPjZ6Xj', 138 'is_active' => '1', 139 ), 140 array( '%s', '%s', '%s', '%d' ) 141 ); 142 } else { 143 $wpdb->update( 144 $legal_pages->tablename, 145 array( 146 'is_active' => '1', 147 'content' => $terms_latest, 148 'contentfor' => 'n1bmPjZ6Xj', 146 149 ), 147 150 array( 'title' => 'Terms of Use' ), 151 array( '%d', '%s', '%s' ), 152 array( '%s' ) 153 ); // db call ok; no-cache ok. 154 } 155 $terms_of_use_fr_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'Terms of Use - FR' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 156 if ( '0' === $terms_of_use_fr_count ) { 157 $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 158 $legal_pages->tablename, 159 array( 160 'title' => 'Terms of Use - FR', 161 'content' => $terms_fr, 162 'contentfor' => 'MMFqUJfC3m', 163 'is_active' => '1', 164 ), 165 array( '%s', '%s', '%s', '%d' ) 166 ); 167 } else { 168 $wpdb->update( 169 $legal_pages->tablename, 170 array( 171 'is_active' => '1', 172 'content' => $terms_fr, 173 'contentfor' => 'MMFqUJfC3m', 174 ), 175 array( 'title' => 'Terms of Use - FR' ), 176 array( '%d', '%s', '%s' ), 177 array( '%s' ) 178 ); // db call ok; no-cache ok. 179 } 180 $terms_of_use_de_count = $wpdb->get_var( $wpdb->prepare( 'SELECT COUNT(*) FROM ' . $legal_pages->tablename . ' WHERE title=%s', array( 'Terms of Use - DE' ) ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.DirectDatabaseQuery,WordPress.DB.DirectDatabaseQuery.NoCaching 181 if ( '0' === $terms_of_use_de_count ) { 182 $wpdb->insert( // phpcs:ignore WordPress.DB.DirectDatabaseQuery 183 $legal_pages->tablename, 184 array( 185 'title' => 'Terms of Use - DE', 186 'content' => $terms_de, 187 'contentfor' => 'fbBlC5Y4yZ', 188 'is_active' => '1', 189 ), 190 array( '%s', '%s', '%s', '%d' ) 191 ); 192 } else { 193 $wpdb->update( 194 $legal_pages->tablename, 195 array( 196 'is_active' => '1', 197 'content' => $terms_de, 198 'contentfor' => 'fbBlC5Y4yZ', 199 ), 200 array( 'title' => 'Terms of Use - DE' ), 148 201 array( '%d', '%s' ), 149 202 array( '%s' ) … … 205 258 'title' => 'CCPA - California Consumer Privacy Act', 206 259 'content' => $ccpa, 207 'contentfor' => '5a5b5c5d5e', 208 'is_active' => '1', 209 ), 210 array( '%s', '%s', '%s', '%d' ) 211 ); 212 } else { 213 $wpdb->update( 214 $legal_pages->tablename, 215 array( 216 'is_active' => '1', 217 'content' => $ccpa, 260 'contentfor' => 'JRevVk8nkP', 261 'is_active' => '1', 262 ), 263 array( '%s', '%s', '%s', '%d' ) 264 ); 265 } else { 266 $wpdb->update( 267 $legal_pages->tablename, 268 array( 269 'is_active' => '1', 270 'content' => $ccpa, 271 'contentfor' => 'JRevVk8nkP', 218 272 ), 219 273 array( 'title' => 'CCPA - California Consumer Privacy Act' ), 220 array( '%d', '%s' ), 221 array( '%s' ) 222 ); // db call ok; no-cache ok. 223 } 224 add_option( '_lp_db_updated', true ); 225 add_option( '_lp_terms_updated', true ); 226 add_option( '_lp_terms_fr_de_updated', true ); 274 array( '%d', '%s', '%s' ), 275 array( '%s' ) 276 ); // db call ok; no-cache ok. 277 } 278 279 delete_option( '_lp_db_updated' ); 280 delete_option( '_lp_terms_updated' ); 281 delete_option( '_lp_terms_fr_de_updated' ); 282 add_option( '_lp_templates_updated', true ); 227 283 add_option( 'lp_excludePage', 'true' ); 228 284 add_option( 'lp_general', '' ); … … 242 298 add_option( 'lp_eu_link_color', '#8f0410' ); 243 299 add_option( 'lp_eu_text_size', '12' ); 244 $lp_general = get_option( 'lp_general' );245 if ( isset( $lp_general ) && ! empty( $lp_general ) ) {246 $lp_general['generate'] = '1';247 } else {248 $lp_general = array();249 $lp_general['generate'] = '1';250 }251 update_option( 'lp_general', $lp_general );252 300 } 253 301 } -
wplegalpages/trunk/includes/class-wp-legal-pages-deactivator.php
r2215516 r2241664 41 41 public static function deactivate() { 42 42 delete_option( '_lp_db_updated' ); 43 delete_option( '_lp_terms_updated' ); 44 delete_option( '_lp_terms_fr_de_updated' ); 43 45 delete_option( 'lp_accept_terms' ); 44 46 } -
wplegalpages/trunk/includes/class-wp-legal-pages.php
r2236364 r2241664 86 86 global $table_prefix; 87 87 $this->plugin_name = 'wp-legal-pages'; 88 $this->version = '2.3. 8';88 $this->version = '2.3.9'; 89 89 $this->tablename = $table_prefix . 'legal_pages'; 90 90 $this->popuptable = $table_prefix . 'lp_popups'; … … 92 92 $this->load_dependencies(); 93 93 $this->set_locale(); 94 if ( is_admin() ) {94 if ( $this->is_request( 'admin' ) ) { 95 95 $this->define_admin_hooks(); 96 } elseif ( $this->is_request( 'frontend' ) ) { 97 $this->define_public_hooks(); 96 98 } 97 $this->define_public_hooks(); 99 } 100 101 /** 102 * What type of request is this? 103 * 104 * @since 2.3.9 105 * @param string $type admin, ajax, cron or frontend. 106 * @return bool 107 */ 108 private function is_request( $type ) { 109 switch ( $type ) { 110 case 'admin': 111 return is_admin(); 112 case 'ajax': 113 return defined( 'DOING_AJAX' ); 114 case 'cron': 115 return defined( 'DOING_CRON' ); 116 case 'frontend': 117 return ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) && ! defined( 'REST_REQUEST' ); 118 } 98 119 } 99 120 -
wplegalpages/trunk/public/class-wp-legal-pages-public.php
r2215516 r2241664 119 119 $is_legal = get_post_meta( $post->ID, 'is_legal', true ); 120 120 if ( isset( $is_legal ) && 'yes' === $is_legal ) { 121 $generate_text = "<div style='font-size: 0.7em;'><i> Policygenerated by <a href='https://club.wpeka.com/product/wplegalpages/?utm_source=generated-page&utm_medium=credit-link' rel='nofollow' target='_blank'>WP Legal Pages</a></i></div>";121 $generate_text = "<div style='font-size: 0.7em;'><i>" . get_the_title( $post ) . " generated by <a href='https://club.wpeka.com/product/wplegalpages/?utm_source=generated-page&utm_medium=credit-link' rel='nofollow' target='_blank'>WP Legal Pages</a></i></div>"; 122 122 $content = $content . $generate_text; 123 123 } -
wplegalpages/trunk/readme.txt
r2236364 r2241664 9 9 Requires PHP: 5.0 10 10 Tested up to: 5.3.2 11 Stable tag: 2.3. 811 Stable tag: 2.3.9 12 12 13 13 Easily generate privacy policy pages on your WordPress website in a few clicks. Legal Pages for blogs, ecommerce and marketing websites. … … 171 171 172 172 == Changelog == 173 = 2.3.9 = 174 * Update: Templates and minor plugin updates. 175 173 176 = 2.3.8 = 174 177 * Feature: Added Terms of use templates for French and German Translations. -
wplegalpages/trunk/templates/Terms-latest.html
r2215516 r2241664 1 <h2>TERMS OF USE</h2>2 1 <p>PLEASE READ! [Domain] REQUIRES CONSIDERATION FOR AND AS A CONDITION OF ALLOWING YOUR USE OF [Domain].</p> 3 2 <p>BY ACCESSING OR USING THIS SITE YOU REPRESENT THAT YOU HAVE THE FULL AUTHORITY TO ACT TO BIND YOURSELF, ANY THIRD PARTY, COMPANY, OR LEGAL ENTITY, AND THAT YOUR USE AND/OR INTERACTION, AS WELL AS CONTINUING TO USE OR INTERACT, WITH THE SITE CONSTITUTES YOUR HAVING READ AND AGREED TO THESE TERMS OF USE AS WELL AS OTHER AGREEMENTS THAT WE MAY POST ON THE SITE.</p> -
wplegalpages/trunk/templates/Terms-of-use.html
r2218628 r2241664 1 <h2>TERMS OF USE</h2>2 1 <p>These Terms govern your access to, usage of all content, Product and Services available at [Domain] website (the “Service”) operated by [Business Name] (“us”, “we”, or “our”).</p> 3 2 <p>Your access to our services are subject to your acceptance, without modification, of all of the terms and conditions contained herein and all other operating rules and policies published and that may be published from time to time by us.</p> -
wplegalpages/trunk/templates/privacy.html
r2165603 r2241664 1 <h2>Privacy Policy</h2>2 1 <p>Welcome to [Domain] (the "Site"). We understand that privacy online is important to users of our Site, especially when conducting business. This statement governs our privacy policies with respect to those users of the Site ("Visitors") who visit without transacting business and Visitors who register to transact business on the Site and make use of the various services offered by [Business Name] (collectively, "Services") ("Authorized Customers").</p> 3 2 <strong>"Personally Identifiable Information"</strong> -
wplegalpages/trunk/wplegalpages.php
r2236364 r2241664 5 5 * Description: WP Legal Pages is a simple 1 click legal page management plugin. You can quickly add in legal pages to your WordPress sites. 6 6 * Author: WPEka Club 7 * Version: 2.3. 87 * Version: 2.3.9 8 8 * Author URI: https://club.wpeka.com 9 9 * License: GPL2 … … 42 42 'product_name' => 'WP Legal Pages', 43 43 'module_type' => 'plugin', 44 'version' => '2.3. 8',44 'version' => '2.3.9', 45 45 'plugin_basename' => 'wplegalpages/wplegalpages.php', 46 46 'plugin_url' => WPL_LITE_PLUGIN_URL,
Note: See TracChangeset
for help on using the changeset viewer.