Skip to content

Instantly share code, notes, and snippets.

View 1shiharat's full-sized avatar
💭
I may be slow to respond.

ishihara takashi 1shiharat

💭
I may be slow to respond.
View GitHub Profile
@1shiharat
1shiharat / .babelrc
Last active February 9, 2016 07:43
おもむろに es6, sass で書きたい時のセット
{
"presets": ["es2015"],
// Remove the line below to enable ES2015 support.
"retainLines": true
}
<a href="">
<img src="http://image.rakuten.co.jp/510-corp/cabinet/top/03263171/imgrc0064027279.gif" alt="" width="294" >
</a>
@1shiharat
1shiharat / terms.php
Last active August 29, 2015 14:10
カンマ区切りでカテゴリを出力
<?php
$terms = get_the_terms( get_the_ID(), 'category' );
if ( !empty($terms) ) {
if ( !is_wp_error( $terms ) ) {
foreach( $terms as $term_key => $term ) {
// カテゴリー名がhogehogeの場合ループをすっ飛ばす
if( $term->name == 'hogehoge' ) {
continue;
}
if ($term === end($terms)) {
http://sourcedrop.net/eEP0deadce3fb
@1shiharat
1shiharat / acf_image.php
Created September 9, 2014 10:29
acf_image.php
<?php
$image_id = get_field( 'カスタムフィールドID' );
$src = wp_get_attachment_image_src( $image_id, 'カスタムサイズのスラッグ' );?>
<img src="<?php echo esc_url( $src['url'] ); ?>" alt="placeholder+image">

スタッフリレーブログ4日目を任されました、石原です。 普段は GrowGroup合同会社で CMSを使ったWeb制作業務を行っております。

WordFes では、サイト制作を主に担当しており、「WordPress の最新動向」との題材でセッションを行います。 ご期待に沿えるセッションができるか不安ではありますが、 興味がある方は是非ご来場ください。

(一応) 去年からスタッフとして参加していましたが、今年はサイト制作を担当しました。 野末さん、Katz さんにディレクションをしていただき、 デザインと土台のコーディングを WordBench Nagoya 山田さおりさん にやってもらい、

@1shiharat
1shiharat / gcb-setup.php
Created June 3, 2014 07:33
allow x-domain for wp json api
/**
* ぜっっっったいわすれんな : テスト用
*
*/
add_action( 'init', 'handle_preflight' );
function handle_preflight() {
header("Access-Control-Allow-Origin: " . get_http_origin());
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
header("Access-Control-Allow-Credentials: true");
@1shiharat
1shiharat / theme-customizer-setting.json
Created May 30, 2014 16:59
theme-customizer-setting.json
{
"setting": {
"theme_slug": "growcreater_basic" ,
"capability": "edit_theme_options"
},
"sections" : {
"gg_general_settings": {
"title" : "基本的な設定",
"priority" : 29,
@1shiharat
1shiharat / class-wp-theme-customizer-import-json.php
Last active June 24, 2019 05:59
WordPress Theme Customizer Setting json Import.
<?php
/**
* class WP_Theme_Customizer_Import_Json
*
* method list:
* - __construct()
* - register_json()
* - set_capability()
* - register_customizer()
* - get_theme_name()
@1shiharat
1shiharat / plugin-install-list.php
Created May 26, 2014 15:10
plugin install list
<?php
/**
* Plugin Install.
*
* @package TGM-Plugin-Activation
* @version 2.4.0
* @author Thomas Griffin <thomasgriffinmedia.com>
* @author Gary Jones <gamajo.com>
* @copyright Copyright (c) 2014, Thomas Griffin
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later