Changeset 2863637
- Timestamp:
- 02/11/2023 11:45:52 AM (3 years ago)
- Location:
- wpglobus-translate-options/trunk
- Files:
-
- 6 edited
-
README.md (modified) (2 diffs)
-
includes/class-wpglobus-translate-options.php (modified) (7 diffs)
-
languages/wpglobus-translate-options.pot (modified) (3 diffs)
-
package.json (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wpglobus-translate-options.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpglobus-translate-options/trunk/README.md
r2811605 r2863637 4 4 **Tags:** WPGlobus, localization, multilingual, translate, translation 5 5 **Requires at least:** 5.5 6 **Tested up to:** 6.1 6 **Tested up to:** 6.1 7 7 **Stable tag:** trunk 8 8 **Requires PHP:** 5.6 … … 62 62 63 63 ## Changelog ## 64 65 ### 2.2.0 ### 66 * Code cleanup and additional security measures. 64 67 65 68 ### 2.1.0 ### -
wpglobus-translate-options/trunk/includes/class-wpglobus-translate-options.php
r2633240 r2863637 396 396 /** @todo These two vars are set inside a condition. Should refactor. */ 397 397 $page = ''; 398 $option = false; 399 398 // @since 2.2.0 399 $option = $this->safe_get_option(); 400 400 401 $tab_active = array(); 401 402 $tab_active[self::TRANSLATE_OPTIONS_PAGE] = ''; … … 407 408 if ( $pagenow == 'admin.php' && isset($_GET['page']) ) : 408 409 409 $page = $_GET['page'];410 411 if ( self::TRANSLATE_OPTIONS_PAGE == $page ) {410 $page = WPGlobus_Utils::safe_get('page'); 411 412 if ( self::TRANSLATE_OPTIONS_PAGE === $page ) { 412 413 413 414 $tab_active[self::TRANSLATE_OPTIONS_PAGE] = ' nav-tab-active'; 414 if ( isset($_GET['option']) ) { 415 416 $option = $_GET['option']; 417 418 } else { 419 420 $option = false; 421 422 } 423 424 } elseif ( self::SETTINGS_PAGE == $page ) { 415 416 } elseif ( self::SETTINGS_PAGE === $page ) { 425 417 426 418 $tab_active[self::SETTINGS_PAGE] = ' nav-tab-active'; 427 419 428 } elseif ( self::ABOUT_PAGE == $page ) {420 } elseif ( self::ABOUT_PAGE === $page ) { 429 421 430 422 $tab_active[self::ABOUT_PAGE] = ' nav-tab-active'; 431 423 432 } elseif ( self::THEME_PAGE == $page ) {424 } elseif ( self::THEME_PAGE === $page ) { 433 425 434 426 $tab_active[self::THEME_PAGE] = ' nav-tab-active'; … … 437 429 438 430 endif; 439 440 431 441 432 if ( isset( $_POST['wpglobus_translate_form'] ) ) { … … 514 505 case self::TRANSLATE_OPTIONS_PAGE : ?> 515 506 <?php 516 if ( empty($_GET['option'])) :507 if ( ! $option ) : 517 508 ?> 518 509 <div class="search"> … … 534 525 <?php 535 526 endif; 527 536 528 ?> 537 529 <form method="post" id="options"> <?php 538 530 // @since 2.2.0 539 531 $search = false; 540 532 if ( ! empty( $_POST['search'] ) ) { 541 $search = $_POST['search']; 542 $option = '[]'; 533 534 $search = sanitize_text_field( $_POST['search'] ); 535 536 if ( ! empty($search) ) { 537 $option = '[]'; 538 } 543 539 } 544 540 545 541 if ( $option ) { 546 542 … … 862 858 863 859 endif; 864 865 860 } 866 861 … … 889 884 890 885 endif; 891 892 } 886 } 887 888 /** 889 * Get value of $_GET['option']. 890 * 891 * @since 2.2.0 892 */ 893 protected function safe_get_option() { 894 $option = WPGlobus_Utils::safe_get('option'); 895 if ( $option === '' ) { 896 return false; 897 } 898 return $option; 899 } 900 893 901 } 894 902 -
wpglobus-translate-options/trunk/languages/wpglobus-translate-options.pot
r2651767 r2863637 1 # Copyright (C) 202 2WPGlobus1 # Copyright (C) 2023 WPGlobus 2 2 # This file is distributed under the GPL-3.0. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WPGlobus Translate Options 2. 1.0\n"5 "Project-Id-Version: WPGlobus Translate Options 2.2.0\n" 6 6 "Report-Msgid-Bugs-To: https://wpglobus.com/pg/contact-us/\n" 7 "POT-Creation-Date: 202 2-01-02 07:55:52+00:00\n"7 "POT-Creation-Date: 2023-02-11 11:23:25+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=utf-8\n" 10 10 "Content-Transfer-Encoding: 8bit\n" 11 "PO-Revision-Date: 202 2-MO-DA HO:MI+ZONE\n"11 "PO-Revision-Date: 2023-MO-DA HO:MI+ZONE\n" 12 12 "Last-Translator: The WPGlobus Team <support@wpglobus.com>\n" 13 13 "Language-Team: The WPGlobus Team <support@wpglobus.com>\n" … … 24 24 "X-Textdomain-Support: yes\n" 25 25 26 #: includes/class-wpglobus-to-2.php:48 826 #: includes/class-wpglobus-to-2.php:489 27 27 #: includes/class-wpglobus-translate-options.php:191 28 28 msgid "Options" … … 33 33 msgstr "" 34 34 35 #: includes/class-wpglobus-to-rest-controller.php:27 235 #: includes/class-wpglobus-to-rest-controller.php:276 36 36 msgid "Options to translate." 37 37 msgstr "" 38 38 39 #: includes/class-wpglobus-to-rest-controller.php:9 4440 #: includes/class-wpglobus-to-rest-controller.php:9 7439 #: includes/class-wpglobus-to-rest-controller.php:959 40 #: includes/class-wpglobus-to-rest-controller.php:989 41 41 msgid "Sorry, you are not allowed to read options." 42 42 msgstr "" 43 43 44 #: includes/class-wpglobus-translate-options.php:4 9544 #: includes/class-wpglobus-translate-options.php:486 45 45 msgid "All options" 46 46 msgstr "" 47 47 48 #: includes/class-wpglobus-translate-options.php:4 9748 #: includes/class-wpglobus-translate-options.php:488 49 49 msgid "Theme properties" 50 50 msgstr "" 51 51 52 #: includes/class-wpglobus-translate-options.php:49 952 #: includes/class-wpglobus-translate-options.php:490 53 53 msgid "Settings" 54 54 msgstr "" 55 55 56 #: includes/class-wpglobus-translate-options.php: 50156 #: includes/class-wpglobus-translate-options.php:492 57 57 msgid "About" 58 58 msgstr "" 59 59 60 #: includes/class-wpglobus-translate-options.php: 50360 #: includes/class-wpglobus-translate-options.php:494 61 61 msgid "Switch to new interface v.2" 62 62 msgstr "" -
wpglobus-translate-options/trunk/package.json
r2651767 r2863637 1 1 { 2 2 "name": "wpglobus-translate-options", 3 "version": "2. 1.0",3 "version": "2.2.0", 4 4 "title": "WPGlobus Translate Options", 5 5 "description": "WPGlobus Translate Options is an extension to the WPGlobus plugin. It allows translate options from wp_options table.", -
wpglobus-translate-options/trunk/readme.txt
r2811605 r2863637 56 56 57 57 == Changelog == 58 59 = 2.2.0 = 60 * Code cleanup and additional security measures. 58 61 59 62 = 2.1.0 = -
wpglobus-translate-options/trunk/wpglobus-translate-options.php
r2770439 r2863637 6 6 * Text Domain: wpglobus-translate-options 7 7 * Domain Path: /languages/ 8 * Version: 2. 1.08 * Version: 2.2.0 9 9 * Author: WPGlobus 10 10 * Author URI: https://wpglobus.com/ 11 11 * Network: false 12 * Copyright 2015-202 2Alex Gor (alexgff) / WPGlobus12 * Copyright 2015-2023 Alex Gor (alexgff) / WPGlobus 13 13 * License: GPL-3.0 14 14 * License URI: http://www.gnu.org/licenses/gpl.txt … … 20 20 } 21 21 22 define( 'WPGLOBUS_TRANSLATE_OPTIONS_VERSION', '2. 1.0' );22 define( 'WPGLOBUS_TRANSLATE_OPTIONS_VERSION', '2.2.0' ); 23 23 define( 'WPGLOBUS_TRANSLATE_OPTIONS_KEY', 'wpglobus_translate_options' ); 24 24 define( 'WPGLOBUS_TRANSLATE_OPTIONS_INTERFACE_VERSION_KEY', 'interface_version' );
Note: See TracChangeset
for help on using the changeset viewer.