View private-debug-log.php
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: Private Debug Log | |
Description: Enable debug log to a private folder not accessible from the web | |
Version: 0.0.1 | |
Author: WebAware | |
Author URI: http://www.webaware.com.au/ | |
*/ | |
/* |
View mtk
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
#!/bin/sh | |
echo '玉子とじラーメン 730円(大盛900円)' | |
echo '玉子とじ担々麺 850円(大盛1030円)' | |
echo 'もやし麺 850円(大盛1030円)' | |
echo 'ワンタン麺 850円(大盛1030円)' | |
echo '叉焼麺 850円(大盛1030円)' | |
echo '天津麺 850円(大盛1030円)' | |
echo '五目麺 850円(大盛1030円)' | |
echo '替玉 180円' |
View functions.php
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 | |
/** | |
* 前後リンクの出力部分で、a要素の内側にさらにspanを入れる | |
* | |
* @param string $link Link permalink format. | |
* | |
* @return string | |
*/ | |
function my_post_link( $link ) { | |
$link = preg_replace( '/<a href="(.+?)">(.+?)<\/a>/', '<a href="$1"><span>$2</span></a>', $link ); |
View functions.php
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_list_categories の出力を支給HTMLに合わせて変更 | |
* カレント表示のclass変更、a要素の内側にさらにspanを入れる | |
* | |
* @param string $output | |
* | |
* @return string | |
*/ | |
function my_wp_list_categories( $output ) { |
View custom-fields.php
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 // | |
$Setting->add_group( | |
'group-pref', false, array( | |
array( | |
'name' => 'cf_prefecture', | |
'label' => '都道府県(テキスト)', | |
'type' => 'select', | |
'choices' => array( | |
'北海道' => '北海道', | |
'青森県' => '青森県', |
View .htaccess
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
AddHandler x-httpd-php528a .php | |
Options +SymLinksIfOwnerMatch |
View refine-search-checkbox.php
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
<!--カスタム投稿のタグをチェックボックスで絞り込み--> | |
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> | |
<label for="s" class="assistive-text">検索</label> | |
<h2>タグまたはカスタムタクソノミー</h2> | |
<?php | |
$taxonomy_name = 'cpt_tag'; | |
$taxonomys = get_terms($taxonomy_name); | |
if(!is_wp_error($taxonomys) && count($taxonomys)): | |
foreach($taxonomys as $taxonomy): | |
$tax_posts = get_posts(array('post_type' => get_post_type('cpttype'), 'taxonomy' => $taxonomy_name, 'term' => $taxonomy->slug ) ); |
View archive-faq.php
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 | |
$displayed_post_id = array(); | |
$terms = get_terms( | |
'faqcategory', array( | |
'orderby' => 'slug', | |
'order' => 'ASC' | |
) | |
); | |
foreach( $terms as $term ): | |
?> |
View sns.php
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 if( function_exists( 'scc_get_share_facebook' ) ){ | |
$https_count = scc_get_share_facebook(); | |
$http_count = get_post_meta( get_the_ID(), 'scc_http_count_facebook', true ); | |
$total_count = $https_count + $http_count; | |
} ?> | |
<div class="social-buttons"> | |
<a href="https://twitter.com/share?url=<?php echo esc_url( get_the_permalink() ); ?>&text=<?php echo urlencode( get_the_title() . ' | ' . get_bloginfo( 'name' ) ); ?>" rel="nofollow" onclick="window.open(this.href, 'tweetwindow', 'width=650, height=470, personalbar=0, toolbar=0, scrollbars=1, sizable=1'); return false;" class="social-btn twitter"> | |
<i class="fa fa-twitter"></i>ツイート | |
</a> | |
<a href="https://plus.google.com/share?url=<?php echo esc_url( get_the_permalink() ); ?>" rel="nofollow" class="social-btn gplus"> |
NewerOlder