Last active
February 26, 2021 13:34
-
-
Save gatespace/6007495 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.1 | |
*/ | |
/* | |
Plugin Name: Content Mayuge Systems | |
Plugin URI: https://gist.github.com/gatespace/6007495 | |
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