Code Duplication    Length = 4-5 lines in 2 locations

geodirectory-functions/map-functions/map_functions.php 1 location

@@ 168-171 (lines=4) @@
165
    $exclude_categories_new = get_option('geodir_exclude_cat_on_map_upgrade');
166
167
    // check if exclude categories saved before fix of categories identical names
168
    if ($exclude_categories_new) {
169
        $gd_cat_taxonomy = isset($cat_taxonomy[0]) ? $cat_taxonomy[0] : '';
170
        $exclude_categories = !empty($exclude_categories[$gd_cat_taxonomy]) && is_array($exclude_categories[$gd_cat_taxonomy]) ? array_unique($exclude_categories[$gd_cat_taxonomy]) : array();
171
    }
172
173
    $exclude_cat_str = implode(',', $exclude_categories);
174

geodirectory-admin/admin_functions.php 1 location

@@ 1612-1616 (lines=5) @@
1609
                            foreach ($post_types as $key => $post_types_obj) :
1610
                                $checked = is_array($gd_post_types) && in_array($key, $gd_post_types) ? 'checked="checked"' : '';
1611
                                $gd_taxonomy = geodir_get_taxonomies($key);
1612
                                if ($gd_cats_upgrade) {
1613
                                    $gd_cat_taxonomy = isset($gd_taxonomy[0]) ? $gd_taxonomy[0] : '';
1614
                                    $gd_cats = isset($gd_categs[$gd_cat_taxonomy]) ? $gd_categs[$gd_cat_taxonomy] : array();
1615
                                    $gd_cats = !empty($gd_cats) && is_array($gd_cats) ? array_unique($gd_cats) : array();
1616
                                }
1617
                                $post_cat = implode(',', $gd_cats);
1618
                                $gd_taxonomy_list = geodir_custom_taxonomy_walker($gd_taxonomy);
1619
                                ?>