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
# 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 |
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
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" |
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
/* | |
WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。 | |
ただし、header.php や get_template_part などでインクルードされているファイルを除く。 | |
フックする場所をwp_footerにしてみた。 | |
*/ | |
if ( !function_exists( 'view_template_files' ) ): | |
function view_template_files() { | |
if (WP_DEBUG) { | |
global $template; |
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 | |
function get_the_khoshino() { | |
return 'やはりですか。なるほどですね。'; | |
} | |
?> |
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 | |
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) |