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

@@ 475-501 (lines=27) @@
472
	/**
473
	 * Formats the row for output on the screen.
474
	 */	
475
	public function format_row($row = false){
476
		if(false !== $row){
477
478
			$status = 'import';
479
			if(0 !== $row['post_id']){
480
				$status = '<a href="'.admin_url('/post.php?post='.$row['post_id'].'&action=edit').'" target="_blank">'.get_post_status($row['post_id']).'</a>';
481
			}
482
483
			$row_html = '
484
			<tr class="post-'.$row['post_id'].' type-tour" id="post-'.$row['post_id'].'">
485
				<th class="check-column" scope="row">
486
					<label for="cb-select-'.$row['identifier'].'" class="screen-reader-text">'.$row['name'].'</label>
487
					<input type="checkbox" data-identifier="'.$row['identifier'].'" value="'.$row['post_id'].'" name="post[]" id="cb-select-'.$row['identifier'].'">
488
				</th>
489
				<td class="post-title page-title column-title">
490
					<strong>'.$row['name'].'</strong> - '.$status.'
491
				</td>
492
				<td class="date column-date">
493
					<abbr title="'.date('Y/m/d',strtotime($row['last_modified'])).'">'.date('Y/m/d',strtotime($row['last_modified'])).'</abbr><br>Last Modified
494
				</td>
495
				<td class="ssid column-ssid">
496
					'.$row['identifier'].'
497
				</td>
498
			</tr>';		
499
			return $row_html;
500
		}
501
	}
502
503
	/**
504
	 * Connect to wetu