Пример #1
0
include 'lib/mobile.php';
//モバイル関係の関数
include 'lib/image.php';
//画像関係の関数
include 'lib/comment.php';
//コメント関係の関数
//URLの正規表現
define('URL_REG', '/(https?|ftp)(:\\/\\/[-_.!~*\'()a-zA-Z0-9;\\/?:\\@&=+\\$,%#]+)/');
// アイキャッチ画像を有効化
add_theme_support('post-thumbnails');
//サムネイルサイズ
add_image_size('thumb100', 100, 100, true);
add_image_size('thumb150', 150, 150, true);
add_image_size('thumb320', 320, 180, true);
//画像の縦横比を保存したタイル状リストのとき
if (is_list_style_tile_thumb_cards_raw()) {
    add_image_size('thumb320_raw', 320, 0, false);
}
//コンテンツの幅の指定
if (!isset($content_width)) {
    $content_width = 680;
}
//カテゴリー説明文でHTMLタグを使う
remove_filter('pre_term_description', 'wp_filter_kses');
//ビジュアルエディターとテーマ表示のスタイルを合わせる
add_editor_style();
// RSS2 の feed リンクを出力
add_theme_support('automatic-feed-links');
// カスタムメニューを有効化
add_theme_support('menus');
// カスタムメニューの「場所」を設定
Пример #2
0
"><img src="<?php 
        echo get_template_directory_uri();
        ?>
/images/no-image.png" alt="NO IMAGE" class="entry-thumnail no-image list-no-image" /></a>
      <?php 
    }
    ?>
    <?php 
} else {
    //大きなサムネイルカードの場合
    ?>
      <?php 
    if (has_post_thumbnail()) {
        // サムネイルを持っているとき
        //サムネイル画像の縦横比を保存するかどうかで取得するサムネイルを変化
        $thumb = is_list_style_tile_thumb_cards_raw() ? 'thumb320_raw' : 'thumb320';
        ?>
        <a href="<?php 
        the_permalink();
        ?>
" class="entry-image entry-image-link" title="<?php 
        the_title();
        ?>
"><?php 
        the_post_thumbnail($thumb, array('class' => 'entry-thumnail', 'alt' => get_the_title()));
        ?>
</a>
      <?php 
    } else {
        // サムネイルを持っていないとき
        ?>