Fixed Broken Shit
This commit is contained in:
6
user/plugins/hyphens-in-urls/README.md
Normal file
6
user/plugins/hyphens-in-urls/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
Hyphens in URLs
|
||||
===============
|
||||
This is a core plugin, bundled with YOURLS.
|
||||
Don't modify this plugin. Instead, copy its folder
|
||||
and modify your own copy. This way, your code won't
|
||||
be overwritten when you upgrade YOURLS.
|
19
user/plugins/hyphens-in-urls/plugin.php
Normal file
19
user/plugins/hyphens-in-urls/plugin.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?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.'-';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user