Code Duplication    Length = 27-27 lines in 3 locations

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

@@ 389-415 (lines=27) @@
386
	/**
387
	 * Formats the row for output on the screen.
388
	 */
389
	public function format_row( $row = false ) {
390
		if ( false !== $row ) {
391
392
			$status = 'import';
393
			if ( 0 !== $row['post_id'] ) {
394
				$status = '<a href="' . admin_url( '/post.php?post=' . $row['post_id'] . '&action=edit' ) . '" target="_blank">' . get_post_status( $row['post_id'] ) . '</a>';
395
			}
396
397
			$row_html = '
398
			<tr class="post-' . $row['post_id'] . ' type-tour" id="post-' . $row['post_id'] . '">
399
				<th class="check-column" scope="row">
400
					<label for="cb-select-' . $row['id'] . '" class="screen-reader-text">' . $row['name'] . '</label>
401
					<input type="checkbox" data-identifier="' . $row['id'] . '" value="' . $row['post_id'] . '" name="post[]" id="cb-select-' . $row['id'] . '">
402
				</th>
403
				<td class="post-title page-title column-title">
404
					<strong>' . $row['name'] . '</strong> - ' . $status . '
405
				</td>
406
				<td class="date column-date">
407
					<abbr title="' . date( 'Y/m/d',strtotime( $row['last_modified'] ) ) . '">' . date( 'Y/m/d',strtotime( $row['last_modified'] ) ) . '</abbr><br>Last Modified
408
				</td>
409
				<td class="ssid column-ssid">
410
					' . $row['id'] . '
411
				</td>
412
			</tr>';
413
			return $row_html;
414
		}
415
	}
416
417
	/**
418
	 * 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

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

@@ 448-474 (lines=27) @@
445
	/**
446
	 * Formats the row for output on the screen.
447
	 */
448
	public function format_row( $row = false ) {
449
		if ( false !== $row ) {
450
451
			$status = 'import';
452
			if ( 0 !== $row['post_id'] ) {
453
				$status = '<a href="' . admin_url( '/post.php?post=' . $row['post_id'] . '&action=edit' ) . '" target="_blank">' . get_post_status( $row['post_id'] ) . '</a>';
454
			}
455
456
			$row_html = '
457
			<tr class="post-' . $row['post_id'] . ' type-tour" id="post-' . $row['post_id'] . '">
458
				<th class="check-column" scope="row">
459
					<label for="cb-select-' . $row['id'] . '" class="screen-reader-text">' . $row['name'] . '</label>
460
					<input type="checkbox" data-identifier="' . $row['id'] . '" value="' . $row['post_id'] . '" name="post[]" id="cb-select-' . $row['id'] . '">
461
				</th>
462
				<td class="post-title page-title column-title">
463
					<strong>' . $row['name'] . '</strong> - ' . $status . '
464
				</td>
465
				<td class="date column-date">
466
					<abbr title="' . date( 'Y/m/d',strtotime( $row['last_modified'] ) ) . '">' . date( 'Y/m/d',strtotime( $row['last_modified'] ) ) . '</abbr><br>Last Modified
467
				</td>
468
				<td class="ssid column-ssid">
469
					' . $row['id'] . '
470
				</td>
471
			</tr>';
472
			return $row_html;
473
		}
474
	}
475
476
	/**
477
	 * Connect to wetu