Changeset 1815615
- Timestamp:
- 02/05/2018 12:37:04 PM (8 years ago)
- Location:
- legal-pages/trunk
- Files:
-
- 8 edited
-
adl-legal-pages.php (modified) (2 diffs)
-
admin/assets/js/adl-lp-main.js (modified) (10 diffs)
-
includes/classes/ADL_LP_ajax_handler.php (modified) (3 diffs)
-
includes/classes/ADL_LP_general.php (modified) (1 diff)
-
includes/classes/ADL_LP_helper.php (modified) (2 diffs)
-
main.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
views/upgrade-features.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
legal-pages/trunk/adl-legal-pages.php
r1579911 r1815615 4 4 Plugin URI: https://adlplugins.com/plugin/legal-pages-pro 5 5 Description: A very useful plugin to generate legal pages for your websites/ business. It is simple, easy and elegant to use. It comes with ready-made templates which gives you even better experience creating legal pages with ease. You can customize the page template too. 6 Version: 1.0. 06 Version: 1.0.1 7 7 Author: ADL plugins 8 8 Author URI: https://adlplugins.com … … 30 30 31 31 // Make sure we don't expose any info if called directly 32 if (!defined('ADL_LP_ALERT_MSG')) define( 'ADL_LP_ALERT_MSG', __( 'You should not access this file directly.!', 'adl-legal-pages' ) ); 33 if ( !defined('ABSPATH') ) die( ADL_LP_ALERT_MSG);32 33 defined('ABSPATH') || die( 'Cheating? Direct access is not allowed !!!' ); 34 34 if ( !defined('ADL_LP_BASE') ) { define('ADL_LP_BASE', plugin_basename( __FILE__ )); } 35 35 -
legal-pages/trunk/admin/assets/js/adl-lp-main.js
r1579911 r1815615 1 1 (function($){ 2 2 // for making any tab as default tab for testing and working nicely after refresh. 3 // setTimeout(function () {4 // $('a[href="#editTemplates"]').trigger('click');5 // }, 200);6 7 3 // send user to the right tab based on the query string or url 8 4 const QS = window.location.search; … … 37 33 $(".btn-pref .btn").click(function () { 38 34 $(".btn-pref .btn").removeClass("btn-primary").addClass("btn-default"); 39 // $(".tab").addClass("active"); // instead of this do the below40 35 $(this).removeClass("btn-default").addClass("btn-primary"); 41 36 }); … … 64 59 }else{ 65 60 autoCLoseMessage('Error: Something went wrong. <span id="adl_close_it">X</span>', 2000); 66 // for debugging only: add this : <pre>'+data+'</pre> below67 // $('<div class="notice notice-error is-dismissible" id="successResult"><p>Error: Something went wrong.<pre>'+data+'</pre></p></div>').insertAfter(form);68 69 61 } 70 62 }); … … 96 88 autoCLoseMessage('Success: Data has been reset. <span id="adl_close_it">X</span>', 3000); 97 89 }else{ 98 // for debugging only: add this : <pre>'+data+'</pre> below99 90 $('<div class="notice notice-error is-dismissible" id="successResult"><p>Error: Something went wrong</p><pre>'+data+'</pre></div>').insertAfter(form); 100 91 … … 123 114 // get submitted from data and serialize them and send them to the ajax handler 124 115 125 //var iconBindingElement = jQuery('#adl_ajax_loader');126 116 adlAjaxHandler( form, 'social_info_handler', formData, function(data){ 127 117 … … 160 150 autoCLoseMessage('Success: Data saved. <span id="adl_close_it">X</span>', 2000); 161 151 }else{ 162 // for debugging only: add this : <pre>'+data+'</pre> below163 152 $('<div class="notice notice-error is-dismissible" id="successResult"><p>Error: Something went wrong</p><pre>'+data+'</pre></div>').insertAfter(form); 164 153 … … 180 169 $("#successResult").remove(); 181 170 // get submitted from data and serialize them and send them to the ajax handler 182 183 //var iconBindingElement = jQuery('#adl_ajax_loader');184 171 adlAjaxHandler( form, 'misc_info_handler', formData, function(data){ 185 186 172 if(data === 'success') { 187 173 autoCLoseMessage('Success: Data saved. <span id="adl_close_it">X</span>', 2000) 188 174 }else{ 189 // for debugging only: add this : <pre>'+data+'</pre> below190 175 $('<div class="notice notice-error is-dismissible" id="successResult"><p>Error: Something went wrong.<pre>'+data+'</pre></p></div>').insertAfter(form); 191 176 … … 225 210 autoCLoseMessage('Template list updated successfully. <span id="adl_close_it">X</span>', 2000); 226 211 chooseTemplate.html('<h3>Choose a Template</h3>'+data); 227 // $('<div class="notice notice-success is-dismissible" id="successResult"><p>Success: Data saved.</p></div>').html(chooseTemplate); 228 //chooseTemplate.replaceWith('<div class="notice notice-success is-dismissible" id="successResult"><p>Success: Data saved.</p></div>'); 229 }else{ 230 // for debugging only: add this : <pre>'+data+'</pre> below 231 // $('<div class="notice notice-error is-dismissible" id="successResult">'+data+'<p>Error: Something went wrong.</p></div>').html(chooseTemplate); 232 //chooseTemplate.html('<div class="notice notice-error is-dismissible" id="successResult">'+data+'<p>Error: Something went wrong.</p></div>'); 212 213 }else{ 233 214 chooseTemplate.html(''); 234 215 autoCLoseMessage('<p class="notice notice-error">ERROR: something went wrong</p> <span id="adl_close_it"></span>', 3000); … … 238 219 }); 239 220 240 // alert('The option with value ' + $(this).val() );241 //Vanilla JS alternative242 // alert(this.options[this.selectedIndex].value);243 // alert(this.options[this.selectedIndex].textContent);244 221 }); 245 222 … … 295 272 if(jsn){ 296 273 var parsedData = JSON.parse(data); // parsed JSON Object retuned from the database. 297 // lp_title.val(parsedData[0]); // set title value 298 // tinyMCE.activeEditor.setContent(parsedData[1]); // set tinyMCE content 299 // console.dir(parsedData); 274 300 275 301 276 } 302 277 const msg = 'Page Created Successfully. You can view and edit page as normal page under WordPress Pages menu</br>'+parsedData[0] +' || ' +parsedData[1]+'<span id="adl_close_it">X</span>'; 303 278 autoCLoseMessage(msg, 8000); 304 // $(msg).insertBefore(cbtn);305 // for debugging uncomment the line below. and see what is returned by the server. and it is best to var_dump() on the server side script to see what is received by the server.306 // $('<div class="notice notice-error is-dismissible" id="successResult"><p>Error: Something went wrong.<pre>'+data+'</pre></p></div>').insertAfter(cbtn);307 308 279 309 280 } else { -
legal-pages/trunk/includes/classes/ADL_LP_ajax_handler.php
r1579911 r1815615 1 1 <?php 2 if ( ! defined('ABSPATH') ) { die( ADL_LP_ALERT_MSG); }2 if ( ! defined('ABSPATH') ) { die( 'Cheating? Direct access is not allowed !!!' ); } 3 3 4 4 if(!class_exists('ADL_LP_ajax_handler')): … … 29 29 add_action( 'wp_ajax_deleteLegalTemplate', array($this, 'deleteLegalTemplate')); 30 30 31 31 32 } 32 33 … … 65 66 public function addNewLegalTemplate() { 66 67 global $ADL_LP, $wpdb; 67 var_dump($_POST);68 68 if($ADL_LP->verifyNonce()) { 69 69 $lp_title = ( !empty($_POST['lp_title']) ) ? sanitize_text_field($_POST['lp_title']) : ''; -
legal-pages/trunk/includes/classes/ADL_LP_general.php
r1579911 r1815615 1 1 <?php 2 if ( ! defined('ABSPATH') ) { die( ADL_LP_ALERT_MSG); }2 if ( ! defined('ABSPATH') ) { die( 'Cheating? Direct access is not allowed !!!' ); } 3 3 if(!class_exists('ADL_LP_general')): 4 4 class ADL_LP_general { -
legal-pages/trunk/includes/classes/ADL_LP_helper.php
r1579911 r1815615 1 1 <?php 2 2 3 if ( ! defined('ABSPATH') ) { die( ADL_LP_ALERT_MSG); }3 if ( ! defined('ABSPATH') ) { die( 'Cheating? Direct access is not allowed !!!' ); } 4 4 5 5 if( !class_exists( 'ADL_LP_helper' ) ) : … … 46 46 <div class="error"> <p> 47 47 <?php 48 echo ADL_LP_PLUGIN_NAME.' requires minimum PHP 5.4 to function properly. Please upgrade PHP version. The Plugin has been auto-deactivated.. You have PHP version '.PHP_VERSION;48 printf(esc_html__('%s requires minimum PHP 5.4 to function properly. Please upgrade PHP version. The Plugin has been auto-deactivated.. You have PHP version %d', ADL_LP_TEXTDOMAIN), ADL_LP_PLUGIN_NAME, PHP_VERSION); 49 49 ?> 50 50 </p></div> -
legal-pages/trunk/main.php
r1579911 r1815615 1 1 <?php 2 if ( ! defined('ABSPATH') ) { die( ADL_LP_ALERT_MSG); } // die if the page is accessed directly2 if ( ! defined('ABSPATH') ) { die( 'Cheating? Direct access is not allowed !!!' ); } // die if the page is accessed directly 3 3 4 4 if ( ! class_exists('Adl_Legal_Pages') ) : … … 15 15 global $wpdb; 16 16 // Don't let the class/plugin instantiate outside of WordPress 17 if ( ! defined('ABSPATH') ) { die( ADL_LP_ALERT_MSG); }17 if ( ! defined('ABSPATH') ) { die( 'Cheating? Direct access is not allowed !!!' ); } 18 18 $this->template_table_name = $wpdb->prefix .'adl_lp_templates'; 19 19 // load all classes and its object -
legal-pages/trunk/readme.txt
r1732717 r1815615 3 3 Tags: legal, legal page, legal pages, legal documents, law, legal page template, privacy policy, refund-policy, digital goods refund policy, linking policy, external links policy, cookie privacy policy, facebook policy, coppa - children’s online privacy policy, advertising disclosures, confidentiality disclosure, testimonials disclosure, affiliate disclosure, disclaimer, earnings disclaimer, medical disclaimer, terms of use, forced agreement to the terms, amazon affiliate, dmca, antispam, double dart cookie, about us, california privacy rights, end-user license agreement 4 4 Requires at least: 4.0 5 Tested up to: 4. 8.26 Stable tag: 1.0 5 Tested up to: 4.9.2 6 Stable tag: 1.0.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 95 95 == Changelog == 96 96 97 = 1.0.1 = 98 * Removed dumped testing data when creating legal page template 99 * Improved Translation 97 100 = 1.0 = 98 101 * Initial release -
legal-pages/trunk/views/upgrade-features.php
r1579911 r1815615 2 2 <h3>Main Features of the Pro Version</h3> 3 3 <ul> 4 <li>< li><span class="dashicons dashicons-yes"></span>4 <li><span class="dashicons dashicons-yes"></span> 5 5 25 Legal Page Templates. 6 6 </li> 7 <li><li><span class="dashicons dashicons-yes"></span> 7 8 <li><span class="dashicons dashicons-yes"></span> 8 9 Ability to show a very beautiful and customization EU-cookie agreement notice button. You can decide how to show the cookie agreement to the user. 9 10 </li> 10 <li><li><span class="dashicons dashicons-yes"></span> 11 12 <li><span class="dashicons dashicons-yes"></span> 11 13 You can show cookie agreement bar on any where in the page. 12 14 </li> 13 <li><li><span class="dashicons dashicons-yes"></span> 15 16 <li><span class="dashicons dashicons-yes"></span> 14 17 You can also show cookie notice as a pop ups. 15 18 </li> 16 <li><li><span class="dashicons dashicons-yes"></span> 19 <li><span class="dashicons dashicons-yes"></span> 20 You can customize the style and texts of cookie as much as you want. 21 </li> 22 23 24 <li><span class="dashicons dashicons-yes"></span> 17 25 Ability to show any types of popups with legal message to the user. 18 26 </li> 19 <li><li><span class="dashicons dashicons-yes"></span> 27 28 <li><span class="dashicons dashicons-yes"></span> 20 29 Ability to lock down any content, page, posts using this plugin and allow user to view a certain content or page or post after they accept any terms and conditions you made. 21 30 </li> 22 <li><li><span class="dashicons dashicons-yes"></span> 31 32 <li><span class="dashicons dashicons-yes"></span> 23 33 And many more. 24 34 </li>
Note: See TracChangeset
for help on using the changeset viewer.