Plugin Directory

Changeset 1369048


Ignore:
Timestamp:
03/11/2016 09:55:32 AM (10 years ago)
Author:
studioreforma
Message:

Auto-change filenames as well

Location:
bulglish-permalinks/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bulglish-permalinks/trunk/bulglish-permalinks.php

    r1098480 r1369048  
    33Plugin Name: Bulglish permalinks
    44Plugin URI: http://talkingaboutthis.eu
    5 Description: This plugins provides bulglish permalinks for cyrillic titles. Based on the work of Iacovos Constantinou
     5Description: This plugins provides bulglish permalinks for cyrillic titles and filenames. Based on the work of Iacovos Constantinou
    66Author: Boyan Raichev
    7 Version: 1.2.0
     7Version: 1.3.0
    88Author URI: http://talkingaboutthis.eu/
    99*/
     
    5454}
    5555add_filter('sanitize_title', 'bulglish_permalinks_title', 1);
     56
     57// now also change filenames!
     58function bulglish_filenames( $file ){
     59    $file['name'] = bulglish_permalinks_title($file['name']);
     60    return $file;
     61}
     62add_filter('wp_handle_upload_prefilter', 'bulglish_filenames' );
    5663?>
  • bulglish-permalinks/trunk/readme.txt

    r1098481 r1369048  
    44Tags: bulgarian, bulgarian permalink, cyrillic, slugs, transliteration
    55Requires at least: 3.0.1
    6 Tested up to: 4.1.0
    7 Stable tag: 1.2.0
     6Tested up to: 4.4.0
     7Stable tag: 1.3.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 This plugin converts Bulgarian cyrillic characters in slugs to Latin characters, according to the official rules for transliteration.
     11This plugin converts Bulgarian cyrillic characters in slugs and filenames to Latin characters, according to the official rules for transliteration.
    1212
    1313== Description ==
    1414
    15 This plugin converts Bulgarian cyrillic characters in slugs to Latin characters, according to the official rules for transliteration.
     15This plugin converts Bulgarian cyrillic characters in slugs and filenames to Latin characters, according to the official rules for transliteration.
    1616
    1717Cyrillic letters in URLs, while supported, are ugly and when copy/pasted around the internet are often encoded (converted to those ugly URLs looking like %DU^ED%…)
    1818The Plugin based on the work of Iacovos Constantinou for a similar plugin for greek alphabet.
     19
     20The plugin automatically converts slugs when a post is created, as well as file names, when a file is uploaded.
    1921
    2022It will also work for Russian permalinks, as it matches all the letters in the Russian alphabet, although the user should have in mind that there are minor differences in the common transliterations rules in the two languages.
     
    3739== Changelog ==
    3840
     41= 1.3.0 =
     42* Now will auto convert filenames upon upload
     43
    3944= 1.2.0 =
    4045* Works on front end saving of posts as well
     
    4954== Upgrade Notice ==
    5055
     56= 1.3.0 =
     57Auto converts filenames upon upload
     58
    5159= 1.2.0 =
    5260Will work on front-end saving of posts as well
Note: See TracChangeset for help on using the changeset viewer.