Code Duplication    Length = 27-27 lines in 2 locations

classes/class-accommodation.php 1 location

@@ 360-386 (lines=27) @@
357
	/**
358
	 * Formats the row for output on the screen.
359
	 */	
360
	public function format_row($row = false){
361
		if(false !== $row){
362
363
			$status = 'import';
364
			if(0 !== $row['post_id']){
365
				$status = '<a href="'.admin_url('/post.php?post='.$row['post_id'].'&action=edit').'" target="_blank">'.get_post_status($row['post_id']).'</a>';
366
			}
367
368
			$row_html = '
369
			<tr class="post-'.$row['post_id'].' type-tour" id="post-'.$row['post_id'].'">
370
				<th class="check-column" scope="row">
371
					<label for="cb-select-'.$row['id'].'" class="screen-reader-text">'.$row['name'].'</label>
372
					<input type="checkbox" data-identifier="'.$row['id'].'" value="'.$row['post_id'].'" name="post[]" id="cb-select-'.$row['id'].'">
373
				</th>
374
				<td class="post-title page-title column-title">
375
					<strong>'.$row['name'].'</strong> - '.$status.'
376
				</td>
377
				<td class="date column-date">
378
					<abbr title="'.date('Y/m/d',strtotime($row['last_modified'])).'">'.date('Y/m/d',strtotime($row['last_modified'])).'</abbr><br>Last Modified
379
				</td>
380
				<td class="ssid column-ssid">
381
					'.$row['id'].'
382
				</td>
383
			</tr>';		
384
			return $row_html;
385
		}
386
	}
387
388
	/**
389
	 * Connect to wetu

classes/class-tours.php 1 location

@@ 430-456 (lines=27) @@
427
	/**
428
	 * Formats the row for output on the screen.
429
	 */	
430
	public function format_row($row = false){
431
		if(false !== $row){
432
433
			$status = 'import';
434
			if(0 !== $row['post_id']){
435
				$status = '<a href="'.admin_url('/post.php?post='.$row['post_id'].'&action=edit').'" target="_blank">'.get_post_status($row['post_id']).'</a>';
436
			}
437
438
			$row_html = '
439
			<tr class="post-'.$row['post_id'].' type-tour" id="post-'.$row['post_id'].'">
440
				<th class="check-column" scope="row">
441
					<label for="cb-select-'.$row['identifier'].'" class="screen-reader-text">'.$row['name'].'</label>
442
					<input type="checkbox" data-identifier="'.$row['identifier'].'" value="'.$row['post_id'].'" name="post[]" id="cb-select-'.$row['identifier'].'">
443
				</th>
444
				<td class="post-title page-title column-title">
445
					<strong>'.$row['name'].'</strong> - '.$status.'
446
				</td>
447
				<td class="date column-date">
448
					<abbr title="'.date('Y/m/d',strtotime($row['last_modified'])).'">'.date('Y/m/d',strtotime($row['last_modified'])).'</abbr><br>Last Modified
449
				</td>
450
				<td class="ssid column-ssid">
451
					'.$row['identifier'].'
452
				</td>
453
			</tr>';		
454
			return $row_html;
455
		}
456
	}
457
458
	/**
459
	 * Connect to wetu