Plugin Directory

Changeset 2816808


Ignore:
Timestamp:
11/11/2022 07:48:19 PM (3 years ago)
Author:
bigdropgr
Message:
  • Fixed the issue with the convertion of old URLs.
  • If you are facing any error 404 with mass converted old URLs, please visit the Admin > Greek Multi Tool > Convert Old Permalinks and hit the Convert Button.
Location:
greek-multi-tool
Files:
60 added
3 edited

Legend:

Unmodified
Added
Removed
  • greek-multi-tool/trunk/admin/functions/oldtranslator.php

    r2812381 r2816808  
    22
    33function grmlt_old_sanitizer($text) {
     4        $expressions = array(
    45
    5     $expressions = array(
     6            '/[αάΑΆ]/u'   => 'a',
     7            '/[βΒ]/u'     => 'v',
     8            '/[γΓ]/u'     => 'g',
     9            '/[δΔ]/u'     => 'd',
     10            '/[εέΕΈ]/u'   => 'e',
     11            '/[ζΖ]/u'     => 'z',
     12            '/[ηήΗΉ]/u'   => 'i',
     13            '/[θΘ]/u'     => 'th',
     14            '/[ιίϊΙΊΪ]/u' => 'i',
     15            '/[κΚ]/u'     => 'k',
     16            '/[λΛ]/u'     => 'l',
     17            '/[μΜ]/u'     => 'm',
     18            '/[νΝ]/u'     => 'n',
     19            '/[ξΞ]/u'     => 'x',
     20            '/[οόΟΌ]/u'   => 'o',
     21            '/[πΠ]/u'     => 'p',
     22            '/[ρΡ]/u'     => 'r',
     23            '/[σςΣ]/u'    => 's',
     24            '/[τΤ]/u'     => 't',
     25            '/[υύϋΥΎΫ]/u' => 'y',
     26            '/[φΦ]/iu'    => 'f',
     27            '/[χΧ]/u'     => 'ch',
     28            '/[ψΨ]/u'     => 'ps',
     29            '/[ωώ]/iu'    => 'o',
     30            '/[--]/'      => '-',
     31            '/[.]/'       => '',
    632
    7         '/[αάΑΆ]/u'   => 'a',
    8         '/[βΒ]/u'     => 'v',
    9         '/[γΓ]/u'     => 'g',
    10         '/[δΔ]/u'     => 'd',
    11         '/[εέΕΈ]/u'   => 'e',
    12         '/[ζΖ]/u'     => 'z',
    13         '/[ηήΗΉ]/u'   => 'i',
    14         '/[θΘ]/u'     => 'th',
    15         '/[ιίϊΙΊΪ]/u' => 'i',
    16         '/[κΚ]/u'     => 'k',
    17         '/[λΛ]/u'     => 'l',
    18         '/[μΜ]/u'     => 'm',
    19         '/[νΝ]/u'     => 'n',
    20         '/[ξΞ]/u'     => 'x',
    21         '/[οόΟΌ]/u'   => 'o',
    22         '/[πΠ]/u'     => 'p',
    23         '/[ρΡ]/u'     => 'r',
    24         '/[σςΣ]/u'    => 's',
    25         '/[τΤ]/u'     => 't',
    26         '/[υύϋΥΎΫ]/u' => 'y',
    27         '/[φΦ]/iu'    => 'f',
    28         '/[χΧ]/u'     => 'ch',
    29         '/[ψΨ]/u'     => 'ps',
    30         '/[ωώ]/iu'    => 'o',
    31         '/[ ]/'       => '-',
     33        );
    3234
    33     );
     35        // Stop Words functionality
     36        $stop_words = get_option( 'grmlt_stwords' );
     37        if ( isset( $stop_words ) &&  $stop_words != '') {
     38            $stop_words = explode( ',' , $stop_words );
     39            $text = str_replace( $stop_words, '', $text );
     40        }
    3441
    35    
     42        $text = preg_replace( array_keys($expressions), array_values($expressions), $text );
    3643
    37     $text = preg_replace( array_keys($expressions), array_values($expressions), $text );
    38     return $text;
     44        // Remove one letter words
     45        if ( get_option( 'grmlt_one_letter_words' ) == 1 ) {
     46            $text = preg_replace('/\s+\D{1}(?!\S)|(?<!\S)\D{1}\s+/', '', $text);
     47        }
    3948
     49        // Remove two letter words
     50        if ( get_option( 'grmlt_two_letter_words' ) == 1 ) {
     51            $text = preg_replace('/\s+\D{2}(?!\S)|(?<!\S)\D{2}\s+/', '', $text);
     52        }
     53
     54        return $text;
     55       
    4056}
    4157
  • greek-multi-tool/trunk/grmlt-plugin.php

    r2815489 r2816808  
    22/**
    33 * @link              https://bigdrop.gr
    4  * @since             2.1.1
     4 * @since             2.1.2
    55 * @package           Grmlt_Plugin
    66 *
     
    99 * Plugin URI:        https://bigdrop.gr/greek-multi-tool
    1010 * Description:       This plugin provides a handful of tools and key functionalities to simplify and fix the greek language used in your webpage. For example it change the greek character urls to latin, remove the uppercase accents.
    11  * Version:           2.1.1
     11 * Version:           2.1.2
    1212 * Author:            BigDrop.gr
    1313 * Author URI:        https://bigdrop.gr
     
    2929 * Start at version 2.1.1
    3030 */
    31 define( 'GRMLT_PLUGIN_VERSION', '2.1.1' );
     31define( 'GRMLT_PLUGIN_VERSION', '2.1.2' );
    3232
    3333/**
  • greek-multi-tool/trunk/readme.txt

    r2815489 r2816808  
    33Tags: greek, greeklish, permalinks, accent remover, multi tool
    44Requires at least: 5.4
    5 Stable tag: 2.1.1
     5Stable tag: 2.1.2
    66Tested up to: 6.1.0
    77Requires PHP: 7.4
     
    179179* Add link to settings page from the plugins list
    180180
     181= 2.1.2 =
     182
     183* Fixed the issue with the convertion of old URLs.
     184* If you are facing any error 404 with mass converted old URLs, please visit the Admin > Greek Multi Tool > Convert Old Permalinks and hit the Convert Button.
     185
    181186== Upgrade Notice ==
    182187Make sure to keep this plugin up to date, to avoid any issue with the translation functionalities.
Note: See TracChangeset for help on using the changeset viewer.