芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/blog.ycreate.jp/wp-content/themes/swell/lib/pluggable_parts.php
format( 'Y-m-d' ); $date_text = $time->format( $date_format ); $classname = "c-postTimes__{$type} icon-{$type}"; $aria_label = ( 'posted' === $type ) ? __( '公開日', 'swell' ) : __( '更新日', 'swell' ); echo '
' . esc_html( $date_text ) . '
'; } endif; /** * 投稿タイトル横の日付 */ if ( ! function_exists( 'swl_parts__title_date' ) ) : function swl_parts__title_date( $args ) { $time = $args['time'] ?: null; if ( empty( $time ) ) return; ?>
=esc_html( $time->format( 'Y' ) )?>
=esc_html( $time->format( 'n/d' ) )?>
>
'__svg' ] ); ?>
=esc_html( wp_strip_all_tags( $title ) )?>
'', 'site_name' => '', 'caption' => '', 'title' => '', 'custom_title' => '', 'thumb' => '', 'excerpt' => '', 'is_blank' => false, 'add_class' => '', 'rel' => '', 'noimg' => false, 'nodesc' => false, 'type' => 'type1', // 'style' => '', ], $args ); // 変数化 extract( $args ); // phpcs:ignore WordPress.PHP.DontExtract.extract_extract if ( ! $url ) return; if ( $custom_title ) { $title = $custom_title; } $caption = $caption ?: $site_name ?: __( 'あわせて読みたい', 'swell' ); $card_class = 'p-blogCard'; if ( $add_class ) { $card_class .= ' ' . $add_class; } // 画像を表示するか $card_thumb = ''; if ( '' === $thumb || $noimg ) { $card_class .= ' -noimg'; } else { $card_img = '
'; $card_thumb = '
' . $card_img . '
'; } $card_excerpt = $nodesc ? '' : '
' . $excerpt . '
'; // target, rel $link_props = ( $is_blank ) ? ' target="_blank"' : ''; $rel = $rel ?: ( $is_blank ? 'noopener noreferrer' : '' ); if ( $rel ) { $link_props .= ' rel="' . esc_attr( $rel ) . '"'; } ?>
=esc_html( $caption )?>
=$card_thumb?>
>=wp_kses( $title, SWELL::$allowed_text_html )?>
=$card_excerpt?>
>=esc_html( $text )?>
=esc_html__( 'Scroll', 'swell' )?>
url . '"'; if ( $item->target === '_blank' ) { $a_props .= ' target="_blank" rel="noopener noreferrer"'; } // レイアウトに合わせてsizes取得 $sizes = SWELL::get_pickup_banner_sizes( $menu_count ); // lazyloadタイプ $lazy_type = SWELL::get_setting( 'pickbnr_lazy_off' ) ? 'none' : SWELL::$lazy_type; $img_class = 'c-bannerLink__img'; // 説明欄に直接画像URLがある場合 (タームの説明文が入ってくることに注意。) $img_url = trim( $item->description ); if ( $img_url && 0 === strpos( $img_url, 'http' ) ) { $img_id = SWELL::get_imgid_from_url( $img_url ); $thumb = SWELL::get_image( $img_id, [ 'class' => $img_class, 'sizes' => $sizes, 'loading' => $lazy_type, 'decoding' => 'async', ]); } elseif ( $item->type === 'post_type' ) { $post_id = $item->object_id; $thumb = SWELL::get_thumbnail( [ 'post_id' => $post_id, 'sizes' => $sizes, 'class' => $img_class, 'lazy_type' => $lazy_type, 'decoding' => 'async', ] ); } elseif ( $item->type === 'taxonomy' ) { $thumb = SWELL::get_thumbnail( [ 'term_id' => $item->object_id, 'sizes' => $sizes, 'class' => $img_class, 'lazy_type' => $lazy_type, 'decoding' => 'async', ] ); } // 画像なければ NO IMAGE if ( ! $thumb ) { $thumb = '
'; } ?>
class="c-bannerLink">
=$thumb?>
=wp_kses( $item->title, SWELL::$allowed_text_html )?>
=wp_kses( SWELL::get_setting( 'pr_notation_l_text' ), SWELL::$allowed_text_html )?>