Plugin Directory

Changeset 3103870

Timestamp:
06/18/2024 06:34:20 AM (7 weeks ago)
Author:
Chouby
Message:

Version 3.6.3

Location:
polylang
Files:
7 edited
166 copied

Legend:

Unmodified
Added
Removed
  • polylang/tags/3.6.3/frontend/frontend-filters-search.php

    r3067374 r3103870  
    8989
    9090    /**
    91      * Adds the language information in admin bar search form
     91     * Adds the language information in
    9292     *
    9393     * @since 1.2
     
    9696     */
    9797    public function add_admin_bar_menus() {
    98         remove_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 4 );
    99         add_action( 'admin_bar_menu', array( $this, 'admin_bar_search_menu' ), 4 );
     98        // Backward compatibility with WP < 6.6. The priority was 4 before this version, 9999 since then.
     99        $priority = has_action( 'admin_bar_menu', 'wp_admin_bar_search_menu' );
     100        if ( ! is_int( $priority ) ) {
     101            return;
     102        }
     103
     104        remove_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', $priority );
     105        add_action( 'admin_bar_menu', array( $this, 'admin_bar_search_menu' ), $priority );
    100106    }
    101107
  • polylang/tags/3.6.3/include/language.php

    r3042028 r3103870  
    374374     */
    375375    public static function get_flag_informations( $code ) {
    376         $flag = array( 'url' => '' );
     376        $default_flag = array(
     377            'url' => '',
     378            'src' => '',
     379        );
    377380
    378381        // Polylang builtin flags.
    379382        if ( ! empty( $code ) && is_readable( POLYLANG_DIR . ( $file = '/flags/' . $code . '.png' ) ) ) {
    380             $flag['url'] = plugins_url( $file, POLYLANG_FILE );
     383            $flag['url'] = plugins_url( $file, POLYLANG_FILE );
    381384
    382385            // If base64 encoded flags are preferred.
     
    384387                $imagesize = getimagesize( POLYLANG_DIR . $file );
    385388                if ( is_array( $imagesize ) ) {
    386                     list( $flag['width'], $flag['height'] ) = $imagesize;
     389                    list( $flag['height'] ) = $imagesize;
    387390                }
    388                 $file_contents = file_get_contents( POLYLANG_DIR . $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
    389                 $flag['src'] = 'data:image/png;base64,' . base64_encode( $file_contents ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
     391                $file_contents = file_get_contents( POLYLANG_DIR . $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
     392                $flag['src'] = 'data:image/png;base64,' . base64_encode( $file_contents ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
    390393            }
    391394        }
     
    406409         * @param string $code Flag code.
    407410         */
    408         $flag = apply_filters( 'pll_flag', $flag, $code );
     411        $flag = apply_filters( 'pll_flag', $flag, $code );
    409412
    410413        $flag['url'] = esc_url_raw( $flag['url'] );
    411414
    412         if ( empty( $flag['src'] ) ) {
     415        if ( empty( $flag['src'] ) ) {
    413416            $flag['src'] = esc_url( set_url_scheme( $flag['url'], 'relative' ) );
    414417        }
  • polylang/tags/3.6.3/modules/wpml/wpml-compat.php

    r2907847 r3103870  
    9797    /**
    9898     * Unlike pll_register_string, icl_register_string stores the string in database
    99      * so we need to do the same as some plugins or themes may expect this
    100      * we use a serialized option to do this
     99     * so we need to do the same as some plugins or themes may expect this
     100     *
    101101     *
    102102     * @since 1.0.2
    103103     *
    104      * @param string $context The group in which the string is registered.
    105      * @param string $name    A unique name for the string.
    106      * @param string $string  The string to register.
     104     * @param string $context The group in which the string is registered.
     105     * @param string $name    A unique name for the string.
     106     * @param string $string  The string to register.
    107107     * @return void
    108108     */
     
    110110        if ( ! $string || ! is_scalar( $string ) ) {
    111111            return;
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
    112122        }
    113123
  • polylang/tags/3.6.3/polylang.php

    r3096618 r3103870  
    1111 * Plugin URI:        https://polylang.pro
    1212 * Description:       Adds multilingual capability to WordPress
    13  * Version:           3.6.2
     13 * Version:           3.6.
    1414 * Requires at least: 6.2
    1515 * Requires PHP:      7.0
     
    5454} else {
    5555    // Go on loading the plugin
    56     define( 'POLYLANG_VERSION', '3.6.2' );
     56    define( 'POLYLANG_VERSION', '3.6.' );
    5757    define( 'PLL_MIN_WP_VERSION', '6.2' );
    5858    define( 'PLL_MIN_PHP_VERSION', '7.0' );
  • polylang/tags/3.6.3/readme.txt

    r3096618 r3103870  
    66Tested up to: 6.5
    77Requires PHP: 7.0
    8 Stable tag: 3.6.2
     8Stable tag: 3.6.
    99License: GPLv3 or later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    105105
    106106== Changelog ==
     107
     108
     109
     110
     111
     112
     113
    107114
    108115= 3.6.2 (2024-06-03) =
  • polylang/tags/3.6.3/vendor/composer/installed.php

    r3096618 r3103870  
    44        'pretty_version' => '3.6.x-dev',
    55        'version' => '3.6.9999999.9999999-dev',
    6         'reference' => '4ccb4bed5fb87bccf22ce8d829c96fc1719b50fa',
     6        'reference' => '',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => '3.6.x-dev',
    1515            'version' => '3.6.9999999.9999999-dev',
    16             'reference' => '4ccb4bed5fb87bccf22ce8d829c96fc1719b50fa',
     16            'reference' => '',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • polylang/trunk/frontend/frontend-filters-search.php

    r3067374 r3103870  
    8989
    9090    /**
    91      * Adds the language information in admin bar search form
     91     * Adds the language information in
    9292     *
    9393     * @since 1.2
     
    9696     */
    9797    public function add_admin_bar_menus() {
    98         remove_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 4 );
    99         add_action( 'admin_bar_menu', array( $this, 'admin_bar_search_menu' ), 4 );
     98        // Backward compatibility with WP < 6.6. The priority was 4 before this version, 9999 since then.
     99        $priority = has_action( 'admin_bar_menu', 'wp_admin_bar_search_menu' );
     100        if ( ! is_int( $priority ) ) {
     101            return;
     102        }
     103
     104        remove_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', $priority );
     105        add_action( 'admin_bar_menu', array( $this, 'admin_bar_search_menu' ), $priority );
    100106    }
    101107
  • polylang/trunk/include/language.php

    r3042028 r3103870  
    374374     */
    375375    public static function get_flag_informations( $code ) {
    376         $flag = array( 'url' => '' );
     376        $default_flag = array(
     377            'url' => '',
     378            'src' => '',
     379        );
    377380
    378381        // Polylang builtin flags.
    379382        if ( ! empty( $code ) && is_readable( POLYLANG_DIR . ( $file = '/flags/' . $code . '.png' ) ) ) {
    380             $flag['url'] = plugins_url( $file, POLYLANG_FILE );
     383            $flag['url'] = plugins_url( $file, POLYLANG_FILE );
    381384
    382385            // If base64 encoded flags are preferred.
     
    384387                $imagesize = getimagesize( POLYLANG_DIR . $file );
    385388                if ( is_array( $imagesize ) ) {
    386                     list( $flag['width'], $flag['height'] ) = $imagesize;
     389                    list( $flag['height'] ) = $imagesize;
    387390                }
    388                 $file_contents = file_get_contents( POLYLANG_DIR . $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
    389                 $flag['src'] = 'data:image/png;base64,' . base64_encode( $file_contents ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
     391                $file_contents = file_get_contents( POLYLANG_DIR . $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
     392                $flag['src'] = 'data:image/png;base64,' . base64_encode( $file_contents ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
    390393            }
    391394        }
     
    406409         * @param string $code Flag code.
    407410         */
    408         $flag = apply_filters( 'pll_flag', $flag, $code );
     411        $flag = apply_filters( 'pll_flag', $flag, $code );
    409412
    410413        $flag['url'] = esc_url_raw( $flag['url'] );
    411414
    412         if ( empty( $flag['src'] ) ) {
     415        if ( empty( $flag['src'] ) ) {
    413416            $flag['src'] = esc_url( set_url_scheme( $flag['url'], 'relative' ) );
    414417        }
  • polylang/trunk/modules/wpml/wpml-compat.php

    r2907847 r3103870  
    9797    /**
    9898     * Unlike pll_register_string, icl_register_string stores the string in database
    99      * so we need to do the same as some plugins or themes may expect this
    100      * we use a serialized option to do this
     99     * so we need to do the same as some plugins or themes may expect this
     100     *
    101101     *
    102102     * @since 1.0.2
    103103     *
    104      * @param string $context The group in which the string is registered.
    105      * @param string $name    A unique name for the string.
    106      * @param string $string  The string to register.
     104     * @param string $context The group in which the string is registered.
     105     * @param string $name    A unique name for the string.
     106     * @param string $string  The string to register.
    107107     * @return void
    108108     */
     
    110110        if ( ! $string || ! is_scalar( $string ) ) {
    111111            return;
     112
     113
     114
     115
     116
     117
     118
     119
     120
     121
    112122        }
    113123
  • polylang/trunk/polylang.php

    r3096618 r3103870  
    1111 * Plugin URI:        https://polylang.pro
    1212 * Description:       Adds multilingual capability to WordPress
    13  * Version:           3.6.2
     13 * Version:           3.6.
    1414 * Requires at least: 6.2
    1515 * Requires PHP:      7.0
     
    5454} else {
    5555    // Go on loading the plugin
    56     define( 'POLYLANG_VERSION', '3.6.2' );
     56    define( 'POLYLANG_VERSION', '3.6.' );
    5757    define( 'PLL_MIN_WP_VERSION', '6.2' );
    5858    define( 'PLL_MIN_PHP_VERSION', '7.0' );
  • polylang/trunk/readme.txt

    r3096618 r3103870  
    66Tested up to: 6.5
    77Requires PHP: 7.0
    8 Stable tag: 3.6.2
     8Stable tag: 3.6.
    99License: GPLv3 or later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    105105
    106106== Changelog ==
     107
     108
     109
     110
     111
     112
     113
    107114
    108115= 3.6.2 (2024-06-03) =
  • polylang/trunk/vendor/composer/installed.php

    r3096618 r3103870  
    44        'pretty_version' => '3.6.x-dev',
    55        'version' => '3.6.9999999.9999999-dev',
    6         'reference' => '4ccb4bed5fb87bccf22ce8d829c96fc1719b50fa',
     6        'reference' => '',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => '3.6.x-dev',
    1515            'version' => '3.6.9999999.9999999-dev',
    16             'reference' => '4ccb4bed5fb87bccf22ce8d829c96fc1719b50fa',
     16            'reference' => '',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.