Forked from gatespace/content_mayuge_systems.php
Last active
December 19, 2015 19:49
-
-
Save ShinichiNishikawa/6008741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package content_mayuge_systems | |
* @version 0.2 | |
*/ | |
/* | |
Plugin Name: Content Mayuge Systems | |
Plugin URI: http://wordpress.org/extend/plugins/hello-dolly/ | |
Description: 本文中に句点「。」があると「( ・ิω・)╯ิ」がくっつきます。 | |
Author: gatespace | |
Version: 0.1 | |
Author URI: http://gatespace.jp/ | |
*/ | |
add_filter('the_content', 'content_mayuge_systems'); | |
function content_mayuge_systems( $content ) | |
{ | |
$pattern = '/(。|まゆげ|マユゲ|まゆ毛|眉毛|わたし|私|ぼく|僕)/'; | |
$replace = '$1 ( ・ิω・)╯ิ '; | |
$content = preg_replace( $pattern , $replace , $content ); | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment