0 ) {
$style_async_v = filemtime( TPATH . DSEP . 'style.async.min.css' );
?>
0 ) {
$style_swiper_v = filemtime( TPATH . DSEP . 'styles' . DSEP . 'thk-swiper.min.css' );
?>
analytics( 'add-analytics-head.php' );
}
if( $_is['singular'] === true && isset( $luxe['amp_enable'] ) && !isset( $luxe['amp'] ) ) {
$amplink = thk_get_amp_permalink( get_queried_object_id() );
?>
add_inline();
}
}
}
/* テンプレートごとに違うカラム数にしてる場合の 3カラム CSS
* (親子 CSS 非結合時は子テーマより先に読み込ませる -> load_styles.php で処理 )
*/
if( $luxe['child_css_compress'] === 'bind' && !isset( $luxe['amp'] ) ) {
if( $luxe['column_default'] === false ) {
if( $luxe['column_style'] === '1column' ) {
wp_enqueue_style( 'luxe1', $load_files['p-1col'][1], array(), false, 'all' );
wp_add_inline_style( 'luxe1', thk_direct_style( $load_files['p-1col'][0] ) );
}
if( $luxe['column_style'] === '2column' ) {
wp_enqueue_style( 'luxe2', $load_files['p-2col'][1], array(), false, 'all' );
wp_add_inline_style( 'luxe2', thk_direct_style( $load_files['p-2col'][0] ) );
}
if( $luxe['column_style'] === '3column' ) {
wp_enqueue_style( 'luxe3', $load_files['p-3col'][1], array(), false, 'all' );
wp_add_inline_style( 'luxe3', thk_direct_style( $load_files['p-3col'][0] ) );
}
}
}
/* noscript css */
// グローバルナビの CSS ( noscript 用 )
$fle = '/styles/nav.min.css';
$ver = file_exists( TPATH . $fle ) === true ? filemtime( TPATH . $fle ) : $_SERVER['REQUEST_TIME'];
wp_enqueue_style( 'nav', TDEL . $fle . '?v=' . $ver, array(), false, 'all' );
// 非同期で読み込む CSS ( noscript 用 ) style.async.min.css
if( file_exists( $load_files['p-async'][0] ) === true ) {
wp_enqueue_style( 'async', $load_files['p-async'][1] . '?v=' . $_SERVER['REQUEST_TIME'], array(), false, 'all' );
}
// Material icons の CSS ( CDN から読み込む場合 )
if( isset( $luxe['material_load'] ) ) {
global $awesome;
if( $luxe['material_load_async'] === 'async' || $luxe['material_load'] === 'svg' ) {
// noscript 用
wp_enqueue_style( 'material', $awesome['material']['uri'] . $awesome['material']['css'], array(), false, 'all' );
}
elseif( $luxe['material_load_async'] === 'sync' ) {
// 同期的な読み込み
wp_enqueue_style( 'material-cdn', $awesome['material']['uri'] . $awesome['material']['css'], array(), false, 'all' );
}
}
// Font Awsome の CSS ( CDN から読み込む場合 )
if( isset( $luxe['awesome_load'] ) ) {
global $awesome;
if( $luxe['awesome_load_async'] === 'async' || $luxe['awesome_load'] === 'svg' ) {
// noscript 用
wp_enqueue_style( 'awesome', $awesome['awesome']['uri'] . $awesome['awesome']['css'], array(), false, 'all' );
}
elseif( $luxe['awesome_load_async'] === 'sync' ) {
// 同期的な読み込み
wp_enqueue_style( 'awesome-cdn', $awesome['awesome']['uri'] . $awesome['awesome']['css'], array(), false, 'all' );
}
}
// Web font の CSS ( 同期的に読み込む場合 )
if( !isset( $luxe['web_font_async'] ) ) {
if( isset( Web_Font::$japanese[$luxe['font_alphabet']][1] ) ) {
wp_enqueue_style( 'rom-font', Web_Font::$alphabet[$luxe['font_alphabet']][1], array(), false, 'all' );
}
if( isset( Web_Font::$japanese[$luxe['font_japanese']][1] ) ) {
wp_enqueue_style( 'jp-font', Web_Font::$japanese[$luxe['font_japanese']][1], array(), false, 'all' );
}
}
// その他のインラインスクリプトとインラインスタイル
if( !isset( $luxe['amp'] ) ) {
require( INC . 'load-inline.php' );
}
// 条件によっては、hentry を削除
if( $_is['singular'] === true ) {
/* 以下の条件の時に hentry を削除する
・ カスタマイズで hentry 削除にチェックがついてる
・ 投稿日時・更新日時の両方が非表示
・ 投稿者名が非表示
・ 外観カスタマイズで固定フロントページの記事タイトルを非表示に設定してる
・ $post->post_author が空っぽ ( 通常はありえないけどプラグインではあり得る )
・ get_the_modified_date が空っぽ ( 通常はありえないけどプラグインではあり得る )
*/
$pdat = get_the_date();
$mdat = get_the_modified_date();
$auth = get_userdata( $post->post_author );
if(
isset( $luxe['remove_hentry_class'] ) || !isset( $luxe['author_visible'] ) || empty( $mdat ) || empty( $auth ) ||
( $_is['front_page'] === true && !isset( $luxe['front_page_post_title'] ) ) ||
( !isset( $luxe['post_date_visible'] ) && !isset( $luxe['mod_date_visible'] ) &&
!isset( $luxe['post_date_u_visible'] ) && !isset( $luxe['mod_date_u_visible'] )
)
) {
add_filter( 'post_class', 'thk_remove_hentry' );
}
}
// Amp 用のスクリプトとスタイルを挿入
if( isset( $luxe['amp'] ) ) {
require( INC . 'load-inline-amp.php' );
}
}, 7 );