Code Duplication    Length = 11-13 lines in 2 locations

geodirectory-functions/taxonomy_functions.php 1 location

@@ 1722-1734 (lines=13) @@
1719
            
1720
            $neighbourhood_active = $location_manager && get_option('location_neighbourhoods') ? true : false;
1721
            
1722
            if (geodir_is_page('detail') && isset($post->country_slug)) {
1723
                $location_terms = array(
1724
                    'gd_country' => $post->country_slug,
1725
                    'gd_region' => $post->region_slug,
1726
                    'gd_city' => $post->city_slug
1727
                );
1728
                
1729
                if ($neighbourhood_active && !empty($location_terms['gd_city']) && $gd_ses_neighbourhood = $gd_session->get('gd_neighbourhood')) {
1730
                    $location_terms['gd_neighbourhood'] = $gd_ses_neighbourhood;
1731
                }
1732
            } else {
1733
                $location_terms = geodir_get_current_location_terms('query_vars');
1734
            }
1735
1736
            $geodir_show_location_url = get_option('geodir_show_location_url');
1737
            $location_terms = geodir_remove_location_terms($location_terms);

geodirectory-functions/general_functions.php 1 location

@@ 1286-1296 (lines=11) @@
1283
			$location_manager     = defined( 'POST_LOCATION_TABLE' ) ? true : false;
1284
			$neighbourhood_active = $location_manager && get_option( 'location_neighbourhoods' ) ? true : false;
1285
1286
			if ( geodir_is_page( 'detail' ) && isset( $post->country_slug ) ) {
1287
				$location_terms = array(
1288
					'gd_country' => $post->country_slug,
1289
					'gd_region'  => $post->region_slug,
1290
					'gd_city'    => $post->city_slug
1291
				);
1292
1293
				if ( $neighbourhood_active && ! empty( $location_terms['gd_city'] ) && $gd_ses_neighbourhood = $gd_session->get( 'gd_neighbourhood' ) ) {
1294
					$location_terms['gd_neighbourhood'] = $gd_ses_neighbourhood;
1295
				}
1296
			}
1297
1298
			$geodir_show_location_url = get_option( 'geodir_show_location_url' );
1299