$ mkdir -p ~/vagrants/vccw
$ cd ~/vagrants/vccw
$ git clone git@github.com:miya0001/vccw.git .
次に以下のコードを~/.bash_profileに登録
| <?php | |
| /** | |
| * Plugin Name: Customizer Cross-Domain Workaround (Trac #39128) | |
| * Description: Force customizer preview to use siteurl instead of home URL to work around Trac #39128. Temp fix for issue loading customizer preview when home and siteurl have different domains (cross-domain). | |
| * Plugin URI: https://core.trac.wordpress.org/ticket/39128 | |
| * Author: Weston Ruter, XWP | |
| * Author URI: https://make.xwp.co/ | |
| * | |
| * Copyright (c) 2017 XWP (https://xwp.co/) | |
| * |
| <?php | |
| /** | |
| * Smart Custom Fieldsの定義用クラス | |
| * グループごとにメソッドを作ると良い | |
| * | |
| * @link https://2inc.org/blog/2015/03/12/4670/ | |
| */ | |
| Class Test_SmartCustomFields { |
| <?php | |
| function habakiri_child_theme_setup() { | |
| class Habakiri extends Habakiri_Base_Functions { | |
| public function __construct() { | |
| parent::__construct(); | |
| add_action( 'init', array( $this, 'register_post_types' ) ); | |
| } | |
| /** | |
| * カスタム投稿タイプを定義 |
| <?php | |
| // PHP memory limit for this site | |
| define( 'WP_MEMORY_LIMIT', '128M' ); | |
| define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
| // Database | |
| define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
| define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
| // Explicitely setting url |
| <?php | |
| /* | |
| Plugin Name: Divide Meta Fields with Comma (Really Simple CSV Importer add-on) | |
| */ | |
| add_filter('really_simple_csv_importer_save_meta', function($meta, $post, $is_update) { | |
| foreach ($meta as $key => $value) { | |
| if (strpos($value, ',') !== false) { | |
| $_value = preg_split("/,+/", $value); | |
| $meta[$key] = $_value; |
| <?php | |
| /** | |
| * カスタムフィールドを定義 | |
| * | |
| * @param array $settings Smart_Custom_Fields_Setting オブジェクトの配列 | |
| * @param string $type 投稿タイプ or ロール | |
| * @param int $id 投稿ID or ユーザーID | |
| * @param string $meta_type post | user | |
| * @return array | |
| */ |
| <?php | |
| /* | |
| Plugin Name: Really Simple CSV Importer Action add-on | |
| Description: Run the additional action after importing the post data | |
| Author: Takuro Hishikawa | |
| Version: 0.1 | |
| */ | |
| class rscsvimporter_action { | |
| // singleton instance |
| <?php | |
| public function plugins_loaded(){ | |
| add_action ( 'edited_term',array($this,'save_extra_category_fileds')); // 編集画面の保存 | |
| add_action ( 'created_term',array($this,'save_extra_category_fileds')); // 新規追加の保存 | |
| } | |
| public function init(){ | |
| $args=array('public' => true,'_builtin' => false ); // builtin=false(WordPressが設定してるものは省く) | |
| $output = 'names'; // or objects |
| # Require any additional compass plugins here. | |
| # Set this to the root of your project when deployed: | |
| http_path = "/" | |
| css_dir = "css" | |
| sass_dir = "sass" | |
| images_dir = "img" | |
| javascripts_dir = "js" | |
| # You can select your preferred output style here (can be overridden via the command line): |