39292-vm/fix_about_css.php
2026-03-26 22:39:58 +00:00

68 lines
2.7 KiB
PHP

<?php
$post_id = 48;
$post = get_post($post_id);
$content = $post->post_content;
$content = preg_replace(
'/\.about-middle\s*\{[^}]+\}/',
".about-middle { background-color: #F5F2EC; padding: 100px 0; }",
$content
);
$content = preg_replace(
'/\.about-card\s*\{[^}]+\}/',
".about-card { background: #FFFFFF; border-radius: 32px; padding: 48px; box-shadow: 0 4px 24px rgba(0,0,0,0.03); }",
$content
);
$content = preg_replace(
'/\.about-card-title\s*\{[^}]+\}/',
".about-card-title { font-family: 'Cardo', serif; font-size: 42px; font-weight: 700; margin: 0 0 40px; color: #1C3434; }",
$content
);
$content = preg_replace(
'/\.about-list\s*\{[^}]+\}/',
".about-list { display: flex; flex-direction: column; gap: 32px; }",
$content
);
$content = preg_replace(
'/\.about-list-item\s*\{[^}]+\}/',
".about-list-item { display: flex; align-items: center; gap: 24px; font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 700; color: #1C3434; }",
$content
);
$content = preg_replace(
'/\.about-connect-card\s*\{[^}]+\}/',
".about-connect-card { display: flex; align-items: center; justify-content: flex-start; gap: 24px; padding: 32px 48px; }",
$content
);
$content = preg_replace(
'/\.about-social-icon\s*\{[^}]+/',
".about-social-icon { width: 48px; height: 48px; border-radius: 50%; background-color: #1C3434; display: flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0;",
$content
);
$content = preg_replace(
'/\.about-middle-image\s*\{[^}]+\}/',
".about-middle-image { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; min-height: 400px; }",
$content
);
$old_icon1 = '<svg viewBox="0 0 24 24"><path d="M12 2L3 9h18L12 2zm0 0v7M5 9v13h14V9" stroke-linecap="round" stroke-linejoin="round"/></svg>';
$new_icon1 = '<svg viewBox="0 0 24 24" fill="none" stroke="#1C3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 14h4v7h-4z" /><path d="M14 17h5v4h-5z" /><path d="M5 19h5v2H5z" /><path d="M12 4l1.5 3.5 3.5 1.5-3.5 1.5L12 14l-1.5-3.5-3.5-1.5 3.5-1.5z"/></svg>';
$content = str_replace($old_icon1, $new_icon1, $content);
$old_icon2 = '<svg viewBox="0 0 24 24"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 4-7 8-7s8 3 8 7" stroke-linecap="round" stroke-linejoin="round"/></svg>';
$new_icon2 = '<svg viewBox="0 0 24 24" fill="none" stroke="#1C3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 4-7 8-7s8 3 8 7"/></svg>';
$content = str_replace($old_icon2, $new_icon2, $content);
wp_update_post([
'ID' => $post_id,
'post_content' => $content
]);
echo "Updated successfully.";