Plugin Directory

Changeset 3445244


Ignore:
Timestamp:
01/23/2026 01:31:00 AM (2 months ago)
Author:
senlin
Message:

commit v2.3.7 - see changelog for details

Location:
so-pinyin-slugs
Files:
25 added
4 edited

Legend:

Unmodified
Added
Removed
  • so-pinyin-slugs/trunk/README.md

    r3437363 r3445244  
    33[![plugin version](https://img.shields.io/wordpress/plugin/v/so-pinyin-slugs.svg)](https://wordpress.org/plugins/so-pinyin-slugs) [![WP compatibility](https://plugintests.com/plugins/so-pinyin-slugs/wp-badge.svg)](https://plugintests.com/plugins/so-pinyin-slugs/latest) [![PHP compatibility](https://plugintests.com/plugins/so-pinyin-slugs/php-badge.svg)](https://plugintests.com/plugins/so-pinyin-slugs/latest)
    44
    5 ###### Last updated on April 27, 2025
    6 ###### tested up to WP 6.8
     5###### Last updated on January 23, 2026
     6###### tested up to WP 6.9
    77###### Authors: [Pieter Bos](https://github.com/senlin)
    88###### [Stable Version](https://wordpress.org/plugins/so-pinyin-slugs) (via WordPress Plugins Repository)
     
    7575
    7676## Changelog
     77
     78### 2.3.7
     79
     80* date: January 23, 2026
     81* fix PHP 8+ warning by aligning pinyin dictionary global variable name [issue 31](https://github.com/senlin/pinyin-slugs/issues/31)
    7782
    7883### 2.3.6
  • so-pinyin-slugs/trunk/inc/functions.php

    r3437363 r3445244  
    88  * since version 2.0.0
    99  * @modified 2.3.2
     10  * @modified 2.3.7
    1011  */
    1112
     
    1516    $strTitle = sanitize_text_field( $strTitle ); // Sanitizing and Validating Input ($strTitle)
    1617    // Load Chinese character dictionary
    17     global $dictPinyin;
     18    global $sops_dictPinyin;
    1819
    1920    $strRet = '';
     
    4849            $fullChar = substr( $strTitle, $i, 3 ); $i+=2;
    4950            //Find spelling in the dictionary; if it cannotfind the character, it will be ignored
    50             foreach ( $dictPinyin as $pinyin=>$val ) {
    51                 if ( strpos( $val, $fullChar ) !== false ) {
    52                         $strRet .= $pinyin;
    53                     break;
    54                 }
    55             }
     51            if ( ! empty( $sops_dictPinyin ) && is_array( $sops_dictPinyin ) ) {
     52                foreach ( $sops_dictPinyin as $pinyin=>$val ) {
     53                    if ( strpos( $val, $fullChar ) !== false ) {
     54                            $strRet .= $pinyin;
     55                        break;
     56                    }
     57                }
     58            }
    5659        } else {
    5760            /**
  • so-pinyin-slugs/trunk/readme.txt

    r3437363 r3445244  
    44Requires at least: 4.6
    55Tested up to: 6.9
    6 Stable tag: 2.3.6
     6Stable tag: 2.3.7
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7979
    8080== Changelog ==
     81
     82= 2.3.7 =
     83
     84* date: January 23, 2026
     85* fix PHP 8+ warning by aligning pinyin dictionary global variable name [issue 31](https://github.com/senlin/pinyin-slugs/issues/31)
    8186
    8287= 2.3.6 =
  • so-pinyin-slugs/trunk/so-pinyin-slugs.php

    r3437363 r3445244  
    55Description: Transforms Simplified or Traditional Chinese character titles into Pinyin to create a permalink friendly slug.
    66Author: SO WP
    7 Version: 2.3.6
     7Version: 2.3.7
    88Author URI: https://so-wp.com
    99License: GPL v2 or later
     
    8484
    8585        /* Set the version number of the plugin. */
    86         define( 'SOPS_VERSION', '2.3.6' );
     86        define( 'SOPS_VERSION', '2.3.7' );
    8787
    8888        /* Set constant path to the plugin directory. */
Note: See TracChangeset for help on using the changeset viewer.