$ git clone https://github.com/wp-cli/extension-command.git
$ cd extension-command
$ composer install
このあと、このリポジトリのコマンドを実行するには、このディレクトリ内にいたまま WP-CLI コマンドを実行するといいです。
$ wp help theme --path=/path/to/wordpress
<?php | |
/* | |
Plugin Name: I am Free! | |
Author: My Name | |
Description: WordPressで好き勝手なコンテンツを好き勝手なURLで表示する。 | |
*/ | |
require_once(dirname(__FILE__).'/includes/class-addrewriterules.php'); | |
require_once(dirname(__FILE__).'/includes/class-addpage.php'); |
!#/usr/bin/env bash | |
set -ex | |
echo $1 |
<?php | |
add_filter( 'wp_image_editors', function( $editors ) { | |
if ( ! class_exists( '_WP_Image_Editor_GD' ) ) { | |
class _WP_Image_Editor_GD extends WP_Image_Editor_GD { | |
protected function _save( $image, $filename = null, $mime_type = null ) { | |
$saved = parent::_save( $image, $filename, $mime_type ); | |
if ( ! empty( $saved["mime-type"] ) && 'image/jpeg' == $saved["mime-type"] ) { | |
jpegoptim( $saved['path'] ); | |
} |
{ | |
"version": 8, | |
"name": "Geolonia Basic", | |
"sources": { | |
"gsi-japan": { | |
"type": "vector", | |
"tiles": [ | |
"https://cyberjapandata.gsi.go.jp/xyz/experimental_bvmap/{z}/{x}/{y}.pbf" | |
], | |
"attribution": "<a href=\"https://www.gsi.go.jp/\">GSI Japan</a>", |
{ | |
"version": 8, | |
"name": "Geolonia Basic", | |
"metadata": {}, | |
"sources": { | |
"geolonia": { | |
"type": "vector", | |
"url": "https://api.geolonia.com/v1/sources?key=YOUR-API-KEY" | |
}, | |
"japanese-prefectures": { |
{ | |
"version": 8, | |
"name": "Geolonia Basic", | |
"sources": { | |
"geolonia": { | |
"type": "vector", | |
"url": "https://api.geolonia.com/v1/sources?key=YOUR-API-KEY" | |
}, | |
"japanese-prefectures": { | |
"type": "geojson", |
{ | |
"version": 8, | |
"name": "Geolonia Midnight", | |
"metadata": {}, | |
"sources": { | |
"geolonia": { | |
"type": "vector", | |
"url": "https://api.geolonia.com/v1/sources?key=YOUR-API-KEY" | |
} | |
}, |
<?php | |
/** | |
* Plugin Name: _tarosky | |
* Plugin URI: https://tarosky.co.jp/ | |
* Description: Fixes the some problems with our environment. | |
* Author: Takayuki Miyauchi | |
* Version: nightly | |
* | |
* @package _tarosky | |
*/ |
$ git clone https://github.com/wp-cli/extension-command.git
$ cd extension-command
$ composer install
このあと、このリポジトリのコマンドを実行するには、このディレクトリ内にいたまま WP-CLI コマンドを実行するといいです。
$ wp help theme --path=/path/to/wordpress