Code Duplication    Length = 8-8 lines in 2 locations

geodirectory-functions/custom_functions.php 2 locations

@@ 647-654 (lines=8) @@
644
				$sort->htmlvar_name = 'rating_count';
645
			}
646
647
			if ( $sort->sort_asc ) {
648
				$key   = $sort->htmlvar_name . '_asc';
649
				$label = $sort->site_title;
650
				if ( $sort->asc_title ) {
651
					$label = $sort->asc_title;
652
				}
653
				( $sort_by == $key || ( $sort->is_default == '1' && $sort->default_order == $key && ! isset( $_REQUEST['sort_by'] ) ) ) ? $selected = 'selected="selected"' : $selected = '';
654
				$sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg( 'sort_by', $key ) ) . '">' . __( $label, 'geodirectory' ) . '</option>';
655
			}
656
657
			if ( $sort->sort_desc ) {
@@ 657-664 (lines=8) @@
654
				$sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg( 'sort_by', $key ) ) . '">' . __( $label, 'geodirectory' ) . '</option>';
655
			}
656
657
			if ( $sort->sort_desc ) {
658
				$key   = $sort->htmlvar_name . '_desc';
659
				$label = $sort->site_title;
660
				if ( $sort->desc_title ) {
661
					$label = $sort->desc_title;
662
				}
663
				( $sort_by == $key || ( $sort->is_default == '1' && $sort->default_order == $key && ! isset( $_REQUEST['sort_by'] ) ) ) ? $selected = 'selected="selected"' : $selected = '';
664
				$sort_field_options .= '<option ' . $selected . ' value="' . esc_url( add_query_arg( 'sort_by', $key ) ) . '">' . __( $label, 'geodirectory' ) . '</option>';
665
			}
666
667
		}