<?php if ( !defined( 'ABSPATH' ) ) exit;//PHPの宣言と直接アクセスの拒否

/***** 固定ページ・投稿編集 *****/
/* get_option GetOP01_utility() */

/* 独自ブロックパターンの使用 */
//if(get_option('hautility-use-block-pattern',false)==1){
//	require_once (__DIR__ .'/block-pattern/block-pattern.php');
//}

/* アイコン挿入ブロックツールバー */
if(isset( GetOP09_addcontent()['expansion-hau-icons'] ) && GetOP09_addcontent()['expansion-hau-icons'] == 1 ){
	require_once (__DIR__ .'/post-edit/icon-insert/functions.php');
}


/* ブロックへ選択式のデザインを追加 */
if(isset( GetOP01_utility()['use-block-design'] ) && GetOP01_utility()['use-block-design']){
require_once (__DIR__ .'/post-edit/block-design/bd-function-hr.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-para.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-group.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-table.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-list.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-space.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-code.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-details.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-social-link.php');
//require_once (__DIR__ .'/post-edit/block-design/bd-function-post-title.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-post-template.php');
require_once (__DIR__ .'/post-edit/block-design/bd-function-date.php');
}

/* アコーディオンブロックのスムーズな開閉 */
if(isset( GetOP01_utility()['accordion-block-animation'] ) && GetOP01_utility()['accordion-block-animation']){
require_once (__DIR__ .'/post-edit/smooth-accordion/functions.php');
}

/* 文字単位の装飾 */
if(isset( GetOP01_utility()['use-editor-extend'] ) && GetOP01_utility()['use-editor-extend']){
require_once (__DIR__ .'/post-edit/editor-extend/editor-extend-functions.php');
}

/* ブロック一覧を１列表示する */
if(isset( GetOP01_utility()['block-select-single-column'] ) && GetOP01_utility()['block-select-single-column']){
require_once (__DIR__ .'/post-edit/block-select-single-column/block-select-single-column.php');
}

/* ブロックに枠線を付ける */
if(isset( GetOP01_utility()['block-border'] ) && GetOP01_utility()['block-border']){
require_once (__DIR__ .'/post-edit/block-border/block-border-functions.php');
}

/* グループブロックに枠線を付ける */
if(isset( GetOP01_utility()['grouping-block-border'] ) && GetOP01_utility()['grouping-block-border']){
require_once (__DIR__ .'/post-edit/group-border/group-border-functions.php');
}

/* スペーサーブロックに背景色を付ける */
if(isset( GetOP01_utility()['admin-spacer-block-bg-color'] ) && GetOP01_utility()['admin-spacer-block-bg-color']){
require_once (__DIR__ .'/post-edit/spacer-block-bg/spacer-block-bg-functions.php');
}

/* 編集画面のタグをリスト表示 */
if(isset( GetOP01_utility()['editor-tag-list-display'] ) && GetOP01_utility()['editor-tag-list-display']){
require_once (__DIR__ .'/post-edit/editor-tag-list-display/editor-tag-list-display.php');
}

/* 編集画面のカテゴリー選択をラジオボタン化 */
if(isset( GetOP01_utility()['single-category-selection'] ) && GetOP01_utility()['single-category-selection']){
require_once (__DIR__ .'/post-edit/category-radiobutton/functions.php');
}

/* 更新日のコントロール */
if(isset( GetOP01_utility()['post-moddate'] ) && GetOP01_utility()['post-moddate']){
require_once (__DIR__ .'/post-edit/post-moddate/post-moddate.php');
}

/* 再利用ブロックの編集を制限する */
if(isset( GetOP01_utility()['disable-reuse-block-edit'] ) && GetOP01_utility()['disable-reuse-block-edit']){
require_once (__DIR__ .'/post-edit/disable-reuse-block-edit/disable-reuse-block-edit-functions.php');
}

/* クイック編集で更新日を更新しない */
if(isset( GetOP01_utility()['quick-edit-control'] ) && GetOP01_utility()['quick-edit-control']){
require_once (__DIR__ .'/post-edit/quick-edit-control/quick-edit-control-function.php');
}

/***** 基本機能の制御 *****/
/* get_option GetOP02_utility() */

/* ブロックエディタへようこそ、フルスクリーンモードの無効 */
if(isset( GetOP02_utility()['disable-popover-fulscreen'] ) && GetOP02_utility()['disable-popover-fulscreen']){
require_once (__DIR__ .'/wp-core/editor-start-control/editor-start-control.php');
}


