Skip to content

Instantly share code, notes, and snippets.

View tekapo's full-sized avatar

Tai / JOTAKI Taisuke tekapo

View GitHub Profile
@tekapo
tekapo / .editorconfig
Created December 4, 2021 03:26 — forked from salcode/.editorconfig
WordPress .editorconfig - modified version of the WordPress coding standards
# EditorConfig helps keep your project formatting consistent.
# See https://EditorConfig.org
#
# This is a modified version of the WordPress coding standards.
#
# Author: Sal Ferrarello (@salcode)
# https://salferrarello.com/wordpress-editorconfig/
#
# You can download this file directly
# to your project from the command-line with
export PS1="[\u@\h \W]\\$ "
HISTIGNORE=rm\ *
alias vi="vim"
alias delmacfile="find . -name \".DS_Store\" -exec rm -f {} \;"
alias ql='qlmanage -p "$@" >& /dev/null'
alias svndel="svn st | grep '^!' | sed -e 's/\![ ]*/svn del /g' | sh"
alias svnadd="svn st | grep '^?' | sed -e 's/\?[ ]*/svn add /g' | sh"
alias yuicomp="/usr/local/bin/yuicompressor --charset UTF-8 -o"
@tekapo
tekapo / view_template_files.php
Last active December 11, 2015 02:19 — forked from gatespace/view_template_files.php
hookをwp_footerにしてみた。
/*
WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。
ただし、header.php や get_template_part などでインクルードされているファイルを除く。
フックする場所をwp_footerにしてみた。
*/
if ( !function_exists( 'view_template_files' ) ):
function view_template_files() {
if (WP_DEBUG) {
global $template;
@tekapo
tekapo / gist:4108697
Created November 19, 2012 02:45 — forked from tecking/gist:4108680
最強のテンプレートタグ get_the_khoshino()
<?php
function get_the_khoshino() {
return 'やはりですか。なるほどですね。';
}
?>
@tekapo
tekapo / example.php
Created November 16, 2012 05:37 — forked from wokamoto/example.php
how to use class-wp_post_helper
<?php
require_once('/path/to/wordpress/wp-load.php');
require_once('class-wp_post_helper.php');
// initialize
$post = new wp_post_helper(array(
'post_name' => 'slug' , // slug
'post_author' => 1 , // author's ID
'post_date' => '2012/11/15 20:00:00' , // post date and time
'post_type' => 'posts' , // post type (you can use custom post type)