]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - user/plugins/hyphens-in-urls/plugin.php
Revert to a-zA-Z0-9 charset in short url keywords, but bundle a core plugin allowing...
[Github/YOURLS.git] / user / plugins / hyphens-in-urls / plugin.php
1 <?php\r
2 /*\r
3 Plugin Name: Allow Hyphens in Short URLs\r
4 Plugin URI: http://yourls.org/\r
5 Description: Allow hyphens in short URLs (like <tt>http://sho.rt/hello-world</tt>)\r
6 Version: 1.0\r
7 Author: Ozh\r
8 Author URI: http://ozh.org/\r
9 */\r
10 \r
11 yourls_add_filter( 'get_shorturl_charset', 'ozh_hyphen_in_charset' );\r
12 function ozh_hyphen_in_charset( $in ) {\r
13         return $in.'-';\r
14 }\r
15 \r
16 \r
17 ?>