/* 絵文字を無効にする */
if(isset( GetOP02_utility()['disable-emoji'] ) && GetOP02_utility()['disable-emoji']){
require_once (__DIR__ .'/wp-core/disable-emoji/desable-emoji.php');
}

/* Feedを更新日順で出力する */
/* 一覧を更新日にすると同時に機能させる */
if(isset( GetOP02_utility()['list-control'] ) && GetOP02_utility()['list-control']){
require_once (__DIR__ .'/wp-core/feed-moddate/feed-functions.php');
}

/* 一覧を更新日順で出力する */
if(isset( GetOP02_utility()['list-control'] ) && GetOP02_utility()['list-control']){
require_once (__DIR__ .'/wp-core/list-control/list-control-function.php');
}

/* リンクカードのデザイン変更 */
/*** バージョン3.2で別プログラムへ置き換え ***/
//if(get_option('hautility-change-embed-link-design',false)==1){
//require_once (__DIR__ .'/wp-core/embed-custom/embed-custom-functions.php');
//}

/* 抜粋末尾の[...]を変更 */
if(isset( GetOP02_utility()['change-frontend-list-more-text'] ) && GetOP02_utility()['change-frontend-list-more-text']){
require_once (__DIR__ .'/wp-core/change-exerpt-more-text/change-exerpt-more-text-functions.php');
}

/* お気に入りブロック */
/* 特に有効無効の設定は必要ないので直接読み込み */
require_once (__DIR__ .'/wp-core/favorite-blocks/functions.php');

/***** 管理画面 *****/
/* get_option GetOP03_utility() */

/* 一覧のタイトルを広げる */
if(isset( GetOP03_utility()['admin-list-title400'] ) && GetOP03_utility()['admin-list-title400']){
require_once (__DIR__ .'/admin-control/admin-list-title400/admin-list-title400.php');
}

/* 更新日列を表示 */
if(isset( GetOP03_utility()['add-admin-mdate-column'] ) && GetOP03_utility()['add-admin-mdate-column']){
require_once (__DIR__ .'/admin-control/add-admin-mdate-column/add-admin-mdate-column-function.php');
}

/* リストの更新日順表示 */
if(isset( GetOP03_utility()['admin-list-asc-moddate'] ) && GetOP03_utility()['admin-list-asc-moddate']){
require_once (__DIR__ .'/admin-control/list-control-admin/list-control-admin-functions.php');
}

/* クイック編集クリック時に画面上部へ遷移しないようにする */
if(isset( GetOP03_utility()['disable-quick-edit-move-top'] ) && GetOP03_utility()['disable-quick-edit-move-top']){
require_once (__DIR__ .'/admin-control/disable-quick-edit-moveup/disable-quick-edit-moveup.php');
}

/* コメントの有効／無効表示列を表示 */
if(isset( GetOP03_utility()['is-opened-comment'] ) && GetOP03_utility()['is-opened-comment']){
require_once (__DIR__ .'/admin-control/comment-enable-column/comment-enable-column-functions.php');
}

/* パターンメニューを表示 */
if(isset( GetOP03_utility()['reuse-block-menu-link'] ) && GetOP03_utility()['reuse-block-menu-link']){
require_once (__DIR__ .'/admin-control/reuse-block-menu-link/reuse-block-menu-link.php');
}

/* パターンの状態を表示 */
if(isset( GetOP03_utility()['pattern-sync-status-column'] ) && GetOP03_utility()['pattern-sync-status-column']){
require_once (__DIR__ .'/admin-control/reuse-block-status/reuse-block-status-functions.php');
}

/* コードエディターの文字拡大 */
if(isset( GetOP03_utility()['code-mirror-font-expansion'] ) && GetOP03_utility()['code-mirror-font-expansion']){
require_once (__DIR__ .'/admin-control/code-mirror-ex/code-mirror-ex-functions.php');
}

/* 一覧にIDを表示 */
if(isset( GetOP03_utility()['show-admin-list-id'] ) && GetOP03_utility()['show-admin-list-id']){
require_once (__DIR__ .'/admin-control/admin-list-id/admin-list-id-functions.php');
}

/* 一覧にスラグ（ホームURLを除くパーマリンク）を表示 */
if(isset( GetOP03_utility()['show-admin-list-slug'] ) && GetOP03_utility()['show-admin-list-slug']){
require_once (__DIR__ .'/admin-control/admin-list-slug/admin-list-slug-functions.php');
}

