PluginProbe
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score / 1.0
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score v1.0
trunk 1.0 1.0.1 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1 2.1.1 2.1.2 2.2 2.2.1 All 69 releases
powered-cache / includes / admin / settings / cdn.php

cdn.php in Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score 1.0, at includes/admin/settings/cdn.php

89 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 * Settings page template
5 *
6 * @package PoweredCache
7 * @subpackage PoweredCache/Settings
8 */
9
10 // Exit if accessed directly
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 ?>
16
17 <div class="meta-box-sortables ui-sortable">
18
19 <div class="postbox">
20 <div class="inside">
21
22 <table class="form-table">
23 <tbody>
24 <tr>
25 <th scope="row"><label for="powered_cache_cdn_status"><?php _e( 'CDN', 'powered-cache' ); ?></label></th>
26 <td>
27 <label><input type="checkbox" id="powered_cache_cdn_status" name="powered_cache_settings[cdn_status]" <?php checked( powered_cache_get_option( 'cdn_status' ), 1 ); ?> value="1"><?php _e( 'Enable CDN Support', 'powered-cache' ); ?></label>
28 <br>
29 <span class="description"><?php _e('please make sure that your CDN is property setup before enabling this feature','powered-cache'); ?></span>
30 (<a target="_blank" href="http://docs.poweredcache.com/article/12-cdn-setup">?</a>)
31 </td>
32 </tr>
33
34 <tr>
35 <th scope="row"><label for="cdn_ssl_disable"><?php _e( 'SSL', 'powered-cache' ); ?></label></th>
36 <td>
37 <label><input type="checkbox" id="cdn_ssl_disable" name="powered_cache_settings[cdn_ssl_disable]" <?php checked( powered_cache_get_option( 'cdn_ssl_disable' ), 1 ); ?> value="1"><?php _e( 'Disable CDN to avoid "mixed content" errors', 'powered-cache' ); ?></label>
38 </td>
39 </tr>
40
41 <tr>
42 <th scope="row"><label for="powered_cache_cdn_hostname_primary"><?php _e( 'CDN Hostname(s)', 'powered-cache' ); ?></label></th>
43 <td>
44 <?php
45 $cdn_zones = powered_cache_get_option( 'cdn_zone', array('') );
46 $hostnames = powered_cache_get_option( 'cdn_hostname', array('') );
47 ?>
48
49 <div id="cdn-zones">
50 <?php foreach ( $hostnames as $key => $cdn ): ?>
51 <div class="cdn-zone <?php echo( 0 == $key ? 'primary-cdn-zone' : '' ); ?>">
52 <label><input value="<?php echo esc_url( $cdn ); ?>" type="text" id="powered_cache_cdn_hostname_primary" size="50" name="powered_cache_settings[cdn_hostname][]"></label> <?php _e( 'for', 'powered-cache' ); ?>
53 <select name="powered_cache_settings[cdn_zone][]">
54 <?php foreach ( Powered_Cache_Admin_Helper::cdn_zones() as $zone => $zone_name ): ?>
55 <option <?php selected( $cdn_zones[ $key ], $zone ); ?> value="<?php echo esc_attr( $zone ); ?>"><?php echo esc_attr( $zone_name ); ?></option>
56 <?php endforeach; ?>
57 </select>
58
59 <?php if ( 0 !== $key ): ?>
60 <span class="dashicons dashicons-no remove-cdn-item" onclick="powered_cache_remove_cdn_item();"> </span>
61 <?php endif;?>
62 </div>
63 <?php endforeach; ?>
64 </div>
65 <button type="button" onclick="powered_cache_clone_cdn_item();" class="button-secondary hide-if-no-js"><?php _e('Add Hostname','powered-cache'); ?></button>
66 </td>
67 </tr>
68
69
70 <tr>
71 <th scope="row"><label for="powered_cache_cdn_rejected_files"><?php _e( 'Rejected files', 'powered-cache' ); ?></label></th>
72 <td>
73 <textarea id="powered_cache_cdn_rejected_files" name="powered_cache_settings[cdn_rejected_files]" cols="50" rows="5"><?php echo powered_cache_get_option( 'cdn_rejected_files' ); ?></textarea><br>
74 <span class="description"><?php _e( 'One URL per line. It can be full URL or absolute path.', 'powered-cache' ); ?></span>
75 </td>
76 </tr>
77
78 </tbody>
79 </table>
80
81
82 </div>
83 <!-- .inside -->
84
85 </div>
86 <!-- .postbox -->
87
88 </div>
89