require_once ABSPATH . 'wp-admin/includes/image.php';
$spec = json_decode('[{"slug":"moneyminder","title":"MoneyMinder","year":2025,"site_url":"https://moneyminder.com","deliverables":["content_strategy","custom_design","wp_development"],"note":"Spigot has been working with the Moneyminder team for nearly ten years now, and we couldn\'t have been happier when they asked us back to start an in-situ redesign.","desktop":"https://spigotdesign.com/wp-content/uploads/2025/05/mm-home.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2025/05/mm-mobile-menu.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2025/05/people_mgmt.webp","https://spigotdesign.com/wp-content/uploads/2025/05/mm-home-1.webp","https://spigotdesign.com/wp-content/uploads/2025/05/moneyminder-pricing.webp","https://spigotdesign.com/wp-content/uploads/2025/05/mm-services-screen.webp","https://spigotdesign.com/wp-content/uploads/2025/05/mm-mobile-menu.webp","https://spigotdesign.com/wp-content/uploads/2025/05/moneyminder-header.webp"]},{"slug":"power-of-closure","title":"Power of Closure","year":2025,"site_url":"https://powerofclosure.com","deliverables":["brand_guide","content_strategy","custom_design","logo_design","wp_development"],"note":"Working with Dr. Gary McClain on the Power of Closure project allowed us to bring his compassionate approach to healing and personal growth to life online.","desktop":"https://spigotdesign.com/wp-content/uploads/2025/02/poc-home-page.webp","mobile":"","gallery":["https://spigotdesign.com/wp-content/uploads/2025/02/speaking-engagements-scaled.webp","https://spigotdesign.com/wp-content/uploads/2025/02/power-of-closure-home.webp","https://spigotdesign.com/wp-content/uploads/2025/02/poc-you-are-not-alone.webp","https://spigotdesign.com/wp-content/uploads/2025/02/poc-book.webp","https://spigotdesign.com/wp-content/uploads/2025/02/poc-relationship-coaching-scaled.webp"]},{"slug":"fj-management","title":"FJ Management","year":2025,"site_url":"https://fjmgt.com/","deliverables":["content_strategy","custom_design","hosting","wp_development"],"note":"The legacy of FJ Management comes to life through a digital presence that balances its business acumen with its philanthropic heart.","desktop":"https://spigotdesign.com/wp-content/uploads/2025/02/FJM-hero.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2025/02/fjm-home-mobile.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2025/02/fjm-energy-2.webp","https://spigotdesign.com/wp-content/uploads/2025/02/fjm-home-mobile.webp","https://spigotdesign.com/wp-content/uploads/2025/02/fjm-business-dev.webp","https://spigotdesign.com/wp-content/uploads/2025/02/fjm-work-with-us.webp","https://spigotdesign.com/wp-content/uploads/2025/02/fjm-philanthropy.webp","https://spigotdesign.com/wp-content/uploads/2025/02/fjm-history-scaled.webp"]},{"slug":"pathway-group","title":"Pathway Group","year":2025,"site_url":"https://pathwaygroup.co/","deliverables":["content_strategy","custom_design","hosting","wp_development"],"note":"The Pathway Group stands as a trusted partner in organizational transformation, bringing strategic insight to nonprofits and businesses across the nation from their base in Utah.","desktop":"https://spigotdesign.com/wp-content/uploads/2025/02/pathway-group-home.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2025/02/pathway-mobile-home.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2025/02/pathway-fundraising-scaled.webp","https://spigotdesign.com/wp-content/uploads/2025/02/pathway-mobile-home.webp","https://spigotdesign.com/wp-content/uploads/2025/02/pathway-group-mobile-execsearch.webp","https://spigotdesign.com/wp-content/uploads/2025/02/pathway-mobile-footer.webp","https://spigotdesign.com/wp-content/uploads/2025/02/pathway-mobile-about.webp","https://spigotdesign.com/wp-content/uploads/2025/02/pathway-group-about-scaled.webp"]}]', true);
if (!$spec) { echo 'SPEC DECODE FAIL'; return; }
$side = static fn($url, $desc) => (static function ($url, $desc) {
$resp = wp_remote_get($url, ['timeout' => 30, 'headers' => ['User-Agent' => 'Mozilla/5.0 Spigot17Importer']]);
if (is_wp_error($resp) || wp_remote_retrieve_response_code($resp) !== 200) return 0;
$body = wp_remote_retrieve_body($resp);
if (!$body) return 0;
$up = wp_upload_bits(basename(parse_url($url, PHP_URL_PATH)), null, $body);
if (!empty($up['error'])) return 0;
$att = wp_insert_attachment(['post_mime_type' => wp_check_filetype($up['file'])['type'], 'post_title' => $desc, 'post_status' => 'inherit'], $up['file']);
if (is_wp_error($att) || !$att) return 0;
wp_update_attachment_metadata($att, wp_generate_attachment_metadata($att, $up['file']));
return $att;
})($url, $desc);
foreach ($spec as $p) {
if (get_page_by_path($p['slug'], OBJECT, 'work')) { echo $p['slug'] . ': exists' . "\n"; continue; }
$pid = wp_insert_post(['post_type' => 'work', 'post_status' => 'draft', 'post_title' => $p['title'], 'post_name' => $p['slug']]);
if (is_wp_error($pid)) { echo $p['slug'] . ': POST FAIL' . "\n"; continue; }
$desk = $p['desktop'] ? $side($p['desktop'], $p['title'] . ' desktop') : 0;
$mob = $p['mobile'] ? $side($p['mobile'], $p['title'] . ' mobile') : 0;
$g = [];
foreach ((array) $p['gallery'] as $u) { $a = $side($u, $p['title'] . ' screenshot'); if ($a) $g[] = $a; }
update_field('client_name', $p['title'], $pid);
if (!empty($p['year'])) update_field('launch_year', $p['year'], $pid);
if (!empty($p['site_url'])) update_field('site_url', $p['site_url'], $pid);
if (!empty($p['deliverables'])) update_field('deliverables', $p['deliverables'], $pid);
if (!empty($p['note'])) update_field('build_note', $p['note'], $pid);
if ($desk) { update_field('desktop_screenshot', $desk, $pid); set_post_thumbnail($pid, $desk); }
if ($mob) update_field('mobile_screenshot', $mob, $pid);
if ($g) update_field('gallery', $g, $pid);
update_field('hosted_on_cinch', 1, $pid);
echo $p['slug'] . ': post ' . $pid . ' desk ' . $desk . ' mob ' . $mob . ' gal ' . count($g) . "\n";
}
require_once ABSPATH . 'wp-admin/includes/image.php';
$spec = json_decode('[{"slug":"utah-donor-collective","title":"Utah Donor Collective","year":2024,"site_url":"https://utahdonorcollaborative.com/","deliverables":["brand_guide","content_strategy","custom_design","logo_design","wp_development"],"note":"There aren\'t too many people who\'d look to Utah as the center of diversity in politics.","desktop":"https://spigotdesign.com/wp-content/uploads/2024/07/Utah-Donor-Collaborative-overview.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2024/07/utah-mobile-view-1.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2024/07/Our-Mission-Utah-Donor-Collaborative-2-scaled.webp","https://spigotdesign.com/wp-content/uploads/2024/07/utah-mobile-view-1.webp","https://spigotdesign.com/wp-content/uploads/2024/07/utah-mobile-view-2-1.webp","https://spigotdesign.com/wp-content/uploads/2024/07/utah-mobile-view-3.webp","https://spigotdesign.com/wp-content/uploads/2024/07/utah-mobile-view-4.webp","https://spigotdesign.com/wp-content/uploads/2024/07/Utah-Donor-Collaborative-overview-footer-2.webp"]},{"slug":"armentum-partners","title":"Armentum Partners","year":2024,"site_url":"https://armentumpartners.com/transactions/","deliverables":["brand_guide","content_strategy","custom_design","logo_design","wp_development"],"note":"This is the second website we have designed for Armentum.","desktop":"https://spigotdesign.com/wp-content/uploads/2024/06/armentum-homepage.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2024/06/mobile-menu-armentum-partners.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2024/06/transactions-armentum-partners-scaled.webp","https://spigotdesign.com/wp-content/uploads/2024/06/mobile-menu-armentum-partners.webp","https://spigotdesign.com/wp-content/uploads/2024/06/mobile-icons-armentum-partners.webp","https://spigotdesign.com/wp-content/uploads/2024/06/mobile-transactions-armentum-partners.webp","https://spigotdesign.com/wp-content/uploads/2024/06/mobile-blog-armentum-partners.webp","https://spigotdesign.com/wp-content/uploads/2024/06/home-page-footer-armentum-partners.webp"]},{"slug":"bond-design-company","title":"Bond Design Company","year":2024,"site_url":"https://bonddesigncompany.com/portfolio","deliverables":["content_strategy","custom_design","hosting","wp_development"],"note":"Have you ever worked with someone whose work you are in total awe of, maybe felt a little intimidated by their talent?","desktop":"https://spigotdesign.com/wp-content/uploads/2023/10/bond-desktop-home.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2023/10/bond-mobile-1.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2023/10/bond-desktop-interior.webp","https://spigotdesign.com/wp-content/uploads/2023/10/bond-mobile-1.webp","https://spigotdesign.com/wp-content/uploads/2023/10/bond-mobile-3.webp","https://spigotdesign.com/wp-content/uploads/2023/10/bond-mobile-2.webp","https://spigotdesign.com/wp-content/uploads/2023/10/bond-mobile-4.webp","https://spigotdesign.com/wp-content/uploads/2023/10/bond-desktop-contact.webp"]},{"slug":"american-academy-innovation","title":"American Academy of Innovation","year":2024,"site_url":"https://aaiutah.org","deliverables":["brand_guide","content_strategy","copywriting","custom_design","hosting","wp_development"],"note":"When a school is described as innovative, embracing change, facing failures and challenging potential, you\'re definitely not looking at a standard educational institution.","desktop":"https://spigotdesign.com/wp-content/uploads/2023/10/aai-utah-desktop-home-1.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2023/10/aai-mobile-1.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2023/10/aai-utah-desktop-footer.webp","https://spigotdesign.com/wp-content/uploads/2023/10/aai-mobile-1.webp","https://spigotdesign.com/wp-content/uploads/2023/10/aai-mobile-4.webp","https://spigotdesign.com/wp-content/uploads/2023/10/aai-mobile-2.webp","https://spigotdesign.com/wp-content/uploads/2023/10/aai-mobile-3.webp","https://spigotdesign.com/wp-content/uploads/2023/10/aai-tablet-interior.webp"]}]', true);
if (!$spec) { echo 'SPEC DECODE FAIL'; return; }
$side = static fn($url, $desc) => (static function ($url, $desc) {
$resp = wp_remote_get($url, ['timeout' => 30, 'headers' => ['User-Agent' => 'Mozilla/5.0 Spigot17Importer']]);
if (is_wp_error($resp) || wp_remote_retrieve_response_code($resp) !== 200) return 0;
$body = wp_remote_retrieve_body($resp);
if (!$body) return 0;
$up = wp_upload_bits(basename(parse_url($url, PHP_URL_PATH)), null, $body);
if (!empty($up['error'])) return 0;
$att = wp_insert_attachment(['post_mime_type' => wp_check_filetype($up['file'])['type'], 'post_title' => $desc, 'post_status' => 'inherit'], $up['file']);
if (is_wp_error($att) || !$att) return 0;
wp_update_attachment_metadata($att, wp_generate_attachment_metadata($att, $up['file']));
return $att;
})($url, $desc);
foreach ($spec as $p) {
if (get_page_by_path($p['slug'], OBJECT, 'work')) { echo $p['slug'] . ': exists' . "\n"; continue; }
$pid = wp_insert_post(['post_type' => 'work', 'post_status' => 'draft', 'post_title' => $p['title'], 'post_name' => $p['slug']]);
if (is_wp_error($pid)) { echo $p['slug'] . ': POST FAIL' . "\n"; continue; }
$desk = $p['desktop'] ? $side($p['desktop'], $p['title'] . ' desktop') : 0;
$mob = $p['mobile'] ? $side($p['mobile'], $p['title'] . ' mobile') : 0;
$g = [];
foreach ((array) $p['gallery'] as $u) { $a = $side($u, $p['title'] . ' screenshot'); if ($a) $g[] = $a; }
update_field('client_name', $p['title'], $pid);
if (!empty($p['year'])) update_field('launch_year', $p['year'], $pid);
if (!empty($p['site_url'])) update_field('site_url', $p['site_url'], $pid);
if (!empty($p['deliverables'])) update_field('deliverables', $p['deliverables'], $pid);
if (!empty($p['note'])) update_field('build_note', $p['note'], $pid);
if ($desk) { update_field('desktop_screenshot', $desk, $pid); set_post_thumbnail($pid, $desk); }
if ($mob) update_field('mobile_screenshot', $mob, $pid);
if ($g) update_field('gallery', $g, $pid);
update_field('hosted_on_cinch', 1, $pid);
echo $p['slug'] . ': post ' . $pid . ' desk ' . $desk . ' mob ' . $mob . ' gal ' . count($g) . "\n";
}
require_once ABSPATH . 'wp-admin/includes/image.php';
$spec = json_decode('[{"slug":"outkast-tackle","title":"Outkast Tackle","year":2024,"site_url":"https://outkasttackle.com/","deliverables":["content_strategy","copywriting","custom_design","ecommerce","seo_setup"],"note":"Tradition. Craftsmanship. Thoughtful design.","desktop":"https://spigotdesign.com/wp-content/uploads/2024/01/marquee-outkast-tackle.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2024/01/outkast-home-mobile.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2024/01/outkast-product.webp","https://spigotdesign.com/wp-content/uploads/2024/01/outkast-home-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/footer-outkast-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/shop-outkast-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/rig-chart-outkast-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/outkast-pro-staff.webp"]},{"slug":"stereotomic","title":"Stereotomic","year":2023,"site_url":"https://stereotomic.space/","deliverables":["brand_guide","content_strategy","custom_design","logo_design","wp_development"],"note":"Our partnership with the Stereotomic team brought their visionary architectural practice to life in the digital space.","desktop":"https://spigotdesign.com/wp-content/uploads/2023/11/stereotomic-home.webp","mobile":"","gallery":["https://spigotdesign.com/wp-content/uploads/2023/11/stereotomic-work.webp","https://spigotdesign.com/wp-content/uploads/2023/11/stereotomic-project.webp","https://spigotdesign.com/wp-content/uploads/2023/11/stereotomic-work-1.webp","https://spigotdesign.com/wp-content/uploads/2023/11/stereotomic-about.webp","https://spigotdesign.com/wp-content/uploads/2023/11/stereotomic-single-project.webp","https://spigotdesign.com/wp-content/uploads/2023/11/stereotomic-about-desktop.webp"]},{"slug":"lake-house-academy","title":"Lake House Academy","year":2023,"site_url":"https://lakehouseacademy.com","deliverables":["brand_guide","content_strategy","copywriting","custom_design","logo_design","wp_development"],"note":"There are a few industries that aren\'t known for well-designed or easy-to-use websites.","desktop":"https://spigotdesign.com/wp-content/uploads/2023/10/lakeouse-desktop-home.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2023/10/lakeouse-mobile-1.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2023/10/life-at-lakehouse.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lakeouse-mobile-1.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lakeouse-mobile-2.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lakeouse-mobile-3.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lakeouse-mobile-4.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lakehouse-tablet.webp"]},{"slug":"new-haven","title":"New Haven","year":2023,"site_url":"https://www.newhavenrtc.com","deliverables":["content_strategy","custom_design","logo_design","seo_setup","wp_development"],"note":"Imagine being an organization without the independence to make marketing decisions because of ownership hierarchies.","desktop":"https://spigotdesign.com/wp-content/uploads/2023/10/nh-desktop-scaled.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2023/10/newhaven-mobile-1.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2023/10/nh-campuses.webp","https://spigotdesign.com/wp-content/uploads/2023/10/newhaven-mobile-1.webp","https://spigotdesign.com/wp-content/uploads/2023/10/newhaven-mobile-2.webp","https://spigotdesign.com/wp-content/uploads/2023/10/newhaven-mobile-3.webp","https://spigotdesign.com/wp-content/uploads/2023/10/newhaven-mobile-4.webp","https://spigotdesign.com/wp-content/uploads/2023/10/nh-leadership-desktop.webp"]}]', true);
if (!$spec) { echo 'SPEC DECODE FAIL'; return; }
$side = static fn($url, $desc) => (static function ($url, $desc) {
$resp = wp_remote_get($url, ['timeout' => 30, 'headers' => ['User-Agent' => 'Mozilla/5.0 Spigot17Importer']]);
if (is_wp_error($resp) || wp_remote_retrieve_response_code($resp) !== 200) return 0;
$body = wp_remote_retrieve_body($resp);
if (!$body) return 0;
$up = wp_upload_bits(basename(parse_url($url, PHP_URL_PATH)), null, $body);
if (!empty($up['error'])) return 0;
$att = wp_insert_attachment(['post_mime_type' => wp_check_filetype($up['file'])['type'], 'post_title' => $desc, 'post_status' => 'inherit'], $up['file']);
if (is_wp_error($att) || !$att) return 0;
wp_update_attachment_metadata($att, wp_generate_attachment_metadata($att, $up['file']));
return $att;
})($url, $desc);
foreach ($spec as $p) {
if (get_page_by_path($p['slug'], OBJECT, 'work')) { echo $p['slug'] . ': exists' . "\n"; continue; }
$pid = wp_insert_post(['post_type' => 'work', 'post_status' => 'draft', 'post_title' => $p['title'], 'post_name' => $p['slug']]);
if (is_wp_error($pid)) { echo $p['slug'] . ': POST FAIL' . "\n"; continue; }
$desk = $p['desktop'] ? $side($p['desktop'], $p['title'] . ' desktop') : 0;
$mob = $p['mobile'] ? $side($p['mobile'], $p['title'] . ' mobile') : 0;
$g = [];
foreach ((array) $p['gallery'] as $u) { $a = $side($u, $p['title'] . ' screenshot'); if ($a) $g[] = $a; }
update_field('client_name', $p['title'], $pid);
if (!empty($p['year'])) update_field('launch_year', $p['year'], $pid);
if (!empty($p['site_url'])) update_field('site_url', $p['site_url'], $pid);
if (!empty($p['deliverables'])) update_field('deliverables', $p['deliverables'], $pid);
if (!empty($p['note'])) update_field('build_note', $p['note'], $pid);
if ($desk) { update_field('desktop_screenshot', $desk, $pid); set_post_thumbnail($pid, $desk); }
if ($mob) update_field('mobile_screenshot', $mob, $pid);
if ($g) update_field('gallery', $g, $pid);
update_field('hosted_on_cinch', 1, $pid);
echo $p['slug'] . ': post ' . $pid . ' desk ' . $desk . ' mob ' . $mob . ' gal ' . count($g) . "\n";
}
require_once ABSPATH . 'wp-admin/includes/image.php';
$spec = json_decode('[{"slug":"mountainlands-community-housing-trust","title":"Mountainlands Community Housing Trust","year":2023,"site_url":"https://housinghelp.org","deliverables":["brand_guide","content_strategy","custom_design","hosting","wp_development"],"note":"Sometimes Puzzle Season \\u2014 that peaceful time between Thanksgiving and New Year\'s \\u2014 stretches into June.","desktop":"https://spigotdesign.com/wp-content/uploads/2023/10/mountainlands-desktop.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2023/10/mountainlands-mobile-2.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2023/10/housing-for-people-not-profit.webp","https://spigotdesign.com/wp-content/uploads/2023/10/mountainlands-mobile-2.webp","https://spigotdesign.com/wp-content/uploads/2023/10/mountainlands-mobile-1.webp","https://spigotdesign.com/wp-content/uploads/2023/10/mountainlands-mobile-3.webp","https://spigotdesign.com/wp-content/uploads/2023/10/mountainlands-mobile-4.webp","https://spigotdesign.com/wp-content/uploads/2023/10/mountainlands-interior.webp"]},{"slug":"lumen-scholar-institute","title":"Lumen Scholar Institute","year":2022,"site_url":"https://lumenscholar.org/","deliverables":["brand_guide","content_strategy","copywriting","custom_design","hosting","wp_development"],"note":"While Dorothy once implored \\u201cThere\\u2019s no place like home,\\u201d today\'s students require an expanded definition of this sentiment.","desktop":"https://spigotdesign.com/wp-content/uploads/2023/10/lumen-desktop-home.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2023/10/lumenscholar-mobile-1.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2023/10/lumen-desktop-footer-1.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lumenscholar-mobile-1.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lumenscholar-mobile-3.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lumenscholar-mobile-4.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lumenscholar-mobile-2.webp","https://spigotdesign.com/wp-content/uploads/2023/10/lumen-desktop-interior.webp"]},{"slug":"beehive-buildings","title":"Beehive Buildings","year":2021,"site_url":"https://beehivebuildings.com/","deliverables":["content_strategy","custom_design","hosting","wp_development"],"note":"If you build it, they will come. That goes for both well-designed, SEO-optimized websites and quality pole barns at an affordable price.","desktop":"https://spigotdesign.com/wp-content/uploads/2024/01/Beehive-Buildings-Custom-Pole-Barn-Builders.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2024/01/beehive-marquee-mobile.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2024/01/Archives-Projects-Beehive-Buildings.webp","https://spigotdesign.com/wp-content/uploads/2024/01/beehive-marquee-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/beehive-footer-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/beehive-interior-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/beehive-blog-mobile.webp","https://spigotdesign.com/wp-content/uploads/2024/01/Beehive-Buildings-home.webp"]},{"slug":"elliott-workgroup","title":"Elliott Workgroup","year":2021,"site_url":"https://elliottworkgroup.com","deliverables":["content_strategy","custom_design","hosting","wp_development"],"note":"Since 2002, this forward-thinking architectural design firm has engrained its philosophy of doing good for the community, for visual participants, and for the planet into the very fibers of Park City and Utah at large.","desktop":"https://spigotdesign.com/wp-content/uploads/2024/07/Elliott-Workgroup-homepage.webp","mobile":"https://spigotdesign.com/wp-content/uploads/2024/07/eliott-home-mobile-view.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2021/12/elliott-worgroup-project.webp","https://spigotdesign.com/wp-content/uploads/2024/07/eliott-home-mobile-view.webp","https://spigotdesign.com/wp-content/uploads/2024/07/home-mobile-menu-open.webp","https://spigotdesign.com/wp-content/uploads/2024/07/eliott-projects-mobile-view.webp","https://spigotdesign.com/wp-content/uploads/2024/07/eliott-projects.webp","https://spigotdesign.com/wp-content/uploads/2024/08/elliott-workgroup-blog-archive.webp"]}]', true);
if (!$spec) { echo 'SPEC DECODE FAIL'; return; }
$side = static fn($url, $desc) => (static function ($url, $desc) {
$resp = wp_remote_get($url, ['timeout' => 30, 'headers' => ['User-Agent' => 'Mozilla/5.0 Spigot17Importer']]);
if (is_wp_error($resp) || wp_remote_retrieve_response_code($resp) !== 200) return 0;
$body = wp_remote_retrieve_body($resp);
if (!$body) return 0;
$up = wp_upload_bits(basename(parse_url($url, PHP_URL_PATH)), null, $body);
if (!empty($up['error'])) return 0;
$att = wp_insert_attachment(['post_mime_type' => wp_check_filetype($up['file'])['type'], 'post_title' => $desc, 'post_status' => 'inherit'], $up['file']);
if (is_wp_error($att) || !$att) return 0;
wp_update_attachment_metadata($att, wp_generate_attachment_metadata($att, $up['file']));
return $att;
})($url, $desc);
foreach ($spec as $p) {
if (get_page_by_path($p['slug'], OBJECT, 'work')) { echo $p['slug'] . ': exists' . "\n"; continue; }
$pid = wp_insert_post(['post_type' => 'work', 'post_status' => 'draft', 'post_title' => $p['title'], 'post_name' => $p['slug']]);
if (is_wp_error($pid)) { echo $p['slug'] . ': POST FAIL' . "\n"; continue; }
$desk = $p['desktop'] ? $side($p['desktop'], $p['title'] . ' desktop') : 0;
$mob = $p['mobile'] ? $side($p['mobile'], $p['title'] . ' mobile') : 0;
$g = [];
foreach ((array) $p['gallery'] as $u) { $a = $side($u, $p['title'] . ' screenshot'); if ($a) $g[] = $a; }
update_field('client_name', $p['title'], $pid);
if (!empty($p['year'])) update_field('launch_year', $p['year'], $pid);
if (!empty($p['site_url'])) update_field('site_url', $p['site_url'], $pid);
if (!empty($p['deliverables'])) update_field('deliverables', $p['deliverables'], $pid);
if (!empty($p['note'])) update_field('build_note', $p['note'], $pid);
if ($desk) { update_field('desktop_screenshot', $desk, $pid); set_post_thumbnail($pid, $desk); }
if ($mob) update_field('mobile_screenshot', $mob, $pid);
if ($g) update_field('gallery', $g, $pid);
update_field('hosted_on_cinch', 1, $pid);
echo $p['slug'] . ': post ' . $pid . ' desk ' . $desk . ' mob ' . $mob . ' gal ' . count($g) . "\n";
}
require_once ABSPATH . 'wp-admin/includes/image.php';
$spec = json_decode('[{"slug":"park-city-library","title":"Park City Library","year":2021,"site_url":"https://utahdonorcollaborative.com/","deliverables":["brand_guide","content_strategy","custom_design","logo_design","wp_development"],"note":"The Park City Library has been a client of ours for many years, and we\'ve built more than one iteration of its site.","desktop":"https://spigotdesign.com/wp-content/uploads/2024/07/Logo_of_the_Park_City_Library.svg.png","mobile":"https://spigotdesign.com/wp-content/uploads/2024/07/home-mobile-screenshot-1.webp","gallery":["https://spigotdesign.com/wp-content/uploads/2024/07/park-city-library-homepage.webp","https://spigotdesign.com/wp-content/uploads/2024/07/park-city-library-homepage-screenshot-3.webp","https://spigotdesign.com/wp-content/uploads/2024/07/home-mobile-screenshot-1.webp","https://spigotdesign.com/wp-content/uploads/2024/07/home-mobile-screenshot-2.webp","https://spigotdesign.com/wp-content/uploads/2024/07/insidepage-mobile-screenshot-1.webp","https://spigotdesign.com/wp-content/uploads/2024/07/utah-mobile-view-4.webp","https://spigotdesign.com/wp-content/uploads/2024/07/Storytimes-Park-City-Library-scaled.webp"]}]', true);
if (!$spec) { echo 'SPEC DECODE FAIL'; return; }
$side = static fn($url, $desc) => (static function ($url, $desc) {
$resp = wp_remote_get($url, ['timeout' => 30, 'headers' => ['User-Agent' => 'Mozilla/5.0 Spigot17Importer']]);
if (is_wp_error($resp) || wp_remote_retrieve_response_code($resp) !== 200) return 0;
$body = wp_remote_retrieve_body($resp);
if (!$body) return 0;
$up = wp_upload_bits(basename(parse_url($url, PHP_URL_PATH)), null, $body);
if (!empty($up['error'])) return 0;
$att = wp_insert_attachment(['post_mime_type' => wp_check_filetype($up['file'])['type'], 'post_title' => $desc, 'post_status' => 'inherit'], $up['file']);
if (is_wp_error($att) || !$att) return 0;
wp_update_attachment_metadata($att, wp_generate_attachment_metadata($att, $up['file']));
return $att;
})($url, $desc);
foreach ($spec as $p) {
if (get_page_by_path($p['slug'], OBJECT, 'work')) { echo $p['slug'] . ': exists' . "\n"; continue; }
$pid = wp_insert_post(['post_type' => 'work', 'post_status' => 'draft', 'post_title' => $p['title'], 'post_name' => $p['slug']]);
if (is_wp_error($pid)) { echo $p['slug'] . ': POST FAIL' . "\n"; continue; }
$desk = $p['desktop'] ? $side($p['desktop'], $p['title'] . ' desktop') : 0;
$mob = $p['mobile'] ? $side($p['mobile'], $p['title'] . ' mobile') : 0;
$g = [];
foreach ((array) $p['gallery'] as $u) { $a = $side($u, $p['title'] . ' screenshot'); if ($a) $g[] = $a; }
update_field('client_name', $p['title'], $pid);
if (!empty($p['year'])) update_field('launch_year', $p['year'], $pid);
if (!empty($p['site_url'])) update_field('site_url', $p['site_url'], $pid);
if (!empty($p['deliverables'])) update_field('deliverables', $p['deliverables'], $pid);
if (!empty($p['note'])) update_field('build_note', $p['note'], $pid);
if ($desk) { update_field('desktop_screenshot', $desk, $pid); set_post_thumbnail($pid, $desk); }
if ($mob) update_field('mobile_screenshot', $mob, $pid);
if ($g) update_field('gallery', $g, $pid);
update_field('hosted_on_cinch', 1, $pid);
echo $p['slug'] . ': post ' . $pid . ' desk ' . $desk . ' mob ' . $mob . ' gal ' . count($g) . "\n";
}
Dropping future support for IE6 - Spigot 17
Skip to main content
Skip to footer
← Design & Development Blog Dropping future support for IE6
Checking the stats for spigot17.spigotdev.com/ today revealed that less than 10% of the visitors here are using Internet Explorer 6. This is great news!
This means we can now officially drop support for this outdated browser, at least on this site. Now that I’ve reached the vaunted 10%, and with newer browsers continuing to improve rendering consistency and support for standards based techniques, continuing to support an aged browser simply doesn’t make sense.
I’ve come to this decision with hesitation, and also relief. I hesitate because I pride myself on designing websites with accessibility and usability in mind. Dropping support for any percentage of users doesn’t jibe with those ideals. I’ve continued on in this decision because I’m confident that while I’m ostensibly ‘dropping support’ for IE6, users of that browser will not notice a difference in how this site looks and functions than it did yesterday. Freedom and relief are what I feel when I realize that I will not have to spend countless future hours, at least when working on this site, on supporting a browser that doesn’t support me.
What does this mean to you?
For most of you it means absolutely nothing. For the 90% of you that are viewing this site on a modern browser (including Internet Explorer 7) – spigot17.spigotdev.com/ supports you. For the rest of you – you don't have much to worry about either. 'Dropping support' sounds so harsh and violent, but I'm really just trying to make a point. I won't be pulling out my .png fix support, nor will I take out my IE6 specific stylesheet. In fact, you won't notice any difference from my previous 'IE6 support' days. In the future, however, I will not be going out of my way to make sure this site looks as good on IE6 as it does on any other modern browser.
Of course, I will continue to support IE6 for all of my existing and future clients sites. 10% is still a large enough portion of visitors on any site. Completely leaving them in the dark would be counter to our philosophy of building sites that are as usable as possible for as many users as possible.
Some helpful links
Get yourself a ‘modern’ browser
Join in on the IE6 bash
Counterpoints of view
Bryan
@Michal – Your project looks really interesting, and there\’s a part of me that would love to participate, but it feels a little drastic. I can\’t afford to alienate current or potential clients!
Michal
Fancy supporting http://browsesad.com ? 😉
Jon Hughes
No arguments there, Bryan! I’ve just got to keep looking out for our customers, no matter what browser they are using. The site I am currently working on is 70% IE7 and 22% IE6 – way too many to drop support!
Bryan
Well John, you certainly make a good point. I\’m not a hater in general, but the day we can all safely leave IE6 behind will be a day to celebrate.
Jon Hughes
I enjoy being the nonconformist 🙂
(Author of the lonely ‘counterpoint of view’)