Code Duplication    Length = 4-6 lines in 3 locations

includes/class-api.php 1 location

@@ 362-367 (lines=6) @@
359
	 */
360
	public static function entry_link_html( $entry = array(), $anchor_text = '', $passed_tag_atts = array(), $field_settings = array() ) {
361
362
		if ( empty( $entry ) || ! is_array( $entry ) || ! isset( $entry['id'] ) ) {
363
364
			do_action( 'gravityview_log_debug', 'GravityView_API[entry_link_tag] Entry not defined; returning null', $entry );
365
366
			return NULL;
367
		}
368
369
		$href = self::entry_link( $entry );
370

includes/class-common.php 2 locations

@@ 769-772 (lines=4) @@
766
			}
767
		}
768
769
		if ( empty( $criteria['search_criteria'] ) || ! is_array( $criteria['search_criteria'] ) ) {
770
			do_action( 'gravityview_log_debug', '[apply_filters_to_entry] Entry approved! No search criteria found:', $criteria );
771
			return $entry;
772
		}
773
774
		$search_criteria = $criteria['search_criteria'];
775
		unset( $criteria );
@@ 787-790 (lines=4) @@
784
		// @todo: Does it make sense to apply the Date create filters to the single entry?
785
786
		// field_filters
787
		if ( empty( $search_criteria['field_filters'] ) || ! is_array( $search_criteria['field_filters'] ) ) {
788
			do_action( 'gravityview_log_debug', '[apply_filters_to_entry] Entry approved! No field filters criteria found:', $search_criteria );
789
			return $entry;
790
		}
791
792
		$filters = $search_criteria['field_filters'];
793
		unset( $search_criteria );