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

@@ 1294-1304 (lines=11) @@
1291
			$location_manager     = defined( 'POST_LOCATION_TABLE' ) ? true : false;
1292
			$neighbourhood_active = $location_manager && get_option( 'location_neighbourhoods' ) ? true : false;
1293
1294
			if ( geodir_is_page( 'detail' ) && isset( $post->country_slug ) ) {
1295
				$location_terms = array(
1296
					'gd_country' => $post->country_slug,
1297
					'gd_region'  => $post->region_slug,
1298
					'gd_city'    => $post->city_slug
1299
				);
1300
1301
				if ( $neighbourhood_active && ! empty( $location_terms['gd_city'] ) && $gd_ses_neighbourhood = $gd_session->get( 'gd_neighbourhood' ) ) {
1302
					$location_terms['gd_neighbourhood'] = $gd_ses_neighbourhood;
1303
				}
1304
			}
1305
1306
			$geodir_show_location_url = get_option( 'geodir_show_location_url' );
1307