Changeset 3482475
- Timestamp:
- 03/14/2026 10:26:26 AM (2 weeks ago)
- Location:
- loco-translate/trunk
- Files:
-
- 6 edited
-
languages/loco-translate.pot (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
src/admin/config/VersionController.php (modified) (3 diffs)
-
src/mvc/View.php (modified) (4 diffs)
-
src/mvc/ViewParams.php (modified) (3 diffs)
-
tpl/admin/config/version.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
loco-translate/trunk/languages/loco-translate.pot
r3471926 r3482475 2 2 msgid "" 3 3 msgstr "" 4 "Project-Id-Version: Loco Translate 2.8. 2\n"4 "Project-Id-Version: Loco Translate 2.8.3-dev\n" 5 5 "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" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 14 14 "Content-Transfer-Encoding: 8bit\n" 15 15 "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" 17 17 "X-Domain: loco-translate" 18 18 … … 1018 1018 1019 1019 #: src/ajax/ApisController.php:26 src/admin/file/EditController.php:214 1020 #: tpl/admin/bundle/conf.php:147 1020 1021 msgid "Help" 1021 1022 msgstr "" … … 1591 1592 msgstr "" 1592 1593 1593 #: tpl/admin/bundle/conf.php:1 59tpl/admin/bundle/setup/saved.php:181594 #: tpl/admin/bundle/conf.php:160 tpl/admin/bundle/setup/saved.php:18 1594 1595 msgid "Reset config" 1595 1596 msgstr "" -
loco-translate/trunk/readme.txt
r3478954 r3482475 103 103 104 104 = 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.) 106 108 107 109 = 2.8.2 = -
loco-translate/trunk/src/admin/config/VersionController.php
r2666243 r3482475 23 23 $breadcrumb = new Loco_admin_Navigation; 24 24 $breadcrumb->add( $title ); 25 $this->setLocoUpdate('0'); 25 26 26 27 // current plugin version … … 41 42 } 42 43 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 45 45 $phpversion = PHP_VERSION; 46 46 if( version_compare($phpversion,'7.4.0','<') ){ … … 48 48 } 49 49 50 51 50 // check WordPress version, No plans to increase this until WP bumps their min PHP requirement. 52 51 $wpversion = $GLOBALS['wp_version']; 53 /*if( version_compare($wpversion,'5.2','<') ){54 $this->setWpUpdate('5.2');55 }*/56 57 52 return $this->view('admin/config/version', compact('breadcrumb','version','phpversion','wpversion') ); 58 53 } 59 54 60 55 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 } 69 68 } 70 71 72 /**73 * @param string minimum recommended version74 *75 private function setWpUpdate( $version ){76 $this->set('wpupdate',$version);77 $this->set('wpupdate_href', admin_url('update-core.php') );78 }*/79 69 80 70 -
loco-translate/trunk/src/mvc/View.php
r3269005 r3482475 147 147 148 148 /** 149 * @param string $prop 150 * @return bool 149 * Test if a view argument exists 151 150 */ 152 151 public function has( string $prop ):bool { … … 157 156 /** 158 157 * Get property after checking with self::has 159 * @param string $prop160 158 * @return mixed 161 159 */ … … 167 165 /** 168 166 * Set a view argument 169 * @param string $prop170 * @param mixed $value171 *172 * @return Loco_mvc_View173 167 */ 174 168 public function set( string $prop, $value ):self { … … 178 172 179 173 174 /** 175 * Remove a view argument 176 */ 177 public function unset( string $prop ):void { 178 $this->scope->offsetUnset($prop); 179 } 180 180 181 181 182 /** -
loco-translate/trunk/src/mvc/ViewParams.php
r3269005 r3482475 66 66 /** 67 67 * @internal 68 * @param string $p property name69 68 * @return mixed 70 69 */ 71 public function __get( $p ){70 public function __get( string $p ){ 72 71 return $this->offsetExists($p) ? $this->offsetGet($p) : null; 73 72 } … … 76 75 /** 77 76 * 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 { 82 79 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); 83 88 } 84 89 … … 89 94 * @return string empty string 90 95 */ 91 public function e( $p ){96 public function e( string $p ):string { 92 97 $text = $this->__get($p); 93 98 echo $this->escape( $text ); -
loco-translate/trunk/tpl/admin/config/version.php
r3034746 r3482475 4 4 */ 5 5 $this->extend('../layout'); 6 6 /* @var Loco_mvc_ViewParams $params */ 7 7 // Loco Translate version: 8 if( $params-> has('update') ):?>8 if( $params->truthy('update') && $params->truthy('update_href') ):?> 9 9 <div class="panel panel-warning"> 10 10 <h3 class="has-icon"> … … 15 15 </p> 16 16 <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> 18 18 <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> 19 19 </p>
Note: See TracChangeset
for help on using the changeset viewer.