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
# Update Macports / Macportsを最新に | |
sudo port selfupdate | |
# Stop MySQL 5.6 / MySQL 5.6を停止 | |
sudo port unload mysql56-server | |
# Remove from service. / 自動起動から削除 | |
sudo lauchctl unload -w /Library/LaunchDaemons/org.macports.mysql56-server.plist | |
# Install MySQL 5.7 / MySQL 5.7をインストール |
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 | |
# see https://otti.xyz/2021/05/how-to-fix-wp-env-mysqlcheck-error.html | |
LINE=$( docker ps | grep tests-wordpress- ) | |
HERE=$(pwd) | |
LINE=${LINE##* } | |
LINE=${LINE%%-*} | |
echo "Restore container: $LINE" |
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 | |
trait BaseTrait { | |
private $counter = 0; | |
private $greeting = 'Hello World!'; | |
public function say_hello() { |
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
const { registerBlockType, registerBlockStyle } = wp.blocks; | |
const { select } = wp.data; | |
/** | |
* Get next blokc from client ID. | |
*/ | |
const getNextBlock = ( id ) => { | |
const allBlocks = select( 'core/block-editor' ).getBlocks(); | |
let index = null; | |
for ( let i = 0; i < allBlocks.length; i++ ) { |
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 | |
/** | |
* WP Core logic to change user email. | |
* | |
* This method is monolithic because it depends on admin ui. | |
* So if you need custom user page, | |
* you need re-implement these features. | |
* | |
* @see https://github.com/WordPress/WordPress/blob/master/wp-admin/user-edit.php#L100-L116 | |
* @see https://github.com/WordPress/WordPress/blob/master/wp-includes/user.php#L2994-L3102 |
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 | |
*/ |
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
/*! | |
* 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
<?php | |
/** | |
* Add loading="lazy" and decodiing="async" | |
* | |
* @see https://spelldata.co.jp/blog/blog-2019-12-19.html | |
*/ | |
/** | |
* Start buffer for img attributes. | |
*/ |
NewerOlder