Code Duplication    Length = 27-27 lines in 2 locations

classes/class-tours.php 1 location

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

classes/class-accommodation.php 1 location

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