Exemplo n.º 1
0
namespace W3TC;

if (!defined('W3TC')) {
    die;
}
include W3TC_INC_DIR . '/options/common/header.php';
?>

<form action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Database Cluster Configuration File', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <th>
                    <textarea cols="70" rows="25" style="width: 100%"
                        name="newcontent" id="newcontent"
                        tabindex="1"><?php 
echo esc_textarea($content);
?>
</textarea><br />
                    <br />
                    <span class="description">
                        <?php 
_e('Note: Changes will have immediate effect on your database configuration. If the application stops working creating the settings file, edit or remove this configuration file manually at <strong>/wp-content/db-cluster-config.php</strong>.', 'w3-total-cache');
?>
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
Util_Ui::postbox_header(__('<acronym title="Content Delivery Network">CDN</acronym>', 'w3-total-cache'), '', 'cdn');
Util_Ui::config_overloading_button(array('key' => 'cdn.configuration_overloaded'));
?>
<p><?php 
_e('Host static files with your content delivery network provider to reduce page load time.', 'w3-total-cache');
if (!$cdn_enabled) {
    printf(__('If you do not have a <acronym title="Content Delivery Network">CDN</acronym> provider try MaxCDN. <a href="%s" target="_blank">Sign up and save 25&#37;</a>.', 'w3-total-cache'), wp_nonce_url(Util_Ui::admin_url('admin.php?page=w3tc_dashboard&w3tc_cdn_maxcdn_signup'), 'w3tc'));
}
?>
</p>
<table class="form-table">
    <?php 
Util_Ui::config_item(array('key' => 'cdn.enabled', 'control' => 'checkbox', 'checkbox_label' => __('Enable', 'w3-total-cache'), 'description' => __('Theme files, media library attachments, <acronym title="Cascading Style Sheet">CSS</acronym>, <acronym title="JavaScript">JS</acronym> files etc will appear to load instantly for site visitors.', 'w3-total-cache')));
Util_Ui::config_item(array('key' => 'cdn.engine', 'control' => 'selectbox', 'selectbox_values' => $engine_values, 'selectbox_optgroups' => $engine_optgroups, 'description' => __('Select the <acronym title="Content Delivery Network">CDN</acronym> type you wish to use.', 'w3-total-cache') . $cdn_engine_extra_description));
?>
</table>

<?php 
Util_Ui::button_config_save('general_cdn', '<input id="cdn_purge" type="button" value="' . __('Empty cache', 'w3-total-cache') . '" ' . ($cdn_enabled && Cdn_Util::can_purge_all($config->get_string('cdn.engine')) ? '' : ' disabled="disabled" ') . ' class="button {nonce: \'' . wp_create_nonce('w3tc') . '\'}" />');
Util_Ui::postbox_footer();
namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form style="padding: 20px">
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>

    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Specify API Key', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <th>
                    <label for="newrelic_api_key"><?php 
_e('<acronym title="Application Programming Interface">API</acronym> key:', 'w3-total-cache');
?>
</label>
                </th>
                <td>
                    <input name="api_key" class="w3tcnr_api_key" type="text"
                        value="<?php 
echo esc_attr($details['api_key']);
?>
" size="45"/>
Util_Ui::hidden('', 'w3tc_action', 'cdn_rackspace_service_actualize_done');
Util_Ui::hidden('', 'user_name', $details['user_name']);
Util_Ui::hidden('', 'api_key', $details['api_key']);
Util_Ui::hidden('', 'access_token', $details['access_token']);
Util_Ui::hidden('', 'access_region_descriptor', $details['access_region_descriptor_serialized']);
Util_Ui::hidden('', 'region', $details['region']);
Util_Ui::hidden('', 'service_id', $details['service_id']);
echo Util_Ui::nonce_field('w3tc');
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>

	<div class="metabox-holder">
		<?php 
Util_Ui::postbox_header(__('Configure service', 'w3-total-cache'));
?>
		<table class="form-table">
			<tr>
				<th>Name:</th>
				<td><?php 
