Changeset 3086288
- Timestamp:
- 05/14/2024 07:21:43 AM (23 months ago)
- Location:
- belingogeo/trunk/includes
- Files:
-
- 2 edited
-
core-functions.php (modified) (1 diff)
-
sitemaps.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
belingogeo/trunk/includes/core-functions.php
r3077769 r3086288 371 371 $city = belingogeo_get_city_by('slug', $current_city); 372 372 } 373 374 if(!$city) { 375 return true; 376 } 373 377 374 378 if($city && $city->get_slug() == 'default-city') { -
belingogeo/trunk/includes/sitemaps.php
r3003610 r3086288 123 123 } 124 124 125 $page = 1; 126 while($post_pages >= $page) { 127 $url = [ 128 "loc" => get_site_url() . '/'.$city->get_slug().'_post.sitemap'.$page.'.xml', 129 "lastmod" => date('c',time()) 130 ]; 131 $xml .= belingoGeo_get_xml_sitemap($url); 132 $page++; 125 $belingo_geo_exclude_all_posts = get_option('belingo_geo_exclude_all_posts'); 126 if(!$belingo_geo_exclude_all_posts) { 127 $page = 1; 128 while($post_pages >= $page) { 129 $url = [ 130 "loc" => get_site_url() . '/'.$city->get_slug().'_post.sitemap'.$page.'.xml', 131 "lastmod" => date('c',time()) 132 ]; 133 $xml .= belingoGeo_get_xml_sitemap($url); 134 $page++; 135 } 133 136 } 134 137 $page = 1; … … 160 163 $exclude_taxonomies = get_option('belingo_geo_exclude_taxonomies'); 161 164 foreach($taxonomies as $taxonomy) { 162 if($taxonomy->public == 1 && $taxonomy->show_ui == 1 && !array_key_exists($taxonomy->name, $exclude_taxonomies)) {165 if($taxonomy->public == 1 && $taxonomy->show_ui == 1 && !array_key_exists($taxonomy->name, (array)$exclude_taxonomies)) { 163 166 $url = [ 164 167 "loc" => get_site_url() . '/'.$city->get_slug().'_sitemap_tax_'.$taxonomy->name.'.xml', … … 178 181 179 182 $urls = []; 183 184 $belingo_geo_exclude_all_posts = get_option('belingo_geo_exclude_all_posts'); 185 if($belingo_geo_exclude_all_posts) { 186 return $urls; 187 } 180 188 181 189 // записи
Note: See TracChangeset
for help on using the changeset viewer.