Code Duplication    Length = 8-8 lines in 2 locations

geodirectory-functions/custom_functions.php 2 locations

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