PluginProbe ʕ •ᴥ•ʔ
Redirection / 1.0.3
Redirection v1.0.3
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0
redirect-redirection / includes / settings / layouts / common / single-redirection.php
redirect-redirection / includes / settings / layouts / common Last commit date
custom-body-data.php 4 years ago custom-dropdown.php 4 years ago custom-filter.php 4 years ago custom-pagination.php 4 years ago default-settings-modal.php 4 years ago delete-confirmation-prompt.php 4 years ago header-settings-paragraph.php 4 years ago index.html 4 years ago single-redirection.php 4 years ago
single-redirection.php
104 lines
1 <?php
2 if (!defined("ABSPATH")) {
3 exit();
4 }
5 ?>
6 <div class="flex-table__col ir-redirect-<?php echo intval($id); ?>">
7 <div class="flex-table__row">
8 <span class="flex-table__row-column row-column d-flex align-items-center">
9 <!-- Checkbox for mobile -->
10 <span class="d-lg-none flex-grow-1">
11 <label for="switch-1_<?php echo intval($id); ?>" class="custom-switch">
12 <input type="checkbox" id="switch-1_<?php echo intval($id); ?>" class="ir-redirect-chk ir-redirect-chk-<?php echo intval($id); ?>" <?php echo esc_attr($checked); ?> data-db-id="<?php echo intval($id); ?>">
13 <div class="custom-switch-slider round">
14 <span class="on"><?php _e( "On", "redirect-redirection" ); ?></span>
15 <span class="off"><?php _e( "Off", "redirect-redirection" ); ?></span>
16 </div>
17 </label>
18 </span>
19 <input type="checkbox" class="ir-redirect-chk ir-redirect-chk-<?php echo intval($id); ?>" <?php echo esc_attr($checked); ?> data-db-id="<?php echo intval($id); ?>">
20 </span>
21 <!-- Checkbox for desktop -->
22 <span class="flex-table__row-column row-column d-none d-lg-flex align-items-center">
23 <label for="switch-2_<?php echo intval($id); ?>" class="custom-switch">
24 <input type="checkbox" id="switch-2_<?php echo intval($id); ?>" <?php echo esc_attr($status); ?> class="ir-instant-edit-redirect ir-instant-edit-status-<?php echo intval($id); ?>" data-db-id="<?php echo intval($id); ?>" data-db-column="status">
25 <div class="custom-switch-slider round">
26 <span class="on"><?php _e( "On", "redirect-redirection" ); ?></span>
27 <span class="off"><?php _e( "Off", "redirect-redirection" ); ?></span>
28 </div>
29 </label>
30 </span>
31 <span class="flex-table__row-column row-column d-block">
32 <span class="row-column__input-label d-lg-none"><?php _e( "Redirect from", "redirect-redirection" ); ?></span>
33 <?php if ($redirectionType === self::TYPE_REDIRECTION) { ?>
34 <div class="row-column__input-group table-input-group"><!-- add class "custom-tooltip" for tooltip -->
35 <input class="flex-table__input table-input-group__input ir-instant-edit-redirect ir-instant-edit-from-<?php echo intval($id); ?>" type="text" value="<?php echo esc_attr($from); ?>" <?php echo esc_attr($fromDisabled); ?> title="<?php echo esc_html($fromTitle); ?>" data-db-id="<?php echo intval($id); ?>" data-db-column="from">
36 </div>
37 <?php
38 } else {
39 foreach ($metas[self::META_KEY_CRITERIAS] as $key => $criteria) {
40 $from = $criteria["value"];
41 $fromIndex = array_search($metas[self::META_KEY_CRITERIAS][$key]["criteria"], array_column(IrrPRedirection::$CRITERIAS, "option"));
42 $fromTitle = empty(IrrPRedirection::$CRITERIAS[$fromIndex]["text"]) ? "" : IrrPRedirection::$CRITERIAS[$fromIndex]["text"];
43 $style = ($key > 0) ? "margin-top:3px;" : "";
44 ?>
45 <!-- custom style maybe needs changes!! -->
46 <!-- add class "custom-tooltip" for tooltip -->
47 <div class="row-column__input-group table-input-group" style="<?php echo esc_html($style); ?>;">
48 <input class="flex-table__input table-input-group__input ir-instant-edit-redirect ir-instant-edit-from-<?php echo intval($id); ?>" type="text" value="<?php echo esc_attr($from); ?>" <?php echo esc_attr($fromDisabled); ?> title="<?php echo esc_html($fromTitle); ?>" data-db-id="<?php echo intval($id); ?>" data-db-column="from">
49 </div>
50 <?php
51 }
52 }
53 ?>
54 </span>
55 <span class="flex-table__row-column row-column">
56 <div class="row-column__arrow-svg d-flex align-items-center">
57 <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
58 <path d="M19.829 9.5547L13.8293 2.88839C13.7013 2.74706 13.5227 2.66707 13.3334 2.66707H9.33358C9.07093 2.66707 8.83227 2.82173 8.72428 3.06171C8.61762 3.30303 8.66162 3.58435 8.83761 3.77901L14.436 10L8.83761 16.2197C8.66162 16.4157 8.61628 16.697 8.72428 16.937C8.83227 17.1783 9.07093 17.3329 9.33358 17.3329H13.3334C13.5227 17.3329 13.7013 17.2516 13.8293 17.113L19.829 10.4466C20.057 10.1933 20.057 9.80668 19.829 9.5547Z" fill="currentColor" />
59 <path d="M11.1628 9.5547L5.16314 2.88839C5.03514 2.74706 4.85649 2.66707 4.66716 2.66707H0.66738C0.404728 2.66707 0.166074 2.82173 0.0580799 3.06171C-0.048581 3.30303 -0.00458339 3.58435 0.171407 3.77901L5.76977 10L0.171407 16.2197C-0.00458339 16.4157 -0.0499143 16.697 0.0580799 16.937C0.166074 17.1783 0.404728 17.3329 0.66738 17.3329H4.66716C4.85649 17.3329 5.03514 17.2516 5.16314 17.113L11.1628 10.4466C11.3908 10.1933 11.3908 9.80668 11.1628 9.5547Z" fill="currentColor" />
60 </svg>
61 </div>
62 </span>
63 <span class="flex-table__row-column row-column d-block">
64 <span class="row-column__input-label d-lg-none"><?php _e( "To a specific URL", "redirect-redirection" ); ?></span>
65 <div class="row-column__input-group table-input-group"><!-- add class "custom-tooltip" for tooltip -->
66 <?php if ( isset( $metas["action"]["name"] ) ) { ?>
67 <?php if ( $metas["action"]["name"] != 'urls-with-removed-string' ) { ?>
68 <input class="flex-table__input table-input-group__input ir-instant-edit-redirect ir-instant-edit-to-<?php echo intval($id); ?> <?php echo ( $to ) ? 'ir-with-data' : 'ir-without-data'; ?>" type="text" value="<?php echo esc_attr($to); ?>" <?php echo esc_attr($toDisabled); ?> title="<?php echo esc_html($toTitle); ?>" data-db-id="<?php echo intval($id); ?>" data-db-column="to">
69 <?php } ?>
70 <?php } else { ?>
71 <input class="flex-table__input table-input-group__input ir-instant-edit-redirect ir-instant-edit-to-<?php echo intval($id); ?> <?php echo ( $to ) ? 'ir-with-data' : 'ir-without-data'; ?>" type="text" value="<?php echo esc_attr($to); ?>" <?php echo esc_attr($toDisabled); ?> title="<?php echo esc_html($toTitle); ?>" data-db-id="<?php echo intval($id); ?>" data-db-column="to">
72 <?php } ?>
73 </div>
74 </span>
75 <span class="flex-table__row-column row-column">
76 <span class="row-column__label d-lg-none flex-grow-1">
77 <?php _e( "Date added", "redirect-redirection" ); ?>
78 </span>
79 <span>
80 <?php echo date("d/m/Y", $timestamp); ?>
81 </span>
82 </span>
83 <span class="flex-table__row-column row-column">
84 <span class="row-column__label d-lg-none flex-grow-1">
85 <?php _e( "Type", "redirect-redirection" ); ?>
86 </span>
87 <span id="ir-redirect-code-<?php echo intval($id); ?>">
88 <?php echo intval($redirectCode); ?>
89 </span>
90 </span>
91 <span class="flex-table__row-column row-column d-flex align-items-center">
92 <span class="row-column__label d-lg-none flex-grow-1">
93 <?php _e( "Actions", "redirect-redirection" ); ?>
94 </span>
95 <button class="ir-edit-redirect <?php echo esc_attr($editClass); ?>" data-db-id="<?php echo intval($id); ?>">
96 <img src="<?php echo plugins_url(IRRP_DIR_NAME . "/assets/css/assets/images/edit.svg"); ?>" alt="<?php _e( "edit row", "redirect-redirection" ); ?>">
97 </button>
98 <button class="ir-delete-confirmation-show" style="margin-left: 7px" data-db-id="<?php echo intval($id); ?>">
99 <img src="<?php echo plugins_url(IRRP_DIR_NAME . "/assets/css/assets/images/close.svg"); ?>" alt="<?php _e( "close row", "redirect-redirection" ); ?>">
100 </button>
101 </span>
102 </div>
103 </div>
104