Plugin Directory

Changeset 3482475


Ignore:
Timestamp:
03/14/2026 10:26:26 AM (2 weeks ago)
Author:
timwhitlock
Message:

Bumped WordPress compatibility to 6.9.4

Location:
loco-translate/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • loco-translate/trunk/languages/loco-translate.pot

    r3471926 r3482475  
    22msgid ""
    33msgstr ""
    4 "Project-Id-Version: Loco Translate 2.8.2\n"
     4"Project-Id-Version: Loco Translate 2.8.3-dev\n"
    55"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loco-translate/\n"
    6 "POT-Creation-Date: 2026-03-01 07:58+0000\n"
     6"POT-Creation-Date: 2026-03-14 10:22+0000\n"
    77"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    88"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1414"Content-Transfer-Encoding: 8bit\n"
    1515"X-Generator: Loco https://localise.biz/\n"
    16 "X-Loco-Version: 2.8.2; wp-6.9.1; php-8.3.27\n"
     16"X-Loco-Version: 2.8.3-dev; wp-6.9.4; php-8.3.27\n"
    1717"X-Domain: loco-translate"
    1818
     
    10181018
    10191019#: src/ajax/ApisController.php:26 src/admin/file/EditController.php:214
     1020#: tpl/admin/bundle/conf.php:147
    10201021msgid "Help"
    10211022msgstr ""
     
    15911592msgstr ""
    15921593
    1593 #: tpl/admin/bundle/conf.php:159 tpl/admin/bundle/setup/saved.php:18
     1594#: tpl/admin/bundle/conf.php:160 tpl/admin/bundle/setup/saved.php:18
    15941595msgid "Reset config"
    15951596msgstr ""
  • loco-translate/trunk/readme.txt

    r3478954 r3482475  
    103103
    104104= 2.8.3 =
    105 * WIP
     105* Bumped WordPress compatibility to 6.9.4
     106* Additional restrictions on viewing source code refs
     107* Fix for CVE-2026-4146: Thanks Jack Pas (Dark.)
    106108
    107109= 2.8.2 =
  • loco-translate/trunk/src/admin/config/VersionController.php

    r2666243 r3482475  
    2323        $breadcrumb = new Loco_admin_Navigation;
    2424        $breadcrumb->add( $title );
     25        $this->setLocoUpdate('0');
    2526       
    2627        // current plugin version
     
    4142        }
    4243       
    43        
    44         // check PHP version, noting that we want to move to minimum version 5.6 as per latest WordPress
     44        // check PHP version is at least 7.4
    4545        $phpversion = PHP_VERSION;
    4646        if( version_compare($phpversion,'7.4.0','<') ){
     
    4848        }
    4949       
    50        
    5150        // check WordPress version, No plans to increase this until WP bumps their min PHP requirement.
    5251        $wpversion = $GLOBALS['wp_version'];
    53         /*if( version_compare($wpversion,'5.2','<') ){
    54             $this->setWpUpdate('5.2');
    55         }*/
    56        
    5752        return $this->view('admin/config/version', compact('breadcrumb','version','phpversion','wpversion') );
    5853    }
    5954
    6055
    61     /**
    62      * @param string version
    63      */
    64     private function setLocoUpdate( $version ){
    65         $action = 'upgrade-plugin_'.loco_plugin_self();
    66         $link = admin_url( 'update.php?action=upgrade-plugin&plugin='.rawurlencode(loco_plugin_self()) );
    67         $this->set('update', $version );
    68         $this->set('update_href', wp_nonce_url( $link, $action ) );
     56
     57    private function setLocoUpdate( string $version ){
     58        if( $version ){
     59            $action = 'upgrade-plugin_'.loco_plugin_self();
     60            $link = admin_url( 'update.php?action=upgrade-plugin&plugin='.rawurlencode(loco_plugin_self()) );
     61            $this->set('update', $version );
     62            $this->set('update_href', wp_nonce_url( $link, $action ) );
     63        }
     64        else {
     65            $this->set('update','');
     66            $this->set('update_href','');
     67        }
    6968    }
    70 
    71 
    72     /**
    73      * @param string minimum recommended version
    74      *
    75     private function setWpUpdate( $version ){
    76         $this->set('wpupdate',$version);
    77         $this->set('wpupdate_href', admin_url('update-core.php') );
    78     }*/
    7969
    8070   
  • loco-translate/trunk/src/mvc/View.php

    r3269005 r3482475  
    147147
    148148    /**
    149      * @param string $prop
    150      * @return bool
     149     * Test if a view argument exists
    151150     */
    152151    public function has( string $prop ):bool {
     
    157156    /**
    158157     * Get property after checking with self::has
    159      * @param string $prop
    160158     * @return mixed
    161159     */
     
    167165    /**
    168166     * Set a view argument
    169      * @param string $prop
    170      * @param mixed $value
    171      *
    172      * @return Loco_mvc_View
    173167     */
    174168    public function set( string $prop, $value ):self {
     
    178172
    179173
     174    /**
     175     * Remove a view argument
     176     */
     177    public function unset( string $prop ):void {
     178        $this->scope->offsetUnset($prop);
     179    }
     180   
    180181
    181182    /**
  • loco-translate/trunk/src/mvc/ViewParams.php

    r3269005 r3482475  
    6666    /**
    6767     * @internal
    68      * @param string $p property name
    6968     * @return mixed
    7069     */
    71     public function __get( $p ){
     70    public function __get( string $p ){
    7271        return $this->offsetExists($p) ? $this->offsetGet($p) : null;
    7372    }
     
    7675    /**
    7776     * Test if a property exists, even if null
    78      * @param string $p property name
    79      * @return bool
    80      */
    81     public function has( $p ){
     77     */
     78    public function has( string  $p ):bool {
    8279        return $this->offsetExists($p);
     80    }
     81
     82
     83    /**
     84     * Test if a property exists and is truthy
     85     */
     86    public function truthy( string $p ):bool {
     87        return $this->offsetExists($p) && $this->offsetGet($p);
    8388    }
    8489
     
    8994     * @return string empty string
    9095     */
    91     public function e( $p ){
     96    public function e( string $p ):string {
    9297        $text = $this->__get($p);
    9398        echo $this->escape( $text );
  • loco-translate/trunk/tpl/admin/config/version.php

    r3034746 r3482475  
    44 */
    55$this->extend('../layout');
    6 
     6    /* @var Loco_mvc_ViewParams $params */
    77    // Loco Translate version:
    8     if( $params->has('update') ):?>
     8    if( $params->truthy('update') && $params->truthy('update_href') ):?>
    99    <div class="panel panel-warning">
    1010        <h3 class="has-icon">
     
    1515        </p>
    1616        <p class="submit">
    17             <a class="button button-primary" href="<?php echo $update_href?>" target="_blank"><?php self::e(__('Upgrade to %s','loco-translate'), 'v'.$update )?></a>
     17            <a class="button button-primary" href="<?php echo esc_url($update_href)?>" target="_blank"><?php self::e(__('Upgrade to %s','loco-translate'), 'v'.$update )?></a>
    1818            <a class="button button-link has-icon icon-ext" href="https://wordpress.org/plugins/loco-translate/installation/" target="_blank"><?php esc_html_e('Install manually','loco-translate')?></a>
    1919        </p>
Note: See TracChangeset for help on using the changeset viewer.