Skip to content

Instantly share code, notes, and snippets.

View ShinichiNishikawa's full-sized avatar
🏠
Working from home

Shinichi Nishikawa ShinichiNishikawa

🏠
Working from home
View GitHub Profile
@ShinichiNishikawa
ShinichiNishikawa / gist:11371541
Last active August 29, 2015 14:00 — forked from wokamoto/gist:11365599
おかもとさんより
<?php
add_filter( 'the_content', 'my_pre_shortcode', 7 );
function my_pre_shortcode( $content ) {
global $shortcode_tags;
$shortcode_tags_org = $shortcode_tags;
remove_all_shortcodes();
add_shortcode( 'code', 'code_shortcode_handler' );
$content = do_shortcode( $content );
<?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
@ShinichiNishikawa
ShinichiNishikawa / gist:4108737
Created November 19, 2012 03:08 — forked from gatespace/gist:4108710
最強のテンプレートタグ get_the_khoshino()
<?php
function get_the_khoshino($destination == null, $username == null) {
if ( $destination ) {
return 'というわけで、' . $destination . 'に向かっています';
} else {
if (!empty($username)) {
return 'いやいや'.$username.'さんほどでは。';
} else {
return 'やはりですか。なるほどですね。';
}