PluginProbe
Image Source Control Lite – Show Image Credits and Captions / 3.11.0
Image Source Control Lite – Show Image Credits and Captions v3.11.0
3.12.0 3.11.0 trunk 1.1 1.1.1 1.1.2 1.1.2.1 1.1.3 1.10 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.2 1.2.0.1 1.2.0.2 1.2.0.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.4.1 1.3.5 All 110 releases
image-source-control-isc / admin / templates / settings / miscellaneous / log-enable.php

log-enable.php in Image Source Control Lite – Show Image Credits and Captions 3.11.0, at admin/templates/settings/miscellaneous/log-enable.php

40 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Render the Debug Log setting
4 *
5 * @var bool $checked if the log file option is enabled.
6 * @var bool $file_exists true if the log file exists.
7 * @var string $log_file_url URL of the log file.
8 */
9
10 ?>
11 <label>
12 <input type="checkbox" name="isc_options[enable_log]" value="1" <?php checked( $checked ); ?> id="isc-enable-log-checkbox"/>
13 <?php
14 $file_link = 'image-source-control.log';
15
16 if ( $file_exists ) {
17 $file_link = '<a href="' . esc_url( $log_file_url ) . '" target="_blank">' . $file_link . '</a>';
18 }
19 printf(
20 // translators: %1$s is a file name, %2$s is a URL parameter.
21 esc_html__( 'Writes image source activity to the %1$s file when %2$s is added to the URL of a page.', 'image-source-control-isc' ),
22 // phpcs:ignore WordPress.Security.EscapeOutput
23 $file_link,
24 '<code>?isc-log</code>'
25 );
26 ?>
27 </label>
28 <div id="isc-log-url-wrapper" style="margin-top: 10px; display: <?php echo $checked ? 'block' : 'none'; ?>;">
29 <input type="text" id="isc-log-url-field" value="<?php echo esc_attr( $log_file_url ); ?>" readonly style="width: 100%; max-width: 500px; height: 28px; line-height: 28px; padding: 0 8px; vertical-align: middle;" />
30 <button type="button" id="isc-copy-log-url-btn" class="button" style="height: 28px; line-height: 26px; padding: 0 10px; vertical-align: middle;">
31 <span class="dashicons dashicons-admin-page" style="line-height: 28px;"></span>
32 </button>
33 <?php if ( $file_exists ) : ?>
34 <button type="button" id="isc-download-log-btn" class="button" style="height: 28px; line-height: 26px; padding: 0 10px; vertical-align: middle;">
35 <span class="dashicons dashicons-download" style="line-height: 28px;"></span>
36 </button>
37 <?php endif; ?>
38 <span class="dashicons dashicons-yes" id="isc-copy-log-url-success" style="color: #46b450; line-height: 28px; vertical-align: middle; display: none;"></span>
39 </div>
40