Plugin Directory

Changeset 3663733


Ignore:
Timestamp:
08/24/2026 03:02:10 PM (3 months ago)
Author:
transifex
Message:

Version 1.3.53 Released

Location:
transifex-live-integration
Files:
42 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • transifex-live-integration/trunk/includes/admin/transifex-live-integration-admin-util.php

    r2968758 r3663733  
    6262                $tokenized_url = implode( '/', $slashes );
    6363                return ($tokenized_url) ? $tokenized_url : false;
     64        }
     65
     66        /**
     67         * Returns whether the picker library should be enabled, based on the picker
     68         * setting Transifex reports for the environment this site points at.
     69         * The settings payload carries a block per environment, so reading the
     70         * production block on a staging site reports the wrong picker.
     71         * @param string $transifex_settings JSON settings payload from Transifex
     72         * @param bool $enable_staging Whether the site points at the staging environment
     73         * @return bool Returns true unless the environment explicitly has no picker
     74         */
     75        static function calc_enable_picker( $transifex_settings, $enable_staging ) {
     76                Plugin_Debug::logTrace();
     77                $env = ($enable_staging) ? 'staging' : 'production';
     78                $picker = json_decode( $transifex_settings, true )[$env]['picker'] ?? null;
     79                return ($picker !== 'no-picker');
    6480        }
    6581
  • transifex-live-integration/trunk/includes/admin/transifex-live-integration-admin.php

    r3607015 r3663733  
    210210
    211211                if ( isset( $settings['transifex_live_transifex_settings']['settings'] ) ) {
    212                         $p = json_decode( $settings['transifex_live_transifex_settings']['settings'], true )['production']['picker'] ?? null;
    213                         $settings['transifex_live_settings']['enable_picker'] = ($p !== 'no-picker') ? true : false;
     212                        $settings['transifex_live_settings']['enable_picker'] = Transifex_Live_Integration_Admin_Util::calc_enable_picker(
     213                                $settings['transifex_live_transifex_settings']['settings'],
     214                                !empty( $settings['transifex_live_settings']['enable_staging'] )
     215                        );
    214216                }
    215217
  • transifex-live-integration/trunk/readme.txt

    r3607015 r3663733  
    55Requires at least: 3.5.2
    66Tested up to: 6.9.1
    7 Stable tag: 1.3.52
     7Stable tag: 1.3.53
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8080
    8181== Changelog ==
     82
     83= 1.3.53 =
     84Fix keys for picker settings retrieval
    8285
    8386= 1.3.52 =
  • transifex-live-integration/trunk/transifex-live-integration.php

    r3607015 r3663733  
    66 * @link    https://help.transifex.com/en/articles/6261241-wordpress
    77 * @package TransifexLiveIntegration
    8  * @version 1.3.52
     8 * @version 1.3.53
    99 *
    1010 * @wordpress-plugin
    … …  
    1212 * Plugin URI:        https://help.transifex.com/en/articles/6261241-wordpress
    1313 * Description:       Translate your WordPress powered website using Transifex.
    14  * Version:           1.3.52
     14 * Version:           1.3.53
    1515 * License:           GNU General Public License
    1616 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    … …  
    7676
    7777define( 'LANG_PARAM', 'lang' );
    78 $version = '1.3.52';
     78$version = '1.3.53';
    7979
    8080require_once( dirname( __FILE__ ) . '/transifex-live-integration-main.php' );
Note: See TracChangeset for help on using the changeset viewer.