echo $details['name'];
?>
</td>
			</tr>
			<tr>
				<th>Origin host:</th>
				<td><?php 
$this->render_service_value_change($details, 'origin');
?>
</td>
_e('Reduce the download time for text-based files.', 'w3-total-cache');
?>
</span>
                </th>
            </tr>
        </table>

        <?php 
Util_Ui::button_config_save('browsercache_html_xml');
?>
        <?php 
Util_Ui::postbox_footer();
?>

        <?php 
Util_Ui::postbox_header(__('Media &amp; Other Files', 'w3-total-cache'), '', 'media');
?>
        <table class="form-table">
            <?php 
if (!Util_Environment::is_nginx()) {
    ?>
            <tr>
                <th colspan="2">
                    <?php 
    $this->checkbox('browsercache.other.last_modified');
    ?>
 <?php 
    Util_Ui::e_config_label('browsercache.other.last_modified');
    ?>
</label>
                    <br /><span class="description"><?php 
if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_cdn_rackspace_form" method="post" style="padding: 20px">
	<?php 
Util_Ui::hidden('', 'w3tc_action', 'cdn_rackspace_intro_done');
?>
	<?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
	<div class="metabox-holder">
		<?php 
Util_Ui::postbox_header(__('Your RackSpace API key', 'w3-total-cache'));
?>
		<table class="form-table">
			<tr>
				<th><?php 
_e('Username:'******'w3-total-cache');
?>
</td>
				<td>
					<input name="user_name" type="text" class="w3tc-ignore-change"
						style="width: 100px"
						value="<?php 
echo esc_attr($details['user_name']);
?>
" />
				</td>
    self::cloudflare_checkbox($settings, array('key' => 'browser_check', 'label' => 'Browser Integrity Check', 'description' => 'Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will also challenge visitors that do not have a user agent or a non standard user agent (also commonly used by abuse bots, crawlers or visitors).'));
    self::cloudflare_checkbox($settings, array('key' => 'always_online', 'label' => 'Always Online', 'description' => 'When enabled, Always Online will serve pages from our cache if your server is offline'));
    self::cloudflare_checkbox($settings, array('key' => 'waf', 'label' => 'Web Application Firewall', 'description' => 'The WAF examines HTTP requests to your website. It inspects both GET and POST requests and applies rules to help filter out illegitimate traffic from legitimate website visitors.'));
    self::cloudflare_checkbox($settings, array('key' => 'advanced_ddos', 'label' => 'Advanced DDOS Protection', 'description' => 'Advanced protection from Distributed Denial of Service (DDoS) attacks on your website.'));
    self::cloudflare_textbox($settings, array('key' => 'max_upload', 'label' => 'Max Upload', 'description' => 'Max size of file allowed for uploading'));
    echo '</table>';
    self::cloudflare_button_save('protection');
    Util_Ui::postbox_footer();
    Util_Ui::postbox_header(__('CloudFlare: IP', 'w3-total-cache'), '', 'general');
    echo '<table class="form-table">';
    self::cloudflare_checkbox($settings, array('key' => 'ip_geolocation', 'label' => 'IP Geolocation', 'description' => 'Enable IP Geolocation to have CloudFlare geolocate visitors to your website and pass the country code to you.'));
    self::cloudflare_checkbox($settings, array('key' => 'ipv6', 'label' => 'IPv6', 'description' => 'Enable IPv6.'));
    self::cloudflare_checkbox($settings, array('key' => 'pseudo_ipv4', 'label' => 'Pseudo IPv4', 'description' => 'Support for IPv6 addresses in legacy IPv4 applications.'));
    self::cloudflare_checkbox($settings, array('key' => 'true_client_ip_header', 'label' => 'True Client IP', 'description' => 'Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin.'));
    echo '</table>';
    self::cloudflare_button_save('ip');
    Util_Ui::postbox_footer();
    Util_Ui::postbox_header(__('CloudFlare: SSL', 'w3-total-cache'), '', 'general');
    echo '<table class="form-table">';
    self::cloudflare_selectbox($settings, array('key' => 'ssl', 'label' => 'SSL', 'values' => array('' => '', 'off' => 'Off', 'flexible' => 'Flexible (https to end-user only)', 'full' => 'Full (https everywhere)', 'full_strict' => 'Strict'), 'description' => 'SSL encrypts your visitor\'s connection and safeguards credit card numbers and other personal data to and from your website.'));
    self::cloudflare_checkbox($settings, array('key' => 'security_header', 'label' => 'Security Header (HSTS)', 'description' => 'Enables or disables HSTS header.'));
    self::cloudflare_checkbox($settings, array('key' => 'tls_1_2_only', 'label' => 'TLS 1.2 Only', 'description' => 'Enable Crypto TLS 1.2 feature for this zone and prevent use of previous versions.'));
    self::cloudflare_checkbox($settings, array('key' => 'tls_client_auth', 'label' => 'TLS Client Auth', 'description' => 'TLS Client Auth requires CloudFlare to connect to your origin server using a client certificate'));
    echo '</table>';
    self::cloudflare_button_save('ssl');
    Util_Ui::postbox_footer();
}
?>
    </div>
