Code Duplication    Length = 8-8 lines in 2 locations

geodirectory-functions/helper_functions.php 2 locations

@@ 151-158 (lines=8) @@
148
        add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
149
    }
150
151
    if($gd_page_id){
152
        $post = get_post($gd_page_id);
153
        $slug = $post->post_name;
154
        //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors
155
        $login_url = trailingslashit($home_url)."$slug/";
156
    }else{
157
        $login_url = trailingslashit($home_url)."?geodir_signup=true";
158
    }
159
160
    if($args){
161
        $login_url = add_query_arg($args,$login_url );
@@ 200-207 (lines=8) @@
197
        add_filter('home_url', 'geodir_location_geo_home_link', 100000, 2);
198
    }
199
200
    if($gd_page_id){
201
        $post = get_post($gd_page_id);
202
        $slug = $post->post_name;
203
        //$login_url = get_permalink($gd_page_id );// get_permalink can only be user after theme-Setup hook, any earlier and it errors
204
        $info_url = trailingslashit($home_url)."$slug/";
205
    }else{
206
        $info_url = trailingslashit($home_url);
207
    }
208
209
    if($args){
210
        $info_url = add_query_arg($args,$info_url );