Plugin Directory

Changeset 3269528


Ignore:
Timestamp:
04/09/2025 09:31:06 AM (11 months ago)
Author:
Chouby
Message:

Version 3.7-rc1

Location:
polylang/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • polylang/trunk/frontend/frontend-filters-links.php

    r3042028 r3269528  
    277277                array( 'function' => 'get_custom_logo' ),
    278278                array( 'function' => 'render_block_core_site_title' ),
     279                array( 'function' => 'render_block_core_home_link' ),
    279280            );
    280281
  • polylang/trunk/include/Options/Business/Sync.php

    r3243124 r3269528  
    66namespace WP_Syntex\Polylang\Options\Business;
    77
     8use NOOP_Translations;
     9use PLL_Settings_Sync;
    810use WP_Syntex\Polylang\Options\Primitive\Abstract_List;
    911
     
    4143     */
    4244    protected function get_data_structure(): array {
    43         add_filter( 'lang_dir_for_domain', '__return_false' ); // Prevents loading the translations too early.
    44         $enum = array_keys( \PLL_Settings_Sync::list_metas_to_sync() );
    45         remove_filter( 'lang_dir_for_domain', '__return_false' );
    46         unload_textdomain( 'polylang', true ); // Required to allow `_load_textdomain_just_in_time()` to load the translations.
     45        $GLOBALS['l10n']['polylang'] = new NOOP_Translations(); // Prevents loading the translations too early.
     46        $enum = array_keys( PLL_Settings_Sync::list_metas_to_sync() );
     47        unset( $GLOBALS['l10n']['polylang'] );
     48
    4749        return array(
    4850            'type'  => 'array',
  • polylang/trunk/polylang.php

    r3263029 r3269528  
    1111 * Plugin URI:        https://polylang.pro
    1212 * Description:       Adds multilingual capability to WordPress
    13  * Version:           3.7-beta3
     13 * Version:           3.7-rc1
    1414 * Requires at least: 6.2
    1515 * Requires PHP:      7.2
     
    5353} else {
    5454    // Go on loading the plugin
    55     define( 'POLYLANG_VERSION', '3.7-beta3' );
     55    define( 'POLYLANG_VERSION', '3.7-rc1' );
    5656    define( 'PLL_MIN_WP_VERSION', '6.2' );
    5757    define( 'PLL_MIN_PHP_VERSION', '7.2' );
  • polylang/trunk/readme.txt

    r3263029 r3269528  
    139139* Fix possible term duplication #1490
    140140* Fix sanitization of translated options that may impact other strings #1571
     141* Fix home link block not translated #1647
    141142* Fix a conflict with WooCommerce Price Based on Country #1638
    142143
  • polylang/trunk/vendor/autoload.php

    r3221451 r3269528  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
  • polylang/trunk/vendor/composer/InstalledVersions.php

    r2974283 r3269528  
    2828{
    2929    /**
     30     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
     31     * @internal
     32     */
     33    private static $selfDir = null;
     34
     35    /**
    3036     * @var mixed[]|null
    3137     * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
    3238     */
    3339    private static $installed;
     40
     41    /**
     42     * @var bool
     43     */
     44    private static $installedIsLocalDir;
    3445
    3546    /**
     
    310321        self::$installed = $data;
    311322        self::$installedByVendor = array();
     323
     324        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     325        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     326        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     327        // all installed packages for example
     328        self::$installedIsLocalDir = false;
     329    }
     330
     331    /**
     332     * @return string
     333     */
     334    private static function getSelfDir()
     335    {
     336        if (self::$selfDir === null) {
     337            self::$selfDir = strtr(__DIR__, '\\', '/');
     338        }
     339
     340        return self::$selfDir;
    312341    }
    313342
     
    323352
    324353        $installed = array();
     354        $copiedLocalDir = false;
    325355
    326356        if (self::$canGetVendors) {
     357            $selfDir = self::getSelfDir();
    327358            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     359                $vendorDir = strtr($vendorDir, '\\', '/');
    328360                if (isset(self::$installedByVendor[$vendorDir])) {
    329361                    $installed[] = self::$installedByVendor[$vendorDir];
     
    331363                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332364                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     365                    self::$installedByVendor[$vendorDir] = $required;
     366                    $installed[] = $required;
     367                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     368                        self::$installed = $required;
     369                        self::$installedIsLocalDir = true;
    336370                    }
     371                }
     372                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     373                    $copiedLocalDir = true;
    337374                }
    338375            }
     
    351388        }
    352389
    353         if (self::$installed !== array()) {
     390        if (self::$installed !== array() && !$copiedLocalDir) {
    354391            $installed[] = self::$installed;
    355392        }
  • polylang/trunk/vendor/composer/installed.php

    r3263029 r3269528  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'bebeddac74b7410fc7b81893bdc73afdae97c56c',
     6        'reference' => '4feca17a604abccbec27eee121f8206855c39a7a',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-master',
    1515            'version' => 'dev-master',
    16             'reference' => 'bebeddac74b7410fc7b81893bdc73afdae97c56c',
     16            'reference' => '4feca17a604abccbec27eee121f8206855c39a7a',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.