Code Duplication    Length = 8-8 lines in 3 locations

geodirectory-widgets/geodirectory_bestof_widget.php 1 location

@@ 434-441 (lines=8) @@
431
                        name="<?php echo $this->get_field_name('post_type'); ?>"
432
                        onchange="geodir_change_category_list(this)">
433
434
                    <?php foreach ($postypes as $postypes_obj) { ?>
435
436
                        <option <?php if ($post_type == $postypes_obj) {
437
                            echo 'selected="selected"';
438
                        } ?> value="<?php echo $postypes_obj; ?>"><?php $extvalue = explode('_', $postypes_obj);
439
                            echo geodir_utf8_ucfirst($extvalue[1]); ?></option>
440
441
                    <?php } ?>
442
443
                </select>
444
            </label>

geodirectory-widgets/geodirectory_listing_slider_widget.php 1 location

@@ 174-181 (lines=8) @@
171
                        name="<?php echo $this->get_field_name('post_type'); ?>"
172
                        onchange="geodir_change_category_list(this.value)">
173
174
                    <?php foreach ($postypes as $postypes_obj) { ?>
175
176
                        <option <?php if ($post_type == $postypes_obj) {
177
                            echo 'selected="selected"';
178
                        } ?> value="<?php echo $postypes_obj; ?>"><?php $extvalue = explode('_', $postypes_obj);
179
                            echo geodir_utf8_ucfirst($extvalue[1]); ?></option>
180
181
                    <?php } ?>
182
183
                </select>
184
            </label>

geodirectory-widgets/geodirectory_popular_widget.php 1 location

@@ 300-307 (lines=8) @@
297
                        name="<?php echo $this->get_field_name('post_type'); ?>"
298
                        onchange="geodir_change_category_list(this)">
299
300
                    <?php foreach ($postypes as $postypes_obj) { ?>
301
302
                        <option <?php if ($post_type == $postypes_obj) {
303
                            echo 'selected="selected"';
304
                        } ?> value="<?php echo $postypes_obj; ?>"><?php $extvalue = explode('_', $postypes_obj);
305
                            echo geodir_utf8_ucfirst($extvalue[1]); ?></option>
306
307
                    <?php } ?>
308
309
                </select>
310
            </label>