Changeset 3430214
- Timestamp:
- 12/31/2025 05:18:50 PM (3 months ago)
- Location:
- surflink/trunk
- Files:
-
- 9 edited
-
assets/js/redirects.js (modified) (18 diffs)
-
includes/class-surfl-404.php (modified) (1 diff)
-
includes/class-surfl-410.php (modified) (1 diff)
-
includes/class-surfl-loader.php (modified) (1 diff)
-
includes/class-surfl-loginhider.php (modified) (1 diff)
-
includes/class-surfl-redirect.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
surf-link.php (modified) (3 diffs)
-
templates/surfl-shortlink-options.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
surflink/trunk/assets/js/redirects.js
r3430186 r3430214 279 279 function (confirmed) { 280 280 if (confirmed) { 281 282 281 $.post(SURFL_AJAX_REDIRECTS.ajaxurl, { 283 282 action: "surfl_empty_redirects", … … 532 531 "#surfl-edit-redirect-modal-message" 533 532 ); 534 changeBtnState(btn, btnText);533 changeBtnState(btn, btnText); 535 534 ob_redirect_list(response); 536 535 }, … … 684 683 processData: false, 685 684 }).done(function (res) { 686 687 changeBtnState(btn, btnText); 685 changeBtnState(btn, btnText); 688 686 if (res.success) { 689 690 691 687 ob_redirect_list(res); 692 688 showNotification( … … 698 694 showNotification("error", res.data.message, "#surfl-imp-ex-notice"); 699 695 } 700 701 702 696 }); 703 697 }); … … 869 863 */ 870 864 jQuery(document).ready(function ($) { 871 872 873 874 function ob_gone_list(res) { 865 function ob_gone_list(res) { 875 866 const gone_html = res.data.gone_html || false; 876 867 … … 880 871 } 881 872 //handle single 410 882 883 884 885 873 886 874 $(document).on("submit", "#surfl-410-form", function (e) { … … 903 891 }, 904 892 success: function (response) { 905 906 changeBtnState(btn, btnText); 893 changeBtnState(btn, btnText); 907 894 if (response.success) { 908 909 895 showNotification( 910 896 "success", … … 912 898 "#surfl-410-response-msg" 913 899 ); 914 ob_gone_list(response);900 ob_gone_list(response); 915 901 } else { 916 902 showNotification( … … 920 906 ); 921 907 } 922 923 908 }, 924 909 error: function (xhr, status, error) { … … 986 971 } 987 972 988 let btn ; 989 let btnText ; 990 991 if (action != "surfl_empty_410") 992 { 993 btn = $(this); 994 btnText = btn.text(); 995 changeBtnState(btn); 996 } 997 998 999 973 let btn; 974 let btnText; 975 976 if (action != "surfl_empty_410") { 977 btn = $(this); 978 btnText = btn.text(); 979 changeBtnState(btn); 980 } 981 1000 982 showCustomConfirm( 1001 983 "Are you sure you want to delete the selected 410s? This action cannot be undone.", … … 1025 1007 ); 1026 1008 1027 setTimeout(() => ob_gone_list(response), 1500);1009 setTimeout(() => ob_gone_list(response), 1500); 1028 1010 } else { 1029 1011 showNotification( … … 1047 1029 _wpnonce: nonce, 1048 1030 }).done(function (response) { 1049 1050 1031 if (response.success) { 1051 ob_gone_list(response);1032 ob_gone_list(response); 1052 1033 } else { 1053 1034 showNotification( … … 1118 1099 processData: false, 1119 1100 }).done(function (res) { 1120 changeBtnState(btn, btnText);1101 changeBtnState(btn, btnText); 1121 1102 if (res.success) { 1122 1103 showNotification( … … 1132 1113 showNotification("error", res.data.message, "#surfl-410-import-notice"); 1133 1114 } 1134 1135 1136 1115 }); 1137 1116 }); … … 1206 1185 ); 1207 1186 changeBtnState(btn, btnText); 1208 ob_gone_list(response);1187 ob_gone_list(response); 1209 1188 }, 1210 1189 error: function () { … … 1234 1213 "#surfl-410-edit-msg" 1235 1214 ); 1236 ob_gone_list(response);1215 ob_gone_list(response); 1237 1216 }); 1238 1217 } … … 1268 1247 }); 1269 1248 1270 setTimeout(() => ob_gone_list(response), 1500);1249 setTimeout(() => ob_gone_list(response), 1500); 1271 1250 } 1272 1251 }); … … 1302 1281 } 1303 1282 1283 function ob_shortlinkgroup_list(res) { 1284 const shortlink_html = res.data.shortlink_html || false; 1285 1286 if (shortlink_html) { 1287 $("#surfl-shortlink-content").html(shortlink_html); 1288 } 1289 } 1290 1291 1304 1292 $(document).on("click", "#surfl-shortlink-toggle-h3", function () { 1305 1293 const btn = $(this); -
surflink/trunk/includes/class-surfl-404.php
r3430186 r3430214 216 216 $max_404_logs = isset($settings['max_404_logs']) ? absint($settings['max_404_logs']) : 100; 217 217 218 $per_page = 20;218 $per_page = 30; 219 219 $current_page = isset($_GET['paged']) ? max(1, intval($_GET['paged'])) : 1; 220 220 $offset = ($current_page - 1) * $per_page; -
surflink/trunk/includes/class-surfl-410.php
r3430186 r3430214 349 349 } 350 350 // --- Pagination Setup --- 351 $per_page = 20;351 $per_page = 30; 352 352 $current_page = ( isset( $_GET['paged'] ) ? max( 1, intval( $_GET['paged'] ) ) : 1 ); 353 353 $offset = ($current_page - 1) * $per_page; -
surflink/trunk/includes/class-surfl-loader.php
r3430186 r3430214 490 490 } elseif ( $active_tab === 'surfl-sl-ls-li-tab' ) { 491 491 set_transient( $tab_transient, $active_tab, 5 * MINUTE_IN_SECONDS ); 492 require_once SURFL_PATH . 'templates/surfl-shortlink-list-html.php'; 492 echo '<div id="surfl-shortlink-content">'; 493 require SURFL_PATH . 'templates/surfl-shortlink-list-html.php'; 494 echo '</div>'; 493 495 } elseif ( $active_tab === 'surfl-sl-ls-option-tab' ) { 494 496 set_transient( $tab_transient, $active_tab, 5 * MINUTE_IN_SECONDS ); -
surflink/trunk/includes/class-surfl-loginhider.php
r3426914 r3430214 866 866 867 867 // --- Pagination Setup --- 868 $per_page = 20;868 $per_page = 30; 869 869 $current_page = isset($_GET['paged']) ? max(1, intval($_GET['paged'])) : 1; 870 870 $offset = ($current_page - 1) * $per_page; -
surflink/trunk/includes/class-surfl-redirect.php
r3430186 r3430214 113 113 public function render_red_page() { 114 114 global $wpdb; 115 $per_page = 20;115 $per_page = 30; 116 116 $current_page = ( isset( $_GET['paged'] ) ? max( 1, intval( $_GET['paged'] ) ) : 1 ); 117 117 $offset = ($current_page - 1) * $per_page; … … 127 127 // 'all' means 'All Redirect Types' 128 128 $filter_redirect_type = ( isset( $_GET['surfl_redirect_type_filter'] ) ? sanitize_text_field( $_GET['surfl_redirect_type_filter'] ) : 'all' ); 129 $per_page = 20;129 $per_page = 30; 130 130 $current_page = ( isset( $_GET['paged'] ) ? max( 1, intval( $_GET['paged'] ) ) : 1 ); 131 131 $offset = ($current_page - 1) * $per_page; -
surflink/trunk/readme.txt
r3430186 r3430214 6 6 **Requires PHP:** 7.4 7 7 **Tested up to:** 6.9 8 **Stable tag:** 2.3. 18 **Stable tag:** 2.3.2 9 9 **License:** GPLv3 or later 10 10 **License URI:** https://opensource.org/licenses/GPL-3.0 … … 141 141 == Changelog == 142 142 143 = 2.3.2 = 144 * Improved: SmartLink Module's UX is improved. 145 * Fixed: Critical bug fixed in Redirect, 410, 404 and Shortlinks. 146 143 147 = 2.3.1 = 144 * Improved: UX is improved in Redirects module. And some minor fixes. 148 * Improved: Redirects Module's UX is improved. 149 * Fixed: Critical bug fixed. 145 150 146 151 = 2.3.0 = -
surflink/trunk/surf-link.php
r3430186 r3430214 7 7 * Author: SurfLab 8 8 * Author URI: https://surflabtech.com 9 * Version: 2.3. 19 * Version: 2.3.2 10 10 * Text Domain: surflink 11 11 * License: GPL-3.0-or-later … … 67 67 } 68 68 if ( !defined( 'SURFL_VERSION' ) ) { 69 define( 'SURFL_VERSION', '2.3. 1' );69 define( 'SURFL_VERSION', '2.3.2' ); 70 70 } 71 71 if ( !defined( 'SURFL_PLUGIN' ) ) { … … 99 99 } 100 100 if ( !defined( 'SURFL_VERSION' ) ) { 101 define( 'SURFL_VERSION', '2.3. 1' );101 define( 'SURFL_VERSION', '2.3.2' ); 102 102 } 103 103 if ( !defined( 'SURFL_SITE_URL' ) ) { -
surflink/trunk/templates/surfl-shortlink-options.php
r3428732 r3430214 1 1 <?php 2 2 3 4 3 $option_name = 'surfl_shortlink_options'; 5 6 7 $defaults = [ 8 'pass_params' => 0, 9 'duration' => 0, 10 'delete_data' => 0 11 ]; 12 13 14 $settings = get_option($option_name, $defaults); 15 16 if (!$settings) { 17 update_option($option_name, $defaults); 18 } 19 20 21 if ($_SERVER['REQUEST_METHOD'] === 'POST' && check_admin_referer('surfl_ls_option_nonce')) { 22 23 error_log('post ' . print_r($_POST, true)); 24 $shortlinks = absint($_POST['shortlinks_duration']); 25 $pass_params = isset($_POST['pass_params']) ? 1 : 0; 26 $delete_data = isset($_POST['delete_data']) ? 1 : 0; 27 $settings['duration'] = $shortlinks; 28 $settings['delete_data'] = $delete_data; 29 $settings['pass_params'] = $pass_params; 30 update_option($option_name, $settings); 31 echo '<div class="updated"><p style="color:black;">Settings saved.</p></div>'; 32 } 33 34 4 $defaults = [ 5 'pass_params' => 0, 6 'duration' => 0, 7 'delete_data' => 0, 8 ]; 9 $settings = get_option( $option_name, $defaults ); 35 10 ?> 36 11 37 12 38 13 <div class="surfl-page-content-wrapper" > 39 <?php require SURFL_PATH . "templates/surfl-pro-ad.php"; ?> 14 <?php 15 require SURFL_PATH . "templates/surfl-pro-ad.php"; 16 ?> 40 17 41 18 <div class="surfl-section-title"> 42 19 43 20 <h2><span class="surfl-price-title"> 44 <?php esc_html_e('Shortlink Options', 'surflink'); ?> 21 <?php 22 esc_html_e( 'Shortlink Options', 'surflink' ); 23 ?> 45 24 </span></h2> 46 25 </div> 47 26 <form method="post" id="surfl-ls-option-form"> 48 <?php wp_nonce_field('surfl_ls_option_nonce'); ?> 27 <?php 28 wp_nonce_field( 'surfl_ls_option_nonce' ); 29 ?> 49 30 <table class="surfl-sr-table" style="max-width: 1200px;"> 50 31 <tr> … … 64 45 65 46 <input name="shortlinks_duration" type="number" id="shortlinks_duration" 66 value="<?php echo esc_attr($settings['duration']); ?>" class="small-text"> 47 value="<?php 48 echo esc_attr( $settings['duration'] ); 49 ?>" class="small-text"> 67 50 <label class="surfl-label">days</label> 68 51 </div> … … 82 65 name="pass_params" 83 66 value="1" 84 <?php checked($settings['pass_params'], 1); ?>> 67 <?php 68 checked( $settings['pass_params'], 1 ); 69 ?>> 85 70 86 71 </td> … … 94 79 name="delete_data" 95 80 value="1" 96 <?php checked($settings['delete_data'], 1); ?>> 81 <?php 82 checked( $settings['delete_data'], 1 ); 83 ?>> 97 84 98 85 </td> … … 102 89 <td> 103 90 <div class="surfl-flex-center"> 104 <button <?php echo ! surflink_fs()->is_premium() ? 'disabled' : ''; ?> type="submit" class="surfl-module-card surfl-white-button">SAVE</button> 91 <button <?php 92 echo ( !surflink_fs()->is_premium() ? 'disabled' : '' ); 93 ?> type="submit" class="surfl-module-card surfl-white-button">SAVE</button> 105 94 </div> 106 95 </td>
Note: See TracChangeset
for help on using the changeset viewer.