Plugin Directory

Changeset 3077802


Ignore:
Timestamp:
04/26/2024 07:02:21 PM (2 years ago)
Author:
mi13
Message:

fix bug

Location:
mi13-glossary/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mi13-glossary/trunk/mi13-glossary.php

    r2954501 r3077802  
    44Plugin URI:     https://wordpress.org/plugins/mi13-glossary/
    55Description:    Glossary plugin for your site (ru).
    6 Version:        2.8
     6Version:        2.9
    77Author:         mi13
    88 
     
    187187            $text = preg_replace( '/\<\/?[^>]+>/U','<mi13_glossary_only_tag>',$text);
    188188           
    189             usort($array, function($a, $b) {return( strlen($a["title"]) < strlen($b["title"]) );}); // Сортируем лестницей чтобы исключить повторного пойска
     189            usort($array, function($a, $b) {
     190                return strlen($a["title"]) < strlen($b["title"]) ? 1 : -1;
     191            }); // Сортируем лестницей чтобы исключить повторного пойска
    190192           
    191193            foreach( $array as $key ) {
     
    307309            }
    308310            unset($glos);
    309             usort($keys, function($a, $b) {return( strlen($a["title"]) < strlen($b["title"]) );});
     311            usort($keys, function($a, $b) {
     312                return strlen($a["title"]) < strlen($b["title"]) ? 1 : -1;
     313            });
    310314            $args = array(
    311315                'post_type' => 'post',
     
    547551                $keys[] = $post->post_title;
    548552            }
    549             usort($keys, function($a, $b) {return( strlen($a) < strlen($b) );});
     553            usort($keys, function($a, $b) {
     554                return strlen($a) < strlen($b) ? 1 : -1;
     555            });
    550556            $i = 1;
    551557            foreach( $keys as $key ) {
  • mi13-glossary/trunk/readme.txt

    r2954501 r3077802  
    22Contributors: mi13
    33Tags: glossary, modal keys
    4 Tested up to: 6.3
    5 Stable tag: 2.8
     4Tested up to: 6.5.2
     5Stable tag: 2.9
    66License: GPLv2 or later
    77License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5959= 2.8 =
    6060* Во фронте jquery не требуется теперь.
     61= 2.9 =
     62* fix bug for php 8.
Note: See TracChangeset for help on using the changeset viewer.