Code Duplication    Length = 27-27 lines in 2 locations

classes/class-wetu-importer-accommodation.php 1 location

@@ 378-404 (lines=27) @@
375
	/**
376
	 * Formats the row for output on the screen.
377
	 */
378
	public function format_row( $row = false ) {
379
		if ( false !== $row ) {
380
381
			$status = 'import';
382
			if ( 0 !== $row['post_id'] ) {
383
				$status = '<a href="' . admin_url( '/post.php?post=' . $row['post_id'] . '&action=edit' ) . '" target="_blank">' . get_post_status( $row['post_id'] ) . '</a>';
384
			}
385
386
			$row_html = '
387
			<tr class="post-' . $row['post_id'] . ' type-tour" id="post-' . $row['post_id'] . '">
388
				<th class="check-column" scope="row">
389
					<label for="cb-select-' . $row['id'] . '" class="screen-reader-text">' . $row['name'] . '</label>
390
					<input type="checkbox" data-identifier="' . $row['id'] . '" value="' . $row['post_id'] . '" name="post[]" id="cb-select-' . $row['id'] . '">
391
				</th>
392
				<td class="post-title page-title column-title">
393
					<strong>' . $row['name'] . '</strong> - ' . $status . '
394
				</td>
395
				<td class="date column-date">
396
					<abbr title="' . date( 'Y/m/d',strtotime( $row['last_modified'] ) ) . '">' . date( 'Y/m/d',strtotime( $row['last_modified'] ) ) . '</abbr><br>Last Modified
397
				</td>
398
				<td class="ssid column-ssid">
399
					' . $row['id'] . '
400
				</td>
401
			</tr>';
402
			return $row_html;
403
		}
404
	}
405
406
	/**
407
	 * Saves the queue to the option.

classes/class-wetu-importer-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
			$status = 'import';
480
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