1
0
mirror of https://github.com/kremalicious/krtmn.git synced 2024-12-23 01:29:50 +01:00
krtmn/user/plugins/hyphens-in-urls/plugin.php
2012-02-26 03:28:54 +01:00

20 lines
434 B
PHP

<?php
/*
Plugin Name: Allow Hyphens in Short URLs
Plugin URI: http://yourls.org/
Description: Allow hyphens in short URLs (like <tt>http://sho.rt/hello-world</tt>)
Version: 1.0
Author: Ozh
Author URI: http://ozh.org/
*/
// No direct call
if( !defined( 'YOURLS_ABSPATH' ) ) die();
yourls_add_filter( 'get_shorturl_charset', 'ozh_hyphen_in_charset' );
function ozh_hyphen_in_charset( $in ) {
return $in.'-';
}
?>