forked from crowdfavorite-mirrors/wp-w3-total-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cdn_CloudFrontFsd_Page_View.php
executable file
·69 lines (63 loc) · 1.77 KB
/
Cdn_CloudFrontFsd_Page_View.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace W3TC;
if ( !defined( 'W3TC' ) )
die();
$key = $config->get_string( 'cdn.cloudfront_fsd.access_key' );
$authorized = !empty( $key );
include W3TC_DIR . '/Cdn_Page_View_Header.php';
?>
<p id="w3tc-options-menu">
<?php _e( 'Jump to:', 'w3-total-cache' ); ?>
<a href="?page=w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a>
</p>
<form id="cdn_form" action="admin.php?page=w3tc_cdn" method="post">
<div class="metabox-holder">
<?php Util_Ui::postbox_header( __( 'Configuration', 'w3-total-cache' ),
'', 'configuration' ); ?>
<table class="form-table">
<tr>
<th style="width: 300px;">
<label>
<?php
_e( 'Specify account credentials:',
'w3-total-cache' );
?>
</label>
</th>
<td>
<?php if ( $authorized ): ?>
<input class="w3tc_cdn_cloudfront_fsd_authorize button-primary"
type="button"
value="<?php _e( 'Reauthorize', 'w3-total-cache' ); ?>"
/>
<?php else: ?>
<input class="w3tc_cdn_cloudfront_fsd_authorize button-primary"
type="button"
value="<?php _e( 'Authorize', 'w3-total-cache' ); ?>"
/>
<?php endif ?>
</td>
</tr>
<?php if ( $authorized ): ?>
<tr>
<th>
<label><?php _e( 'CDN CNAME:', 'w3-total-cache' ); ?></label>
</th>
<td class="w3tc_config_value_text">
<?php
echo $config->get_string( 'cdn.cloudfront_fsd.distribution_domain' )
?><br />
<span class="description">
This website domain has to be CNAME pointing to this
CDN domain
</span>
</td>
</tr>
<?php endif ?>
</table>
<?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
<?php Util_Ui::postbox_footer(); ?>
</div>
</form>
<?php
include W3TC_INC_DIR . '/options/common/footer.php';