if (array_is_valid($foundCategoryRow)) { foreach (["state_title" => "title", "state_meta" => "meta", "x_h1_state" => "x_h1_state", "x_article_state" => "x_article_state"] as $k12 => $v12) { if (!empty(trim($foundCategoryRow[$k12]))) { ${"" . $v12} = $foundCategoryRow[$k12]; } } if (\App\Support\ConfigRuntime::isCategoryPhoneEnabled()) { if (!empty($foundCategoryRow['dn_api_phone'])) { C_Domain_Instance::setKey("dn_api_phone", $foundCategoryRow['dn_api_phone']); } if (!empty($foundCategoryRow['dn_api_phone_pool'])) { C_Domain_Instance::setKey("dn_api_phone_pool", $foundCategoryRow['dn_api_phone_pool']); } } if (!empty($__matchedApiId = \App\Helpers\AppHelper::getApiIdFromPool([$foundCategoryRow['surl_a_api_id_default'], $foundCategoryRow['surl_a_api_id_phone']]))) { $__tvar['surl_a_api_id'] = $__matchedApiId; $__tvar['surl_a_api_id_content'] = \App\Support\LeadContent::contentApiId_encrypt($__tvar['surl_a_api_id']); } $source_local_token = \App\SourceLocal\SourceLocalHelper::generateTokenString(["type" => \App\SourceLocal\SourceLocalEnum::TYPE_CATEGORY, "related_id" => $foundCategoryRow['id'], "related_uuid" => "", "related_subtype" => GeneralEnum::PAGE_TYPE_S, "related_data" => ["x_table" => $x_table]]); $__tvar['sltkn'] = $source_local_token; } } if ($category_arr[0] == url_mapping_get(GeneralEnum::URL_MAPPING_TYPE_L)) { $page_type = GeneralEnum::PAGE_TYPE_LINK_POOL; \App\LinkPool\LinkPool::setDomain($domain); $page_data = []; $page_data['link_pool'] = \App\LinkPool\LinkPool::get_listing(); $title = set_value_of_multi_for_empty([$page_data['link_pool']['title']], "Recent Posts | $domain_keyword"); $meta = "New from $domain_keyword. Updated often."; } if ($category_arr[0] == url_mapping_get(GeneralEnum::URL_MAPPING_TYPE_C)) { $content_groups_detail = \App\ContentGroups\ContentGroups::getForDetailPage(trim($category_arr[1])); $__content_groups_type = $custom_page_detail['type']; if (!empty($__content_groups_type)) { $__content_groups_type_data = $content_groups_detail['type_data_array']; } if (array_is_valid($content_groups_detail)) { $keyword_verb = set_value_of_extended($content_groups_detail['aa_library_id'], $keyword_verb); $cat_name = ucwords($keyword_verb); $content_groups_detail = \App\Support\StringRenderer::render($content_groups_detail, ["default" => ["cat_name" => $cat_name]]); if (array_is_valid($content_groups_detail['content_variables'])) { \App\Support\ContentVariables::applyToGlobal($content_groups_detail['content_variables']); } $page_type = GeneralEnum::PAGE_TYPE_CONTENT_GROUPS; $meta = $content_groups_detail['meta_description']; $title = $content_groups_detail['meta_title']; if (!empty($content_groups_detail['image_src'])) { $image_src = $content_groups_detail['image_src']; } if (!empty($content_groups_detail['image_alt'])) { $image_alt = $content_groups_detail['image_alt']; } $h1_tag = $content_groups_detail['title']; $tagline = $content_groups_detail['tagline']; $text = $content_groups_detail['content']; if (!empty($content_groups_detail['subtitle'])) { $__extend_view_custom_data['section']['h1_subtitle'] = $content_groups_detail['subtitle']; } if (!empty($content_groups_detail['breadcrumb_data'])) { $__extend_view_custom_data['section']['breadcrumb_data'] = $content_groups_detail['breadcrumb_data']; } if (array_is_valid($content_groups_detail['pagination_data'])) { $__extend_view_custom_data['section']['pagination_data'] = $content_groups_detail['pagination_data']; } if (isShowcaseEnabled("content_groups", ["build_type" => $domain_arr['build_type']])) { $showcase = \App\Support\Showcase::make($content_groups_detail); $section_showcase_data = \App\Support\Showcase::getDataRender(); } if (isReviewsEnabled("content_groups")) { $reviews = \App\Support\Reviews::make($content_groups_detail); $section_reviews_data = \App\Support\Reviews::getDataRender(); } if (isFaqEnabled("content_groups")) { $faq = \App\Support\Faq::make($content_groups_detail); $section_faq_data = \App\Support\Faq::getDataRender(); } if (isProductsEnabled("content_groups")) { $products = \App\Support\Products::make($content_groups_detail); $section_products_data = \App\Support\Products::getDataRender(); } $__skip_section = array_merge_certainly($__skip_section, array("locationfinder", "states", "cities", "counties", "locationother", "locationseodata", "categories", "custompages")); if (!empty($content_groups_detail['_page_type_include_file'])) { $page_type_include_file = "content-group-type/" . $content_groups_detail['_page_type_include_file']; } $__extend_view_custom_data['section']['content_groups_type_data'] = $__content_groups_type_data; $__tvar['current_content_group_title'] = $content_groups_detail['title']; $__tvar['current_content_group_slug'] = $content_groups_detail['_slug_plain']; $__tvar['current_content_group_rowid'] = $content_groups_detail['id']; if (!empty($__matchedApiId = \App\Helpers\AppHelper::getApiIdFromPool([$content_groups_detail['surl_a_api_id_default'], $content_groups_detail['surl_a_api_id_phone']]))) { $__tvar['surl_a_api_id'] = $__matchedApiId; $__tvar['surl_a_api_id_content'] = \App\Support\LeadContent::contentApiId_encrypt($__tvar['surl_a_api_id']); } $source_local_token = \App\SourceLocal\SourceLocalHelper::generateTokenString(["type" => \App\SourceLocal\SourceLocalEnum::TYPE_CONTENT_GROUP, "related_id" => $content_groups_detail['id'], "related_uuid" => "", "related_subtype" => $content_groups_detail['type']]); $__tvar['sltkn'] = $source_local_token; $__tvar['page_slug'] = $content_groups_detail['slug']; $precheckOtherPageType = TRUE; } } // Type g // Geo Page with City and State // Check xtable Slug Exists if (empty($page_type)) { $__data_xtable_slug_exists = querytorowarray("select * from `$x_table` where slug = '" . Security::sanitizeSqlInput(link_decode($category_arr[0])) . "'"); } if (array_is_valid($__data_xtable_slug_exists)) { $title = $geo_title; $meta = $geo_meta; // Check Url Exists In Data $ycat_slug = link_decode($category_arr[3]); $city = link_decode($category_arr[2]); $city_id = $city; $country = country_settings_property("country_id"); $otherlocation = $city; $otherlocation_id = strtolower($otherlocation); if (country_settings_property("state") === TRUE) { //Check State Exists $__data_state_exists = dataprovider_state_list_row(array("state" => link_decode($category_arr[1]), "geo" => link_decode($category_arr[2]))); if (!array_is_valid($__data_state_exists)) { $err = 1; } else { $state_full = ucwords($__data_state_exists['statefullname']); $state = strtoupper($__data_state_exists['state']); $state_abr = $state; $__tvar['current_state'] = (!empty($state)) ? $state : ""; $__tvar['current_state_id'] = (!empty($state)) ? $state : ""; $__tvar['replace_combined'] = (!empty($__data_state_exists['combined'])) ? $__data_state_exists['combined'] : ""; } //Check City Exists //$__data_check_city_exists = querytorowarray("select * from `$geo_database` where state='" . link_decode($state) . "' and geo='" . link_decode($city) . "'"); $__data_check_city_exists = \App\Support\Geo::getRowFromGeoDatabase(["type" => "state_city", "geo_database" => $geo_database, "state" => link_decode($state), "city" => link_decode($city)]); $last_name = $__data_check_city_exists['last_name']; if (!array_is_valid($__data_check_city_exists)) { $err = 1; } else { $__tvar['current_city'] = (!empty($city_id)) ? $city_id : ""; $__tvar['current_city_id'] = (!empty($city_id)) ? $city_id : ""; $__tvar['current_geo'] = (!empty($__data_check_city_exists['geo'])) ? $__data_check_city_exists['geo'] : ""; $__tvar['current_geo_rowid'] = (!empty($__data_check_city_exists['id'])) ? $__data_check_city_exists['id'] : ""; $__tvar['current_geo_type'] = (!empty($__data_check_city_exists['geo_type'])) ? $__data_check_city_exists['geo_type'] : ""; $__viewCustomerData = []; foreach (["geo_title", "geo_meta", "x_article", "x_h1_city", "x_h2", "x_h2_article", "x_h2_img_src", "bubble4_link" => "city_image"] as $k3 => $v3) { if (!empty($__data_check_city_exists[$v3])) { $__viewCustomerDataKey = (is_numeric($k3)) ? $v3 : $k3; $__viewCustomerData[$__viewCustomerDataKey] = $__data_check_city_exists[$v3]; } } App\ViewCustomizer\CDomain::runAsRuntimeVariables($__viewCustomerData, ["mapping_other" => ["title" => "geo_title", "meta" => "geo_meta", "image_src" => "bubble4_link"]]); } //Get Lat/Long $latitude = $__data_xtable_slug_exists['latitude']; $longitude = $__data_xtable_slug_exists['longitude']; //Check Category Exists $__data_check_category_exists = querynumrows("select * from `$x_table` where subcat_slug='" . Security::sanitizeSqlInput(link_decode($category_arr[3])) . "'"); if ($__data_check_category_exists == 0) { $err = 1; } //Set geo_nice (discontinued) $geo_nice = link_decode($city) . ", " . link_decode($state_full); } else { //Check Location Exists $__data_check_location_exists = querytorowarray("select * from zip_world where country = '" . country_settings_property("country_id") . "' and geo = '" . Security::sanitizeSqlInput($otherlocation) . "'"); if (!array_is_valid($__data_check_location_exists)) { $err = 1; } else { $__tvar['current_other_location'] = (!empty($otherlocation)) ? $otherlocation : ""; $__tvar['current_other_location_id'] = (!empty($otherlocation_id)) ? $otherlocation_id : ""; } //Check Category Exists $__data_check_category_exists = querynumrows("select * from `$x_table` where subcat_slug='" . Security::sanitizeSqlInput(link_decode($category_arr[3])) . "'"); if ($__data_check_category_exists == 0) { $err = 1; } //Get Lat/Long $latitude = $__data_check_location_exists['latitude']; $longitude = $__data_check_location_exists['longitude']; $percent = ""; $alias = ""; $zipcodes = ""; $geo_nice = link_decode($otherlocation); $state_full = country_settings_property("country_name"); } $page_type = GeneralEnum::PAGE_TYPE_G; $page_type_id = GeneralEnum::PAGE_ID_TYPE_G; // Get Category array # for $our_array as $t $b = 0; $found = 0; $foundCategoryRow = FALSE; if (array_is_valid($our_array)) { foreach ($our_array as $icat) { if (strtolower($our_array[$b]['subcat_slug']) == strtolower($ycat_slug)) { $found = 1; $t = $b; $foundCategoryRow = $icat; } $b++; } } if ($page_type == GeneralEnum::PAGE_TYPE_G && $found == "0") { $err = 1; $page_type = GeneralEnum::PAGE_TYPE_404; } else if (isset($category_arr['4']) && !empty($category_arr['4'])) { /** * /vinyl-flooring/ak/anchorage/fixvinyl-floor-scratches/aaa is not allowed */ $err = 1; $page_type = GeneralEnum::PAGE_TYPE_404; } $cat_name = ucwords($our_array[$t]['subcat_name']); $keyword_verb = set_value_of_extended($our_array[$t]['keyword_verb'], $keyword_verb); if (array_is_valid($foundCategoryRow)) { foreach (["city_title" => "title", "city_meta" => "meta", "x_h1_city" => "x_h1_city", "x_article_city" => "x_article", "x_h2" => "x_h2", "x_h2_article" => "x_h2_article"] as $k12 => $v12) { if (!empty(trim($foundCategoryRow[$k12]))) { ${"" . $v12} = $foundCategoryRow[$k12]; } } if (\App\Support\ConfigRuntime::isCategoryPhoneEnabled()) { if (!empty($foundCategoryRow['dn_api_phone'])) { C_Domain_Instance::setKey("dn_api_phone", $foundCategoryRow['dn_api_phone']); } if (!empty($foundCategoryRow['dn_api_phone_pool'])) { C_Domain_Instance::setKey("dn_api_phone_pool", $foundCategoryRow['dn_api_phone_pool']); } } if (!empty($__matchedApiId = \App\Helpers\AppHelper::getApiIdFromPool([$foundCategoryRow['surl_a_api_id_default'], $foundCategoryRow['surl_a_api_id_phone']]))) { $__tvar['surl_a_api_id'] = $__matchedApiId; $__tvar['surl_a_api_id_content'] = \App\Support\LeadContent::contentApiId_encrypt($__tvar['surl_a_api_id']); } $source_local_token = \App\SourceLocal\SourceLocalHelper::generateTokenString(["type" => \App\SourceLocal\SourceLocalEnum::TYPE_CATEGORY, "related_id" => $foundCategoryRow['id'], "related_uuid" => "", "related_subtype" => GeneralEnum::PAGE_TYPE_G, "related_data" => ["x_table" => $x_table]]); $__tvar['sltkn'] = $source_local_token; } // Set Session Variables for tricky location selection skipping. $_SESSION["city"] = $city; $_SESSION["state"] = $state; $_SESSION["cat"] = $our_array[$t]['subcat_slug']; $_SESSION["last_slug"] = $our_array[$t]['slug']; // Canonical Link $header_canonical = "" . "\n"; // End page_type g } // Handle Non Index pages plus 404 errors if (is_no_index(["category_arr" => $category_arr])) { $page_type = url_mapping_get_page_type($category_arr[0]); $head_addon .= "" . "\n"; } if ($domain_arr['custom_page_home_enabled'] == "1" && is_numeric($domain_arr['custom_page_home_id']) && empty($custom_page_slug)) { $__forceCustomPageID = $domain_arr['custom_page_home_id']; if ($domain_arr['custom_page_home_id'] == "0") { $custom_page_slug = $__forceCustomPageID = "index"; } } if ($__isViewCustomized) { $__forceCustomPageID = \App\ViewCustomizer\CustomPage::get(); //dump($__forceCustomPageID); } $__skipCustomPage = FALSE; if ($category_arr[0] == url_mapping_get(GeneralEnum::URL_MAPPING_TYPE_LEAD_FORM_ONLY)) { $page_type = GeneralEnum::PAGE_TYPE_LEAD_FORM_ONLY; $__skipCustomPage = TRUE; } if ($category_arr[0] == url_mapping_get(GeneralEnum::URL_MAPPING_TYPE_PIX2QUOTE)) { $template_file_override = "template.blank.php"; \App\Support\Pix2Quote_Instance::makeByCurrentRequest(); $page_type = GeneralEnum::PAGE_TYPE_PIX2QUOTE; $__skipCustomPage = TRUE; } if ($category_arr[0] == "opt" || $page_type == GeneralEnum::PAGE_TYPE_ADDITIONAL) { $__skipCustomPage = TRUE; } if (isPQProCompanyShowcaseEnabled(["page_type" => $page_type])) { $optionsActionCompanyShowcase = []; if (!empty($state_abr)) { $optionsActionCompanyShowcase['state_abr'] = $state_abr; } if (!empty($city)) { $optionsActionCompanyShowcase['city'] = $city; } //dump($optionsActionCompanyShowcase); $section_pqpro_company_showcase_data = \App\Other\PQPROCompany::cached_getDataForCompanyShowcase($optionsActionCompanyShowcase); } if (\App\Other\CentralLinkPool::isEnabled()) { $section_central_link_pool_data = \App\Other\CentralLinkPool::cached_getDataForRender(); } if ((($err == "1" || $page_type == "") || !empty($__forceCustomPageID)) && $__skipCustomPage !== TRUE) { $precheckOtherPageType = FALSE; $custom_page_detail = CustomPages::get_detail($custom_page_slug); // We're overriding with $__forceCustomPageID when we are sure url requested is not custom page if (!array_is_valid($custom_page_detail)) { $custom_page_detail = CustomPages::get_detail_by_id($__forceCustomPageID); } if ($custom_page_detail) { if (!empty($category_arr[0])) { if ($domain_arr['custom_page_home_enabled'] == "1") { if (($domain_arr['custom_page_home_id'] == "0" && $custom_page_slug == "index") || ($domain_arr['custom_page_home_id'] == $custom_page_detail['id'])) { redirect("/"); } } } $keyword_verb = set_value_of_extended($custom_page_detail['aa_library_id'], $keyword_verb); $cat_name = ucwords($keyword_verb); $custom_page_detail = CustomPages::__format_detail_for_page($custom_page_detail); if (array_is_valid($custom_page_detail['content_variables'])) { \App\Support\ContentVariables::applyToGlobal($custom_page_detail['content_variables']); } $page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE; $meta = $custom_page_detail['meta_description']; $title = $custom_page_detail['meta_title']; if (!empty($custom_page_detail['image_src'])) { $image_src = $custom_page_detail['image_src']; } if (!empty($custom_page_detail['image_alt'])) { $image_alt = $custom_page_detail['image_alt']; } $h1_tag = $custom_page_detail['title']; $tagline = $custom_page_detail['title_tagline']; $text = $custom_page_detail['content']; if (!empty($custom_page_detail['title_sub'])) { $__extend_view_custom_data['section']['h1_subtitle'] = $custom_page_detail['title_sub']; } if (!empty($custom_page_detail['breadcrumb_data'])) { $__extend_view_custom_data['section']['breadcrumb_data'] = $custom_page_detail['breadcrumb_data']; } if (!empty($custom_page_detail['dn_api_phone'])) { C_Domain_Instance::setKey("dn_api_phone", $custom_page_detail['dn_api_phone']); } if (!empty($custom_page_detail['dn_api_phone_pool'])) { C_Domain_Instance::setKey("dn_api_phone_pool", $custom_page_detail['dn_api_phone_pool']); } $__skip_section = array_merge_certainly($__skip_section, array("locationfinder", "states", "cities", "counties", "locationother", "locationseodata", "categories")); $__tvar['current_page_title'] = $custom_page_detail['title']; $__tvar['current_page_slug'] = $custom_page_detail['_slug_plain']; $__tvar['current_page_rowid'] = $custom_page_detail['id']; if (!empty($__matchedApiId = \App\Helpers\AppHelper::getApiIdFromPool([$custom_page_detail['surl_a_api_id_default'], $custom_page_detail['surl_a_api_id_phone']]))) { $__tvar['surl_a_api_id'] = $__matchedApiId; $__tvar['surl_a_api_id_content'] = \App\Support\LeadContent::contentApiId_encrypt($__tvar['surl_a_api_id']); } $source_local_token = \App\SourceLocal\SourceLocalHelper::generateTokenString(["type" => \App\SourceLocal\SourceLocalEnum::TYPE_CUSTOM_PAGE, "related_id" => $custom_page_detail['id'], "related_uuid" => "", "related_subtype" => $custom_page_detail['type']]); $__tvar['sltkn'] = $source_local_token; $optionsActionCustomPages = ["exclude_id" => $custom_page_detail['id'], "list_homepage_type" => "other_pages"]; $section_custompages_links = CustomPages::get_list_on_homepage($optionsActionCustomPages); $precheckOtherPageType = TRUE; $__custom_page_type = $custom_page_detail['type']; if (!empty($__custom_page_type)) { $__custom_page_type_data = json_decode($custom_page_detail['type_data'], TRUE); } switch ($__custom_page_type) { case CustomPages::CUSTOM_PAGE_TYPE_AMAZON_PRODUCT_LISTING: $page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE_TYPE; $page_type_include_file = "custom-page-type/amazon_product_listing.php"; $amazon_product_listing_data = \App\Other\SAmazon::getListingDetail($__custom_page_type_data['s_amazon_id']); $__extend_view_custom_data['section']['amazon_product_listing_data'] = $amazon_product_listing_data; break; case CustomPages::CUSTOM_PAGE_TYPE_TEST_01: $page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE; $page_type_include_file = "custom-page-type/test_01.php"; break; case CustomPages::CUSTOM_PAGE_TYPE_EXTRA: /* switch ($__custom_page_type_data['rid']) { } */ break; case CustomPages::CUSTOM_PAGE_TYPE_SERVICES: $page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE_TYPE; $page_type_include_file = "custom-page-type/services.php"; $section_custompages_links = CustomPages::get_list_on_services(); break; case CustomPages::CUSTOM_PAGE_TYPE_LOCATION: $page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE_TYPE; $page_type_include_file = "custom-page-type/location.php"; $page_data = []; $page_data['location_map_url'] = \App\Other\PhotoDataLibrary::generateRenderUrl(["type" => \App\Other\PhotoDataLibrary::TYPE_LOCATION_MAP_LOCATION]); break; case CustomPages::CUSTOM_PAGE_TYPE_AREYOUCONTRACTOR: $page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE_TYPE; $page_type_include_file = "custom-page-type/areyoucontractor.php"; $section_custompages_links = CustomPages::get_list_on_services(); break; case CustomPages::CUSTOM_PAGE_TYPE_CONTENT_01: case CustomPages::CUSTOM_PAGE_TYPE_CONTENT_02: case CustomPages::CUSTOM_PAGE_TYPE_CONTENT_03: case CustomPages::CUSTOM_PAGE_TYPE_BLOG_POST: $mappingViewFile = [ CustomPages::CUSTOM_PAGE_TYPE_CONTENT_01 => "content_01.php", CustomPages::CUSTOM_PAGE_TYPE_CONTENT_02 => "content_02.php", CustomPages::CUSTOM_PAGE_TYPE_CONTENT_03 => "content_03.php", CustomPages::CUSTOM_PAGE_TYPE_BLOG_POST => "blog_post.php", ]; $mappingViewFileSelected = $mappingViewFile[$__custom_page_type]; $page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE_TYPE; if (!empty($mappingViewFileSelected)) { $page_type_include_file = "custom-page-type/" . $mappingViewFileSelected; $__extend_view_custom_data['section']['custom_page_type_data'] = $__custom_page_type_data; } break; } //$page_type_include_file = "custom-page-type/" . "blog_post.php"; //$page_type = GeneralEnum::PAGE_TYPE_CUSTOM_PAGE_TYPE; //$page_type_include_file = "custom-page-type/" . "content_03.php"; //dump($__custom_page_type); //exit(); if (!empty($category_arr[0])) { // We are only allowing noindex for non-homepage custom-pages if ($custom_page_detail['noindex'] === "1") { $head_addon .= "" . "\n"; } } $optionsActionData = [ 'id' => $custom_page_detail['id'], 'content_group_id' => $custom_page_detail['content_group_id'], 'surl_a_api_id_default' => $custom_page_detail['surl_a_api_id_default'], 'surl_a_api_id_phone' => $custom_page_detail['surl_a_api_id_phone'], 'limit' => 9, // Optional limit "type" => $custom_page_detail['type'], "_other" => [ "title" => $custom_page_detail['title'], "slug" => $custom_page_detail['slug'], "href_title" => $custom_page_detail['href_title'], ], ]; $section_custompages_other_links = \App\CustomPages\CustomPagesLinkTree::getRenderDataSimple($optionsActionData); $__tvar['page_slug'] = $custom_page_detail['slug']; /** * Check canonical domain */ // Removed on 2025-02-20 /* switch (current_domain_url()) { case \App\Support\DomainEnum::DOMAIN_HENSLEYBROTHERS_COM: // We are only enabling for old records. if ($custom_page_detail['id'] <= 169586) { $__canonical_url = "https://" . "hensleypro.com" . "/" . $custom_page_detail['slug']; $header_canonical = "" . "\n"; } break; } */ } if (!$precheckOtherPageType) { if ($indexNowApiKey = isIndexNowEnabled()) { if ($real_slug == $indexNowApiKey . ".txt") { $page_type = GeneralEnum::PAGE_TYPE_INDEXNOWVERIFICATIONFILE; header('Content-type: plain/text'); echo $indexNowApiKey; exit(); } } } } if ($err == "1" || $page_type == "") { // 404 header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found"); $page_type = GeneralEnum::PAGE_TYPE_404; } $__site_phone = site_phone_get(); $__site_phone_link = format_phone_to_link($__site_phone); \App\PhoneTracker\PhoneTracker::setData(["phone" => $__site_phone, "url" => current_url_extended(), "domain" => $domain]); $__variableSelected = []; $__variableSelected['cat_name'] = set_value_of_multi([$cat_name, $our_array[$t]['subcat_name']], ""); $__variableSelected['cat_name_lower'] = strtolower($__variableSelected['cat_name']); $__variableSelected['cat_title'] = set_value_of_multi([$cat_title, $our_array[$t]['subcat_title']], ""); $__variableSelected['keyword_verb'] = set_value_of_multi([$our_array[$t]['keyword_verb'], $keyword_verb], ""); $__variableSelected['geo'] = set_value_of_multi([$geo, $city], "your area"); $__variableSelected['city'] = set_value_of_multi([$city], "your area"); $__variableSelected['city_uc'] = set_value_of_multi([$city], "Your Area"); //dump($__variableSelected, $cat_name, $keyword_verb); // String Replacements // Get all the columns and make variables for them $x_h1_index = str_replace("{{main_keyword}}", ucwords($x_main_keyword), $x_h1_index); $x_h1_index = str_replace("{{main_keyword_lower}}", strtolower($x_main_keyword), $x_h1_index); $x_h1_index = str_replace("{{domain_keyword}}", $domain_keyword, $x_h1_index); $x_h1_index = str_replace("{{domain_nice}}", $domain_nice, $x_h1_index); $x_h1_index = str_replace("{{city}}", $__variableSelected['city_uc'], $x_h1_index); $x_h1_index = str_replace("{{city_only}}", ucwords($city_only), $x_h1_index); $x_h1_index = str_replace("{{state}}", $state_full, $x_h1_index); $x_h1_index = str_replace("{{a_pro}}", ucwords($x_pro), $x_h1_index); $x_h1_index = str_replace("{{pro_singular}}", ucwords($x_pro_singular), $x_h1_index); $x_h1_index = str_replace("{{pro_plural}}", ucwords($x_pro_plural), $x_h1_index); $x_h1_index = str_replace("{{cat_title}}", ucwords($__variableSelected['cat_title']), $x_h1_index); $x_h1_index = str_replace("{{cat_name}}", ucwords($__variableSelected['cat_name']), $x_h1_index); $x_h1_index = str_replace("{{cat_name_lower}}", $__variableSelected['cat_name_lower'], $x_h1_index); $x_h1_index = str_replace("{{keyword_verb}}", $__variableSelected['keyword_verb'], $x_h1_index); $x_h1_index = str_replace("{{state_full}}", ucwords($state_full), $x_h1_index); $x_h1_index = str_replace("{{combined}}", $__tvar['replace_combined'], $x_h1_index); $x_h1_index = str_replace("{{phone}}", $__site_phone, $x_h1_index); $x_h1_index = str_replace("{{phone_link}}", $__site_phone_link, $x_h1_index); $h1_tag = str_replace("{{domain_keyword}}", $domain_keyword, $h1_tag); $h1_tag = str_replace("{{domain_nice}}", $domain_nice, $h1_tag); $h1_tag = str_replace("{{city}}", $__variableSelected['city_uc'], $h1_tag); $h1_tag = str_replace("{{city_only}}", ucwords($city_only), $h1_tag); $h1_tag = str_replace("{{state}}", $state_full, $h1_tag); $h1_tag = str_replace("{{cat_title}}", ucwords($__variableSelected['cat_title']), $h1_tag); $h1_tag = str_replace("{{cat_name}}", ucwords($__variableSelected['cat_name']), $h1_tag); $h1_tag = str_replace("{{cat_name_lower}}", $__variableSelected['cat_name_lower'], $h1_tag); $h1_tag = str_replace("{{keyword_verb}}", $__variableSelected['keyword_verb'], $h1_tag); $h1_tag = str_replace("{{state_full}}", ucwords($state_full), $h1_tag); $h1_tag = str_replace("{{combined}}", $__tvar['replace_combined'], $h1_tag); $h1_tag = str_replace("{{phone}}", $__site_phone, $h1_tag); $h1_tag = str_replace("{{phone_link}}", $__site_phone_link, $h1_tag); $title = str_replace("{{main_keyword}}", ucwords($x_main_keyword), $title); $title = str_replace("{{main_keyword_lower}}", strtolower($x_main_keyword), $title); $title = str_replace("{{domain_keyword}}", ucwords($domain_keyword), $title); $title = str_replace("{{domain_nice}}", $domain_nice, $title); $title = str_replace("{{city}}", $__variableSelected['city_uc'], $title); $title = str_replace("{{city_only}}", ucwords($city_only), $title); $title = str_replace("{{state}}", ucwords($state_full), $title); $title = str_replace("{{a_pro}}", ucwords($x_pro), $title); $title = str_replace("{{pro_singular}}", ucwords($x_pro_singular), $title); $title = str_replace("{{pro_plural}}", ucwords($x_pro_plural), $title); $title = str_replace("{{cat_title}}", ucwords($__variableSelected['cat_title']), $title); $title = str_replace("{{cat_name}}", ucwords($__variableSelected['cat_name']), $title); $title = str_replace("{{cat_name_lower}}", $__variableSelected['cat_name'], $title); $title = str_replace("{{keyword_verb}}", $__variableSelected['keyword_verb'], $title); $title = str_replace("{{geo_nice}}", $geo_nice, $title); $title = str_replace("{{combined}}", $__tvar['r