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"; } Comments on: Host Your Own Email with Google https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/ Version 17 of the amazing and famous Wed, 27 May 2015 10:21:58 +0000 hourly 1 https://wordpress.org/?v=7.0 By: best video https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/#comment-134 Wed, 27 May 2015 10:21:58 +0000 https://spigot-16.local/?p=2978#comment-134 Greetings from Los angeles! I\’m bored at work so I decided to check out your site on my iphone during lunch break.

I enjoy the info you provide here and can\’t wait to take a look
when I get home. I\’m shocked at how quick your blog loaded on my mobile ..
I\’m not even using WIFI, just 3G .. Anyways, wonderful blog!

]]>
By: Sims 3 Ambitions Free Download https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/#comment-133 Sun, 27 Apr 2014 02:53:22 +0000 https://spigot-16.local/?p=2978#comment-133 No matter if some one searches for his necessary thing,
therefore he/she wishes to be available that in detail, thus that thing is maintained over here.

]]>
By: why can t i lose weight https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/#comment-132 Wed, 23 Apr 2014 01:13:47 +0000 https://spigot-16.local/?p=2978#comment-132 A motivating discussion is worth comment. There’s no doubt that
that you ought to write more on this subject, it might not be
a taboo matter but generally folks don’t discuss these issues.
To the next! Best wishes!!

]]>
By: companies to invest in now https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/#comment-131 Sun, 20 Apr 2014 23:01:21 +0000 https://spigot-16.local/?p=2978#comment-131 Link exchange is nothing else however it is simply placing the other person\’s weblog link on your page at proper
place and other person will also do same for you.

]]>
By: get paid cash for surveys https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/#comment-130 Sat, 19 Apr 2014 05:59:52 +0000 https://spigot-16.local/?p=2978#comment-130 Its like you read my mind! You seem to know a lot about this, like
you wrote the book in it or something. I think that you could do with a few pics to drive the message
home a little bit, but instead of that, this is fantastic blog.
A great read. I’ll certainly be back.

]]>
By: RowenaBasiga https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/#comment-129 Thu, 28 Jun 2012 14:13:02 +0000 https://spigot-16.local/?p=2978#comment-129 Thanks for the article on Host YOUR Own Email With Google. This is helpful for a newbie like me.

]]>
By: Hans Hendershot https://spigot17.spigotdev.com/2010/08/25/host-your-own-domain-email-with-google/#comment-128 Thu, 26 Aug 2010 20:12:30 +0000 https://spigot-16.local/?p=2978#comment-128 I enjoyed your postings about Google Apps and the previous posting about CRM. I\’m a business consultant in Draper and I have been doing more and more Google Apps and CRM implementations for my clients.

I\’d like the opportunity to meet with you and share what I\’m doing in this space. Perhaps there will be some opportunities for us to work together.

You can reach me via email or on my cell phone at 801-455-8680.

Thanks,
Hans

]]>