- Timestamp:
- 03/19/2026 10:55:18 AM (9 days ago)
- Location:
- polylang
- Files:
-
- 7 deleted
- 7 edited
- 30 copied
-
tags/3.8.1 (copied) (copied from polylang/trunk)
-
tags/3.8.1/LICENSE (copied) (copied from polylang/trunk/LICENSE)
-
tags/3.8.1/admin (deleted)
-
tags/3.8.1/changelog.txt (copied) (copied from polylang/trunk/changelog.txt)
-
tags/3.8.1/css/build/admin.css (copied) (copied from polylang/trunk/css/build/admin.css)
-
tags/3.8.1/css/build/admin.min.css (copied) (copied from polylang/trunk/css/build/admin.min.css)
-
tags/3.8.1/css/build/navigation-language-switcher-editor-style.css (copied) (copied from polylang/trunk/css/build/navigation-language-switcher-editor-style.css)
-
tags/3.8.1/css/build/navigation-language-switcher-editor-style.min.css (copied) (copied from polylang/trunk/css/build/navigation-language-switcher-editor-style.min.css)
-
tags/3.8.1/css/build/selectmenu.css (copied) (copied from polylang/trunk/css/build/selectmenu.css)
-
tags/3.8.1/css/build/selectmenu.min.css (copied) (copied from polylang/trunk/css/build/selectmenu.min.css)
-
tags/3.8.1/css/build/wizard.css (copied) (copied from polylang/trunk/css/build/wizard.css)
-
tags/3.8.1/css/build/wizard.min.css (copied) (copied from polylang/trunk/css/build/wizard.min.css)
-
tags/3.8.1/frontend (deleted)
-
tags/3.8.1/include (deleted)
-
tags/3.8.1/install (deleted)
-
tags/3.8.1/integrations (deleted)
-
tags/3.8.1/js/build/block-editor.js (copied) (copied from polylang/trunk/js/build/block-editor.js)
-
tags/3.8.1/js/build/block-editor.min.js (copied) (copied from polylang/trunk/js/build/block-editor.min.js)
-
tags/3.8.1/js/build/blocks.js (copied) (copied from polylang/trunk/js/build/blocks.js)
-
tags/3.8.1/js/build/blocks.min.js (copied) (copied from polylang/trunk/js/build/blocks.min.js)
-
tags/3.8.1/js/build/settings.js (copied) (copied from polylang/trunk/js/build/settings.js)
-
tags/3.8.1/js/build/settings.min.js (copied) (copied from polylang/trunk/js/build/settings.min.js)
-
tags/3.8.1/modules (deleted)
-
tags/3.8.1/polylang.php (copied) (copied from polylang/trunk/polylang.php) (2 diffs)
-
tags/3.8.1/readme.txt (copied) (copied from polylang/trunk/readme.txt) (2 diffs)
-
tags/3.8.1/settings (deleted)
-
tags/3.8.1/src (copied) (copied from polylang/trunk/src)
-
tags/3.8.1/src/filters.php (copied) (copied from polylang/trunk/src/filters.php)
-
tags/3.8.1/src/modules/wizard/css/wizard.css (copied) (copied from polylang/trunk/src/modules/wizard/css/wizard.css)
-
tags/3.8.1/src/translatable-object.php (modified) (7 diffs)
-
tags/3.8.1/src/translated-object.php (modified) (1 diff)
-
tags/3.8.1/uninstall.php (copied) (copied from polylang/trunk/uninstall.php)
-
tags/3.8.1/vendor/autoload.php (copied) (copied from polylang/trunk/vendor/autoload.php)
-
tags/3.8.1/vendor/composer/autoload_classmap.php (copied) (copied from polylang/trunk/vendor/composer/autoload_classmap.php)
-
tags/3.8.1/vendor/composer/autoload_psr4.php (copied) (copied from polylang/trunk/vendor/composer/autoload_psr4.php)
-
tags/3.8.1/vendor/composer/autoload_real.php (copied) (copied from polylang/trunk/vendor/composer/autoload_real.php)
-
tags/3.8.1/vendor/composer/autoload_static.php (copied) (copied from polylang/trunk/vendor/composer/autoload_static.php)
-
tags/3.8.1/vendor/composer/installed.php (copied) (copied from polylang/trunk/vendor/composer/installed.php) (2 diffs)
-
tags/3.8.1/vendor/composer/platform_check.php (copied) (copied from polylang/trunk/vendor/composer/platform_check.php)
-
trunk/polylang.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/translatable-object.php (modified) (7 diffs)
-
trunk/src/translated-object.php (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
polylang/tags/3.8.1/polylang.php
r3484589 r3486388 11 11 * Plugin URI: https://polylang.pro 12 12 * Description: Adds multilingual capability to WordPress 13 * Version: 3.8 13 * Version: 3.8.1 14 14 * Requires at least: 6.5 15 15 * Requires PHP: 7.4 … … 54 54 55 55 // Go on loading the plugin. 56 define( 'POLYLANG_VERSION', '3.8 ' );56 define( 'POLYLANG_VERSION', '3.8.1' ); 57 57 define( 'PLL_MIN_WP_VERSION', '6.5' ); 58 58 define( 'PLL_MIN_PHP_VERSION', '7.4' ); -
polylang/tags/3.8.1/readme.txt
r3484589 r3486388 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 3.8 8 Stable tag: 3.8.1 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 105 105 106 106 == Changelog == 107 108 = 3.8.1 (2026-03-19) = 109 110 * Fix fatal error when the cache is suspended #1837 #1839 107 111 108 112 = 3.8 (2026-03-17) = -
polylang/tags/3.8.1/src/translatable-object.php
r3467776 r3486388 252 252 * @param int[] $object_ids Array of object IDs. 253 253 * @param string $taxonomy Taxonomy name. 254 * @return array<int,WP_Term |null> Array of terms with object ID as key.254 * @return array<int,WP_Term> Array of terms with object ID as key. 255 255 */ 256 256 protected function get_object_terms( array $object_ids, string $taxonomy ) { … … 262 262 $cached_values = $this->get_from_object_term_cache( $object_ids, $taxonomy ); 263 263 264 // Flatten the array to prime the terms cache. 265 $all_term_ids = array(); 266 foreach ( $cached_values as $term_ids ) { 267 $all_term_ids = array_merge( $all_term_ids, $term_ids ); 268 } 264 $all_term_ids = array_values( $cached_values ); 269 265 _prime_term_caches( $all_term_ids, false ); 270 266 271 267 $terms = array(); 272 foreach ( $cached_values as $object_id => $term_ids ) { 273 if ( ! empty( $term_ids ) ) { 274 $term_id = reset( $term_ids ); // There is only one term for language or translation groups. 275 276 /** @var WP_Term $term */ 277 $term = get_term( $term_id ); 278 $terms[ $object_id ] = $term; 279 } 268 foreach ( $cached_values as $object_id => $term_id ) { 269 /** @var WP_Term $term */ 270 $term = get_term( $term_id ); 271 $terms[ $object_id ] = $term; 280 272 } 281 273 … … 286 278 * Caches all object-relationship terms. 287 279 * 288 * @since 3.8 280 * @since 3.8.1 289 281 * 290 282 * @param int[] $object_ids Array of object IDs. 291 283 * 292 * @return void293 */ 294 protected function prime_object_term_cache( array $object_ids ) {284 * @return int[][][] 285 */ 286 protected function update_object_term_cache( array $object_ids ) { 295 287 $non_cached_ids = array(); 296 288 foreach ( $this->tax_to_cache as $tax ) { … … 299 291 300 292 if ( empty( $non_cached_ids ) ) { 301 return ;293 return array(); 302 294 } 303 295 … … 312 304 313 305 if ( ! is_array( $terms ) ) { 314 return ;306 return array(); 315 307 } 316 308 … … 331 323 wp_cache_add_multiple( $data, "{$tax}_relationships" ); 332 324 } 325 326 return $object_terms; 333 327 } 334 328 … … 341 335 * @param string $taxonomy Taxonomy name. 342 336 * 343 * @return int[][] 344 */ 345 protected function get_from_object_term_cache( array $object_ids, string $taxonomy ) { 346 $this->prime_object_term_cache( $object_ids ); 347 return wp_cache_get_multiple( $object_ids, "{$taxonomy}_relationships" ); 348 } 349 337 * @return int[] Array of term IDs with object ID as key. 338 */ 339 protected function get_from_object_term_cache( array $object_ids, string $taxonomy ): array { 340 $values = wp_cache_get_multiple( $object_ids, "{$taxonomy}_relationships" ); 341 342 // If values are missing, then update the cache and replace missed values by freshly cached ones. 343 $object_terms = $this->update_object_term_cache( $object_ids ); 344 if ( isset( $object_terms[ $taxonomy ] ) ) { 345 $values = array_replace( $values, $object_terms[ $taxonomy ] ); 346 } 347 348 $sanitized_values = array(); 349 foreach ( $values as $object_id => $term_ids ) { 350 if ( ! is_array( $term_ids ) ) { 351 continue; 352 } 353 354 $id = reset( $term_ids ); 355 if ( ! is_numeric( $id ) || empty( $id ) ) { 356 continue; 357 } 358 359 $sanitized_values[ $object_id ] = (int) $id; 360 } 361 362 return $sanitized_values; 363 } 350 364 351 365 /** -
polylang/tags/3.8.1/src/translated-object.php
r3467776 r3486388 154 154 } 155 155 156 $this-> prime_object_term_cache( array_merge( array( $id ), $translations ) );156 $this->update_object_term_cache( array_merge( array( $id ), $translations ) ); 157 157 158 158 $lang = $this->get_language( $id ); -
polylang/tags/3.8.1/vendor/composer/installed.php
r3484589 r3486388 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' ebe3043546cd03a644091bf927c9ea78266fafbf',6 'reference' => '86992faee7a54a4b542fa390367d66d1120734d5', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' ebe3043546cd03a644091bf927c9ea78266fafbf',16 'reference' => '86992faee7a54a4b542fa390367d66d1120734d5', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
polylang/trunk/polylang.php
r3484589 r3486388 11 11 * Plugin URI: https://polylang.pro 12 12 * Description: Adds multilingual capability to WordPress 13 * Version: 3.8 13 * Version: 3.8.1 14 14 * Requires at least: 6.5 15 15 * Requires PHP: 7.4 … … 54 54 55 55 // Go on loading the plugin. 56 define( 'POLYLANG_VERSION', '3.8 ' );56 define( 'POLYLANG_VERSION', '3.8.1' ); 57 57 define( 'PLL_MIN_WP_VERSION', '6.5' ); 58 58 define( 'PLL_MIN_PHP_VERSION', '7.4' ); -
polylang/trunk/readme.txt
r3484589 r3486388 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 3.8 8 Stable tag: 3.8.1 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 105 105 106 106 == Changelog == 107 108 = 3.8.1 (2026-03-19) = 109 110 * Fix fatal error when the cache is suspended #1837 #1839 107 111 108 112 = 3.8 (2026-03-17) = -
polylang/trunk/src/translatable-object.php
r3467776 r3486388 252 252 * @param int[] $object_ids Array of object IDs. 253 253 * @param string $taxonomy Taxonomy name. 254 * @return array<int,WP_Term |null> Array of terms with object ID as key.254 * @return array<int,WP_Term> Array of terms with object ID as key. 255 255 */ 256 256 protected function get_object_terms( array $object_ids, string $taxonomy ) { … … 262 262 $cached_values = $this->get_from_object_term_cache( $object_ids, $taxonomy ); 263 263 264 // Flatten the array to prime the terms cache. 265 $all_term_ids = array(); 266 foreach ( $cached_values as $term_ids ) { 267 $all_term_ids = array_merge( $all_term_ids, $term_ids ); 268 } 264 $all_term_ids = array_values( $cached_values ); 269 265 _prime_term_caches( $all_term_ids, false ); 270 266 271 267 $terms = array(); 272 foreach ( $cached_values as $object_id => $term_ids ) { 273 if ( ! empty( $term_ids ) ) { 274 $term_id = reset( $term_ids ); // There is only one term for language or translation groups. 275 276 /** @var WP_Term $term */ 277 $term = get_term( $term_id ); 278 $terms[ $object_id ] = $term; 279 } 268 foreach ( $cached_values as $object_id => $term_id ) { 269 /** @var WP_Term $term */ 270 $term = get_term( $term_id ); 271 $terms[ $object_id ] = $term; 280 272 } 281 273 … … 286 278 * Caches all object-relationship terms. 287 279 * 288 * @since 3.8 280 * @since 3.8.1 289 281 * 290 282 * @param int[] $object_ids Array of object IDs. 291 283 * 292 * @return void293 */ 294 protected function prime_object_term_cache( array $object_ids ) {284 * @return int[][][] 285 */ 286 protected function update_object_term_cache( array $object_ids ) { 295 287 $non_cached_ids = array(); 296 288 foreach ( $this->tax_to_cache as $tax ) { … … 299 291 300 292 if ( empty( $non_cached_ids ) ) { 301 return ;293 return array(); 302 294 } 303 295 … … 312 304 313 305 if ( ! is_array( $terms ) ) { 314 return ;306 return array(); 315 307 } 316 308 … … 331 323 wp_cache_add_multiple( $data, "{$tax}_relationships" ); 332 324 } 325 326 return $object_terms; 333 327 } 334 328 … … 341 335 * @param string $taxonomy Taxonomy name. 342 336 * 343 * @return int[][] 344 */ 345 protected function get_from_object_term_cache( array $object_ids, string $taxonomy ) { 346 $this->prime_object_term_cache( $object_ids ); 347 return wp_cache_get_multiple( $object_ids, "{$taxonomy}_relationships" ); 348 } 349 337 * @return int[] Array of term IDs with object ID as key. 338 */ 339 protected function get_from_object_term_cache( array $object_ids, string $taxonomy ): array { 340 $values = wp_cache_get_multiple( $object_ids, "{$taxonomy}_relationships" ); 341 342 // If values are missing, then update the cache and replace missed values by freshly cached ones. 343 $object_terms = $this->update_object_term_cache( $object_ids ); 344 if ( isset( $object_terms[ $taxonomy ] ) ) { 345 $values = array_replace( $values, $object_terms[ $taxonomy ] ); 346 } 347 348 $sanitized_values = array(); 349 foreach ( $values as $object_id => $term_ids ) { 350 if ( ! is_array( $term_ids ) ) { 351 continue; 352 } 353 354 $id = reset( $term_ids ); 355 if ( ! is_numeric( $id ) || empty( $id ) ) { 356 continue; 357 } 358 359 $sanitized_values[ $object_id ] = (int) $id; 360 } 361 362 return $sanitized_values; 363 } 350 364 351 365 /** -
polylang/trunk/src/translated-object.php
r3467776 r3486388 154 154 } 155 155 156 $this-> prime_object_term_cache( array_merge( array( $id ), $translations ) );156 $this->update_object_term_cache( array_merge( array( $id ), $translations ) ); 157 157 158 158 $lang = $this->get_language( $id ); -
polylang/trunk/vendor/composer/installed.php
r3484589 r3486388 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' ebe3043546cd03a644091bf927c9ea78266fafbf',6 'reference' => '86992faee7a54a4b542fa390367d66d1120734d5', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-master', 15 15 'version' => 'dev-master', 16 'reference' => ' ebe3043546cd03a644091bf927c9ea78266fafbf',16 'reference' => '86992faee7a54a4b542fa390367d66d1120734d5', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.