テンプレートから選んで作成! データは不要! 原稿を用意するだけで簡単に作成できます!
商品一覧から選ぶ
お店・ショップで使える印刷物 オリジナルショッパー 名刺 ショップバッグ スタンプカード・2つ折りカード 紙袋 はがき・ポストカード ポスター シール・ステッカー
オフィス・会社で使える印刷物 封筒 名刺 ショップカード 宅配袋・配送袋
イベント・キャンペーンに使える印刷物 ショップバッグ 紙袋 バッグ マスク カイロ のぼり うちわ
の表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 20,
));
//Facebook拡散ボタン表示
$wp_customize->add_setting('sns_option_facebook_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_facebook_btn_visible', array(
'settings' => 'sns_option_facebook_btn_visible',
'label' =>'Facebook「いいね!」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 30,
));
//Google+拡散ボタン表示
$wp_customize->add_setting('sns_option_google_plus_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_google_plus_btn_visible', array(
'settings' => 'sns_option_google_plus_btn_visible',
'label' =>'Google+「+1」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 40,
));
//はてな拡散ボタン表示
$wp_customize->add_setting('sns_option_hatena_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_hatena_btn_visible', array(
'settings' => 'sns_option_hatena_btn_visible',
'label' =>'はてな「はてブ」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 50,
));
//ポケットボタン表示
$wp_customize->add_setting('sns_option_pocket_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_pocket_btn_visible', array(
'settings' => 'sns_option_pocket_btn_visible',
'label' =>'pocket「あとで読む」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 60,
));
//LINEボタン表示(モバイル時)
$wp_customize->add_setting('sns_option_line_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_line_btn_visible', array(
'settings' => 'sns_option_line_btn_visible',
'label' =>'LINEボタンの表示(モバイル時)',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 70,
));
//Evernoteボタン表示
$wp_customize->add_setting('sns_option_evernote_btn_visible', array(
));
$wp_customize->add_control( 'sns_option_evernote_btn_visible', array(
'settings' => 'sns_option_evernote_btn_visible',
'label' =>'Evernoteボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 71,
));
//feedlyボタン表示
$wp_customize->add_setting('sns_option_feedly_btn_visible', array(
));
$wp_customize->add_control( 'sns_option_feedly_btn_visible', array(
'settings' => 'sns_option_feedly_btn_visible',
'label' =>'feedlyボタンの表示(PCのみ吹出付)',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 72,
));
//画像にPinterestピンを表示
$wp_customize->add_setting('sns_option_pinterest_btn_visible', array(
));
$wp_customize->add_control( 'sns_option_pinterest_btn_visible', array(
'settings' => 'sns_option_pinterest_btn_visible',
'label' =>'画像にPinterestピンを表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 73,
));
//全フォローボタンの表示
$wp_customize->add_setting('sns_option_all_sns_follow_btns_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_all_sns_follow_btns_visible', array(
'settings' => 'sns_option_all_sns_follow_btns_visible',
'label' =>'全フォローボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 75,
));
//ページトップのフォローボタン表示
$wp_customize->add_setting('sns_option_top_follows_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_top_follows_visible', array(
'settings' => 'sns_option_top_follows_visible',
'label' =>'ページトップフォローボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 76,
));
//フォローメッセージ
$wp_customize->add_setting('sns_options[follow_msg]', array(
'default' => 'フォローする',
'type' => 'option',
));
$wp_customize->add_control( 'follow_msg_textfield', array(
'settings' => 'sns_options[follow_msg]',
'label' =>'フォローメッセージ(無記入で非表示)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 80,
));
//TwitterフォローID
$wp_customize->add_setting('sns_options[twitter]', array(
'type' => 'option',
));
$wp_customize->add_control( 'twitter_textfield', array(
'settings' => 'sns_options[twitter]',
'label' =>'twitter.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 90,
));
//FacebookフォローID
$wp_customize->add_setting('sns_options[facebook]', array(
'type' => 'option',
));
$wp_customize->add_control( 'facebook_textfield', array(
'settings' => 'sns_options[facebook]',
'label' =>'facebook.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 100,
));
//Google+フォローID
$wp_customize->add_setting('sns_options[google_plus]', array(
'type' => 'option',
));
$wp_customize->add_control( 'google_plus_textfield', array(
'settings' => 'sns_options[google_plus]',
'label' =>'plus.google.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 110,
));
//InstagramフォローID
$wp_customize->add_setting('sns_options[instagram]', array(
'type' => 'option',
));
$wp_customize->add_control( 'instagram_textfield', array(
'settings' => 'sns_options[instagram]',
'label' =>'instagram.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 115,
));
//feedlyフォローボタン
$wp_customize->add_setting('sns_option_feedly_follow_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_feedly_follow_btn_visible', array(
'settings' => 'sns_option_feedly_follow_btn_visible',
'label' =>'feedlyの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 120,
));
//RSSフォローボタン
$wp_customize->add_setting('sns_option_rss_follow_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_rss_follow_btn_visible', array(
'settings' => 'sns_option_rss_follow_btn_visible',
'label' =>'RSSの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 130,
));
//Twitterカードタグを挿入
$wp_customize->add_setting('sns_option_twitter_cards_enable', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_twitter_cards_enable', array(
'settings' => 'sns_option_twitter_cards_enable',
'label' =>'Twitterカードタグを挿入',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 133,
));
//Twitterカードタイプ
$wp_customize->add_setting('sns_option_twitter_card_type', array(
'default' => 'summary',
));
$wp_customize->add_control( 'sns_option_twitter_card_type', array(
'settings' => 'sns_option_twitter_card_type',
'label' =>'Twitterカードタイプ',
'section' => 'sns_section',
'type' => 'radio',
'choices' => array(
'summary' => 'サマリー(summary)',
'summary_large_image' => 'サマリー(summary_large_image)',
'photo' => '写真(photo)',
),
'priority' => 134,
));
//FacebookOGPタグを挿入
$wp_customize->add_setting('sns_option_facebook_ogp_enable', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_facebook_ogp_enable', array(
'settings' => 'sns_option_facebook_ogp_enable',
'label' =>'FacebookOGPタグを挿入',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 135,
));
//fb:admins
$wp_customize->add_setting('sns_options[fb_admins]', array(
'type' => 'option',
));
$wp_customize->add_control( 'fb_admins_textfield', array(
'settings' => 'sns_options[fb_admins]',
'label' =>'FacebookOGP管理者ID(fb:admins)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 140,
));
//fb:app_id
$wp_customize->add_setting('sns_options[fb_app_id]', array(
'type' => 'option',
));
$wp_customize->add_control( 'fb_app_id_textfield', array(
'settings' => 'sns_options[fb_app_id]',
'label' =>'FacebookOGPアプリID(fb:app_id)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 150,
));
//OGPやTwitterカードのホームイメージ
$wp_customize->add_setting('sns_option_ogp_home_image', array(
'default' => '',
));
$wp_customize->add_control( 'sns_option_ogp_home_image', array(
'settings' => 'sns_option_ogp_home_image',
'label' =>'OGPやTwitterカードのホームイメージ(サイトイメージ画像をURLで指定)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 155,
));
//OGPやTwitterカードのサイト概要
$wp_customize->add_setting('sns_options[ogp_description]', array(
'default' => 'excerpt',
'type' => 'option',
));
$wp_customize->add_control( 'ogp_description_radio', array(
'settings' => 'sns_options[ogp_description]',
'label' =>'OGP、Twitterカードのdescription',
'section' => 'sns_section',
'type' => 'radio',
'choices' => array(
'excerpt' => '記事の抜粋(リード文100文字)',
'meta' => 'メタdescription(要All in One SEO Pack)',
),
'priority' => 160,
));
//フォローボタンに色をつける
$wp_customize->add_setting('sns_options[colored_follow_btns]', array(
'type' => 'option',
));
$wp_customize->add_control( 'colored_follow_btns_checkbox', array(
'settings' => 'sns_options[colored_follow_btns]',
'label' =>'フォローボタンに色をつける',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 170,
));
/////////////////////////////
//広告設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'ads_section', array(
'title' =>'広告の設定',
'priority' => 97,
));
//全ての広告を表示
$wp_customize->add_setting('ads_option_ads_visible', array(
'default' => true,
));
$wp_customize->add_control( 'ads_option_ads_visible', array(
'settings' => 'ads_option_ads_visible',
'label' =>'全ての広告を表示 (チェックを外すと全ての広告が非表示に)',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 10,
));
//記事本文中に広告を表示するか
$wp_customize->add_setting('ads_options[ads_position]', array(
'default' => 'under_relations',
'type' => 'option',
));
//広告位置の設定
$radio_items = array();
if ( !is_responsive_enable() ) $radio_items += array('under_relations' => '関連記事下(デフォルト)');
$radio_items += array('sidebar_top' => 'サイドバートップ',
'in_content' => '本文記事中(H2見出し手前)');
if ( is_ads_performance_visible() && !is_responsive_enable() ) $radio_items += array('content_top'=>'コンテンツ上部にバナー表示');
$label = ( is_responsive_enable() ? 'レスポンシブ広告位置の設定' : '記事下以外の広告位置');
$wp_customize->add_control( 'ads_position_radio', array(
'settings' => 'ads_options[ads_position]',
'label' => $label,
'section' => 'ads_section',
'type' => 'radio',
'choices' => $radio_items,
'priority'=> 20,
));
//広告のラベル
$wp_customize->add_setting('ads_options[label]', array(
'default' => 'スポンサーリンク',
'type' => 'option',
));
$wp_customize->add_control( 'label_textfield', array(
'settings' => 'ads_options[label]',
'label' =>'広告のラベル',
'section' => 'ads_section',
'type' => 'text',
'priority'=> 30,
));
//トップページに広告を表示する
$wp_customize->add_setting('ads_options[ads_top_page_visible]', array(
'type' => 'option',
));
$wp_customize->add_control( 'ads_top_page_visible_checkbox', array(
'settings' => 'ads_options[ads_top_page_visible]',
'label' =>'トップページに広告を表示する',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 30,
));
//広告を中央表示
$wp_customize->add_setting('ads_options[ads_center]', array(
'type' => 'option',
));
$wp_customize->add_control( 'ads_center_checkbox', array(
'settings' => 'ads_options[ads_center]',
'label' =>'広告を中央表示',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 40,
));
//ダブルレクタングルを縦型にする
$wp_customize->add_setting('ads_option_vatical_rectangle', array(
));
$wp_customize->add_control( 'ads_option_vatical_rectangle', array(
'settings' => 'ads_option_vatical_rectangle',
'label' =>'PC表示のダブルレクタングルを縦型に',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 500,
));
//パフォーマンス追求広告の表示
$wp_customize->add_setting('ads_options[ads_performance_visible]', array(
'type' => 'option',
));
$wp_customize->add_control( 'ads_performance_visible_checkbox', array(
'settings' => 'ads_options[ads_performance_visible]',
'label' =>'パフォーマンス追求広告の表示(設定ウイジェットを表示します。【重要】グローバルナビでサブメニュー表示している人は、メニューがかぶるとアドセンスポリシー違反になるので非推奨)',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 600,
));
//PCトップをカスタムサイズ広告に
$wp_customize->add_setting('ads_option_custum_ad_space', array(
));
$wp_customize->add_control( 'ads_option_custum_ad_space', array(
'settings' => '',
'label' =>'PCトップ広告をカスタムサイズ広告に',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 700,
));
//アクセス解析設定項目の追加
$wp_customize->add_section( 'ana_section', array(
'title' =>'アクセス解析(Analyticsなど)',
'priority' => 96,
));
//Google AnalyticsトラッキングID
$wp_customize->add_setting('ana_options[tracking_id]', array(
'default' => '',
'type' => 'option',
));
$wp_customize->add_control( 'tracking_id_textfield', array(
'settings' => 'ana_options[tracking_id]',
'label' =>'Google AnalyticsトラッキングID(UA-xxxxxxxx-x)',
'section' => 'ana_section',
'type' => 'text',
'priority'=> 10,
));
//ユーザー属性とインタレストカテゴリに関するレポートに対応する
$wp_customize->add_setting('ana_options[analytics_interest]', array(
'type' => 'option',
));
$wp_customize->add_control( 'analytics_interest_checkbox', array(
'settings' => 'ana_options[analytics_interest]',
'label' =>'Googleアナリティクスのユーザー属性とインタレストカテゴリレポートに対応する(※要Analyticsで有効化)',
'section' => 'ana_section',
'type' => 'checkbox',
'priority'=> 20,
));
//ウェブマスターツールID
$wp_customize->add_setting('ana_options[webmaster_tool_id]', array(
'default' => '',
'type' => 'option',
));
$wp_customize->add_control( 'webmaster_tool_id_textfield', array(
'settings' => 'ana_options[webmaster_tool_id]',
'label' =>'ウェブマスターツールID',
'section' => 'ana_section',
'type' => 'text',
'priority'=> 30,
));
/////////////////////////////
//ブログカード設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'blog_card_section', array(
'title' =>'ブログカードの設定',
'priority' => 98,
));
//ブログカードの有効化
$wp_customize->add_setting('blog_card_enable', array(
'default' =>true,
));
$wp_customize->add_control( 'blog_card_enable', array(
'settings' => 'blog_card_enable',
'label' =>'ブログカード有効(サイト内URLのみ)',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 100,
));
//ブログカードのサムネイルを右側にする
$wp_customize->add_setting('blog_card_thumbnail_right', array(
));
$wp_customize->add_control( 'blog_card_thumbnail_right', array(
'settings' => 'blog_card_thumbnail_right',
'label' =>'サムネイルを右側にする',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 150,
));
//ブログカードのリンクを新しいタブで開く
$wp_customize->add_setting('blog_card_target_blank', array(
));
$wp_customize->add_control( 'blog_card_target_blank', array(
'settings' => 'blog_card_target_blank',
'label' =>'新しいタブで開く',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 200,
));
//はてブ数を表示
$wp_customize->add_setting('blog_card_hatena_visible', array(
));
$wp_customize->add_control( 'blog_card_hatena_visible', array(
'settings' => 'blog_card_hatena_visible',
'label' =>'はてブ数を表示',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 300,
));
//サイトロゴ表示
$wp_customize->add_setting('blog_card_site_logo_visible', array(
));
$wp_customize->add_control( 'blog_card_site_logo_visible', array(
'settings' => 'blog_card_site_logo_visible',
'label' =>'サイトロゴを表示',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 400,
));
//カード幅を広げる
$wp_customize->add_setting('blog_card_width_auto', array(
));
$wp_customize->add_control( 'blog_card_width_auto', array(
'settings' => 'blog_card_width_auto',
'label' =>'カード幅を広げる',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 500,
));
//コメントの設定項目の追加
$wp_customize->add_section( 'comment_section', array(
'title' =>'コメントの設定',
'priority' => 98.3,
));
//コメントの表示
$wp_customize->add_setting('comments_visible', array(
'default' => true,
));
$wp_customize->add_control( 'comments_visible', array(
'settings' => 'comments_visible',
'label' =>'コメントの表示',
'section' => 'comment_section',
'type' => 'checkbox',
'priority' => 10,
));
//コメントスタイル
$wp_customize->add_setting('comment_type', array(
'default' => 'default',
));
$wp_customize->add_control( 'comment_type', array(
'settings' => 'comment_type',
'label' =>'コメントタイプ',
'section' => 'comment_section',
'type' => 'radio',
'choices' => array(
'default' => 'デフォルト',
'thread_simple' => 'シンプルスレッド表示',
'thread' => '某スレッド掲示板風',
),
'priority' => 100,
));
//コメント欄の伸縮
$wp_customize->add_setting('comment_textarea_expand', array(
'default' => false,
));
$wp_customize->add_control( 'comment_textarea_expand', array(
'settings' => 'comment_textarea_expand',
'label' =>'コメント欄を文章量に応じて伸縮',
'section' => 'comment_section',
'type' => 'checkbox',
'priority' => 200,
));
/////////////////////////////
//テーマテキスト設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'theme_text_section', array(
'title' =>'テーマ内テキストの設定',
'priority' => 98.5,
));
//関連記事のタイトルを変更
$wp_customize->add_setting('theme_text_related_entry', array(
'default' => '関連記事',
));
$wp_customize->add_control( 'theme_text_related_entry', array(
'settings' => 'theme_text_related_entry',
'label' =>'関連記事タイトルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 100,
));
//コメントタイトルを変更
$wp_customize->add_setting('theme_text_comments', array(
'default' => 'コメント',
));
$wp_customize->add_control( 'theme_text_comments', array(
'settings' => 'theme_text_comments',
'label' =>'コメントタイトルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 200,
));
//返信コメントタイトルを変更
$wp_customize->add_setting('theme_text_comment_reply_title', array(
'default' => 'コメントをどうぞ',
));
$wp_customize->add_control( 'theme_text_comment_reply_title', array(
'settings' => 'theme_text_comment_reply_title',
'label' =>'返信コメントタイトルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 300,
));
//サブミットラベルを変更
$wp_customize->add_setting('theme_text_comment_submit_label', array(
'default' => 'コメントを送信',
));
$wp_customize->add_control( 'theme_text_comment_submit_label', array(
'settings' => 'theme_text_comment_submit_label',
'label' =>'コメントサブミットラベルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 400,
));
//匿名のユーザー名を変更
$wp_customize->add_setting('theme_text_comment_anonymous_name', array(
'default' => '匿名',
));
$wp_customize->add_control( 'theme_text_comment_anonymous_name', array(
'settings' => 'theme_text_comment_anonymous_name',
'label' =>'匿名のユーザー名を変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 450,
));
//「記事を読む」の変更
$wp_customize->add_setting('theme_text_read_entry', array(
'default' => '記事を読む',
));
$wp_customize->add_control( 'theme_text_read_entry', array(
'settings' => 'theme_text_read_entry',
'label' =>'「記事を読む」の変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 500,
));
//「続きを読む」の変更
$wp_customize->add_setting('theme_text_read_more', array(
'default' => '続きを読む',
));
$wp_customize->add_control( 'theme_text_read_more', array(
'settings' => 'theme_text_read_more',
'label' =>'「続きを読む」の変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 600,
));
//リストタイトルの「一覧」を変更
$wp_customize->add_setting('theme_text_list', array(
'default' => '一覧',
));
$wp_customize->add_control( 'theme_text_list', array(
'settings' => 'theme_text_list',
'label' =>'リストタイトルの「一覧」を変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 700,
));
//年月日のフォーマット
$wp_customize->add_setting('theme_text_ymd_format', array(
'default' => 'Y年m月d日',
));
$wp_customize->add_control( 'theme_text_ymd_format', array(
'settings' => 'theme_text_ymd_format',
'label' =>'年月日のフォーマット',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 800,
));
//年と月のフォーマット
$wp_customize->add_setting('theme_text_ym_format', array(
'default' => 'Y年m月',
));
$wp_customize->add_control( 'theme_text_ym_format', array(
'settings' => 'theme_text_ym_format',
'label' =>'年と月のフォーマット',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 900,
));
//年のフォーマット
$wp_customize->add_setting('theme_text_y_format', array(
'default' => 'Y年',
));
$wp_customize->add_control( 'theme_text_y_format', array(
'settings' => 'theme_text_y_format',
'label' =>'年のフォーマット',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 1000,
));
//検索ボックスのプレースホルダ
$wp_customize->add_setting('theme_text_search_placeholder', array(
'default' =>るかどうか
function is_footer_transparent(){
$o = get_layout_options();
return $o['footer_transparent'];
}
//メニューボタンアイコンフォントの取得
function get_menu_button_icon_font(){
$o = get_layout_options();
return strip_tags($o['menu_button_icon_font'] ? $o['menu_button_icon_font'] : 'fa-bars');
}
//トップへ戻るボタンを表示するか
function is_go_to_top_button_visible(){
return get_theme_mod( 'layout_option_go_to_top_button_visible', true);
}
//TOPへ戻るボタンアイコンフォントの取得
function get_go_to_top_button_icon_font(){
$o = get_layout_options();
return strip_tags($o['go_to_top_button_icon_font'] ? $o['go_to_top_button_icon_font'] : 'fa-chevron-circle-up');
}
//Lazy Loadを有効にするか
function is_lazy_load_enable(){
return get_theme_mod( 'image_option_lazy_load_enable', false);
}
//Lazy Loadのエフェクトを有効にするか
function is_lazy_load_effect_enable(){
return get_theme_mod( 'image_option_lazy_load_effect_enable', true);
}
//Lazy Loadの読み込み開始位置の取得
function get_lazy_load_threshold(){
return get_theme_mod( 'image_option_lazy_load_threshold', '0');
}
//Lightboxを有効にするか
function is_lightbox_enable(){
return get_theme_mod( 'image_option_lightbox_enable', false);
}
//カスタムSEO設定の値を取得
function get_seo_options(){
return get_option('seo_options');
}
//フロントページのタイトルのあとにキャッチフレーズを付加
function is_catch_phrase_to_frontpage_title(){
return get_theme_mod( 'seo_option_add_catch_phrase_to_frontpage_title', false);
}
//投稿・固定ページタイトルなどにサイト名を付加
function is_site_name_to_singular_title(){
return get_theme_mod( 'seo_option_add_site_name_to_singular_title', false);
}
//投稿日を検索エンジンに伝えるか
function is_seo_date_create(){
$options = get_seo_options();
return ($options['seo_date'] == 'create');
}
//更新日を検索エンジンに伝えるか
function is_seo_date_update(){
$options = get_seo_options();
return ($options['seo_date'] == 'update');
}
//抜粋をMeta Descriptionタグに挿入するか
function is_meta_description_insert(){
return strip_tags( get_theme_mod('seo_meta_description_insert', false) );
}
//カスタムSNS設定の値を取得
function get_sns_options(){
return get_option('sns_options');//外観→カスタム→SNSの設定の取得
}
//シェアメッセージの取得
function get_share_msg(){
$o = get_sns_options();
return $o['share_msg'];
}
//全シェアボタン表示がオンかどうか
function is_all_sns_share_btns_visible(){
return get_theme_mod( 'sns_option_all_sns_share_btns_visible', true);
}
//デフォルトのシェアボタンタイプか
function is_share_button_type_default(){
return get_theme_mod( 'sns_option_share_button_type', 'default') == 'default';
}
//デフォルトのシェアボタンタイプか
function is_share_button_type_theme_color(){
return get_theme_mod( 'sns_option_share_button_type', 'default') == 'theme_color_type';
}
//デフォルトのシェアボタンタイプか
function is_share_button_type_twitter(){
return get_theme_mod( 'sns_option_share_button_type', 'default') == 'twitter_type';
}
//独自シェアボタンかどうか
function is_simplicity_share_button(){
return is_share_button_type_theme_color() || is_share_button_type_twitter();
}
//Twitterボタンを表示するかどうか
function is_twitter_btn_visible(){
return get_theme_mod( 'sns_option_twitter_btn_visible', true);
}
//Facebookボタンを表示するかどうか
function is_facebook_btn_visible(){
return get_theme_mod( 'sns_option_facebook_btn_visible', true);
}
//Google+ボタンを表示するかどうか
function is_google_plus_btn_visible(){
return get_theme_mod( 'sns_option_google_plus_btn_visible', true);
}
//はてなボタンを表示するかどうか
function is_hatena_btn_visible(){
return get_theme_mod( 'sns_option_hatena_btn_visible', true);
}
//ポケットボタンを表示するかどうか
function is_pocket_btn_visible(){
return get_theme_mod( 'sns_option_pocket_btn_visible', true);
}
//LINEボタンを表示するかどうか
function is_line_btn_visible(){
return get_theme_mod( 'sns_option_line_btn_visible', true);
}
//Evernoteボタンを表示するかどうか
function is_evernote_btn_visible(){
return get_theme_mod( 'sns_option_evernote_btn_visible', false);
}
//feedlyボタンを表示するかどうか
function is_feedly_btn_visible(){
return get_theme_mod( 'sns_option_feedly_btn_visible', false);
}
//画像にPinterestボタンを表示するかどうか
function is_pinterest_btn_visible(){
return get_theme_mod( 'sns_option_pinterest_btn_visible', false);
}
//全フォローボタン表示がオンかどうか
function is_all_sns_follow_btns_visible(){
return get_theme_mod( 'sns_option_all_sns_follow_btns_visible', true);
}
//ページトップのフォローボタンを表示するか
function is_top_follows_visible(){
return get_theme_mod( 'sns_option_top_follows_visible', true);
}
//シェアメッセージの取得
function get_follow_msg(){
$o = get_sns_options();
return $o['follow_msg'];
}
//TwitterフォローボタンのIDを取得
function get_twitter_follow_id(){
$o = get_sns_options();
return $o['twitter'];
}
//FacebookフォローボタンのIDを取得
function get_facebook_follow_id(){
$o = get_sns_options();
return $o['facebook'];
}
//Google+フォローボタンのIDを取得
function get_google_plus_follow_id(){
$o = get_sns_options();
return $o['google_plus'];
}
//InstagramフォローボタンのIDを取得
function get_instagram_follow_id(){
$o = get_sns_options();
return $o['instagram'];
}
//feedlyフォローボタンを表示するかどうか
function is_feedly_follow_btn_visible(){
return get_theme_mod( 'sns_option_feedly_follow_btn_visible', true);
}
//RSSフォローボタンを表示するかどうか
function is_rss_follow_btn_visible(){
return get_theme_mod( 'sns_option_rss_follow_btn_visible', true);
}
//Twitterカードタグを挿入するか
function is_twitter_cards_enable(){
return get_theme_mod( 'sns_option_twitter_cards_enable', true);
}
//Twitterカードタイプを取得
function get_twitter_card_type(){
return strip_tags( get_theme_mod( 'sns_option_twitter_card_type', 'summary') );
}
//FacebookOGPタグを挿入するか
function is_facebook_ogp_enable(){
return get_theme_mod( 'sns_option_facebook_ogp_enable', true);
}
//fb:adminsを取得
function get_fb_admins(){
$o = get_sns_options();
return $o['fb_admins'];
}
//fb:app_idを取得
function get_fb_app_id(){
$o = get_sns_options();
return $o['fb_app_id'];
}
//OGPやTwitterカードのホームイメージのURLを取得
function get_ogp_home_image(){
return get_theme_mod( 'sns_option_ogp_home_image', '');
}
//フォローボタンに色をつけるかどうか
function is_colored_follow_btns(){
$o = get_option('sns_options');
return $o['colored_follow_btns'];
}
//タイトル下に小さなシェアボタンを表示するかどうか
function is_top_btns_visible(){
$o = get_option('sns_options');
return $o['top_btns_visible'];
}
//追従シェアボタンを表示するかどうか
function is_obsequence_sns_btns_visible(){
$o = get_option('sns_options');
return $o['obsequence_sns_btns_visible'];
}
//広告表示がオンかどうか
function is_bottom_sns_btns_visible(){
return get_theme_mod( 'sns_option_bottom_sns_btns_visible', true);
}
//カスタム広告設定の値を取得
function get_ads_options(){
return get_option('ads_options');
}
//広告表示がオンかどうか
function is_ads_visible(){
return get_theme_mod( 'ads_option_ads_visible', true);
}
//ダブルレクタングルが縦型か
function is_ads_vatical_rectangle(){
return get_theme_mod( 'ads_option_vatical_rectangle', false);
}
//パフォーマンス追求広告を表示するかどうか
function is_ads_performance_visible(){
$o = get_option('ads_options');
return $o['ads_performance_visible'];
}
//PCトップをカスタムサイズ広告にするか
function is_ads_custum_ad_space(){
return get_theme_mod( 'ads_option_custum_ad_space', false);
}
//広告を本文中に掲載するか
function is_ads_in_content(){
$o = get_option('ads_options');
return $o['ads_position'] == 'in_content';
}
//広告をコンテンツトップに掲載するか
function is_ads_content_top(){
$o = get_option('ads_options');
return $o['ads_position'] == 'content_top' && is_ads_performance_visible();
}
//広告をサイドバートップに掲載するか
function is_ads_sidebar_top(){
$o = get_option('ads_options');
return $o['ads_position'] == 'sidebar_top';
}
//関連記事下に掲載するか
function is_ads_under_relations(){
$o = get_option('ads_options');
return $o['ads_position'] == 'under_relations';
}
//広告ラベルの取得(文字が入力されていない場合は偽を返す)
function get_ads_label(){
$o = get_option('ads_options');
return ($o['label'] ? $o['label'] : 'スポンサーリンク');
}
//広告をサイドバートップに掲載するか
function is_ads_top_page_visible(){
$o = get_option('ads_options');
return $o['ads_top_page_visible'];
}
//広告を中央表示
function is_ads_center(){
$o = get_option('ads_options');
return $o['ads_center'];
}
//ブログカードを有効にするか
function is_blog_card_enable(){
return get_theme_mod( 'blog_card_enable', true);
}
//ブログカードのサムネイルを右側にするか
function is_blog_card_thumbnail_right(){
return get_theme_mod( 'blog_card_thumbnail_right', false);
}
//ブログカードリンクを新しいタブで開くか
function is_blog_card_target_blank(){
return get_theme_mod( 'blog_card_target_blank', false);
}
//はてブ数を表示するか
function is_blog_card_hatena_visible(){
return get_theme_mod( 'blog_card_hatena_visible', false);
}
//サイトロゴを表示するか
function is_blog_card_site_logo_visible(){
return get_theme_mod( 'blog_card_site_logo_visible', false);
}
//ブログカードをカラム幅いっぱいにするか
function is_blog_card_width_auto(){
return get_theme_mod( 'blog_card_width_auto', false);
}
//関連記事タイトルの取得
function get_theme_text_related_entry(){
return get_theme_mod( 'theme_text_related_entry', '関連記事');
}
//コメントを表示するか
function is_comments_visible(){
return get_theme_mod( 'comments_visible', true);
}
//コメントタイプがデフォルトか
function is_comment_type_default(){
return get_theme_mod( 'comment_type', 'default') == 'default';
}
//コメントタイプが2chタイプか
function is_comment_type_thread(){
return get_theme_mod( 'comment_type', 'default') == 'thread';
}
//コメントタイプがシンプルスレッド表示タイプか
function is_comment_type_thread_simple(){
return get_theme_mod( 'comment_type', 'default') == 'thread_simple';
}
//コメント欄を伸縮するか
function is_comment_textarea_expand(){
return get_theme_mod( 'comment_textarea_expand', false);
}
//コメントタイトルの取得
function get_theme_text_comments(){
return get_theme_mod( 'theme_text_comments', 'コメント');
}
//返信コメントタイトルの取得
function get_theme_text_comment_reply_title(){
return get_theme_mod( 'theme_text_comment_reply_title', 'コメントをどうぞ');
}
//コメントサブミットラベルの取得
function get_theme_text_comment_submit_label(){
return get_theme_mod( 'theme_text_comment_submit_label', 'コメントを送信');
}
//匿名ユーザー名の取得
function get_theme_text_comment_anonymous_name(){
$name = get_theme_mod( 'theme_text_comment_anonymous_name', '匿名');
return ( $name ? $name : '匿名' );
}
//記事を読むテキストの取得
function get_theme_text_read_entry(){
return get_theme_mod( 'theme_text_read_entry', '記事を読む');
}
//続きを読むテキストの取得
function get_theme_text_read_more(){
return get_theme_mod( 'theme_text_read_more', '続きを読む');
}
//リストタイトルの「一覧」部分のテキストを取得
function get_theme_text_list(){
return get_theme_mod( 'theme_text_list', '一覧');
}
//年月日のフォーマットを取得
function get_theme_text_ymd_format(){
return get_theme_mod( 'theme_text_ymd_format', 'Y年m月d日');
}
//年月のフォーマットを取得
function get_theme_text_ym_format(){
return get_theme_mod( 'theme_text_ym_format', 'Y年m月');
}
//年のフォーマットを取得
function get_theme_text_y_format(){
return get_theme_mod( 'theme_text_y_format', 'Y年');
}
//検索ボックスのプレースホルダテキストを取得
function get_theme_text_search_placeholder(){
return get_theme_mod( 'theme_text_search_placeholder', 'ブログ内を検索');
}
//記事が見つからなかった時のメッセージテキストを取得
function get_theme_text_not_found_message(){
return get_theme_mod( 'theme_text_not_found_message', '記事は見つかりませんでした。');
}
//テーマでファビコンを設定するかどうか
function is_favicon_enable(){
$o = get_option('other_options');
return $o['favicon'];
}
//カスタムアクセス解析設定の値を取得
function get_ana_options(){
return get_option('ana_options');
}
//トラッキングIDの取得
function get_tracking_id(){
$o = get_ana_options();
return $o['tracking_id'];
}
//ユーザー属性とインタレストカテゴリに関するレポートに対応しているか
function is_analytics_interest(){
$o = get_ana_options();
return $o['analytics_interest'];
}
//トラッキングIDの取得
function get_webmaster_tool_id(){
$o = get_ana_options();
return $o['webmaster_tool_id'];
}
//ファビコンのURLを取得
function get_favicon_url(){
$o = get_option('other_options');
return $o['favicon_url'];
}
//ファビコンのURLを取得
function get_the_favicon_url(){
if (is_favicon_enable()) {
if ( get_favicon_url() ) {
return get_favicon_url();
} else {
return get_stylesheet_directory_uri().'/images/favicon.ico';
}
}
}
//テーマでアップルタッチアイコンを設定するかどうか
function is_apple_touch_icon_enable(){
$o = get_option('other_options');
return $o['apple_touch_icon'];
}
//アップルタッチアイコンのURLを取得
function get_apple_touch_icon_url(){
$o = get_option('other_options');
return $o['apple_touch_icon_url'];
}
//「WLWで編集」を出すかどうか
function is_wlw_enable(){
$o = get_option('other_options');
return $o['wlw'];
}
//Simplicity新着・人気エントリーウイジェットにWordpress Popular Postsを使うかどうか
function is_wpp_enable(){
$o = get_option('other_options');
return $o['wpp'];
}
//日本語のスラッグを有効にするかどうか
function is_japanese_slug_enable(){
$o = get_option('other_options');
return $o['japanese_slug_enable'];
}
//ライセンス表記の取得
function get_site_license(){
$o = get_option('other_options');
$site_link = '
'.get_bloginfo('name').'';
$cc_desc = ' Some Rights Reserved.';
switch ( $o['site_license'] ) {
case "cc_by":
return '
CC BY'.$site_link.$cc_desc;
break;
case "cc_by_sa":
return '
CC BY-SA'.$site_link.$cc_desc;
break;
case "cc_by_nd":
return '
CC BY-ND'.$site_link.$cc_desc;
break;
case "cc_by_nc":
return '
CC BY-NC'.$site_link.$cc_desc;
break;
case "cc_by_nc_sa":
return '
CC BY-NC-SA'.$site_link.$cc_desc;
break;
case "cc_by_nc_nd":
return '
CC BY-NC-ND'.$site_link.$cc_desc;
break;
case "cc0":
return '
CC0'.$site_link.' No Rights Reserved.';
break;
case "pd":
return '
Public Domain'.$site_link.' No Rights Reserved.';
break;
default:
return 'Copyright© '.$site_link.' All Rights Reserved.';
}
}
//ローカルでレスポンシブテストのリンクを表示するか
function is_responsive_test_visible(){
return get_theme_mod( 'other_responsive_test_visible', true);
}
//Windows Live Writerで編集するためのリンクを作成する
function wlw_edit_post_link($link, $before, $after){
if (is_wlw_enable()) {
if ( is_user_logged_in() ):
echo $before.'
'.$link.''.$after;
endif;
}
}
//固定ページにパンくずリストを表示するかどうか
function is_page_breadcrumb_visible(){
return get_theme_mod( 'breadcrumb_option_page_breadcrumb_visible', false);
}
//トップページにパンくずリストを表示するかどうか
function is_top_page_breadcrumb_visible(){
return get_theme_mod( 'breadcrumb_option_top_page_breadcrumb_visible', false);
}
//ルートページ名
function get_root_page_breadcrumb_name(){
return get_theme_mod('breadcrumb_option_root_page_name','ホーム');
}
//トップページ名
function get_top_page_breadcrumb_name(){
return get_theme_mod('breadcrumb_option_top_page_name','ブログ');
}
の表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 20,
));
//Facebook拡散ボタン表示
$wp_customize->add_setting('sns_option_facebook_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_facebook_btn_visible', array(
'settings' => 'sns_option_facebook_btn_visible',
'label' =>'Facebook「いいね!」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 30,
));
//Google+拡散ボタン表示
$wp_customize->add_setting('sns_option_google_plus_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_google_plus_btn_visible', array(
'settings' => 'sns_option_google_plus_btn_visible',
'label' =>'Google+「+1」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 40,
));
//はてな拡散ボタン表示
$wp_customize->add_setting('sns_option_hatena_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_hatena_btn_visible', array(
'settings' => 'sns_option_hatena_btn_visible',
'label' =>'はてな「はてブ」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 50,
));
//ポケットボタン表示
$wp_customize->add_setting('sns_option_pocket_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_pocket_btn_visible', array(
'settings' => 'sns_option_pocket_btn_visible',
'label' =>'pocket「あとで読む」ボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 60,
));
//LINEボタン表示(モバイル時)
$wp_customize->add_setting('sns_option_line_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_line_btn_visible', array(
'settings' => 'sns_option_line_btn_visible',
'label' =>'LINEボタンの表示(モバイル時)',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 70,
));
//Evernoteボタン表示
$wp_customize->add_setting('sns_option_evernote_btn_visible', array(
));
$wp_customize->add_control( 'sns_option_evernote_btn_visible', array(
'settings' => 'sns_option_evernote_btn_visible',
'label' =>'Evernoteボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 71,
));
//feedlyボタン表示
$wp_customize->add_setting('sns_option_feedly_btn_visible', array(
));
$wp_customize->add_control( 'sns_option_feedly_btn_visible', array(
'settings' => 'sns_option_feedly_btn_visible',
'label' =>'feedlyボタンの表示(PCのみ吹出付)',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 72,
));
//画像にPinterestピンを表示
$wp_customize->add_setting('sns_option_pinterest_btn_visible', array(
));
$wp_customize->add_control( 'sns_option_pinterest_btn_visible', array(
'settings' => 'sns_option_pinterest_btn_visible',
'label' =>'画像にPinterestピンを表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 73,
));
//全フォローボタンの表示
$wp_customize->add_setting('sns_option_all_sns_follow_btns_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_all_sns_follow_btns_visible', array(
'settings' => 'sns_option_all_sns_follow_btns_visible',
'label' =>'全フォローボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 75,
));
//ページトップのフォローボタン表示
$wp_customize->add_setting('sns_option_top_follows_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_top_follows_visible', array(
'settings' => 'sns_option_top_follows_visible',
'label' =>'ページトップフォローボタンの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 76,
));
//フォローメッセージ
$wp_customize->add_setting('sns_options[follow_msg]', array(
'default' => 'フォローする',
'type' => 'option',
));
$wp_customize->add_control( 'follow_msg_textfield', array(
'settings' => 'sns_options[follow_msg]',
'label' =>'フォローメッセージ(無記入で非表示)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 80,
));
//TwitterフォローID
$wp_customize->add_setting('sns_options[twitter]', array(
'type' => 'option',
));
$wp_customize->add_control( 'twitter_textfield', array(
'settings' => 'sns_options[twitter]',
'label' =>'twitter.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 90,
));
//FacebookフォローID
$wp_customize->add_setting('sns_options[facebook]', array(
'type' => 'option',
));
$wp_customize->add_control( 'facebook_textfield', array(
'settings' => 'sns_options[facebook]',
'label' =>'facebook.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 100,
));
//Google+フォローID
$wp_customize->add_setting('sns_options[google_plus]', array(
'type' => 'option',
));
$wp_customize->add_control( 'google_plus_textfield', array(
'settings' => 'sns_options[google_plus]',
'label' =>'plus.google.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 110,
));
//InstagramフォローID
$wp_customize->add_setting('sns_options[instagram]', array(
'type' => 'option',
));
$wp_customize->add_control( 'instagram_textfield', array(
'settings' => 'sns_options[instagram]',
'label' =>'instagram.com/XXXXXXX',
'section' => 'sns_section',
'type' => 'text',
'priority' => 115,
));
//feedlyフォローボタン
$wp_customize->add_setting('sns_option_feedly_follow_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_feedly_follow_btn_visible', array(
'settings' => 'sns_option_feedly_follow_btn_visible',
'label' =>'feedlyの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 120,
));
//RSSフォローボタン
$wp_customize->add_setting('sns_option_rss_follow_btn_visible', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_rss_follow_btn_visible', array(
'settings' => 'sns_option_rss_follow_btn_visible',
'label' =>'RSSの表示',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 130,
));
//Twitterカードタグを挿入
$wp_customize->add_setting('sns_option_twitter_cards_enable', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_twitter_cards_enable', array(
'settings' => 'sns_option_twitter_cards_enable',
'label' =>'Twitterカードタグを挿入',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 133,
));
//Twitterカードタイプ
$wp_customize->add_setting('sns_option_twitter_card_type', array(
'default' => 'summary',
));
$wp_customize->add_control( 'sns_option_twitter_card_type', array(
'settings' => 'sns_option_twitter_card_type',
'label' =>'Twitterカードタイプ',
'section' => 'sns_section',
'type' => 'radio',
'choices' => array(
'summary' => 'サマリー(summary)',
'summary_large_image' => 'サマリー(summary_large_image)',
'photo' => '写真(photo)',
),
'priority' => 134,
));
//FacebookOGPタグを挿入
$wp_customize->add_setting('sns_option_facebook_ogp_enable', array(
'default' => true,
));
$wp_customize->add_control( 'sns_option_facebook_ogp_enable', array(
'settings' => 'sns_option_facebook_ogp_enable',
'label' =>'FacebookOGPタグを挿入',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 135,
));
//fb:admins
$wp_customize->add_setting('sns_options[fb_admins]', array(
'type' => 'option',
));
$wp_customize->add_control( 'fb_admins_textfield', array(
'settings' => 'sns_options[fb_admins]',
'label' =>'FacebookOGP管理者ID(fb:admins)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 140,
));
//fb:app_id
$wp_customize->add_setting('sns_options[fb_app_id]', array(
'type' => 'option',
));
$wp_customize->add_control( 'fb_app_id_textfield', array(
'settings' => 'sns_options[fb_app_id]',
'label' =>'FacebookOGPアプリID(fb:app_id)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 150,
));
//OGPやTwitterカードのホームイメージ
$wp_customize->add_setting('sns_option_ogp_home_image', array(
'default' => '',
));
$wp_customize->add_control( 'sns_option_ogp_home_image', array(
'settings' => 'sns_option_ogp_home_image',
'label' =>'OGPやTwitterカードのホームイメージ(サイトイメージ画像をURLで指定)',
'section' => 'sns_section',
'type' => 'text',
'priority' => 155,
));
//OGPやTwitterカードのサイト概要
$wp_customize->add_setting('sns_options[ogp_description]', array(
'default' => 'excerpt',
'type' => 'option',
));
$wp_customize->add_control( 'ogp_description_radio', array(
'settings' => 'sns_options[ogp_description]',
'label' =>'OGP、Twitterカードのdescription',
'section' => 'sns_section',
'type' => 'radio',
'choices' => array(
'excerpt' => '記事の抜粋(リード文100文字)',
'meta' => 'メタdescription(要All in One SEO Pack)',
),
'priority' => 160,
));
//フォローボタンに色をつける
$wp_customize->add_setting('sns_options[colored_follow_btns]', array(
'type' => 'option',
));
$wp_customize->add_control( 'colored_follow_btns_checkbox', array(
'settings' => 'sns_options[colored_follow_btns]',
'label' =>'フォローボタンに色をつける',
'section' => 'sns_section',
'type' => 'checkbox',
'priority' => 170,
));
/////////////////////////////
//広告設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'ads_section', array(
'title' =>'広告の設定',
'priority' => 97,
));
//全ての広告を表示
$wp_customize->add_setting('ads_option_ads_visible', array(
'default' => true,
));
$wp_customize->add_control( 'ads_option_ads_visible', array(
'settings' => 'ads_option_ads_visible',
'label' =>'全ての広告を表示 (チェックを外すと全ての広告が非表示に)',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 10,
));
//記事本文中に広告を表示するか
$wp_customize->add_setting('ads_options[ads_position]', array(
'default' => 'under_relations',
'type' => 'option',
));
//広告位置の設定
$radio_items = array();
if ( !is_responsive_enable() ) $radio_items += array('under_relations' => '関連記事下(デフォルト)');
$radio_items += array('sidebar_top' => 'サイドバートップ',
'in_content' => '本文記事中(H2見出し手前)');
if ( is_ads_performance_visible() && !is_responsive_enable() ) $radio_items += array('content_top'=>'コンテンツ上部にバナー表示');
$label = ( is_responsive_enable() ? 'レスポンシブ広告位置の設定' : '記事下以外の広告位置');
$wp_customize->add_control( 'ads_position_radio', array(
'settings' => 'ads_options[ads_position]',
'label' => $label,
'section' => 'ads_section',
'type' => 'radio',
'choices' => $radio_items,
'priority'=> 20,
));
//広告のラベル
$wp_customize->add_setting('ads_options[label]', array(
'default' => 'スポンサーリンク',
'type' => 'option',
));
$wp_customize->add_control( 'label_textfield', array(
'settings' => 'ads_options[label]',
'label' =>'広告のラベル',
'section' => 'ads_section',
'type' => 'text',
'priority'=> 30,
));
//トップページに広告を表示する
$wp_customize->add_setting('ads_options[ads_top_page_visible]', array(
'type' => 'option',
));
$wp_customize->add_control( 'ads_top_page_visible_checkbox', array(
'settings' => 'ads_options[ads_top_page_visible]',
'label' =>'トップページに広告を表示する',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 30,
));
//広告を中央表示
$wp_customize->add_setting('ads_options[ads_center]', array(
'type' => 'option',
));
$wp_customize->add_control( 'ads_center_checkbox', array(
'settings' => 'ads_options[ads_center]',
'label' =>'広告を中央表示',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 40,
));
//ダブルレクタングルを縦型にする
$wp_customize->add_setting('ads_option_vatical_rectangle', array(
));
$wp_customize->add_control( 'ads_option_vatical_rectangle', array(
'settings' => 'ads_option_vatical_rectangle',
'label' =>'PC表示のダブルレクタングルを縦型に',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 500,
));
//パフォーマンス追求広告の表示
$wp_customize->add_setting('ads_options[ads_performance_visible]', array(
'type' => 'option',
));
$wp_customize->add_control( 'ads_performance_visible_checkbox', array(
'settings' => 'ads_options[ads_performance_visible]',
'label' =>'パフォーマンス追求広告の表示(設定ウイジェットを表示します。【重要】グローバルナビでサブメニュー表示している人は、メニューがかぶるとアドセンスポリシー違反になるので非推奨)',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 600,
));
//PCトップをカスタムサイズ広告に
$wp_customize->add_setting('ads_option_custum_ad_space', array(
));
$wp_customize->add_control( 'ads_option_custum_ad_space', array(
'settings' => '',
'label' =>'PCトップ広告をカスタムサイズ広告に',
'section' => 'ads_section',
'type' => 'checkbox',
'priority'=> 700,
));
//アクセス解析設定項目の追加
$wp_customize->add_section( 'ana_section', array(
'title' =>'アクセス解析(Analyticsなど)',
'priority' => 96,
));
//Google AnalyticsトラッキングID
$wp_customize->add_setting('ana_options[tracking_id]', array(
'default' => '',
'type' => 'option',
));
$wp_customize->add_control( 'tracking_id_textfield', array(
'settings' => 'ana_options[tracking_id]',
'label' =>'Google AnalyticsトラッキングID(UA-xxxxxxxx-x)',
'section' => 'ana_section',
'type' => 'text',
'priority'=> 10,
));
//ユーザー属性とインタレストカテゴリに関するレポートに対応する
$wp_customize->add_setting('ana_options[analytics_interest]', array(
'type' => 'option',
));
$wp_customize->add_control( 'analytics_interest_checkbox', array(
'settings' => 'ana_options[analytics_interest]',
'label' =>'Googleアナリティクスのユーザー属性とインタレストカテゴリレポートに対応する(※要Analyticsで有効化)',
'section' => 'ana_section',
'type' => 'checkbox',
'priority'=> 20,
));
//ウェブマスターツールID
$wp_customize->add_setting('ana_options[webmaster_tool_id]', array(
'default' => '',
'type' => 'option',
));
$wp_customize->add_control( 'webmaster_tool_id_textfield', array(
'settings' => 'ana_options[webmaster_tool_id]',
'label' =>'ウェブマスターツールID',
'section' => 'ana_section',
'type' => 'text',
'priority'=> 30,
));
/////////////////////////////
//ブログカード設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'blog_card_section', array(
'title' =>'ブログカードの設定',
'priority' => 98,
));
//ブログカードの有効化
$wp_customize->add_setting('blog_card_enable', array(
'default' =>true,
));
$wp_customize->add_control( 'blog_card_enable', array(
'settings' => 'blog_card_enable',
'label' =>'ブログカード有効(サイト内URLのみ)',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 100,
));
//ブログカードのサムネイルを右側にする
$wp_customize->add_setting('blog_card_thumbnail_right', array(
));
$wp_customize->add_control( 'blog_card_thumbnail_right', array(
'settings' => 'blog_card_thumbnail_right',
'label' =>'サムネイルを右側にする',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 150,
));
//ブログカードのリンクを新しいタブで開く
$wp_customize->add_setting('blog_card_target_blank', array(
));
$wp_customize->add_control( 'blog_card_target_blank', array(
'settings' => 'blog_card_target_blank',
'label' =>'新しいタブで開く',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 200,
));
//はてブ数を表示
$wp_customize->add_setting('blog_card_hatena_visible', array(
));
$wp_customize->add_control( 'blog_card_hatena_visible', array(
'settings' => 'blog_card_hatena_visible',
'label' =>'はてブ数を表示',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 300,
));
//サイトロゴ表示
$wp_customize->add_setting('blog_card_site_logo_visible', array(
));
$wp_customize->add_control( 'blog_card_site_logo_visible', array(
'settings' => 'blog_card_site_logo_visible',
'label' =>'サイトロゴを表示',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 400,
));
//カード幅を広げる
$wp_customize->add_setting('blog_card_width_auto', array(
));
$wp_customize->add_control( 'blog_card_width_auto', array(
'settings' => 'blog_card_width_auto',
'label' =>'カード幅を広げる',
'section' => 'blog_card_section',
'type' => 'checkbox',
'priority' => 500,
));
//コメントの設定項目の追加
$wp_customize->add_section( 'comment_section', array(
'title' =>'コメントの設定',
'priority' => 98.3,
));
//コメントの表示
$wp_customize->add_setting('comments_visible', array(
'default' => true,
));
$wp_customize->add_control( 'comments_visible', array(
'settings' => 'comments_visible',
'label' =>'コメントの表示',
'section' => 'comment_section',
'type' => 'checkbox',
'priority' => 10,
));
//コメントスタイル
$wp_customize->add_setting('comment_type', array(
'default' => 'default',
));
$wp_customize->add_control( 'comment_type', array(
'settings' => 'comment_type',
'label' =>'コメントタイプ',
'section' => 'comment_section',
'type' => 'radio',
'choices' => array(
'default' => 'デフォルト',
'thread_simple' => 'シンプルスレッド表示',
'thread' => '某スレッド掲示板風',
),
'priority' => 100,
));
//コメント欄の伸縮
$wp_customize->add_setting('comment_textarea_expand', array(
'default' => false,
));
$wp_customize->add_control( 'comment_textarea_expand', array(
'settings' => 'comment_textarea_expand',
'label' =>'コメント欄を文章量に応じて伸縮',
'section' => 'comment_section',
'type' => 'checkbox',
'priority' => 200,
));
/////////////////////////////
//テーマテキスト設定項目の追加
/////////////////////////////
$wp_customize->add_section( 'theme_text_section', array(
'title' =>'テーマ内テキストの設定',
'priority' => 98.5,
));
//関連記事のタイトルを変更
$wp_customize->add_setting('theme_text_related_entry', array(
'default' => '関連記事',
));
$wp_customize->add_control( 'theme_text_related_entry', array(
'settings' => 'theme_text_related_entry',
'label' =>'関連記事タイトルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 100,
));
//コメントタイトルを変更
$wp_customize->add_setting('theme_text_comments', array(
'default' => 'コメント',
));
$wp_customize->add_control( 'theme_text_comments', array(
'settings' => 'theme_text_comments',
'label' =>'コメントタイトルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 200,
));
//返信コメントタイトルを変更
$wp_customize->add_setting('theme_text_comment_reply_title', array(
'default' => 'コメントをどうぞ',
));
$wp_customize->add_control( 'theme_text_comment_reply_title', array(
'settings' => 'theme_text_comment_reply_title',
'label' =>'返信コメントタイトルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 300,
));
//サブミットラベルを変更
$wp_customize->add_setting('theme_text_comment_submit_label', array(
'default' => 'コメントを送信',
));
$wp_customize->add_control( 'theme_text_comment_submit_label', array(
'settings' => 'theme_text_comment_submit_label',
'label' =>'コメントサブミットラベルを変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 400,
));
//匿名のユーザー名を変更
$wp_customize->add_setting('theme_text_comment_anonymous_name', array(
'default' => '匿名',
));
$wp_customize->add_control( 'theme_text_comment_anonymous_name', array(
'settings' => 'theme_text_comment_anonymous_name',
'label' =>'匿名のユーザー名を変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 450,
));
//「記事を読む」の変更
$wp_customize->add_setting('theme_text_read_entry', array(
'default' => '記事を読む',
));
$wp_customize->add_control( 'theme_text_read_entry', array(
'settings' => 'theme_text_read_entry',
'label' =>'「記事を読む」の変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 500,
));
//「続きを読む」の変更
$wp_customize->add_setting('theme_text_read_more', array(
'default' => '続きを読む',
));
$wp_customize->add_control( 'theme_text_read_more', array(
'settings' => 'theme_text_read_more',
'label' =>'「続きを読む」の変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 600,
));
//リストタイトルの「一覧」を変更
$wp_customize->add_setting('theme_text_list', array(
'default' => '一覧',
));
$wp_customize->add_control( 'theme_text_list', array(
'settings' => 'theme_text_list',
'label' =>'リストタイトルの「一覧」を変更',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 700,
));
//年月日のフォーマット
$wp_customize->add_setting('theme_text_ymd_format', array(
'default' => 'Y年m月d日',
));
$wp_customize->add_control( 'theme_text_ymd_format', array(
'settings' => 'theme_text_ymd_format',
'label' =>'年月日のフォーマット',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 800,
));
//年と月のフォーマット
$wp_customize->add_setting('theme_text_ym_format', array(
'default' => 'Y年m月',
));
$wp_customize->add_control( 'theme_text_ym_format', array(
'settings' => 'theme_text_ym_format',
'label' =>'年と月のフォーマット',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 900,
));
//年のフォーマット
$wp_customize->add_setting('theme_text_y_format', array(
'default' => 'Y年',
));
$wp_customize->add_control( 'theme_text_y_format', array(
'settings' => 'theme_text_y_format',
'label' =>'年のフォーマット',
'section' => 'theme_text_section',
'type' => 'text',
'priority'=> 1000,
));
//検索ボックスのプレースホルダ
$wp_customize->add_setting('theme_text_search_placeholder', array(
'default' =>るかどうか
function is_footer_transparent(){
$o = get_layout_options();
return $o['footer_transparent'];
}
//メニューボタンアイコンフォントの取得
function get_menu_button_icon_font(){
$o = get_layout_options();
return strip_tags($o['menu_button_icon_font'] ? $o['menu_button_icon_font'] : 'fa-bars');
}
//トップへ戻るボタンを表示するか
function is_go_to_top_button_visible(){
return get_theme_mod( 'layout_option_go_to_top_button_visible', true);
}
//TOPへ戻るボタンアイコンフォントの取得
function get_go_to_top_button_icon_font(){
$o = get_layout_options();
return strip_tags($o['go_to_top_button_icon_font'] ? $o['go_to_top_button_icon_font'] : 'fa-chevron-circle-up');
}
//Lazy Loadを有効にするか
function is_lazy_load_enable(){
return get_theme_mod( 'image_option_lazy_load_enable', false);
}
//Lazy Loadのエフェクトを有効にするか
function is_lazy_load_effect_enable(){
return get_theme_mod( 'image_option_lazy_load_effect_enable', true);
}
//Lazy Loadの読み込み開始位置の取得
function get_lazy_load_threshold(){
return get_theme_mod( 'image_option_lazy_load_threshold', '0');
}
//Lightboxを有効にするか
function is_lightbox_enable(){
return get_theme_mod( 'image_option_lightbox_enable', false);
}
//カスタムSEO設定の値を取得
function get_seo_options(){
return get_option('seo_options');
}
//フロントページのタイトルのあとにキャッチフレーズを付加
function is_catch_phrase_to_frontpage_title(){
return get_theme_mod( 'seo_option_add_catch_phrase_to_frontpage_title', false);
}
//投稿・固定ページタイトルなどにサイト名を付加
function is_site_name_to_singular_title(){
return get_theme_mod( 'seo_option_add_site_name_to_singular_title', false);
}
//投稿日を検索エンジンに伝えるか
function is_seo_date_create(){
$options = get_seo_options();
return ($options['seo_date'] == 'create');
}
//更新日を検索エンジンに伝えるか
function is_seo_date_update(){
$options = get_seo_options();
return ($options['seo_date'] == 'update');
}
//抜粋をMeta Descriptionタグに挿入するか
function is_meta_description_insert(){
return strip_tags( get_theme_mod('seo_meta_description_insert', false) );
}
//カスタムSNS設定の値を取得
function get_sns_options(){
return get_option('sns_options');//外観→カスタム→SNSの設定の取得
}
//シェアメッセージの取得
function get_share_msg(){
$o = get_sns_options();
return $o['share_msg'];
}
//全シェアボタン表示がオンかどうか
function is_all_sns_share_btns_visible(){
return get_theme_mod( 'sns_option_all_sns_share_btns_visible', true);
}
//デフォルトのシェアボタンタイプか
function is_share_button_type_default(){
return get_theme_mod( 'sns_option_share_button_type', 'default') == 'default';
}
//デフォルトのシェアボタンタイプか
function is_share_button_type_theme_color(){
return get_theme_mod( 'sns_option_share_button_type', 'default') == 'theme_color_type';
}
//デフォルトのシェアボタンタイプか
function is_share_button_type_twitter(){
return get_theme_mod( 'sns_option_share_button_type', 'default') == 'twitter_type';
}
//独自シェアボタンかどうか
function is_simplicity_share_button(){
return is_share_button_type_theme_color() || is_share_button_type_twitter();
}
//Twitterボタンを表示するかどうか
function is_twitter_btn_visible(){
return get_theme_mod( 'sns_option_twitter_btn_visible', true);
}
//Facebookボタンを表示するかどうか
function is_facebook_btn_visible(){
return get_theme_mod( 'sns_option_facebook_btn_visible', true);
}
//Google+ボタンを表示するかどうか
function is_google_plus_btn_visible(){
return get_theme_mod( 'sns_option_google_plus_btn_visible', true);
}
//はてなボタンを表示するかどうか
function is_hatena_btn_visible(){
return get_theme_mod( 'sns_option_hatena_btn_visible', true);
}
//ポケットボタンを表示するかどうか
function is_pocket_btn_visible(){
return get_theme_mod( 'sns_option_pocket_btn_visible', true);
}
//LINEボタンを表示するかどうか
function is_line_btn_visible(){
return get_theme_mod( 'sns_option_line_btn_visible', true);
}
//Evernoteボタンを表示するかどうか
function is_evernote_btn_visible(){
return get_theme_mod( 'sns_option_evernote_btn_visible', false);
}
//feedlyボタンを表示するかどうか
function is_feedly_btn_visible(){
return get_theme_mod( 'sns_option_feedly_btn_visible', false);
}
//画像にPinterestボタンを表示するかどうか
function is_pinterest_btn_visible(){
return get_theme_mod( 'sns_option_pinterest_btn_visible', false);
}
//全フォローボタン表示がオンかどうか
function is_all_sns_follow_btns_visible(){
return get_theme_mod( 'sns_option_all_sns_follow_btns_visible', true);
}
//ページトップのフォローボタンを表示するか
function is_top_follows_visible(){
return get_theme_mod( 'sns_option_top_follows_visible', true);
}
//シェアメッセージの取得
function get_follow_msg(){
$o = get_sns_options();
return $o['follow_msg'];
}
//TwitterフォローボタンのIDを取得
function get_twitter_follow_id(){
$o = get_sns_options();
return $o['twitter'];
}
//FacebookフォローボタンのIDを取得
function get_facebook_follow_id(){
$o = get_sns_options();
return $o['facebook'];
}
//Google+フォローボタンのIDを取得
function get_google_plus_follow_id(){
$o = get_sns_options();
return $o['google_plus'];
}
//InstagramフォローボタンのIDを取得
function get_instagram_follow_id(){
$o = get_sns_options();
return $o['instagram'];
}
//feedlyフォローボタンを表示するかどうか
function is_feedly_follow_btn_visible(){
return get_theme_mod( 'sns_option_feedly_follow_btn_visible', true);
}
//RSSフォローボタンを表示するかどうか
function is_rss_follow_btn_visible(){
return get_theme_mod( 'sns_option_rss_follow_btn_visible', true);
}
//Twitterカードタグを挿入するか
function is_twitter_cards_enable(){
return get_theme_mod( 'sns_option_twitter_cards_enable', true);
}
//Twitterカードタイプを取得
function get_twitter_card_type(){
return strip_tags( get_theme_mod( 'sns_option_twitter_card_type', 'summary') );
}
//FacebookOGPタグを挿入するか
function is_facebook_ogp_enable(){
return get_theme_mod( 'sns_option_facebook_ogp_enable', true);
}
//fb:adminsを取得
function get_fb_admins(){
$o = get_sns_options();
return $o['fb_admins'];
}
//fb:app_idを取得
function get_fb_app_id(){
$o = get_sns_options();
return $o['fb_app_id'];
}
//OGPやTwitterカードのホームイメージのURLを取得
function get_ogp_home_image(){
return get_theme_mod( 'sns_option_ogp_home_image', '');
}
//フォローボタンに色をつけるかどうか
function is_colored_follow_btns(){
$o = get_option('sns_options');
return $o['colored_follow_btns'];
}
//タイトル下に小さなシェアボタンを表示するかどうか
function is_top_btns_visible(){
$o = get_option('sns_options');
return $o['top_btns_visible'];
}
//追従シェアボタンを表示するかどうか
function is_obsequence_sns_btns_visible(){
$o = get_option('sns_options');
return $o['obsequence_sns_btns_visible'];
}
//広告表示がオンかどうか
function is_bottom_sns_btns_visible(){
return get_theme_mod( 'sns_option_bottom_sns_btns_visible', true);
}
//カスタム広告設定の値を取得
function get_ads_options(){
return get_option('ads_options');
}
//広告表示がオンかどうか
function is_ads_visible(){
return get_theme_mod( 'ads_option_ads_visible', true);
}
//ダブルレクタングルが縦型か
function is_ads_vatical_rectangle(){
return get_theme_mod( 'ads_option_vatical_rectangle', false);
}
//パフォーマンス追求広告を表示するかどうか
function is_ads_performance_visible(){
$o = get_option('ads_options');
return $o['ads_performance_visible'];
}
//PCトップをカスタムサイズ広告にするか
function is_ads_custum_ad_space(){
return get_theme_mod( 'ads_option_custum_ad_space', false);
}
//広告を本文中に掲載するか
function is_ads_in_content(){
$o = get_option('ads_options');
return $o['ads_position'] == 'in_content';
}
//広告をコンテンツトップに掲載するか
function is_ads_content_top(){
$o = get_option('ads_options');
return $o['ads_position'] == 'content_top' && is_ads_performance_visible();
}
//広告をサイドバートップに掲載するか
function is_ads_sidebar_top(){
$o = get_option('ads_options');
return $o['ads_position'] == 'sidebar_top';
}
//関連記事下に掲載するか
function is_ads_under_relations(){
$o = get_option('ads_options');
return $o['ads_position'] == 'under_relations';
}
//広告ラベルの取得(文字が入力されていない場合は偽を返す)
function get_ads_label(){
$o = get_option('ads_options');
return ($o['label'] ? $o['label'] : 'スポンサーリンク');
}
//広告をサイドバートップに掲載するか
function is_ads_top_page_visible(){
$o = get_option('ads_options');
return $o['ads_top_page_visible'];
}
//広告を中央表示
function is_ads_center(){
$o = get_option('ads_options');
return $o['ads_center'];
}
//ブログカードを有効にするか
function is_blog_card_enable(){
return get_theme_mod( 'blog_card_enable', true);
}
//ブログカードのサムネイルを右側にするか
function is_blog_card_thumbnail_right(){
return get_theme_mod( 'blog_card_thumbnail_right', false);
}
//ブログカードリンクを新しいタブで開くか
function is_blog_card_target_blank(){
return get_theme_mod( 'blog_card_target_blank', false);
}
//はてブ数を表示するか
function is_blog_card_hatena_visible(){
return get_theme_mod( 'blog_card_hatena_visible', false);
}
//サイトロゴを表示するか
function is_blog_card_site_logo_visible(){
return get_theme_mod( 'blog_card_site_logo_visible', false);
}
//ブログカードをカラム幅いっぱいにするか
function is_blog_card_width_auto(){
return get_theme_mod( 'blog_card_width_auto', false);
}
//関連記事タイトルの取得
function get_theme_text_related_entry(){
return get_theme_mod( 'theme_text_related_entry', '関連記事');
}
//コメントを表示するか
function is_comments_visible(){
return get_theme_mod( 'comments_visible', true);
}
//コメントタイプがデフォルトか
function is_comment_type_default(){
return get_theme_mod( 'comment_type', 'default') == 'default';
}
//コメントタイプが2chタイプか
function is_comment_type_thread(){
return get_theme_mod( 'comment_type', 'default') == 'thread';
}
//コメントタイプがシンプルスレッド表示タイプか
function is_comment_type_thread_simple(){
return get_theme_mod( 'comment_type', 'default') == 'thread_simple';
}
//コメント欄を伸縮するか
function is_comment_textarea_expand(){
return get_theme_mod( 'comment_textarea_expand', false);
}
//コメントタイトルの取得
function get_theme_text_comments(){
return get_theme_mod( 'theme_text_comments', 'コメント');
}
//返信コメントタイトルの取得
function get_theme_text_comment_reply_title(){
return get_theme_mod( 'theme_text_comment_reply_title', 'コメントをどうぞ');
}
//コメントサブミットラベルの取得
function get_theme_text_comment_submit_label(){
return get_theme_mod( 'theme_text_comment_submit_label', 'コメントを送信');
}
//匿名ユーザー名の取得
function get_theme_text_comment_anonymous_name(){
$name = get_theme_mod( 'theme_text_comment_anonymous_name', '匿名');
return ( $name ? $name : '匿名' );
}
//記事を読むテキストの取得
function get_theme_text_read_entry(){
return get_theme_mod( 'theme_text_read_entry', '記事を読む');
}
//続きを読むテキストの取得
function get_theme_text_read_more(){
return get_theme_mod( 'theme_text_read_more', '続きを読む');
}
//リストタイトルの「一覧」部分のテキストを取得
function get_theme_text_list(){
return get_theme_mod( 'theme_text_list', '一覧');
}
//年月日のフォーマットを取得
function get_theme_text_ymd_format(){
return get_theme_mod( 'theme_text_ymd_format', 'Y年m月d日');
}
//年月のフォーマットを取得
function get_theme_text_ym_format(){
return get_theme_mod( 'theme_text_ym_format', 'Y年m月');
}
//年のフォーマットを取得
function get_theme_text_y_format(){
return get_theme_mod( 'theme_text_y_format', 'Y年');
}
//検索ボックスのプレースホルダテキストを取得
function get_theme_text_search_placeholder(){
return get_theme_mod( 'theme_text_search_placeholder', 'ブログ内を検索');
}
//記事が見つからなかった時のメッセージテキストを取得
function get_theme_text_not_found_message(){
return get_theme_mod( 'theme_text_not_found_message', '記事は見つかりませんでした。');
}
//テーマでファビコンを設定するかどうか
function is_favicon_enable(){
$o = get_option('other_options');
return $o['favicon'];
}
//カスタムアクセス解析設定の値を取得
function get_ana_options(){
return get_option('ana_options');
}
//トラッキングIDの取得
function get_tracking_id(){
$o = get_ana_options();
return $o['tracking_id'];
}
//ユーザー属性とインタレストカテゴリに関するレポートに対応しているか
function is_analytics_interest(){
$o = get_ana_options();
return $o['analytics_interest'];
}
//トラッキングIDの取得
function get_webmaster_tool_id(){
$o = get_ana_options();
return $o['webmaster_tool_id'];
}
//ファビコンのURLを取得
function get_favicon_url(){
$o = get_option('other_options');
return $o['favicon_url'];
}
//ファビコンのURLを取得
function get_the_favicon_url(){
if (is_favicon_enable()) {
if ( get_favicon_url() ) {
return get_favicon_url();
} else {
return get_stylesheet_directory_uri().'/images/favicon.ico';
}
}
}
//テーマでアップルタッチアイコンを設定するかどうか
function is_apple_touch_icon_enable(){
$o = get_option('other_options');
return $o['apple_touch_icon'];
}
//アップルタッチアイコンのURLを取得
function get_apple_touch_icon_url(){
$o = get_option('other_options');
return $o['apple_touch_icon_url'];
}
//「WLWで編集」を出すかどうか
function is_wlw_enable(){
$o = get_option('other_options');
return $o['wlw'];
}
//Simplicity新着・人気エントリーウイジェットにWordpress Popular Postsを使うかどうか
function is_wpp_enable(){
$o = get_option('other_options');
return $o['wpp'];
}
//日本語のスラッグを有効にするかどうか
function is_japanese_slug_enable(){
$o = get_option('other_options');
return $o['japanese_slug_enable'];
}
//ライセンス表記の取得
function get_site_license(){
$o = get_option('other_options');
$site_link = '
'.get_bloginfo('name').'';
$cc_desc = ' Some Rights Reserved.';
switch ( $o['site_license'] ) {
case "cc_by":
return '
CC BY'.$site_link.$cc_desc;
break;
case "cc_by_sa":
return '
CC BY-SA'.$site_link.$cc_desc;
break;
case "cc_by_nd":
return '
CC BY-ND'.$site_link.$cc_desc;
break;
case "cc_by_nc":
return '
CC BY-NC'.$site_link.$cc_desc;
break;
case "cc_by_nc_sa":
return '
CC BY-NC-SA'.$site_link.$cc_desc;
break;
case "cc_by_nc_nd":
return '
CC BY-NC-ND'.$site_link.$cc_desc;
break;
case "cc0":
return '
CC0'.$site_link.' No Rights Reserved.';
break;
case "pd":
return '
Public Domain'.$site_link.' No Rights Reserved.';
break;
default:
return 'Copyright© '.$site_link.' All Rights Reserved.';
}
}
//ローカルでレスポンシブテストのリンクを表示するか
function is_responsive_test_visible(){
return get_theme_mod( 'other_responsive_test_visible', true);
}
//Windows Live Writerで編集するためのリンクを作成する
function wlw_edit_post_link($link, $before, $after){
if (is_wlw_enable()) {
if ( is_user_logged_in() ):
echo $before.'
'.$link.''.$after;
endif;
}
}
//固定ページにパンくずリストを表示するかどうか
function is_page_breadcrumb_visible(){
return get_theme_mod( 'breadcrumb_option_page_breadcrumb_visible', false);
}
//トップページにパンくずリストを表示するかどうか
function is_top_page_breadcrumb_visible(){
return get_theme_mod( 'breadcrumb_option_top_page_breadcrumb_visible', false);
}
//ルートページ名
function get_root_page_breadcrumb_name(){
return get_theme_mod('breadcrumb_option_root_page_name','ホーム');
}
//トップページ名
function get_top_page_breadcrumb_name(){
return get_theme_mod('breadcrumb_option_top_page_name','ブログ');
}