Changeset 3209648
- Timestamp:
- 12/18/2024 06:28:52 AM (13 months ago)
- Location:
- nestech
- Files:
-
- 15 added
- 2 edited
-
tags/2.3.0 (added)
-
tags/2.3.0/css (added)
-
tags/2.3.0/css/fonts (added)
-
tags/2.3.0/css/fonts/primeicons.eot (added)
-
tags/2.3.0/css/fonts/primeicons.svg (added)
-
tags/2.3.0/css/fonts/primeicons.ttf (added)
-
tags/2.3.0/css/fonts/primeicons.woff (added)
-
tags/2.3.0/css/fonts/primeicons.woff2 (added)
-
tags/2.3.0/css/primeflex.min.css (added)
-
tags/2.3.0/css/primeicons.min.css (added)
-
tags/2.3.0/css/primereact.min.css (added)
-
tags/2.3.0/css/theme.css (added)
-
tags/2.3.0/nestech.php (added)
-
tags/2.3.0/readme.txt (added)
-
tags/2.3.0/uninstall.php (added)
-
trunk/nestech.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nestech/trunk/nestech.php
r3207440 r3209648 4 4 Plugin URI: https://nestech.lt/ 5 5 Description: Smart-ID, Mobile ID and other authenticators for your website 6 Version: 2. 2.06 Version: 2.3.0 7 7 Author: Nestech 8 8 Requires at least: 5.0 … … 300 300 public function add_nestech_content(): void 301 301 { 302 if (get_option('nestech_placement', true)) 302 $placement = get_option('nestech_placement', true); 303 if ($placement || $placement === '') 303 304 echo "<div id='nestech-dokobit-root'></div>"; 304 305 } … … 438 439 $activateUrl = $this->get_host_with_schema() . "?nestech_activate=1&nestech_token=$token"; 439 440 $headers = ['Content-Type: text/html; charset=UTF-8']; 440 $defaultMessage = "<p>Verify your email by clicking <a href='{$activateUrl}'>here</a></p>"; 441 $defaultMessage .= "<p><small>Or paste this link in your browser: $activateUrl</small></p>"; 442 $defaultMessage .= "<p><small>The link is valid for 24 hours</small></p>"; 441 $translations = $this->get_translations(); 442 $defaultMessage = "<p>{$translations['verify_message']} <a href='{$activateUrl}'>{$translations['here']}</a></p>"; 443 $defaultMessage .= "<p><small>{$translations['paste_link_message']}: $activateUrl</small></p>"; 444 $defaultMessage .= "<p><small>{$translations['link_expiry_message']}.</small></p>"; 443 445 $message = apply_filters('nestech_verification_email_body', $defaultMessage, $activateUrl); 444 $subject = apply_filters('nestech_verification_email_subject', 'Verify your email');446 $subject = apply_filters('nestech_verification_email_subject', $translations['subject']); 445 447 $sent = wp_mail($email, $subject, $message, $headers); 446 448 if (!$sent) … … 670 672 $placement = $args['Placement'] ?? null; 671 673 if ($placement !== null) 672 add_option('nestech_placement', $placement);674 update_option('nestech_placement', $placement); 673 675 $response = wp_remote_post($external_url, [ 674 676 'headers' => ['Content-Type' => 'application/json'], … … 836 838 } 837 839 840 private function get_translations() 841 { 842 $translations = [ 843 'en_US' => [ 844 'subject' => 'Verify your email', 845 'verify_message' => 'Verify your email by clicking', 846 'here' => 'here', 847 'paste_link_message' => 'Or paste this link in your browser', 848 'link_expiry_message' => 'The link is valid for 24 hours', 849 ], 850 'lt_LT' => [ 851 'subject' => 'Patvirtinkite savo el. paštą', 852 'verify_message' => 'Patvirtinkite savo el. paštą paspaudę', 853 'here' => 'čia', 854 'paste_link_message' => 'Arba nukopijuokite šią nuorodą naršyklėje', 855 'link_expiry_message' => 'Nuoroda galioja 24 valandas', 856 ], 857 'lv_LV' => [ 858 'subject' => 'Apstipriniet savu e-pastu', 859 'verify_message' => 'Apstipriniet savu e-pastu, noklikšķinot', 860 'here' => 'šeit', 861 'paste_link_message' => 'Vai ielīmējiet šo saiti savā pārlūkprogrammā', 862 'link_expiry_message' => 'Saite ir derīga 24 stundas', 863 ], 864 'et_EE' => [ 865 'subject' => 'Kinnitage oma e-post', 866 'verify_message' => 'Kinnitage oma e-post, klõpsates', 867 'here' => 'siin', 868 'paste_link_message' => 'Või kleepige see link oma brauserisse', 869 'link_expiry_message' => 'Link kehtib 24 tundi', 870 ], 871 'is_IS' => [ 872 'subject' => 'Staðfestu netfangið þitt', 873 'verify_message' => 'Staðfestu netfangið þitt með því að smella', 874 'here' => 'hér', 875 'paste_link_message' => 'Eða límdu þennan hlekk í vafrann þinn', 876 'link_expiry_message' => 'Hlekkurinn er gildur í 24 klukkustundir', 877 ], 878 ]; 879 $locale = determine_locale() ?? 'en_US'; 880 881 return $translations[$locale]; 882 } 883 838 884 public function nestech_shortcode($atts) 839 885 { -
nestech/trunk/readme.txt
r3207440 r3209648 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 8.0 7 Stable tag: 2. 2.07 Stable tag: 2.3.0 8 8 License: GPL V2 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 42 42 2.1.0 - Minor improvements for better support. 43 43 2.2.0 - Improved UX for settings and subscriptions. 44 2.3.0 - Added email translations for Lithuanian, Latvian, Estonian and Icelandic languages. 44 45 45 46 == Upgrade Notice ==
Note: See TracChangeset
for help on using the changeset viewer.