Changeset 3174179
- Timestamp:
- 10/23/2024 09:34:30 AM (15 months ago)
- Location:
- platformly/trunk
- Files:
-
- 13 edited
-
inc/pages/ply.events.php (modified) (1 diff)
-
inc/pages/ply.optins.page.php (modified) (5 diffs)
-
inc/pages/ply.pages.php (modified) (5 diffs)
-
inc/pages/ply.settings.php (modified) (3 diffs)
-
inc/ply.btn.php (modified) (1 diff)
-
inc/ply.functions.php (modified) (1 diff)
-
js/events.js (modified) (2 diffs)
-
js/optins.js (modified) (1 diff)
-
js/pages.js (modified) (1 diff)
-
js/ply_add_link_functions.js (modified) (4 diffs)
-
js/settings.js (modified) (4 diffs)
-
platformly.php (modified) (17 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
platformly/trunk/inc/pages/ply.events.php
r2208564 r3174179 38 38 <a href="javascript:;" id="btnPlyRefreshEvents" class="btn btn-default" title="Refresh">↻</a> 39 39 <hr> 40 <table id="plyEventsTable" class="table" >40 <table id="plyEventsTable" class="table" data-nonce="<?php echo wp_create_nonce("ply_load_data"); ?>"> 41 41 <thead> 42 42 <tr> -
platformly/trunk/inc/pages/ply.optins.page.php
r1998157 r3174179 8 8 9 9 if(isset($_POST['saveOptin'])){ 10 check_admin_referer('ply_options_save'); 10 11 $res = ply_update_optin_info(); 11 12 if($res == '1') … … 16 17 17 18 if(isset($_POST['removeOptin'])){ 19 check_admin_referer('ply_options_remove'); 18 20 $res = ply_remove_optin_info(); 19 21 if($res == '1') … … 36 38 $editOptin = false; 37 39 if(isset($_POST['editOptin'])){ 40 check_admin_referer('ply_options_edit'); 38 41 $editOptin = ply_get_optin_by_id((int)$_POST['editOptin']); 39 42 } … … 95 98 <h4 style='display: inline-block; margin-right: 5px'>Please select optin</h4><a target="_blank" href="<?php echo $user['main_url'] ?>/?page=lead_capture.forms" class="btn btn-default">View Optins</a><hr style="margin-top: 5px !important"> 96 99 </div> 97 <div class="col-md-12" id="tdOptins" >100 <div class="col-md-12" id="tdOptins" data-nonce="<?php echo wp_create_nonce("ply_load_data"); ?>"> 98 101 <label>Select project first</label> 99 102 </div> … … 364 367 <input type="text" name="formOptinBlurBack" id="formOptinBlurBack" value="" /> 365 368 <input type="hidden" name='formOptinWherePages' id='formOptinWherePages' value=''/> 366 369 <?php wp_nonce_field('ply_options_save'); ?> 367 370 <input type="hidden" name="saveOptin" value="1" /> 368 371 </form> 369 372 370 373 <form id="optinRemoveForm" style="display:none" method="post" action=""> 374 <?php wp_nonce_field('ply_options_remove'); ?> 371 375 <input type="hidden" name="removeOptin" id="removeOptin" value="" /> 372 376 </form> 373 377 374 378 <form id="optinEditForm" style="display:none" method="post" action=""> 379 <?php wp_nonce_field('ply_options_edit'); ?> 375 380 <input type="hidden" name="editOptin" id="editOptin" value="" /> 376 381 </form> -
platformly/trunk/inc/pages/ply.pages.php
r2585949 r3174179 13 13 14 14 if(isset($_POST['savePage'])){ 15 check_admin_referer('ply_pages_save'); 15 16 $res = ply_update_page_info(); 16 17 if($res == '1'){ … … 22 23 23 24 if(isset($_POST['removePage'])){ 25 check_admin_referer('ply_pages_remove'); 24 26 $res = ply_remove_page_info(); 25 27 if($res == '1'){ … … 43 45 $editPage = false; 44 46 if(isset($_POST['editPage'])){ 47 check_admin_referer('ply_pages_edit'); 45 48 $editPage = ply_get_page_by_id((int)$_POST['editPage']); 46 49 } … … 101 104 <h4 style='display: inline-block; margin-right: 5px'>Please select page</h4><a target="_blank" href="<?php echo $user['main_url'] ?>/?page=lead_capture.pages" class="btn btn-default">View Pages</a><hr style="margin-top: 5px !important"> 102 105 </div> 103 <div class="col-md-12" id="tdPages" >106 <div class="col-md-12" id="tdPages" data-nonce="<?php echo wp_create_nonce("ply_load_data"); ?>"> 104 107 <label>Select project first</label> 105 108 </div> … … 242 245 <input type="text" name="formPageSlug" id="formPageSlug" value=""/> 243 246 <input type="text" name="formPagePingUpdateServices" id="formPagePingUpdateServices" value=""/> 247 <?php wp_nonce_field('ply_pages_save'); ?> 244 248 <input type="hidden" name="savePage" value="1" /> 245 249 </form> 246 250 247 251 <form id="pageRemoveForm" style="display:none" method="post" action=""> 252 <?php wp_nonce_field('ply_pages_remove'); ?> 248 253 <input type="hidden" name="removePage" id="removePage" value="" /> 249 254 </form> 250 255 251 256 <form id="pageEditForm" style="display:none" method="post" action=""> 257 <?php wp_nonce_field('ply_pages_edit'); ?> 252 258 <input type="hidden" name="editPage" id="editPage" value="" /> 253 259 </form> -
platformly/trunk/inc/pages/ply.settings.php
r2293315 r3174179 4 4 5 5 if(isset($_POST['plugin_key'])){ 6 check_admin_referer('ply_settings'); 6 7 $res = ply_update_plugin_key(); 7 8 if($res == '1') … … 54 55 <label for="plugin_key"></label> 55 56 <input type="text" name="plugin_key" id="plugin_key" style="width:500px;" value="<?php echo $pkey ?>" /> 57 <?php wp_nonce_field( 'ply_settings' ); ?> 56 58 <input type="submit" name="button" id="button" class="button" value="Save" /><br /> 57 59 <span style="font-size:12px;"> You will need to add your API Key from your Platform.ly account. <br>You can find the API section if you click on your name in the upper right corner on Platform.ly and then on 'Api Keys'.</span> … … 112 114 <?php endforeach; ?> 113 115 </select> 116 <input type="hidden" value="<?php echo wp_create_nonce("ply_save_project_code"); ?>" id="projectCodeNonce"> 114 117 <input id="btnPlySaveProjectCode" class="button" type="button" value="Save"/> 115 118 <div id="msgPlyGetProgectCodeError"></div> -
platformly/trunk/inc/ply.btn.php
r2293315 r3174179 6 6 $projectCode = ply_get_project_code(); 7 7 ?> 8 <div id="ply-add-link-dialog" class="hidden" style="max-width:600px;max-height: 500px;" >8 <div id="ply-add-link-dialog" class="hidden" style="max-width:600px;max-height: 500px;" data-nonce="<?php echo wp_create_nonce("ply_load_data"); ?>"> 9 9 <div>Loading . . .</div> 10 10 </div> -
platformly/trunk/inc/ply.functions.php
r2694710 r3174179 46 46 47 47 function ply_update_plugin_key(){ 48 $code = wp_strip_all_tags($_POST['plugin_key'], true); 49 update_option('ply_plugin_key', $code); 50 51 return '1'; 48 $code = sanitize_text_field($_POST['plugin_key']); 49 $res = preg_match('/^[a-zA-Z0-9]{32}$/', $code); 50 if($res){ 51 $check = wp_remote_get(PLATFORMLY_URL . "/plugin/plugin.check.key.php?plugin_key=" . $code); 52 $check = wp_remote_retrieve_body($check); 53 if($check){ 54 $check = json_decode($check, true); 55 if($check['status'] != 'not_found'){ 56 update_option('ply_plugin_key', $code); 57 return '1'; 58 } 59 } 60 } 61 return 'The API key you added is not correct.'; 52 62 } 53 63 -
platformly/trunk/js/events.js
r1998157 r3174179 4 4 } 5 5 jQuery('#plyEventsTable tbody').html('<tr><td colspan="6">Loading...</td></tr>'); 6 jQuery.post(ajaxurl, {'action': 'ply_load_events','projectId': projectId }, function(response){6 jQuery.post(ajaxurl, {'action': 'ply_load_events','projectId': projectId, '_wpnonce': jQuery('#plyEventsTable').data('nonce')}, function(response){ 7 7 data = JSON.parse(response); 8 8 if(data.status!='success'){ … … 84 84 $('#plyProjectSelect').click(function(){ 85 85 var projectId = $(this).val(); 86 /*$('#msgPlyGetProgectCodeActivated').hide();87 $('#plyProjectCodeMsgNotExist').hide();88 $.post(ajaxurl, {'action': 'ply_check_project_code','projectId': projectId}, function(response){89 if(response){90 $('#msgPlyGetProgectCodeActivated span').text($('#plyProjectSelect option:selected').text());91 $('#msgPlyGetProgectCodeActivated').show();92 }else{93 $('#plyProjectCodeMsgNotExist').show();94 }95 });*/96 86 loadEvents(projectId); 97 87 }); -
platformly/trunk/js/optins.js
r1998157 r3174179 5 5 var data = { 6 6 'action': 'ply_load_optins', 7 'projectId': projectId 7 'projectId': projectId, 8 '_wpnonce': jQuery('#tdOptins').data('nonce') 8 9 }; 9 10 -
platformly/trunk/js/pages.js
r2585949 r3174179 6 6 var data = { 7 7 'action': 'ply_load_pages', 8 'projectId': projectId 8 'projectId': projectId, 9 '_wpnonce': jQuery('#tdPages').data('nonce') 9 10 }; 10 11 -
platformly/trunk/js/ply_add_link_functions.js
r2293315 r3174179 5 5 function get_ply_tracking_links(){ 6 6 jQuery('#ply-add-link-dialog').html('<div>Loading . . .</div>'); 7 jQuery.post(ajaxurl, {action: 'ply_get_tracking_links' }, function(response){7 jQuery.post(ajaxurl, {action: 'ply_get_tracking_links', '_wpnonce': jQuery('#ply-add-link-dialog').data('nonce')}, function(response){ 8 8 jQuery('.ui-dialog-buttonpane button:contains("Add Link")').button().hide(); 9 9 var data = JSON.parse(response); … … 61 61 function load_trackingLinks_inDetails(id){ 62 62 jQuery('#ply-add-link-dialog').html('<div>Loading . . .</div>'); 63 jQuery.post(ajaxurl, {action: 'ply_get_tracking_links_details', id: id }, function(response){63 jQuery.post(ajaxurl, {action: 'ply_get_tracking_links_details', id: id, '_wpnonce': jQuery('#ply-add-link-dialog').data('nonce')}, function(response){ 64 64 var data = JSON.parse(response); 65 65 if(data.status=='success'){ … … 128 128 //ply-project-name 129 129 jQuery('#ply-add-link-dialog').html('<div>Loading . . .</div>'); 130 jQuery.post(ajaxurl, {'action': 'ply_get_projects' }, function(response){130 jQuery.post(ajaxurl, {'action': 'ply_get_projects', '_wpnonce': jQuery('#ply-add-link-dialog').data('nonce')}, function(response){ 131 131 var data = JSON.parse(response); 132 132 for(var key in data) { … … 149 149 jQuery('.ui-dialog-buttonpane button:contains("Copy Code")').button().hide(); 150 150 jQuery('#ply-add-link-dialog #ply-events-block').html('<div id="ply-default-event-msg">Loading...</div></div>'); 151 jQuery.post(ajaxurl, {'action': 'ply_load_events','projectId': projectId }, function(response){151 jQuery.post(ajaxurl, {'action': 'ply_load_events','projectId': projectId, '_wpnonce': jQuery('#ply-add-link-dialog').data('nonce')}, function(response){ 152 152 var data = JSON.parse(response); 153 153 if(data.status!='success'){ -
platformly/trunk/js/settings.js
r2293315 r3174179 13 13 $('#msgPlyGetProgectCodeActivated').hide(); 14 14 $('#plyLoadingProjectCode').show(); 15 $.post(ajaxurl, {'action': 'ply_save_project_code','projectId': projectId }, function(response){15 $.post(ajaxurl, {'action': 'ply_save_project_code','projectId': projectId, '_wpnonce': $('#projectCodeNonce').val()}, function(response){ 16 16 data = JSON.parse(response); 17 17 $('#plyLoadingProjectCode').hide(); … … 26 26 } 27 27 }); 28 /* $('#plyProjectSelect').change(function(){29 $('#msgPlyGetProgectCodeError').hide();30 $('#msgPlyGetProgectCodeActivated').hide();31 var projectId = $(this).val();32 $.post(ajaxurl, {'action': 'ply_check_project_code','projectId': projectId}, function(response){33 if(response){34 $('#msgPlyGetProgectCodeActivated span').text($('#plyProjectSelect option:selected').text());35 $('#msgPlyGetProgectCodeActivated').show();36 }else{37 38 }39 });40 }); */41 /*var prevVal;42 $('#plyProjectSelect').focus(function(){43 prevVal = $(this).val();44 }).change(function(){45 if($('#plyProjectCodeBlock').hasClass('ply-wc-project-code')){46 $(this).blur();47 if(!confirm('Changing the project will change the current project in Platform.ly WooCommerce plugin')){48 $(this).val(prevVal);49 return false;50 }51 }52 });*/53 28 $('#plyCheckboxSetProjectCode').change(function(){ 54 29 if($(this).prop('checked')){ … … 60 35 } 61 36 if(!$('#plyProjectCodeBlock').hasClass('ply-wc-project-code')){ 62 $.post(ajaxurl, {action: 'ply_project_code_include', includeCode: includeProjectCode }, function(response){});37 $.post(ajaxurl, {action: 'ply_project_code_include', includeCode: includeProjectCode, '_wpnonce': $('#projectCodeNonce').val()}, function(response){}); 63 38 } 64 39 }); … … 66 41 if(!$('#plyProjectCodeBlock').hasClass('ply-wc-project-code')) { 67 42 if (confirm('Are you sure you want to remove the project code?')) { 68 $.post(ajaxurl, {'action': 'ply_remove_project_code' }, function (response) {43 $.post(ajaxurl, {'action': 'ply_remove_project_code', '_wpnonce': $('#projectCodeNonce').val()}, function (response) { 69 44 $('#msgPlyGetProgectCodeActivated').hide(); 70 45 alert('Project code was removed.'); -
platformly/trunk/platformly.php
r3149131 r3174179 4 4 Plugin Name: Platform.ly Official 5 5 Description: Platform.ly plugin is the easiest way to setup your optins and pages that your created with Platform.ly. After building your optin or page with our interactive WYSIWYG builders, you can set them up to show on your site with just a couple of clicks. 6 Version: 1.1 36 Version: 1.14 7 7 Author: Platform.ly 8 8 Author URI: https://www.platform.ly/ … … 16 16 define("PLATFORMLY_URL", "https://pageserver.platform.ly"); 17 17 18 define('PLATFORMLY_PLUGIN_VERSION', '1.1 1');18 define('PLATFORMLY_PLUGIN_VERSION', '1.14'); 19 19 20 20 include plugin_dir_path(__FILE__) . '/inc/ply.functions.php'; … … 92 92 93 93 function ply_settings(){ 94 wp_enqueue_script('ply_optins_script', plugin_dir_url(__FILE__)."js/settings.js" );94 wp_enqueue_script('ply_optins_script', plugin_dir_url(__FILE__)."js/settings.js", array(),1); 95 95 include plugin_dir_path(__FILE__) . 'inc/pages/ply.settings.php'; 96 96 } … … 101 101 wp_enqueue_style('select2', plugin_dir_url(__FILE__)."css/select2.min.css"); 102 102 wp_enqueue_script('select2', plugin_dir_url(__FILE__)."js/select2.min.js"); 103 wp_enqueue_script('ply_optins_script', plugin_dir_url(__FILE__)."js/optins.js" );103 wp_enqueue_script('ply_optins_script', plugin_dir_url(__FILE__)."js/optins.js", array(),1); 104 104 include plugin_dir_path(__FILE__) . 'inc/pages/ply.optins.page.php'; 105 105 } … … 108 108 wp_enqueue_style('bootstrap_styles', plugin_dir_url(__FILE__)."css/bootstrap.min.css"); 109 109 wp_enqueue_style('bootstrap_theme_styles', plugin_dir_url(__FILE__)."css/bootstrap-theme.min.css"); 110 wp_enqueue_script('ply_pages_script', plugin_dir_url(__FILE__)."js/pages.js" );110 wp_enqueue_script('ply_pages_script', plugin_dir_url(__FILE__)."js/pages.js", array(),1); 111 111 include plugin_dir_path(__FILE__) . 'inc/pages/ply.pages.php'; 112 112 } … … 117 117 wp_enqueue_script('bootstrap_script', plugin_dir_url(__FILE__)."js/bootstrap.min.js"); 118 118 include plugin_dir_path(__FILE__) . 'inc/pages/ply.events.php'; 119 wp_enqueue_script('ply_events_script', plugin_dir_url(__FILE__)."js/events.js" );119 wp_enqueue_script('ply_events_script', plugin_dir_url(__FILE__)."js/events.js", array(),1); 120 120 } 121 121 … … 230 230 231 231 function ply_load_optins_callback(){ 232 check_ajax_referer('ply_load_data'); 232 233 $projectId = intval($_POST['projectId']); 233 234 $get_optins = wp_remote_get(PLATFORMLY_URL . "/plugin/plugin.actions.php?plugin_key=" . ply_get_plugin_key() . "&action=listOptins&projectId=" . $projectId); … … 238 239 239 240 function ply_load_pages_callback(){ 241 check_ajax_referer('ply_load_data'); 240 242 $projectId = intval($_POST['projectId']); 241 243 $get_pages = wp_remote_get(PLATFORMLY_URL . "/plugin/plugin.actions.php?plugin_key=" . ply_get_plugin_key() . "&action=listPages&projectId=" . $projectId); … … 246 248 247 249 function ply_get_tracking_links_callback(){ 250 check_ajax_referer('ply_load_data'); 248 251 $result = wp_remote_get(PLATFORMLY_URL . "/plugin/plugin.actions.php?plugin_key=" . ply_get_plugin_key() . "&action=getTrackingLinks"); 249 252 $result = wp_remote_retrieve_body($result); … … 253 256 254 257 function ply_load_events_callback(){ 258 check_ajax_referer('ply_load_data'); 255 259 $projectId = intval($_POST['projectId']); 256 260 $result = wp_remote_get(PLATFORMLY_URL . "/plugin/plugin.actions.php?plugin_key=" . ply_get_plugin_key() . "&action=getEvents&projectId=" . $projectId); … … 261 265 262 266 function ply_get_tracking_links_details_callback(){ 267 check_ajax_referer('ply_load_data'); 263 268 $linkId = intval($_POST['id']); 264 269 $result = wp_remote_get(PLATFORMLY_URL . "/plugin/plugin.actions.php?plugin_key=" . ply_get_plugin_key() . "&action=getDetailsTrackingLinks&linkId=" . $linkId); … … 269 274 270 275 function ply_save_project_code_callback(){ 276 check_ajax_referer('ply_save_project_code'); 271 277 $projectId = intval($_POST['projectId']); 272 278 $result = wp_remote_get(PLATFORMLY_URL."/plugin/plugin.actions.php?plugin_key=".ply_get_plugin_key()."&action=getProjectCode&projectId=".$projectId); … … 291 297 } 292 298 function ply_check_project_code_callback(){ 299 check_ajax_referer('ply_load_data'); 293 300 $projectId = intval($_POST['projectId']); 294 301 $projectCode = ply_get_project_code($projectId); … … 303 310 304 311 function ply_remove_project_code_callback(){ 312 check_ajax_referer('ply_save_project_code'); 305 313 ply_remove_project_code(); 306 314 wp_die(); … … 308 316 309 317 function ply_project_code_include_callback(){ 318 check_ajax_referer('ply_save_project_code'); 310 319 $includeCode = isset($_POST['includeCode']) && !empty($_POST['includeCode']) ? true : false; 311 320 ply_project_code_include($includeCode); … … 314 323 315 324 function ply_get_projects_callback(){ 325 check_ajax_referer('ply_load_data'); 316 326 $result = wp_remote_get(PLATFORMLY_URL."/plugin/plugin.actions.php?plugin_key=".ply_get_plugin_key()."&action=listProjects"); 317 327 $result = wp_remote_retrieve_body($result); … … 446 456 wp_enqueue_script('jquery-ui-dialog'); 447 457 wp_enqueue_style('wp-jquery-ui-dialog'); 448 wp_enqueue_script('ply-add-link', plugin_dir_url(__FILE__) . 'js/ply_add_link_functions.js' );458 wp_enqueue_script('ply-add-link', plugin_dir_url(__FILE__) . 'js/ply_add_link_functions.js', array(),1); 449 459 if(get_user_option('rich_editing') == 'true'){ 450 460 add_filter("mce_external_plugins", "add_platform_ly_link_plugin"); -
platformly/trunk/readme.txt
r3149131 r3174179 1 1 === Platform.ly Official === 2 2 Contributors: platformlycom 3 Tags: CRM, ecommerce, custom pages, landing pages, optin forms, events, tracking links, platform.ly, platform, platformly3 Tags: crm, ecommerce, platform.ly, platform, platformly 4 4 Requires at least: 4.6 5 5 Tested up to: 6.6 … … 78 78 == Upgrade Notice == 79 79 80 = 1.14 = 81 - Security fix 82 80 83 = 1.13 = 81 84 - Improvement: Compatibility with WP 6.6
Note: See TracChangeset
for help on using the changeset viewer.