Code Duplication    Length = 8-8 lines in 2 locations

geodirectory-functions/helper_functions.php 2 locations

@@ 157-164 (lines=8) @@
154
        add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
155
    }
156
157
    if($gd_page_id){
158
        $post = get_post($gd_page_id);
159
        $slug = $post->post_name;
160
        //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors
161
        $login_url = trailingslashit($home_url)."$slug/";
162
    }else{
163
        $login_url = trailingslashit($home_url)."?geodir_signup=true";
164
    }
165
166
    if($args){
167
        $login_url = add_query_arg($args,$login_url );
@@ 213-220 (lines=8) @@
210
        add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
211
    }
212
213
    if($gd_page_id){
214
        $post = get_post($gd_page_id);
215
        $slug = $post->post_name;
216
        //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors
217
        $info_url = trailingslashit($home_url)."$slug/";
218
    }else{
219
        $info_url = trailingslashit($home_url);
220
    }
221
222
    if($args){
223
        $info_url = add_query_arg($args,$info_url );