installed plugin W3 Total Cache version 2.3.2

This commit is contained in:
2023-06-05 11:23:16 +00:00
committed by Gitium
parent d9b3c97e40
commit 51ea2ff21c
2730 changed files with 334913 additions and 0 deletions

View File

@ -0,0 +1,35 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
if ( empty( $cnames ) ) {
} elseif ( count( $cnames ) == 1 ) {
echo '<div class="w3tc_cdn_cnames_readonly">' . esc_html( $cnames[0] ) . '</div>';
} else {
echo '<ol class="w3tc_cdn_cnames_readonly">';
foreach ( $cnames as $index => $cname ) {
$label = '';
if ( 0 === $index ) {
$label = __( '(reserved for CSS)', 'w3-total-cache' );
} elseif ( 1 === $index ) {
$label = __( '(reserved for JS in <head>)', 'w3-total-cache' );
} elseif ( 2 === $index ) {
$label = __( '(reserved for JS after <body>)', 'w3-total-cache' );
} elseif ( 3 === $index ) {
$label = __( '(reserved for JS before </body>)', 'w3-total-cache' );
} else {
$label = '';
}
echo '<li>' . esc_html( $cname ) . '<span class="w3tc_cdn_cname_comment">';
echo esc_html( $label );
echo '</span></li>';
}
echo '</ol>';
}

View File

@ -0,0 +1,67 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<ol id="cdn_cnames" style="margin: 0">
<?php
if ( ! count( $cnames ) ) {
$cnames = array( '' );
}
$count = count( $cnames );
if ( isset( $cnames['http_default'] ) ) {
$count--;
}
if ( isset( $cnames['https_default'] ) ) {
$count--;
}
$real_index = 0;
foreach ( $cnames as $index => $cname ) :
if ( 'http_default' === $index || 'https_default' === $index ) {
continue;
}
$label = '';
if ( $count > 1 ) :
switch ( $real_index ) :
case 0:
$label = __( '(reserved for CSS)', 'w3-total-cache' );
break;
case 1:
$label = __( '(reserved for JS in <head>)', 'w3-total-cache' );
break;
case 2:
$label = __( '(reserved for JS after <body>)', 'w3-total-cache' );
break;
case 3:
$label = __( '(reserved for JS before </body>)', 'w3-total-cache' );
break;
default:
$label = '';
break;
endswitch;
endif;
?>
<li>
<input type="text" name="cdn_cnames[]" id="cdn_cnames_<?php echo esc_attr( $real_index ); ?>"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $cname ); ?>" size="60" />
<input class="button cdn_cname_delete" type="button"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php esc_attr_e( 'Delete', 'w3-total-cache' ); ?>"<?php echo ! $index ? ' style="display: none;"' : ''; ?> />
<span><?php echo esc_html( $label ); ?></span>
</li>
<?php
$real_index++;
endforeach;
?>
</ol>
<input id="cdn_cname_add" class="button" type="button" value="<?php esc_attr_e( 'Add CNAME', 'w3-total-cache' ); ?>"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> />