</form>
<?php 
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
    class="w3tc_cdn_highwinds_form">
    <?php 
Util_Ui::hidden('', 'account_hash', $details['account_hash']);
Util_Ui::hidden('', 'api_token', $details['api_token']);
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select host to use', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>Host:</td>
                <td>
                    <?php 
foreach ($details['hosts'] as $host) {
    ?>
                        <label>
                            <input name="host" type="radio" class="w3tc-ignore-change"
                                value="<?php 
    echo $host['hashCode'];
    ?>
" />
                            <?php 
        <?php 
Util_Ui::config_item(array('key' => array('genesis.theme', 'genesis_footer'), 'control' => 'checkbox', 'checkbox_label' => __('Enable', 'w3-total-cache'), 'label' => __('Cache genesis footer:', 'w3-total-cache'), 'description' => __('Caches footer loop.', 'w3-total-cache')));
Util_Ui::config_item(array('key' => array('genesis.theme', 'wp_footer'), 'control' => 'checkbox', 'checkbox_label' => __('Enable', 'w3-total-cache'), 'label' => __('Cache footer:', 'w3-total-cache'), 'description' => __('Caches wp_footer loop.', 'w3-total-cache')));
Util_Ui::config_item(array('key' => array('genesis.theme', 'reject_logged_roles'), 'control' => 'checkbox', 'checkbox_label' => __('Enable', 'w3-total-cache'), 'label' => __('Disable fragment cache:', 'w3-total-cache'), 'description' => 'Don\'t use fragment cache with the following hooks and for the specified user roles.'));
?>
    </table>
    <?php 
Util_Ui::button_config_save('extension_genesis_footer');
?>
    <?php 
Util_Ui::postbox_footer();
?>


    <?php 
Util_Ui::postbox_header(__('Exclusions', 'w3-total-cache'), '', 'exclusions');
?>
    <table class="form-table">
        <tr>
            <td><?php 
_e('Select hooks', 'w3-total-cache');
?>
</td>
            <td>
                <?php 
$saved_hooks = $config->get_array(array('genesis.theme', 'reject_logged_roles_on_actions'));
$name = Util_Ui::config_key_to_http_name(array('genesis.theme', 'reject_logged_roles_on_actions'));
$hooks = array('genesis_header' => 'Header', 'genesis_footer' => 'Footer', 'genesis_sidebar' => 'Sidebar', 'genesis_loop' => 'The Loop', 'wp_head' => 'wp_head', 'wp_footer' => 'wp_footer', 'genesis_comments' => 'Comments', 'genesis_pings' => 'Pings', 'genesis_do_nav' => 'Primary navigation', 'genesis_do_subnav' => 'Secondary navigation');
?>

                <input <?php 
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
Util_Ui::postbox_header('Fragment Cache', '', 'fragment_cache');
?>
<p>Enable fragment caching reduce execution time for common operations.</p>

<table class="form-table">
    <?php 
Util_Ui::config_item_engine(array('key' => array('fragmentcache', 'engine'), 'label' => __('Fragment Cache Method:', 'w3-total-cache'), 'empty_value' => true));
?>
</table>

<?php 
Util_Ui::button_config_save('general_feedburner', '<input type="submit" name="w3tc_flush_fragmentcache" value="' . __('Empty cache', 'w3-total-cache') . '" class="button" />');
Util_Ui::postbox_footer();
namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_popup_form">
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Your MaxCDN Account credentials', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>API Key:</td>
                <td>
                    <input name="api_key" type="text" class="w3tc-ignore-change"
                        style="width: 550px"
                        value="<?php 
echo $details['api_key'];
?>
" />
                    <br />
                    <span class="description">
                        To obtain API key you can
                        <a target="_blank" href="<?php 
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
Util_Ui::postbox_header(__('Monitoring', 'w3-total-cache'), '', 'monitoring');
Util_Ui::config_overloading_button(array('key' => 'newrelic.configuration_overloaded'));
?>

<?php 
if (!$new_relic_installed) {
    ?>
    <p><?php 
    echo sprintf(__('
        New Relic may not be installed or not active on this server. %s. Visit %s for installation instructions.', 'w3-total-cache'), '<a href="' . esc_attr(NEWRELIC_SIGNUP_URL) . '" target="_blank">' . __('Sign up for a (free) account', 'w3-total-cache') . '</a>', '<a href="https://newrelic.com/docs/php/new-relic-for-php" target="_blank">New Relic</a>');
    ?>
    </p>
<?php 
}
?>

<table class="form-table">
    <tr>
        <th>
            <label for="newrelic_api_key"><?php 
_e('<acronym title="Application Programming Interface">API</acronym> key:', 'w3-total-cache');
?>
</label>
        </th>
namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_cdn_highwinds_form" method="post" style="padding: 20px">
	<?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
	<div class="metabox-holder">
		<?php 
Util_Ui::postbox_header(__('Your Highwinds API Token', 'w3-total-cache'));
?>
		<table class="form-table">
			<tr>
				<td>API Token:</td>
				<td>
					<input name="api_token" type="text" class="w3tc-ignore-change"
						value="" style="width: 550px" />
				</td>
			</tr>
		</table>

		<p class="submit">
			<input type="button"
				class="w3tc_cdn_highwinds_select_host w3tc-button-save button-primary"
				value="<?php 
if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px">
    <?php 
Util_Ui::hidden('', 'client_id', $client_id);
Util_Ui::hidden('', 'access_token', $access_token);
Util_Ui::hidden('', 'refresh_token', $refresh_token);
echo Util_Ui::nonce_field('w3tc');
?>
    <br /><br />
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select folder', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <td>Folder:</td>
                <td>
                    <?php 
foreach ($folders as $folder) {
    ?>
                        <label>
                            <input name="folder" type="radio" class="w3tc-ignore-change"
                                value="<?php 
    echo $folder->id;
    ?>
" />
                            <?php 
    <?php 
Util_Ui::hidden('', 'w3tc_action', 'cdn_rackspace_regions_done');
Util_Ui::hidden('', 'user_name', $details['user_name']);
Util_Ui::hidden('', 'api_key', $details['api_key']);
Util_Ui::hidden('', 'access_token', $details['access_token']);
Util_Ui::hidden('', 'region_descriptors', $details['region_descriptors_serialized']);
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select region', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr>
                <th>Region:</td>
                <td>
                    <?php 
foreach ($details['region_descriptors'] as $region => $region_details) {
    ?>
                        <label>
                            <input name="region" type="radio" class="w3tc-ignore-change"
                                value="<?php 
    echo $region;
    ?>
" />
                            <?php 
Exemplo n.º 16
0
/*]]>*/</script>

<p>
    <?php 
_e('Referrer group support is always <span class="w3tc-enabled">enabled', 'w3-total-cache');
?>
</span>.
</p>

<form id="referrer_form" action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Manage Referrer Groups', 'w3-total-cache'), '', 'manage');
?>
        <p>
            <input id="referrer_add" type="button" class="button" value="<?php 
_e('Create a group', 'w3-total-cache');
?>
" /> <?php 
_e('of referrers by specifying names in the referrers field. Assign a set of referrers to use a specific theme, redirect them to another domain, create referrer groups to ensure that a unique cache is created for each referrer group. Drag and drop groups into order (if needed) to determine their priority (top -&gt; down).', 'w3-total-cache');
?>
        </p>

        <ul id="referrer_groups">
            <?php 
$index = 0;
foreach ($groups as $group => $group_config) {
    $index++;
    self::cloudflare_selectbox($settings, array('key' => 'security_level', 'label' => __('Security level:', 'w3-total-cache'), 'values' => array('' => '', 'essentially_off' => 'Off', 'low' => 'Low', 'medium' => 'Medium', 'high' => 'High', 'under_attack' => 'Under Attack'), 'description' => 'security profile for your website, which will automatically adjust each of the security settings.'));
    self::cloudflare_checkbox($settings, array('key' => 'browser_check', 'label' => 'Browser integrity check:', 'description' => 'Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will also challenge visitors that do not have a user agent or a non standard user agent (also commonly used by abuse bots, crawlers or visitors).'));
    self::cloudflare_checkbox($settings, array('key' => 'always_online', 'label' => 'Always online:', 'description' => 'When enabled, Always Online will serve pages from our cache if your server is offline'));
    self::cloudflare_checkbox($settings, array('key' => 'waf', 'label' => 'Web application firewall:', 'description' => 'The Web Application Firewall (WAF) examines HTTP requests to your website. It inspects both GET and POST requests and applies rules to help filter out illegitimate traffic from legitimate website visitors.'));
    self::cloudflare_checkbox($settings, array('key' => 'advanced_ddos', 'label' => 'Advanced <acronym title="Distributed Denial of Service">DDoS</acronym> protection:', 'description' => 'Advanced protection from Distributed Denial of Service (DDoS) attacks on your website.'));
    self::cloudflare_textbox($settings, array('key' => 'max_upload', 'label' => 'Max upload:', 'description' => 'Max size of file allowed for uploading'));
    echo '</table>';
    self::cloudflare_button_save('protection');
    Util_Ui::postbox_footer();
    Util_Ui::postbox_header(__('CloudFlare: <acronym title="Internet Protocol">IP</acronym>', 'w3-total-cache'), '', 'general');
    echo '<table class="form-table">';
    self::cloudflare_checkbox($settings, array('key' => 'ip_geolocation', 'label' => '<acronym title="Internet Protocol">IP</acronym> geolocation:', 'description' => 'Enable <acronym title="Internet Protocol">IP</acronym> Geolocation to have CloudFlare geolocate visitors to your website and pass the country code to you.'));
    self::cloudflare_checkbox($settings, array('key' => 'ipv6', 'label' => 'IPv6:', 'description' => 'Enable IPv6.'));
    self::cloudflare_checkbox($settings, array('key' => 'true_client_ip_header', 'label' => 'True client IP:', 'description' => 'Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin.'));
    echo '</table>';
    self::cloudflare_button_save('ip');
    Util_Ui::postbox_footer();
    Util_Ui::postbox_header(__('CloudFlare: <acronym title="Secure Sockets Layer">SSL</acronym>', 'w3-total-cache'), '', 'general');
    echo '<table class="form-table">';
    self::cloudflare_selectbox($settings, array('key' => 'ssl', 'label' => '<acronym title="Secure Sockets Layer">SSL</acronym>:', 'values' => array('' => '', 'off' => 'Off', 'flexible' => 'Flexible (HTTPS to end-user only)', 'full' => 'Full (https everywhere)', 'full_strict' => 'Strict'), 'description' => '<acronym title="Secure Sockets Layer">SSL</acronym> encrypts your visitor\'s connection and safeguards credit card numbers and other personal data to and from your website.'));
    self::cloudflare_checkbox($settings, array('key' => 'security_header', 'label' => 'Security header (<acronym title="Secure Sockets Layer">SSL</acronym>):', 'description' => 'Enables or disables <acronym title="Secure Sockets Layer">SSL</acronym> header.'));
    self::cloudflare_checkbox($settings, array('key' => 'tls_1_2_only', 'label' => '<acronym title="Transport Layer Security">TLS</acronym> 1.2 only:', 'description' => 'Enable Crypto <acronym title="Transport Layer Security">TLS</acronym> 1.2 feature for this zone and prevent use of previous versions.'));
    self::cloudflare_checkbox($settings, array('key' => 'tls_client_auth', 'label' => '<acronym title="Transport Layer Security">TLS</acronym> client auth:', 'description' => '<acronym title="Transport Layer Security">TLS</acronym> Client authentication requires CloudFlare to connect to your origin server using a client certificate'));
    echo '</table>';
    self::cloudflare_button_save('ssl');
    Util_Ui::postbox_footer();
}
?>
    </div>
</form>
<?php 
?>
</a>
</p>
<p>
    FeedBurner extension is currently <?php 
if ($config->is_extension_active_frontend('feedburner')) {
    echo '<span class="w3tc-enabled">enabled</span>';
} else {
    echo '<span class="w3tc-disabled">disabled</span>';
}
?>
.
<p>

<div class="metabox-holder">
    <?php 
Util_Ui::postbox_header(__('Google FeedBurner', 'w3-total-cache'));
?>
    <table class="form-table">
        <?php 
Util_Ui::config_item(array('key' => array('feedburner', 'urls'), 'control' => 'textarea', 'label' => __('Additional URLs:', 'w3-total-cache'), 'description' => __('Specify any additional feed URLs to ping on FeedBurner.', 'w3-total-cache')));
?>
    </table>
    <?php 
Util_Ui::button_config_save('extension_feedburner');
?>
    <?php 
Util_Ui::postbox_footer();
?>
</div>
<?php 
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
Util_Ui::postbox_header(__('Network Performance &amp; Security powered by CloudFlare', 'w3-total-cache'), '', 'cloudflare');
Util_Ui::config_overloading_button(array('key' => 'cloudflare.configuration_overloaded'));
?>
<p>
    <?php 
_e('CloudFlare protects and accelerates websites.', 'w3-total-cache');
?>
</p>

<table class="form-table">
    <?php 
Util_Ui::config_item(array('key' => array('cloudflare', 'widget_cache_mins'), 'label' => __('Cache time:', 'w3-total-cache'), 'control' => 'textbox', 'description' => 'How many minutes data retrieved from CloudFlare ' . 'should be stored. Minimum is 1 minute.'));
Util_Ui::config_item(array('key' => array('cloudflare', 'pagecache'), 'label' => __('Page Caching:', 'w3-total-cache'), 'control' => 'checkbox', 'checkbox_label' => 'Flush CloudFlare on Post Modifications', 'description' => 'Enable when you have html pages cached on CloudFlare level.'));
?>
</table>

<?php 
Util_Ui::button_config_save('general_cloudflare', '<input type="submit" name="w3tc_cloudflare_flush" value="' . __('Empty cache', 'w3-total-cache') . '"' . ' class="button" />');
Util_Ui::postbox_footer();
Exemplo n.º 20
0
    ?>
 disabled="disabled"<?php 
}
?>
 class="button" />
        operation.
    </p>
</form>

<form action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Advanced', 'w3-total-cache'), '', 'advanced');
?>
        <table class="form-table">
            <?php 
if ($this->_config->get_string('objectcache.engine') == 'memcached') {
    $module = 'objectcache';
    include W3TC_INC_DIR . '/options/parts/memcached.php';
} elseif ($this->_config->get_string('objectcache.engine') == 'redis') {
    $module = 'objectcache';
    include W3TC_INC_DIR . '/options/parts/redis.php';
}
?>
            <tr>
                <th style="width: 250px;"><label for="objectcache_lifetime"><?php 
Util_Ui::e_config_label('objectcache.lifetime');
?>
    <?php 
Util_Ui::hidden('', 'user_name', $details['user_name']);
Util_Ui::hidden('', 'api_key', $details['api_key']);
Util_Ui::hidden('', 'access_token', $details['access_token']);
Util_Ui::hidden('', 'access_region_descriptor', $details['access_region_descriptor_serialized']);
Util_Ui::hidden('', 'region', $details['region']);
echo Util_Ui::nonce_field('w3tc');
?>
    <?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Create new service', 'w3-total-cache'));
?>
        <table class="form-table" style="width: 100%">
            <tr>
                <th style="width: 150px">Name:</td>
                <td>
                    <input name="name" type="text" class="w3tc-ignore-change"
                        style="width: 100px"
                        value="<?php 
echo esc_attr($details['name']);
?>
" />
                </td>
            </tr>
            <tr>
                <th style="white-space: nowrap">Traffic Type:</td>
$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"
_e('How many minutes data retrieved from New Relic should be stored. Minimum is 1 minute.', 'w3-total-cache');
?>
                    </span>
                </p>
            </td>
        </tr>
    </table>
    <?php 
Util_Ui::button_config_save('extension_newrelic_dashboard');
?>
    <?php 
Util_Ui::postbox_footer();
?>

    <?php 
Util_Ui::postbox_header(__('Behavior Settings', 'w3-total-cache'), '', 'behavior');
?>
    <table  class="form-table">
        <tr>
            <th colspan="2">
                <?php 
Util_Ui::checkbox('', Util_Ui::config_key_to_http_name(array('newrelic', 'accept.logged_roles')), $config->get_boolean(array('newrelic', 'accept.logged_roles')), $config->is_sealed('newrelic'));
_e('Use <acronym title="Real User Monitoring">RUM</acronym> only for following user roles', 'w3-total-cache');
?>
</label><br />
                <span class="description"><?php 
_e('Select user roles that <acronym title="Real User Monitoring">RUM</acronym> should be enabled for:', 'w3-total-cache');
?>
</span>

                <div id="newrelic_accept_roles">
if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_extension_cloudflare_form" method="post" style="padding: 20px">
	<?php 
Util_Ui::hidden('', 'w3tc_action', 'extension_cloudflare_intro_done');
?>
	<?php 
if (isset($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
	<div class="metabox-holder">
		<?php 
Util_Ui::postbox_header(__('Your CloudFlare API key', 'w3-total-cache'));
?>
		<table class="form-table">
			<tr>
				<th><?php 
_e('Email:', 'w3-total-cache');
?>
</td>
				<td>
					<input name="email" type="text" class="w3tc-ignore-change"
						style="width: 300px"
						value="<?php 
echo esc_attr($details['email']);
?>
" />
				</td>
Exemplo n.º 25
0
				</td>
			</tr>
			<?php 
}
?>
		</table>

		<?php 
Util_Ui::button_config_save('pagecache_advanced');
?>
		<?php 
Util_Ui::postbox_footer();
?>

		<?php 
Util_Ui::postbox_header(__('Note(s)', 'w3-total-cache'), '', 'notes');
?>
		<table class="form-table">
			<tr>
				<th>
					<ul>
						<li><?php 
_e('Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression in the "<acronym title="Hypertext Markup Language">HTML</acronym>" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache');
?>
</li>
						<li><?php 
_e('The <acronym title="Time to Live">TTL</acronym> of page cache files is set via the "Expires header lifetime" field in the "<acronym title="Hypertext Markup Language">HTML</acronym>" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache');
?>
</li>
					</ul>
				</th>
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
Util_Ui::postbox_header(__('Opcode Cache', 'w3-total-cache'), '', 'system_opcache');
?>

<table class="form-table">
    <?php 
Util_Ui::config_item(array('key' => 'opcache.engine', 'label' => 'Opcode Cache', 'control' => 'selectbox', 'value' => $opcode_engine, 'selectbox_values' => array('Not Available' => array('disabled' => $opcode_engine !== 'Not Available', 'label' => __('Not Available', 'w3-total-cache')), 'OPcache' => array('disabled' => $opcode_engine !== 'OPcache', 'label' => __('Opcode: Zend Opcache', 'w3-total-cache')), 'APC' => array('disabled' => $opcode_engine !== 'APC', 'label' => __('Opcode: Alternative PHP Cache (APC / APCu)', 'w3-total-cache')))));
Util_Ui::config_item(array('key' => 'opcache.validate_timestamps', 'label' => 'Validate Timestamps', 'control' => 'checkbox', 'disabled' => true, 'value' => $validate_timestamps, 'checkbox_label' => __('Enable', 'w3-total-cache'), 'description' => __('Once enabled, each file request will update the cache with the latest version.' . 'When this setting is off, the Opcode Cache will not check, instead PHP must be restarted in order for setting changes to be reflected.', 'w3-total-cache')));
?>

</table>
<?php 
Util_Ui::button_config_save('general_opcache', '<input type="submit" name="w3tc_opcache_flush" value="' . __('Empty cache', 'w3-total-cache') . '"' . ($opcode_engine !== 'Not Available' ? '' : ' disabled="disabled" ') . ' class="button" />');
?>

<?php 
Util_Ui::postbox_footer();
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form class="w3tc_popup_form">
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Succeeded', 'w3-total-cache'));
?>

        <div style="text-align: center">
            Pull Zone <?php 
echo $details['name'];
?>
 was successfully configured.<br />
            Now you need to change DNS records of your domain
            <strong><?php 
echo $details['home_domain'];
?>
</strong> and CNAME it to
            <strong><?php 
echo $details['dns_cname_target'];
?>
</strong> to make caching work.
        </div>

        <p class="submit">
Exemplo n.º 28
0
        <?php 
Util_Ui::button_config_save('general_debug');
?>
        <?php 
Util_Ui::postbox_footer();
?>
    </div>
</form>

<form action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post" enctype="multipart/form-data">
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Import / Export Settings', 'w3-total-cache'), '', 'settings');
?>
        <?php 
echo Util_Ui::nonce_field('w3tc');
?>
        <table class="form-table">
            <tr>
                <th><?php 
_e('Import configuration:', 'w3-total-cache');
?>
</th>
                <td>
                    <input type="file" name="config_file" />
                    <input type="submit" name="w3tc_config_import" class="w3tc-button-save button" value="<?php 
_e('Upload', 'w3-total-cache');
?>
namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px" class="w3tc_cdn_highwinds_form">
    <?php 
if (!empty($details['error_message'])) {
    echo '<div class="error">' . $details['error_message'] . '</div>';
}
?>
    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('CNAMEs to use', 'w3-total-cache'));
?>
        <?php 
$cname_class = 'w3tc-ignore-change';
include W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
        <br />
        <span class="description"><?php 
_e('Enter hostname mapped to <acronym>CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache');
?>
</span>

        <p class="submit">
            <input type="button"
                class="w3tc_cdn_highwinds_configure_cnames w3tc-button-save button-primary"
                value="<?php 
<?php

namespace W3TC;

if (!defined('W3TC')) {
    die;
}
?>
<form style="padding: 20px" class="w3tcnr_form">
    <?php 
Util_Ui::hidden('', 'api_key', $details['api_key']);
?>

    <div class="metabox-holder">
        <?php 
Util_Ui::postbox_header(__('Select Application', 'w3-total-cache'));
?>
        <table class="form-table">
            <tr><td>
                <label>
                    <input name="monitoring_type" type="radio" value="apm"
                        <?php 
checked($details['monitoring_type'], 'apm');
?>
 />
                    APM application (uses NewRelic PHP module)
                </label><br />
                <select name="apm_application_name" class="w3tcnr_apm">
                    <?php 
foreach ($details['apm_applications'] as $a) {
    echo '<option ';