|
13 | 13 | * @param bool $wlf_auto_archiver_enabled Whether auto archiver is enabled. |
14 | 14 | * @param bool $wlf_scan_existing_enabled Whether scanning existing posts is enabled. |
15 | 15 | * @param bool $wlf_link_processing_enabled Whether link processing is enabled. |
| 16 | + * @param int $wlf_link_check_duration Number of days between link checks. |
| 17 | + * @param int $wlf_failed_check_count Number of failed checks before marking as broken. |
16 | 18 | */ |
17 | 19 |
|
18 | 20 | defined( 'ABSPATH' ) || exit; |
|
78 | 80 | </span> |
79 | 81 | <div class="wlf_dashboard-features-content"> |
80 | 82 | <span class="wlf_dashboard-features-label"><?php esc_html_e( 'Link Processing', 'wpcomsp_wayback_link_fixer' ); ?></span> |
81 | | - <div class="wlf_dashboard-features-description"><?php esc_html_e( 'Create snapshots of external links in your content', 'wpcomsp_wayback_link_fixer' ); ?></div> |
| 83 | + <div class="wlf_dashboard-features-description"><?php esc_html_e( 'Create snapshots of external links when posts are created or updated', 'wpcomsp_wayback_link_fixer' ); ?></div> |
82 | 84 | </div> |
83 | 85 | </div> |
84 | 86 | <div class="wlf_dashboard-features-item"> |
|
99 | 101 | <div class="wlf_dashboard-features-description"><?php esc_html_e( 'Process links in previously published content', 'wpcomsp_wayback_link_fixer' ); ?></div> |
100 | 102 | </div> |
101 | 103 | </div> |
| 104 | + <div class="wlf_dashboard-features-item"> |
| 105 | + <span class="wlf_dashboard-features-status <?php echo esc_attr( $wlf_link_processing_enabled ? 'enabled' : 'disabled' ); ?>"> |
| 106 | + <span class="dashicons dashicons-clock"></span> |
| 107 | + </span> |
| 108 | + <div class="wlf_dashboard-features-content"> |
| 109 | + <span class="wlf_dashboard-features-label"><?php esc_html_e( 'Link Checking', 'wpcomsp_wayback_link_fixer' ); ?></span> |
| 110 | + <div class="wlf_dashboard-features-description"> |
| 111 | + <?php if ( $wlf_link_processing_enabled ) : ?> |
| 112 | + <?php |
| 113 | + printf( |
| 114 | + /* translators: 1: number of days between checks, 2: number of failed checks before marking as broken */ |
| 115 | + esc_html__( 'Links are checked every %1$d days and marked as broken after %2$d consecutive failures', 'wpcomsp_wayback_link_fixer' ), |
| 116 | + absint( $wlf_link_check_duration ), |
| 117 | + absint( $wlf_failed_check_count ) |
| 118 | + ); |
| 119 | + ?> |
| 120 | + <?php else : ?> |
| 121 | + <?php |
| 122 | + printf( |
| 123 | + /* translators: 1: opening link tag, 2: closing link tag */ |
| 124 | + esc_html__( 'Links are not being checked. %1$sEnable Link Processing%2$s to turn this back on.', 'wpcomsp_wayback_link_fixer' ), |
| 125 | + '<a href="' . esc_url( $wlf_link_to_settings ) . '">', |
| 126 | + '</a>' |
| 127 | + ); |
| 128 | + ?> |
| 129 | + <?php endif; ?> |
| 130 | + </div> |
| 131 | + </div> |
| 132 | + </div> |
102 | 133 | </div> |
103 | 134 | </div> |
104 | 135 |
|
|
0 commit comments