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
#!/bin/sh -u | |
# exit if wp-cli or wordmove is not installed. | |
type wp >/dev/null 2>&1 || { echo >&2 "wp-cli is not installed. Aborting."; exit 1; } | |
type wordmove >/dev/null 2>&1 || { echo >&2 "Wordmove is not installed. Aborting."; exit 1; } | |
type git >/dev/null 2>&1 || { echo >&2 "git is not installed. Aborting."; exit 1; } | |
# Variables. | |
URL_LOCAL=$(wp option get home) |
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
var gulp = require("gulp"); | |
var sass = require("gulp-sass"); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var autoprefixer = require("gulp-autoprefixer"); | |
var browserSync = require("browser-sync").create(); | |
var plumber = require("gulp-plumber"); | |
gulp.task('serve', ['sass'], function() { | |
browserSync.init({ |
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
<h1>見出し壱:夏目漱石著『吾輩は猫である』</h1> | |
<h2>見出し弐:レオ・レオニ作『スイミー 小さなかしこいさかなのはなし』</h2> | |
<h3>見出し参:あまん きみこ作、上野 紀子絵『ちいちゃんのかげおくり』</h3> | |
<h4>見出し四:モンゴルの民話『スーホの白い馬』</h4> | |
<h5>見出し五:新美南吉作『手袋を買いに』</h5> | |
<h6>見出し六:芥川龍之介著『羅生門』</h6> | |
<h2>引用 (Blockquote) テスト</h2> | |
<blockquote>これは言語みたいなものだ。アルファベットすなわち音階を学び、文すなわちコードを学ぶ。そしてやがてホーンと即興で会話するようになる。即興で話すのはすばらしいことだと思うが、私には決して会得できないだろう。しかし音楽ともなれば、私は即座によろこんで会話する。そう、それがジャズ音楽のすべてだ。 | |
<cite>スタン・ゲッツ</cite></blockquote> |
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 | |
class nskw_template_loader { | |
public function __construct() { | |
add_filter( 'template_include', array( __CLASS__, 'template_loader' ) ); | |
} | |
public static function template_loader( $template ) { |
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
wp core download | |
wp core config --dbname=sample --dbuser=root --dbpass=root | |
wp core install --url=http://example.dev --title="WordPress Sample Site" --admin_user=nishikawa --admin_password=pass [email protected] | |
wp plugin install show-current-template wp-basic-auth theme-check plugin-check wp-multibyte-patch --activate | |
wp plugin install wordpress-beta-tester jetpack contact-form-7 vk-all-in-one-expansion-unit | |
wp plugin delete hello | |
wp option update blogdescription "This is a new project!!" | |
wp option update posts_per_page 5 | |
wp option update thread_comments 1 | |
wp option update thread_comments_depth 3 |
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
*.log | |
*.sql | |
.DS_Store | |
.htaccess | |
*.map | |
error_log | |
Movefile | |
wp-cli.yml | |
sitemap.xml | |
sitemap.xml.gz |
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
local: | |
vhost: "http://example.dev" | |
wordpress_path: "/Users/papa/Sites/example.dev" | |
database: | |
name: "example" | |
user: "root" | |
password: "root" | |
host: "localhost" |
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
wp db reset --yes | |
wp core install --url=http://theme-review.loc --title="This is a really long long title to check if this theme design doesn't break with the long site title" --admin_user=admin --admin_password=admin [email protected] | |
wp core update | |
wp plugin install theme-check debug-bar log-deprecated-notices monster-widget wordpress-importer show-current-template customizer-theme-resizer --activate | |
wp plugin install wordpress-beta-tester debogger jetpack | |
wp plugin update --all | |
wp option update blogdescription "I'm in the theme review process and this is a very very long tagline to see if this long tagline text string in WordPress doesn't break the design of the theme header and else." | |
wp option update posts_per_page 5 | |
wp option update thread_comments 1 | |
wp option update thread_comments_depth 3 |
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
// add locale such as locale_ja, locale_en_US to body class | |
add_filter( 'body_class', 'add_body_class_locale' ); | |
function add_body_class_locale( $classes ) { | |
$classes[] = 'locale_' . sanitize_html_class( get_bloginfo('language') ); | |
return $classes; | |
} |
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 | |
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 ); |