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
source: http://qiita.com/egopro/items/aba12261c053eecd6d19 | |
以下の環境は全て Mac OS X | |
参考にした URL |
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 -ex | |
wp plugin install simple-map simple-share child-pages-shortcode --activate | |
wp plugin update --all | |
wp scaffold _s koabase --activate |
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
function custom_login() { | |
echo '<link rel="stylesheet" type="text/css" href="'.get_template_directory_uri() . '/library/css/login.css" />'; | |
} | |
add_action('login_head', 'custom_login'); |
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
//作成したjsファイルを読み込む。 | |
//WordPressの場合は以下のように読み込む。 | |
wp_enqueue_script('getytlist_js', THEME_WEB_ROOT . '/library/js/jquery.getytlist.js'); |
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
$cats = get_categories(); | |
$html = ''; | |
if ($cats): | |
$html .= '<ul>'; | |
foreach($cats as $cat){ | |
if($cat->parent == 0): | |
$html .= '<li><a href="'.get_category_link($cat->term_id).'">'.$cat->name.'</a>'; | |
$cats_child = get_categories('child_of=' . $cat->term_id); | |
if ($cats_child): | |
$html .= '<ul class="children">'; |
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
$imagesize = getimagesize('画像のURL'); | |
if($imagesize){ | |
echo $imagesize[0]; // width | |
echo $imagesize[1]; //height | |
echo $imagesize[2]; //画像の種類 | |
echo $imagesize[3]; //サイズの文字列(width="X" height="Y") | |
}else{ | |
echo 'データ取得失敗...'; | |
} |
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
$('[name="pallets"]:checked').each(function(){ | |
datacnt = Object.keys(postData).length; | |
i = datacnt-0; | |
$cur_td = $(this).parent(); | |
$cur_tr = $cur_td.parent(); | |
cur_rgb10 = $cur_tr.children('td:eq(1)').text(); | |
cur_rgb = $cur_tr.children('td:eq(2)').text(); | |
cur_cmyk =$cur_tr.children('td:eq(3)').text(); | |
postData[i] = []; | |
postData[i]['palletrgb10'] = cur_rgb10; |
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
<script src="<?php echo get_template_directory_uri() ?>/library/js/magnific/jquery.magnific-popup.min.js"></script> | |
<link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/library/js/magnific/magnific-popup.css" /> | |
<?php | |
$output = ''; | |
$tvcmfield = get_field('audition'); | |
if ($tvcmfield != ''): | |
while(the_repeater_field('audition')): | |
if(get_sub_field('audition-url')): | |
$youtubeurl = get_sub_field('audition-url'); |
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
jQuery(function($){ | |
// #で始まるアンカーをクリックした場合に処理 | |
$('.sm-scroll').click(function() { | |
// スクロールの速度 | |
var speed = 400; // ミリ秒 | |
// アンカーの値取得 | |
var href= jQuery(this).attr("href"); | |
// 移動先を取得 | |
var target = jQuery(href == "#" || href == "" ? 'html' : href); | |
// 移動先を数値で取得 |
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
<!-- 置き換えたいimg要素のclassにreplace-noimgを指定する --> | |
<img class="replace-noimg" src="/library/images/step1.png" alt=""> |
NewerOlder