اگه به دنبال یه کد اسنیپت کاربردی و بهینه هستی که بتونی راحت توی سایت یا وبلاگت استفاده کنی، جای درستی اومدی! 🎯
توی این صفحه، کد اسنیپت اختصاصی ما رو به صورت کامل و آماده در اختیارت قرار دادیم. فقط کافیه کد زیر رو کپی کنی، توی صفحهت قرار بدی و از امکاناتش لذت ببری.
علاوه بر کد، افزونه اختصاصی این اسنیپت رو هم برای دانلود آماده کردیم تا بتونی بدون هیچ محدودیتی از تمام قابلیتهاش استفاده کنی. 🚀
قبل از اینکه کد رو استفاده کنی، مطمئن شو که این موارد رو داری:
افزونه زیر را در پنل وردپرس سایت خود نصب کنید
سپس وارد افزونه شوید و گزینه add new را بزنید
یک اسم برای این کد در نظر بگیرید
کد زیر را در کادر قرار دهید (دقت کنید که کد را کامل کپی کرده باشید ) و پس از آن گزینه save را بزنید
یک منوی جدید با نام ارتباط با ما در منوی وردپرس شما اضافه خواهد شد ، وارد آن منو شوید و شخصی سازی کنید و لینک های خود را در صفحه قرار دهید .
دانلود افزودنه کد اسنیپت
کپی کد مورد نظر که باید در کد اسنیپت بزارید
/**
* منوی شناور «ارتباط با ما» - نسخه پیشرفته
* قابلیت افزودن چندین اکانت برای هر شبکه اجتماعی
* نوسته شده توسط داود اعترافی
*/
// ==================== ثبت منوی تنظیمات ====================
add_action( 'admin_menu', 'fsm_register_admin_menu' );
function fsm_register_admin_menu() {
add_menu_page(
'منوی ارتباط با ما',
'ارتباط با ما',
'manage_options',
'floating-social-menu',
'fsm_admin_page',
'dashicons-share',
80
);
}
// ==================== صفحه تنظیمات ====================
function fsm_admin_page() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
// ذخیره تنظیمات
if ( isset( $_POST['fsm_save'] ) && check_admin_referer( 'fsm_save_settings' ) ) {
$items = array();
if ( ! empty( $_POST['items'] ) && is_array( $_POST['items'] ) ) {
foreach ( $_POST['items'] as $item ) {
if ( empty( $item['url'] ) ) continue;
$items[] = array(
'network' => sanitize_text_field( $item['network'] ),
'title' => sanitize_text_field( $item['title'] ),
'url' => esc_url_raw( $item['url'] ),
);
}
}
$settings = array(
'enabled' => isset( $_POST['enabled'] ) ? 1 : 0,
'position' => sanitize_text_field( $_POST['position'] ),
'main_bg' => sanitize_hex_color( $_POST['main_bg'] ),
'main_color' => sanitize_hex_color( $_POST['main_color'] ),
'popup_bg' => sanitize_hex_color( $_POST['popup_bg'] ),
'popup_title' => sanitize_text_field( $_POST['popup_title'] ),
'button_text' => sanitize_text_field( $_POST['button_text'] ),
'items' => $items,
);
update_option( 'fsm_settings', $settings );
echo '<div class="notice notice-success is-dismissible"><p>تنظیمات با موفقیت ذخیره شد.</p></div>';
}
$s = get_option( 'fsm_settings', array() );
$defaults = array(
'enabled' => 1,
'position' => 'right',
'main_bg' => '#25D366',
'main_color' => '#ffffff',
'popup_bg' => '#ffffff',
'popup_title' => 'ارتباط با ما',
'button_text' => 'ارتباط با ما',
'items' => array(),
);
$s = wp_parse_args( $s, $defaults );
$networks_list = array(
'telegram' => 'تلگرام',
'instagram' => 'اینستاگرام',
'whatsapp' => 'واتساپ',
'youtube' => 'یوتیوب',
'x' => 'ایکس (توییتر)',
'facebook' => 'فیسبوک',
'linkedin' => 'لینکدین',
'aparat' => 'آپارات',
'eitaa' => 'ایتا',
'rubika' => 'روبیکا',
'bale' => 'بله',
);
?>
<div class="wrap">
<h1>تنظیمات منوی شناور «ارتباط با ما»</h1>
<form method="post" id="fsm-settings-form">
<?php wp_nonce_field( 'fsm_save_settings' ); ?>
<table class="form-table">
<tr>
<th>فعالسازی منو</th>
<td><label><input type="checkbox" name="enabled" value="1" <?php checked( $s['enabled'], 1 ); ?>> فعال باشد</label></td>
</tr>
<tr>
<th>موقعیت نمایش</th>
<td>
<select name="position">
<option value="right" <?php selected( $s['position'], 'right' ); ?>>سمت راست</option>
<option value="left" <?php selected( $s['position'], 'left' ); ?>>سمت چپ</option>
</select>
</td>
</tr>
<tr>
<th>متن روی دکمه اصلی</th>
<td><input type="text" name="button_text" value="<?php echo esc_attr( $s['button_text'] ); ?>" class="regular-text"></td>
</tr>
<tr>
<th>عنوان داخل پاپآپ</th>
<td><input type="text" name="popup_title" value="<?php echo esc_attr( $s['popup_title'] ); ?>" class="regular-text"></td>
</tr>
<tr>
<th>رنگ پسزمینه دکمه اصلی</th>
<td><input type="color" name="main_bg" value="<?php echo esc_attr( $s['main_bg'] ); ?>"></td>
</tr>
<tr>
<th>رنگ متن/آیکون دکمه اصلی</th>
<td><input type="color" name="main_color" value="<?php echo esc_attr( $s['main_color'] ); ?>"></td>
</tr>
<tr>
<th>رنگ پسزمینه پاپآپ</th>
<td><input type="color" name="popup_bg" value="<?php echo esc_attr( $s['popup_bg'] ); ?>"></td>
</tr>
</table>
<h2 style="margin-top:30px;">شبکههای اجتماعی و اکانتها</h2>
<p>میتوانید برای هر شبکه چندین اکانت اضافه کنید. روی دکمه «افزودن اکانت جدید» کلیک کنید.</p>
<div id="fsm-items-wrapper">
<?php
if ( ! empty( $s['items'] ) ) :
foreach ( $s['items'] as $index => $item ) :
?>
<div class="fsm-item-row" style="background:#f9f9f9; padding:15px; margin-bottom:12px; border:1px solid #ddd; border-radius:6px; display:flex; gap:12px; align-items:center; flex-wrap:wrap;">
<select name="items[<?php echo $index; ?>][network]" style="min-width:140px;">
<?php foreach ( $networks_list as $key => $label ) : ?>
<option value="<?php echo esc_attr( $key ); ?>" <?php selected( $item['network'], $key ); ?>><?php echo esc_html( $label ); ?></option>
<?php endforeach; ?>
</select>
<input type="text" name="items[<?php echo $index; ?>][title]" value="<?php echo esc_attr( $item['title'] ); ?>" placeholder="عنوان (مثلاً پشتیبانی)" style="width:180px;">
<input type="url" name="items[<?php echo $index; ?>][url]" value="<?php echo esc_attr( $item['url'] ); ?>" placeholder="https://..." style="flex:1; min-width:220px;">
<button type="button" class="button fsm-remove-item" style="color:#b32d2e;">حذف</button>
</div>
<?php
endforeach;
endif;
?>
</div>
<p style="margin-top:15px;">
<button type="button" id="fsm-add-item" class="button button-secondary">+ افزودن اکانت جدید</button>
</p>
<p class="submit" style="margin-top:25px;">
<button type="submit" name="fsm_save" class="button button-primary">ذخیره تنظیمات</button>
</p>
</form>
</div>
<script>
(function(){
let itemIndex = <?php echo ! empty( $s['items'] ) ? count( $s['items'] ) : 0; ?>;
const networks = <?php echo json_encode( $networks_list ); ?>;
document.getElementById('fsm-add-item').addEventListener('click', function() {
const wrapper = document.getElementById('fsm-items-wrapper');
const div = document.createElement('div');
div.className = 'fsm-item-row';
div.style.cssText = 'background:#f9f9f9; padding:15px; margin-bottom:12px; border:1px solid #ddd; border-radius:6px; display:flex; gap:12px; align-items:center; flex-wrap:wrap;';
let options = '';
for (const [key, label] of Object.entries(networks)) {
options += `<option value="${key}">${label}</option>`;
}
div.innerHTML = `
<select name="items[${itemIndex}][network]" style="min-width:140px;">${options}</select>
<input type="text" name="items[${itemIndex}][title]" placeholder="عنوان (مثلاً پشتیبانی)" style="width:180px;">
<input type="url" name="items[${itemIndex}][url]" placeholder="https://..." style="flex:1; min-width:220px;">
<button type="button" class="button fsm-remove-item" style="color:#b32d2e;">حذف</button>
`;
wrapper.appendChild(div);
itemIndex++;
});
// حذف ردیف
document.addEventListener('click', function(e) {
if (e.target.classList.contains('fsm-remove-item')) {
e.target.closest('.fsm-item-row').remove();
}
});
})();
</script>
<?php
}
// ==================== نمایش در فرانتاند ====================
add_action( 'wp_footer', 'fsm_render_frontend' );
function fsm_render_frontend() {
$s = get_option( 'fsm_settings', array() );
if ( empty( $s['enabled'] ) || empty( $s['items'] ) ) {
return;
}
$position = isset( $s['position'] ) ? $s['position'] : 'right';
$main_bg = isset( $s['main_bg'] ) ? $s['main_bg'] : '#25D366';
$main_color = isset( $s['main_color'] ) ? $s['main_color'] : '#ffffff';
$popup_bg = isset( $s['popup_bg'] ) ? $s['popup_bg'] : '#ffffff';
$popup_title = isset( $s['popup_title'] ) ? $s['popup_title'] : 'ارتباط با ما';
$button_text = isset( $s['button_text'] ) ? $s['button_text'] : 'ارتباط با ما';
$network_data = array(
'telegram' => array( 'label' => 'تلگرام', 'color' => '#0088cc' ),
'instagram' => array( 'label' => 'اینستاگرام', 'color' => '#E1306C' ),
'whatsapp' => array( 'label' => 'واتساپ', 'color' => '#25D366' ),
'youtube' => array( 'label' => 'یوتیوب', 'color' => '#FF0000' ),
'x' => array( 'label' => 'ایکس', 'color' => '#000000' ),
'facebook' => array( 'label' => 'فیسبوک', 'color' => '#1877F2' ),
'linkedin' => array( 'label' => 'لینکدین', 'color' => '#0A66C2' ),
'aparat' => array( 'label' => 'آپارات', 'color' => '#ED145B' ),
'eitaa' => array( 'label' => 'ایتا', 'color' => '#FF6B00' ),
'rubika' => array( 'label' => 'روبیکا', 'color' => '#7B2D8E' ),
'bale' => array( 'label' => 'بله', 'color' => '#00A86B' ),
);
$side = ( $position === 'left' ) ? 'left: 20px;' : 'right: 20px;';
?>
<style>
#fsm-main-btn {
position: fixed;
bottom: 25px;
<?php echo $side; ?>
z-index: 99999;
background: <?php echo esc_attr( $main_bg ); ?>;
color: <?php echo esc_attr( $main_color ); ?>;
border: none;
border-radius: 50px;
padding: 12px 18px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
box-shadow: 0 4px 18px rgba(0,0,0,0.25);
display: flex;
align-items: center;
gap: 8px;
transition: all 0.3s ease;
font-family: inherit;
line-height: 1.3;
}
#fsm-main-btn:hover {
transform: scale(1.05);
box-shadow: 0 6px 22px rgba(0,0,0,0.3);
}
#fsm-main-btn svg {
width: 20px;
height: 20px;
fill: currentColor;
flex-shrink: 0;
}
/* Overlay */
#fsm-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
z-index: 100000;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
#fsm-overlay.active {
opacity: 1;
visibility: visible;
}
/* Popup */
#fsm-popup {
position: fixed;
bottom: 90px;
<?php echo $side; ?>
z-index: 100001;
background: <?php echo esc_attr( $popup_bg ); ?>;
border-radius: 16px;
padding: 18px;
width: 300px;
max-width: calc(100vw - 40px);
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
transform: translateY(20px) scale(0.95);
opacity: 0;
visibility: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
max-height: 70vh;
overflow-y: auto;
}
#fsm-popup.active {
transform: translateY(0) scale(1);
opacity: 1;
visibility: visible;
}
#fsm-popup h3 {
margin: 0 0 14px;
font-size: 15px;
text-align: center;
color: #333;
font-weight: 600;
}
.fsm-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}
.fsm-item {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: #333;
font-size: 13px;
padding: 8px 10px;
border-radius: 10px;
background: #f5f5f5;
transition: all 0.2s;
}
.fsm-item:hover {
background: #eeeeee;
transform: translateY(-2px);
}
.fsm-item .fsm-icon {
width: 36px;
height: 36px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
flex-shrink: 0;
}
.fsm-item .fsm-icon svg {
width: 18px;
height: 18px;
fill: currentColor;
}
.fsm-item .fsm-label {
line-height: 1.3;
word-break: break-word;
}
#fsm-close {
position: absolute;
top: 8px;
left: 10px;
background: none;
border: none;
font-size: 22px;
cursor: pointer;
color: #999;
line-height: 1;
padding: 0;
}
#fsm-close:hover { color: #333; }
/* موبایل - متن کوچکتر و دکمه جمعوجورتر */
@media (max-width: 768px) {
#fsm-main-btn {
padding: 10px 14px;
font-size: 12px;
bottom: 18px;
gap: 6px;
}
#fsm-main-btn svg {
width: 18px;
height: 18px;
}
#fsm-popup {
bottom: 75px;
width: 280px;
padding: 14px;
}
#fsm-popup h3 {
font-size: 14px;
margin-bottom: 12px;
}
.fsm-item {
font-size: 12px;
padding: 7px 8px;
gap: 8px;
}
.fsm-item .fsm-icon {
width: 32px;
height: 32px;
}
.fsm-item .fsm-icon svg {
width: 16px;
height: 16px;
}
}
/* موبایل خیلی کوچک - فقط آیکون */
@media (max-width: 400px) {
#fsm-main-btn span {
display: none;
}
#fsm-main-btn {
padding: 12px;
border-radius: 50%;
}
}
</style>
<!-- دکمه اصلی -->
<button id="fsm-main-btn" aria-label="<?php echo esc_attr( $button_text ); ?>">
<svg viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12zM7 9h10v2H7V9zm0-3h10v2H7V6zm0 6h7v2H7v-2z"/></svg>
<span><?php echo esc_html( $button_text ); ?></span>
</button>
<!-- Overlay -->
<div id="fsm-overlay"></div>
<!-- Popup -->
<div id="fsm-popup">
<button id="fsm-close" aria-label="بستن">×</button>
<h3><?php echo esc_html( $popup_title ); ?></h3>
<div class="fsm-grid">
<?php foreach ( $s['items'] as $item ) :
if ( empty( $item['url'] ) || empty( $item['network'] ) ) continue;
$net = $item['network'];
$color = isset( $network_data[ $net ]['color'] ) ? $network_data[ $net ]['color'] : '#333';
$default_label = isset( $network_data[ $net ]['label'] ) ? $network_data[ $net ]['label'] : $net;
$label = ! empty( $item['title'] ) ? $item['title'] : $default_label;
?>
<a href="<?php echo esc_url( $item['url'] ); ?>" target="_blank" rel="noopener noreferrer" class="fsm-item">
<div class="fsm-icon" style="background-color: <?php echo esc_attr( $color ); ?>;">
<?php echo fsm_get_icon_svg( $net ); ?>
</div>
<span class="fsm-label"><?php echo esc_html( $label ); ?></span>
</a>
<?php endforeach; ?>
</div>
</div>
<script>
(function(){
const btn = document.getElementById('fsm-main-btn');
const popup = document.getElementById('fsm-popup');
const overlay = document.getElementById('fsm-overlay');
const closeBtn = document.getElementById('fsm-close');
function openPopup() {
popup.classList.add('active');
overlay.classList.add('active');
}
function closePopup() {
popup.classList.remove('active');
overlay.classList.remove('active');
}
btn.addEventListener('click', openPopup);
closeBtn.addEventListener('click', closePopup);
overlay.addEventListener('click', closePopup);
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') closePopup();
});
})();
</script>
<?php
}
// ==================== آیکونهای SVG ====================
function fsm_get_icon_svg( $name ) {
$icons = array(
'telegram' => '<svg viewBox="0 0 24 24"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.02.21-.016.29.015.14.07.23.22.22.38l-.7 4.1c-.05.3-.19.5-.42.63l-1.8.9c-.2.1-.4.12-.6.05l-2.5-1.2-1.3.9c-.15.1-.3.1-.45.05-.15-.05-.25-.2-.25-.35v-1.5l4.6-2.7c.2-.12.2-.3.05-.35l-5.7-2.1c-.25-.1-.5.05-.55.3l-.7 4.3c-.05.3.1.55.4.6l1.9.4 4.4-2.8z"/></svg>',
'instagram' => '<svg viewBox="0 0 24 24"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 1 0 0 12.324 6.162 6.162 0 0 0 0-12.324zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm6.406-11.845a1.44 1.44 0 1 0 0 2.881 1.44 1.44 0 0 0 0-2.881z"/></svg>',
'whatsapp' => '<svg viewBox="0 0 24 24"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.435 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413z"/></svg>',
'youtube' => '<svg viewBox="0 0 24 24"><path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>',
'x' => '<svg viewBox="0 0 24 24"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>',
'facebook' => '<svg viewBox="0 0 24 24"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>',
'linkedin' => '<svg viewBox="0 0 24 24"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>',
'aparat' => '<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/></svg>',
'eitaa' => '<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>',
'rubika' => '<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>',
'bale' => '<svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',
);
return isset( $icons[ $name ] ) ? $icons[ $name ] : '';
}