| @@ -13,9 +13,9 @@ | ||
| 13 | 13 | wp_die('Sorry, but you do not have permissions to change settings.'); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | if(!loginizer_is_premium() && count($_POST) > 0){ |
| 17 | - $lz_error['not_in_free'] = __('This feature is not available in the Free version. <a href="'.LOGINIZER_PRICING_URL.'" target="_blank" style="text-decoration:none; color:green;"><b>Upgrade to Pro</b></a>', 'loginizer'); | |
| 17 | + $lz_error['not_in_free'] = __('This feature is not available in the Free version.', 'loginizer').' <a href="'.LOGINIZER_PRICING_URL.'" target="_blank" style="text-decoration:none; color:green;"><b>'.esc_html__('Upgrade to Pro', 'loginizer').'</b></a>'; | |
| 18 | 18 | return loginizer_page_security_T(); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /* Make sure post was from this page */ |
| @@ -348,9 +348,9 @@ | ||
| 348 | 348 | ?> |
| 349 | 349 | <tr> |
| 350 | 350 | <td scope="row" valign="top" style="width:200px !important"> |
| 351 | 351 | <label><?php echo __('Access Secretly Only', 'loginizer'); ?></label><br> |
| 352 | - <span class="exp"><?php echo __('If set, then all Login URL\'s will still point to '.$loginizer['login_basename'].' and users will have to access the New Login Slug by typing it in the browser.', 'loginizer'); ?></span> | |
| 352 | + <span class="exp"><?php echo sprintf(__('If set, then all Login URL\'s will still point to %s and users will have to access the New Login Slug by typing it in the browser.', 'loginizer'), esc_html($loginizer['login_basename'])); ?></span> | |
| 353 | 353 | </td> |
| 354 | 354 | <td> |
| 355 | 355 | <input type="checkbox" value="1" name="rename_login_secret" <?php echo lz_POSTchecked('rename_login_secret', (empty($loginizer['rename_login_secret']) ? false : true)); ?> /> |
| 356 | 356 | </td> |
| @@ -470,9 +470,12 @@ | ||
| 470 | 470 | return; |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 | var htaccess = textarea.val(); |
| 474 | - htaccess = htaccess.replace(/\^.+?\(/, '^' + admin_name + '('); | |
| 474 | + htaccess = htaccess.replace( | |
| 475 | + /RewriteRule \^\(?([^\(\s]+)(?=\(-lzs|\()/g, | |
| 476 | + (match, current_slug) => match.replace(current_slug, admin_name) | |
| 477 | + ); | |
| 475 | 478 | textarea.val(htaccess); |
| 476 | 479 | |
| 477 | 480 | } |
| 478 | 481 | |
| @@ -574,9 +577,9 @@ | ||
| 574 | 577 | ?> |
| 575 | 578 | <tr> |
| 576 | 579 | <td scope="row" valign="top" style="width:200px !important"> |
| 577 | 580 | <label><?php echo __('I have setup .htaccess', 'loginizer'); ?></label><br> |
| 578 | - <span class="exp"><?php echo __('You need to confirm that you have configured .htaccess as per <a href="'.LOGINIZER_DOCS.'Renaming_the_WP-Admin_Area" target="_blank">our guide</a> so that we can safely enable this feature', 'loginizer'); ?></span> | |
| 581 | + <span class="exp"><?php echo sprintf(__('You need to confirm that you have configured .htaccess as per %sour guide%s so that we can safely enable this feature', 'loginizer'), '<a href="'.LOGINIZER_DOCS.'Renaming_the_WP-Admin_Area" target="_blank">', '</a>'); ?></span> | |
| 579 | 582 | </td> |
| 580 | 583 | <td> |
| 581 | 584 | <input type="checkbox" value="1" name="lz_wp_admin_docs" /> |
| 582 | 585 | <input type="button" onclick="lz_test_wp_admin()" class="button" style="background: #5cb85c; color:white; border:#5cb85c" value="<?php echo __('Test New WP-Admin Slug', 'loginizer'); ?>" /> |
| @@ -731,9 +734,9 @@ | ||
| 731 | 734 | <input type="text" size="50" value="<?php echo lz_optpost('new_username', ''); ?>" name="new_username" id="new_username" /> |
| 732 | 735 | </td> |
| 733 | 736 | </tr> |
| 734 | 737 | </table><br /> |
| 735 | - <i><?php echo __('Note: Username can be changed only for administrator users.'); ?></i> | |
| 738 | + <i><?php echo __('Note: Username can be changed only for administrator users.', 'loginizer'); ?></i> | |
| 736 | 739 | <center><input name="save_lz_admin" class="button button-primary action" value="<?php echo __('Set the Username', 'loginizer'); ?>" type="submit" /></center> |
| 737 | 740 | |
| 738 | 741 | </div> |
| 739 | 742 | </div> |
| @@ -992,8 +995,9 @@ | ||
| 992 | 995 | $rule = '# BEGIN Loginizer' . "\n"; |
| 993 | 996 | $rule .= '<IfModule mod_rewrite.c>' . "\n"; |
| 994 | 997 | $rule .= 'RewriteEngine On' . "\n"; |
| 995 | 998 | $rule .= 'RewriteBase ' . $home_root . "\n\n"; |
| 999 | + $rule .= 'RewriteRule ^(' . $admin_slug . '(-lzs.{20})?)$ $1/ [R=301,L]' . "\n"; | |
| 996 | 1000 | $rule .= 'RewriteRule ^' . $admin_slug . '(-lzs.{20})?(/?)(.*) wp-admin/$3 [L]' . "\n"; |
| 997 | 1001 | $rule .= '</IfModule>' . "\n"; |
| 998 | 1002 | $rule .= '# END Loginizer' . "\n"; |
| 999 | 1003 | |