Code Duplication    Length = 4-6 lines in 3 locations

includes/class-api.php 1 location

@@ 374-379 (lines=6) @@
371
	 */
372
	public static function entry_link_html( $entry = array(), $anchor_text = '', $passed_tag_atts = array(), $field_settings = array() ) {
373
374
		if ( empty( $entry ) || ! is_array( $entry ) || ! isset( $entry['id'] ) ) {
375
376
			do_action( 'gravityview_log_debug', 'GravityView_API[entry_link_tag] Entry not defined; returning null', $entry );
377
378
			return NULL;
379
		}
380
381
		$href = self::entry_link( $entry );
382

includes/class-common.php 2 locations

@@ 746-749 (lines=4) @@
743
			}
744
		}
745
746
		if ( empty( $criteria['search_criteria'] ) || ! is_array( $criteria['search_criteria'] ) ) {
747
			do_action( 'gravityview_log_debug', '[apply_filters_to_entry] Entry approved! No search criteria found:', $criteria );
748
			return $entry;
749
		}
750
751
		$search_criteria = $criteria['search_criteria'];
752
		unset( $criteria );
@@ 764-767 (lines=4) @@
761
		// @todo: Does it make sense to apply the Date create filters to the single entry?
762
763
		// field_filters
764
		if ( empty( $search_criteria['field_filters'] ) || ! is_array( $search_criteria['field_filters'] ) ) {
765
			do_action( 'gravityview_log_debug', '[apply_filters_to_entry] Entry approved! No field filters criteria found:', $search_criteria );
766
			return $entry;
767
		}
768
769
		$filters = $search_criteria['field_filters'];
770
		unset( $search_criteria );