'c-headLogo__img',
'sizes' => $logo_sizes,
'alt' => get_option( 'blogname' ),
'loading' => 'eager',
'decoding' => 'async',
) );
} else {
// ヘッダーオーバーレイ有効時
$ovrly_logo_id = Arkhe::get_setting( 'head_logo_overlay' ) ?: $logo_id;
$ovrly_logo = Arkhe::get_image( $ovrly_logo_id, array(
'class' => 'c-headLogo__img -top',
'sizes' => $logo_sizes,
'alt' => get_option( 'blogname' ),
'loading' => 'eager',
'decoding' => 'async',
) );
$common_logo = Arkhe::get_image( $logo_id, array(
'class' => 'c-headLogo__img -common',
'sizes' => $logo_sizes,
'alt' => get_option( 'blogname' ),
'loading' => 'lazy',
) );
$common_logo = str_replace( '
' .
esc_html( get_option( 'blogdescription' ) ) .
'';
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo apply_filters( 'ark_the__tagline', $return );
}
}
/**
* アイキャッチ画像を取得
*/
if ( ! function_exists( 'ark_the__thumbnail' ) ) {
function ark_the__thumbnail( $args ) {
$the_id = isset( $args['post_id'] ) ? $args['post_id'] : get_the_ID();
$class = isset( $args['class'] ) ? $args['class'] : '';
$size = isset( $args['size'] ) ? $args['size'] : 'full';
$sizes = isset( $args['sizes'] ) ? $args['sizes'] : false;
$srcset = isset( $args['srcset'] ) ? $args['srcset'] : false;
$lazy_type = isset( $args['lazy_type'] ) ? $args['lazy_type'] : Arkhe::get_lazy_type();
$decoding = isset( $args['decoding'] ) ? $args['decoding'] : false;
// $echo = isset( $args['echo'] ) ? $args['echo'] : false;
// $use_noimg = $args['use_noimg'] ?? true;
$thumb_id = 0;
$thumb = '';
if ( has_post_thumbnail( $the_id ) ) {
$thumb_id = get_post_thumbnail_id( $the_id );
} elseif ( ARKHE_NOIMG_ID ) {
$thumb_id = ARKHE_NOIMG_ID;
}
if ( $thumb_id ) {
$thumb = Arkhe::get_image( $thumb_id, array(
'class' => $class,
'size' => $size,
'srcset' => $srcset,
'sizes' => $sizes,
'decoding' => $decoding,
'loading' => $lazy_type,
));
} else {
// デフォルトNOIMG
$thumb = '
';
$thumb = Arkhe::set_lazyload( $thumb, $lazy_type );
}
// phpcs:ignore WordPress.Security.EscapeOutput
echo apply_filters( 'ark_the__thumbnail', $thumb, $args );
}
}
/**
* 投稿の日付データを出力 (アーカイブと投稿ページで使用)
*/
if ( ! function_exists( 'ark_the__postdate' ) ) {
function ark_the__postdate( $time = null, $type = 'posted' ) {
if ( empty( $time ) ) return;
$type_class = "-{$type}";
$date_format = get_option( 'date_format' );
if ( is_numeric( $time ) ) {
// 3.5 未満の後方互換 (タイムスタンプで受け取ってた)
$date_data = wp_date( 'Y-m-d', $time );
$date_text = wp_date( $date_format, $time );
} else {
$date_data = $time->format( 'Y-m-d' );
$date_text = $time->format( $date_format );
}
$return = '';
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo apply_filters( 'ark_the__postdate', $return, $time, $type );
}
}
/**
* 前後記事リンク
*/
if ( ! function_exists( 'ark_the__pnlink' ) ) {
function ark_the__pnlink( $args ) {
$id = isset( $args['id'] ) ? $args['id'] : 0;
$type = isset( $args['type'] ) ? $args['type'] : '';
$title = isset( $args['title'] ) ? $args['title'] : '';
$svg = 'prev' === $type ? 'chevron-left' : 'chevron-right';
$return = '' .
Arkhe::get_svg( $svg, array( 'class' => 'c-pnNav__svg' ) ) .
'' . esc_html( $title ) . '' .
'';
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo apply_filters( 'ark_the__pnlink', $return, $args );
}
}
/**
* サブメニュー展開用ボタン
*/
if ( ! function_exists( 'ark_get__submenu_toggle_btn' ) ) {
function ark_get__submenu_toggle_btn() {
return '';
}
}