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
# シェルBashに変更(要パスワード入力) | |
chsh -s /usr/local/bin/bash | |
echo "export LANG=ja_JP.UTF-8" >> .bash_profile | |
source .bash_profile | |
# 鍵認証(コピペ) | |
vim ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/authorized_keys | |
# コマンドインストール |
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
#!/usr/bin/env php | |
# 利用方法 | |
# 1. このファイルをホームフォルダなどのパスが通っている場所に maisu として保存します。 | |
# wget https://gist.githubusercontent.com/fumikito/5496923ec71e4cc891f263029be79dec/raw/6154450c6a547d14522a2ee7aa6ffd438fcfe3b7/maisu.php -O ~/bin/maisu | |
# 2. 実行権限を付与します。 | |
# chmod +x maisu | |
# 3. ファイルを指定して実行します。 | |
# maisu example.txt | |
# => 400字詰原稿用紙(20字×20行)換算で1枚(12行)です。 | |
# |
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
#!/usr/bin/env bash | |
set -e | |
# Activate WP Importer plugin. | |
wp plugin install wordpress-importer --activate | |
# Don't know why, but failed importing directly. | |
wget https://raw.githubusercontent.com/WPTRT/theme-unit-test/master/themeunittestdata.wordpress.xml | |
# Import | |
wp import themeunittestdata.wordpress.xml --authors=create |
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 | |
$post_labels = [ | |
'name' => __( '', 'domain' ), | |
'singular_name' => __( '', 'domain' ), | |
'add_new' => __( '', 'domain' ), | |
'add_new_item' => __( '', 'domain' ), | |
'edit_item' => __( '', 'domain' ), | |
'new_item' => __( '', 'domain' ), | |
'view_item' => __( '', 'domain' ), | |
'view_items' => __( '', 'domain' ), |
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 | |
/** | |
* Remove recaptcha if it's not contact form. | |
*/ | |
add_action( 'wp_enqueue_scripts', function() { | |
if ( is_singular() && has_shortcode( get_queried_object()->post_content, 'contact-form-7' ) ) { | |
return; | |
} | |
wp_deregister_script( 'google-recaptcha' ); |
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 | |
/** | |
* Add loading="lazy" and decodiing="async" | |
* | |
* @see https://spelldata.co.jp/blog/blog-2019-12-19.html | |
*/ | |
/** | |
* Start buffer for img attributes. | |
*/ |
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
/*! | |
* Test document. | |
* | |
* @deps wp-data, wp-dom-ready | |
*/ | |
const { data, domReady } = wp; | |
const wordLimiter = { | |
80: false, |
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
/*! | |
* Force post title to include "WordPress" | |
* | |
* @deps wp-data, wp-dom-ready, wp-element, wp-components | |
*/ | |
const { data, domReady } = wp; | |
const { render, Component } = wp.element; | |
const { Modal, Button, TextControl } = wp.components; |
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 | |
/* | |
Plugin Name: Yamato B2 Exporter Change Shipping From | |
Plugin URI: https://kunoichiwp.com/product/plugin/yamato-b2-exporter | |
Description: 注文の請求先と配送先が異なる時、Yamato B2 Exporter for WooCommerceプラグインの出力するCSVを変更します。 | |
Version: 1.0.0 | |
Author: Hametuha INC. | |
Author URI: https://kunoichiwp.com/product/plugin/yamato-b2-exporter | |
License: GPLv3 or later | |
*/ |