/* 管理画面に「ページ上部へ戻る」ボタンを表示 */
if(isset( GetOP03_utility()['admin-page-top-scroll'] ) && GetOP03_utility()['admin-page-top-scroll']){
require_once (__DIR__ .'/admin-control/admin-page-to-top/admin-page-to-top.php');
}

/***** ダッシュボードウィジェット *****/
/* get_option GetOP04_utility() */
require_once (__DIR__ .'/widget/dashboard-widget/dashboard-widget-functions.php');

if(isset( GetOP04_utility()['add-mod-post-widget'] ) && GetOP04_utility()['add-mod-post-widget']){
require_once (__DIR__ .'/widget/mod-post-list/mod-post-widget-functions.php');
}

/***** ログイン画面 *****/
if(isset( GetOP06_utility()['define-login-setting'] ) && GetOP06_utility()['define-login-setting']){
require_once (__DIR__ .'/login-screen/functions.php');
}


/***** その他便利機能 *****/
/* get_option GetOP05_utility() */

/* アクセスカウント */
if(isset( GetOP05_utility()['access-count'] ) && GetOP05_utility()['access-count']){
require_once (__DIR__ .'/other/access-count/access-count-function.php');
}

/* テーブルブロックを横スクロールさせる */
if(isset( GetOP05_utility()['mobile-table-block-scroll'] ) && GetOP05_utility()['mobile-table-block-scroll']){
require_once (__DIR__ .'/other/mtable-hscroll/mtable-hscroll-functions.php');
}

/* 投稿公開時にサイトメールアドレスへ通知 */
if(isset( GetOP05_utility()['post-publish-notification'] ) && GetOP05_utility()['post-publish-notification']){
require_once (__DIR__ .'/other/send-pub-mail/send-pub-mail-functions.php');
}

/* プロフィールでのHTMLを許可 */
if(isset( GetOP05_utility()['allow-user-profile-html'] ) && GetOP05_utility()['allow-user-profile-html']){
require_once (__DIR__ .'/other/allow-user-profile-html/allow-user-profile-html-functions.php');
}

/* メディアの画像をユーザー画像として使う */
if(isset( GetOP05_utility()['user-image-used-media-library'] ) && GetOP05_utility()['user-image-used-media-library']){
require_once (__DIR__ .'/other/local-user-avatar/local-user-avatar-functions.php');
}

/* タームの説明文でHTMLを許可 */
if(isset( GetOP05_utility()['allow-term-html'] ) && GetOP05_utility()['allow-term-html']){
require_once (__DIR__ .'/other/allow-term-use-html/allow-term-use-html-functions.php');
}

/* キーワード自動リンクを使用する */
if(isset( GetOP05_utility()['is-use-auto-link'] ) && GetOP05_utility()['is-use-auto-link']){
require_once (__DIR__ .'/other/keyword-auto-link/keyword-auto-link-functions.php');
}

/* 自動タグ機能 */
if(isset( GetOP05_utility()['use-auto-tagger'] ) && GetOP05_utility()['use-auto-tagger']){
require_once (__DIR__ .'/other/auto-post-tags/auto-post-tags.php');
}

/* 送信元メールアドレスをサイトのメールアドレスへ変更 */
if(isset( GetOP05_utility()['change-send-author-mail-address'] ) && GetOP05_utility()['change-send-author-mail-address']){
require_once (__DIR__ .'/other/cange-mail-author/change-sender-email-functions.php');
}

/* メールの送信元名をサイト名へ変更する */
if(isset( GetOP05_utility()['change-send-author-name'] ) && GetOP05_utility()['change-send-author-name']){
require_once (__DIR__ .'/other/cange-mail-author/change-sender-name-functions.php');
}

/*** カスタムCSS ***/
/* get_option GetOP06_utility() */

/* モバイル・PC用の切り分け用にbody classを追加 */
//if(isset( GetOP06_utility()['add-pcmobile-bodyclass'] ) && GetOP06_utility()['add-pcmobile-bodyclass']){
//require_once (__DIR__ .'/custom-js-css/add_pc_mobile_class.php');
//}

/* カスタムJS/CSS */
/* バージョン5.6で削除 */
//require_once (__DIR__ .'/custom-js-css/add-custom-jscss.php');

/*** カスタム投稿タイプ ***/
require_once (__DIR__ .'/cpt-convine/cpt-convine-functions.php');