Code Duplication    Length = 9-10 lines in 2 locations

modules/events_archive_filters/EED_Events_Archive_Filters.module.php 1 location

@@ 276-285 (lines=10) @@
273
	 *  @param	mixed boolean|string	$join_terms pass TRUE or term string, doesn't really matter since this value doesn't really get used for anything yet
274
	 *  @return 	string
275
	 */
276
	public static function posts_join_sql_for_terms( $join_terms = NULL ) {
277
		$SQL= '';
278
		if ( ! empty( $join_terms )) {
279
			global $wpdb;
280
			$SQL .= " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id)";
281
			$SQL .= " LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)";
282
			$SQL .= " LEFT JOIN $wpdb->terms ON ($wpdb->terms.term_id = $wpdb->term_taxonomy.term_id) ";
283
		}
284
		return  $SQL;
285
	}
286
287
288
	/**

core/helpers/EEH_Event_Query.helper.php 1 location

@@ 344-352 (lines=9) @@
341
	 * @param 	string $join_terms pass TRUE or term string, doesn't really matter since this value doesn't really get used for anything yet
342
	 * @return 	string
343
	 */
344
	public static function posts_join_sql_for_terms( $SQL = '', $join_terms = '' ) {
345
		if ( ! empty( $join_terms ) ) {
346
			global $wpdb;
347
			$SQL .= " LEFT JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id)";
348
			$SQL .= " LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)";
349
			$SQL .= " LEFT JOIN $wpdb->terms ON ($wpdb->terms.term_id = $wpdb->term_taxonomy.term_id) ";
350
		}
351
		return $SQL;
352
	}
353
354
355