✏️ 正在编辑: content-card-1.php
路径:
/home/h359620/public_html/wp-content/themes/datis/template-parts/team/content/content-card-1.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * Template part: Team Card * * Usage (inside a team loop): * get_template_part( 'template-parts/team/card' ); */ if (! defined('ABSPATH')) { exit; } $post_id = get_the_ID(); if (! $post_id || get_post_type($post_id) !== 'team') { return; } $name = get_the_title($post_id); $team_terms = get_the_terms($post_id, 'team-categories'); $team_term_text = ''; if (! is_wp_error($team_terms) && ! empty($team_terms)) { $names = wp_list_pluck($team_terms, 'name'); $team_term_text = implode('، ', $names); } $image = get_the_post_thumbnail_url($post_id, 'medium_large'); $instagram = get_post_meta($post_id, '_datis_team_instagram', true); $telegram = get_post_meta($post_id, '_datis_team_telegram', true); $whatsapp = get_post_meta($post_id, '_datis_team_whatsapp', true); $wrapper_classes = ['datis-team-card']; $wrapper_classes[] = is_rtl() ? 'datis-team-card-rtl' : 'datis-team-card-ltr'; ?> <div class="<?php echo esc_attr(implode(' ', $wrapper_classes)); ?>"> <div class="datis-team-card-info"> <div class="datis-team-card-name-row"> <h3 class="datis-team-card-name"> <?php echo esc_html($name); ?> </h3> <span class="datis-team-card-name-indicator"></span> </div> <?php if (! empty($team_term_text)) : ?> <div class="datis-team-card-role"> <?php echo esc_html($team_term_text); ?> </div> <?php endif; ?> <div class="datis-team-card-divider"></div> <div class="datis-team-card-socials"> <?php if (! empty($telegram)) : ?> <a class="datis-team-card-social-link telegram" href="<?php echo esc_url($telegram); ?>" target="_blank" rel="noopener noreferrer" aria-label="<?php esc_attr_e('Telegram', 'datis'); ?>"> <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_1_659)"> <path d="M7.56232 11.5929L15.2881 18.3905C15.3774 18.4696 15.4857 18.524 15.6024 18.5486C15.7191 18.5731 15.8402 18.5668 15.9537 18.5304C16.0673 18.494 16.1694 18.4287 16.2501 18.3409C16.3307 18.2531 16.3872 18.1458 16.4139 18.0296L19.6451 3.91865C19.6722 3.79713 19.6658 3.67053 19.6266 3.55237C19.5873 3.4342 19.5167 3.32892 19.4223 3.24774C19.3279 3.16657 19.2132 3.11256 19.0905 3.09147C18.9678 3.07039 18.8417 3.08302 18.7256 3.12803L2.86153 9.3585C2.2256 9.60772 2.31153 10.5358 2.98185 10.6733L7.56232 11.5929Z" stroke="#090625" stroke-opacity="0.5" stroke-width="1.375" stroke-linecap="round" stroke-linejoin="round" /> <path d="M7.5625 11.5932L19.2586 3.14551" stroke="#090625" stroke-opacity="0.5" stroke-width="1.375" stroke-linecap="round" stroke-linejoin="round" /> <path d="M11.4211 14.9873L8.73984 17.6686C8.64419 17.7657 8.52181 17.8322 8.38828 17.8596C8.25474 17.887 8.11606 17.8741 7.98987 17.8225C7.86368 17.771 7.75567 17.683 7.67958 17.5699C7.60348 17.4568 7.56273 17.3236 7.5625 17.1873V11.5928" stroke="#090625" stroke-opacity="0.5" stroke-width="1.375" stroke-linecap="round" stroke-linejoin="round" /> </g> <defs> <clipPath id="clip0_1_659"> <rect width="22" height="22" fill="white" /> </clipPath> </defs> </svg> </a> <?php endif; ?> <?php if (! empty($whatsapp)) : ?> <a class="datis-team-card-social-link" href="<?php echo esc_url($whatsapp); ?>" target="_blank" rel="noopener noreferrer" aria-label="<?php esc_attr_e('WhatsApp', 'datis'); ?>"> <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_1_664)"> <path fill-rule="evenodd" clip-rule="evenodd" d="M13.1237 10.795C12.8997 10.6829 11.7987 10.1412 11.5934 10.0664C11.3882 9.99168 11.2389 9.95438 11.0896 10.1785C10.9403 10.4027 10.5112 10.9071 10.3805 11.0566C10.2499 11.206 10.1193 11.2248 9.89536 11.1126C9.67141 11.0006 8.94983 10.7641 8.09448 10.0011C7.4288 9.40732 6.97932 8.67399 6.84872 8.4498C6.71808 8.22561 6.83476 8.10443 6.94688 7.99277C7.04767 7.89243 7.17086 7.73121 7.28279 7.60043C7.3948 7.46972 7.4321 7.37624 7.50674 7.22686C7.58137 7.07737 7.54407 6.94663 7.48804 6.83455C7.4321 6.72247 6.98425 5.62018 6.79764 5.17173C6.61584 4.73512 6.43124 4.79425 6.29378 4.78733C6.16331 4.78086 6.01383 4.77949 5.86459 4.77949C5.71532 4.77949 5.47267 4.83553 5.26739 5.05965C5.06215 5.28384 4.48365 5.82567 4.48365 6.92785C4.48365 8.03018 5.28606 9.09496 5.39803 9.24444C5.51 9.39392 6.97711 11.6558 9.22359 12.6258C9.75783 12.8566 10.175 12.9943 10.5002 13.0975C11.0366 13.268 11.5248 13.244 11.9107 13.1863C12.3409 13.122 13.2356 12.6446 13.4222 12.1215C13.6088 11.5983 13.6088 11.15 13.5528 11.0566C13.4969 10.9632 13.3476 10.9071 13.1237 10.795ZM9.03765 16.3741H9.03463C7.69792 16.3735 6.38691 16.0144 5.2432 15.3357L4.97116 15.1743L2.15184 15.9139L2.90436 13.165L2.72728 12.8831C1.98158 11.6971 1.58773 10.3264 1.58832 8.91882C1.58998 4.81169 4.93168 1.47027 9.04061 1.47027C11.0303 1.47093 12.9006 2.2468 14.307 3.65484C15.7135 5.06285 16.4875 6.93443 16.4868 8.92483C16.4851 13.0323 13.1434 16.3741 9.03765 16.3741ZM15.3774 2.58493C13.6853 0.890891 11.4351 -0.0424727 9.03755 -0.043457C4.0976 -0.043457 0.0770977 3.9768 0.0750937 8.91826C0.0744609 10.4979 0.487125 12.0396 1.27146 13.3989L0 18.0431L4.75105 16.7968C6.06013 17.5108 7.53398 17.8871 9.034 17.8876H9.03769C13.9771 17.8876 17.998 13.867 18 8.92543C18.0009 6.53069 17.0695 4.27897 15.3774 2.58493Z" fill="#090625" fill-opacity="0.5" /> </g> <defs> <clipPath id="clip0_1_664"> <rect width="18" height="18" fill="white" /> </clipPath> </defs> </svg> </a> <?php endif; ?> <?php if (! empty($instagram)) : ?> <a class="datis-team-card-social-link" href="<?php echo esc_url($instagram); ?>" target="_blank" rel="noopener noreferrer" aria-label="<?php esc_attr_e('Instagram', 'datis'); ?>"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9.99914 1.4668C7.68162 1.4668 7.39102 1.47662 6.48085 1.51815C5.57258 1.55961 4.95227 1.70384 4.40945 1.9148C3.84831 2.13288 3.37243 2.42466 2.89804 2.89905C2.42365 3.37344 2.13187 3.84932 1.91379 4.41046C1.70283 4.95324 1.5586 5.57356 1.51714 6.48183C1.47561 7.392 1.46582 7.68259 1.46582 10.0001C1.46582 12.3176 1.47561 12.6082 1.51714 13.5184C1.5586 14.4266 1.70283 15.047 1.91379 15.5897C2.13187 16.1509 2.42365 16.6268 2.89804 17.1012C3.37243 17.5756 3.84831 17.8674 4.40945 18.0854C4.95227 18.2964 5.57258 18.4406 6.48085 18.482C7.39102 18.5236 7.68162 18.5334 9.99914 18.5334C12.3166 18.5334 12.6072 18.5236 13.5174 18.482C14.4257 18.4406 15.046 18.2964 15.5888 18.0854C16.1499 17.8674 16.6258 17.5756 17.1002 17.1012C17.5746 16.6268 17.8664 16.1509 18.0845 15.5897C18.2954 15.047 18.4396 14.4266 18.4811 13.5184C18.5226 12.6082 18.5324 12.3176 18.5324 10.0001C18.5324 7.68259 18.5226 7.392 18.4811 6.48183C18.4396 5.57356 18.2954 4.95324 18.0845 4.41046C17.8664 3.84932 17.5746 3.37344 17.1002 2.89905C16.6258 2.42466 16.1499 2.13288 15.5888 1.9148C15.046 1.70384 14.4257 1.55961 13.5174 1.51815C12.6072 1.47662 12.3166 1.4668 9.99914 1.4668ZM9.99914 3.00436C12.2776 3.00436 12.5475 3.01303 13.4473 3.05409C14.2793 3.09206 14.7311 3.23107 15.0318 3.3479C15.4301 3.5027 15.7144 3.68765 16.013 3.98624C16.3116 4.28483 16.4965 4.56912 16.6513 4.9674C16.7682 5.26809 16.9072 5.71992 16.9451 6.55191C16.9862 7.45171 16.9949 7.72162 16.9949 10.0001C16.9949 12.2786 16.9862 12.5485 16.9451 13.4483C16.9072 14.2803 16.7682 14.7321 16.6513 15.0328C16.4965 15.4311 16.3116 15.7154 16.013 16.014C15.7144 16.3126 15.4301 16.4975 15.0318 16.6523C14.7311 16.7692 14.2793 16.9082 13.4473 16.9461C12.5476 16.9872 12.2778 16.9959 9.99914 16.9959C7.72047 16.9959 7.45064 16.9872 6.55094 16.9461C5.71895 16.9082 5.26712 16.7692 4.96643 16.6523C4.56811 16.4975 4.28385 16.3126 3.98523 16.014C3.68664 15.7154 3.50169 15.4311 3.34692 15.0328C3.23006 14.7321 3.09105 14.2803 3.05308 13.4483C3.01202 12.5485 3.00335 12.2786 3.00335 10.0001C3.00335 7.72162 3.01202 7.45171 3.05308 6.55191C3.09105 5.71992 3.23006 5.26809 3.34692 4.9674C3.50169 4.56912 3.68664 4.28483 3.98523 3.98624C4.28385 3.68765 4.56811 3.5027 4.96643 3.3479C5.26712 3.23107 5.71895 3.09206 6.55094 3.05409C7.45074 3.01303 7.72064 3.00436 9.99914 3.00436Z" fill="#090625" fill-opacity="0.5" /> <path d="M9.99926 12.8446C8.4283 12.8446 7.15481 11.5711 7.15481 10.0001C7.15481 8.42918 8.4283 7.15569 9.99926 7.15569C11.5702 7.15569 12.8437 8.42918 12.8437 10.0001C12.8437 11.5711 11.5702 12.8446 9.99926 12.8446ZM9.99926 5.61816C7.57914 5.61816 5.61728 7.58002 5.61728 10.0001C5.61728 12.4202 7.57914 14.3821 9.99926 14.3821C12.4193 14.3821 14.3812 12.4202 14.3812 10.0001C14.3812 7.58002 12.4193 5.61816 9.99926 5.61816Z" fill="#090625" fill-opacity="0.5" /> <path d="M15.5784 5.44537C15.5784 6.01091 15.1199 6.46935 14.5544 6.46935C13.9889 6.46935 13.5304 6.01091 13.5304 5.44537C13.5304 4.87982 13.9889 4.42139 14.5544 4.42139C15.1199 4.42139 15.5784 4.87982 15.5784 5.44537Z" fill="#090625" fill-opacity="0.5" /> </svg> </a> <?php endif; ?> </div> </div> <!-- تصویر عضو تیم --> <div class="datis-team-card-photo"> <div class="datis-team-card-photo-inner"> <?php if ($image) : ?> <img src="<?php echo esc_url($image); ?>" alt="<?php echo esc_attr($name); ?>"> <?php endif; ?> </div> </div> </div>
💾 保存文件
← 返回文件管理器