Exemplo n.º 1
0
    echo esc_textarea(implode("\r\n", $this->_config->get_array('minify.cache.files')));
    ?>
</textarea><br />
                    <span class="description"><?php 
    _e('Specify external files/libraries that should be combined.', 'w3-total-cache');
    ?>
</span>
                </td>
            </tr>
            <?php 
}
?>
        </table>

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

        <?php 
Util_Ui::postbox_header(__('Note(s):', 'w3-total-cache'), '', 'notes');
?>
        <table class="form-table">
            <tr>
                <th colspan="2">
                    <ul>
                        <li><?php 
_e('Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression in the "Cascading Style Sheets &amp; JavaScript" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache');
?>
if ($state == 'available') {
    ?>
<table class="form-table">
<?php 
    Util_Ui::config_item(array('key' => array('cloudflare', 'widget_interval'), 'label' => __('Widget statistics interval:', 'w3-total-cache'), 'control' => 'selectbox', 'selectbox_values' => array('-30' => 'Last 30 minutes', '-360' => 'Last 6 hours', '-720' => 'Last 12 hours', '-1440' => 'Last 24 hours', '-10080' => 'Last week', '-43200' => 'Last month')));
    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 
}
?>


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


<?php 
if ($state == 'available') {
    Util_Ui::postbox_header(__('CloudFlare: Caching', 'w3-total-cache'), '', 'general');
    ?>
<table class="form-table">

<?php 
    self::cloudflare_checkbox($settings, array('key' => 'development_mode', 'label' => 'Development mode:', 'description' => 'Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass CloudFlare\'s accelerated cache and slow down your site, but is useful if you are making changes to cacheable content (like images, css, or JavaScript) and would like to see those changes right away.'));
    self::cloudflare_selectbox($settings, array('key' => 'cache_level', 'label' => __('Cache level:', 'w3-total-cache'), 'values' => array('' => '', 'aggressive' => 'Aggressive (cache all static resources, including ones with a query string)', 'basic' => 'Basic (cache most static resources (i.e., css, images, and JavaScript)', 'simplified' => 'Simplified (ignore the query string when delivering a cached resource)'), 'description' => 'How the content is cached by CloudFlare'));
    self::cloudflare_checkbox($settings, array('key' => 'sort_query_string_for_cache', 'label' => 'Query String Sorting', 'description' => 'CloudFlare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings.'));
    self::cloudflare_selectbox($settings, array('key' => 'browser_cache_ttl', 'label' => 'Browser Cache TTL', 'values' => array('' => '', '30' => '30', '60' => '60', '300' => '300', '1200' => '1200', '1800' => '1800', '3600' => '3600', '7200' => '7200', '10800' => '10800', '14400' => '14400', '18000' => '18000', '28800' => '28800', '43200' => '43200', '57600' => '57600', '72000' => '72000', '86400' => '86400', '172800' => '172800', '259200' => '259200', '345600' => '345600', '432000' => '432000', '691200' => '691200', '1382400' => '1382400', '2073600' => '2073600', '2678400' => '2678400', '5356800' => '5356800', '16070400' => '16070400', '31536000' => '31536000'), 'description' => 'Browser Cache TTL (in seconds) specifies how long CloudFlare-cached resources will remain on your visitors\' computers.'));
Exemplo n.º 3
0
checked($set_cookie_domain, true);
?>
 /> <?php 
printf(__('Set cookie domain to &quot;%s&quot', 'w3-tota-cachel'), htmlspecialchars($cookie_domain));
?>
</label>
					<br /><span class="description"><?php 
_e('If using subdomain for <acronym title="Content Delivery Network">CDN</acronym> functionality, this setting helps prevent new users from sending cookies in requests to the <acronym title="Content Delivery Network">CDN</acronym> subdomain.', 'w3-total-cache');
?>
</span>
				</th>
			</tr>
		</table>

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

		<?php 
Util_Ui::postbox_header(__('Note(s):', 'w3-total-cache'), '', 'notes');
?>
		<table class="form-table">
			<tr>
				<th colspan="2">
					<ul>
						<li><?php 
_e('You can use placeholders {wp_content_dir}, {plugins_dir}, {uploads_dir} instead of writing folder paths (wp-content, wp-content/plugins, wp-content/uploads).', 'w3-total-cache');
?>
    Util_Ui::e_config_label('cluster.messagebus.debug');
    ?>
</label><br />
                    <?php 
}
?>
                    <span class="description"><?php 
_e('If selected, detailed caching information will be appear at the end of each page in a <acronym title="Hypertext Markup Language">HTML</acronym> comment. View a page\'s source code to review.', 'w3-total-cache');
?>
</span>
                </td>
            </tr>
        </table>

        <?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

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();
    Util_Ui::e_config_label('pgcache.cache.nginx_handle_xml');
    ?>
</label><br />
					<span class="description"><?php 
    _e('Return correct Content-Type header for XML files. Slows down cache engine.', 'w3-total-cache');
    ?>
</span>
				</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');
?>
Exemplo n.º 7
0
    ?>
</option>
            <option value="deactivate-selected"><?php 
    _e('Deactivate', 'w3-total-cache');
    ?>
</option>
        </select>
        <input type="submit" name="" id="doaction" class="w3tc-button-save button action" value="<?php 
    esc_attr_e('Apply');
    ?>
">
    </div>
    <?php 
}
?>

    <div class="tablenav-pages one-page">
        <span class="displaying-num"><?php 
printf(translate_nooped_plural(_n_noop('%s extension', '%s extensions'), sizeof($extensions), 'w3-total-cache'), sizeof($extensions));
?>
</span>
    </div>
    <br class="clear">
</div>

<?php 
if (is_network_admin()) {
    ?>
    <?php 
    Util_Ui::button_config_save('extensions');
}
?>
</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 
Exemplo n.º 9
0
                    <?php 
    $this->checkbox('objectcache.purge.all');
    ?>
 <?php 
    Util_Ui::e_config_label('objectcache.purge.all');
    ?>
</label>
                    <br /><span class="description"><?php 
    _e('Enabling this option will increase load on server on certain actions but will guarantee that
                    the Object Cache is always clean and contains latest changes. <em>Enable if you are experiencing issues
                     with options displaying wrong value/state (checkboxes etc).</em>', 'w3-total-cache');
    ?>
</span>
                </th>
            </tr>
            <?php 
}
?>
        </table>

        <?php 
Util_Ui::button_config_save('objectcache');
?>
        <?php 
Util_Ui::postbox_footer();
?>
    </div>
</form>

<?php 
include W3TC_INC_DIR . '/options/common/footer.php';
Exemplo n.º 10
0
    echo esc_textarea(implode("\r\n", (array) $group_config['referrers']));
    ?>
</textarea>
                            <br /><span class="description"><?php 
    _e('Specify the referrers for this group. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache');
    ?>
</span>
                        </td>
                    </tr>
                </table>
            </li>
            <?php 
}
?>
        </ul>
        <div id="referrer_groups_empty" style="display: none;"><?php 
_e('No groups added. All referrers recieve the same page and minify cache results.', 'w3-total-cache');
?>
</div>

        <?php 
Util_Ui::button_config_save('referrers');
?>
        <?php 
Util_Ui::postbox_footer();
?>
    </div>
</form>

<?php 
include W3TC_INC_DIR . '/options/common/footer.php';
			<tr>
				<th><label for="fragmentcache_groups"><?php 
_e('Manual fragment groups:', 'w3-total-cache');
?>
</label></th>
				<td>
					<textarea id="fragmentcache_groups" name="fragmentcache___groups"
						<?php 
Util_Ui::sealing_disabled('fragmentcache.');
?>
							  cols="40" rows="5"><?php 
echo esc_textarea(implode("\r\n", $config->get_array(array('fragmentcache', 'groups'))));
?>
</textarea><br />
					<span class="description"><?php 
_e('Specify fragment groups that should be managed by W3 Total Cache. Enter one action per line comma delimited, e.g. (group, action1, action2). Include the prefix used for a transient by a theme or plugin.', 'w3-total-cache');
?>
</span>
				</td>
			</tr>
		</table>

		<?php 
Util_Ui::button_config_save('extension_fragmentcache');
?>
		<?php 
Util_Ui::postbox_footer();
?>
	</div>
</form>
<?php 
    echo $role_name;
    ?>
" />
                    <label for="role_<?php 
    echo $role_name;
    ?>
"><?php 
    echo $role_data['name'];
    ?>
</label>
                <?php 
}
?>
                <br />
                <span class="description">
                    <?php 
_e('Select user roles that should not use the fragment cache.', 'w3-total-cache');
?>
                </span>
            </td>
        </tr>
    </table>
    <?php 
Util_Ui::button_config_save('extension_genesis_exclusions');
?>
    <?php 
Util_Ui::postbox_footer();
?>

</div>
<?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();
        </th>
        <td class="w3tc-td-with-button">
            <?php 
echo htmlspecialchars($config->get_string(array('newrelic', 'api_key')));
?>
            <input type="button" class="button w3tcnr_configure" value="Configure"
                <?php 
Util_Ui::sealing_disabled('newrelic');
?>
 />
        </td>
    </tr>
    <tr>
        <th>
            <label><?php 
_e('Application name:', 'w3-total-cache');
?>
</label>
        </th>
        <td class="w3tc-td-with-button"><?php 
if ($config->get_string(array('newrelic', 'monitoring_type')) == 'browser') {
    echo '(browser) ';
}
echo htmlspecialchars($effective_appname);
?>
</td>
    </tr>
</table>
<?php 
Util_Ui::button_config_save('general_newrelic');
Util_Ui::postbox_footer();
            <input id="newrelic_enable_xmit" name="extension__newrelic__enable_xmit" type="checkbox" value="1" <?php 
checked($config->get_boolean(array('newrelic', 'enable_xmit')));
?>
 <?php 
Util_Ui::sealing_disabled('newrelic');
?>
/>
                <p><span class="description"><?php 
_e(sprintf('Enable this if you want to record the metric and transaction data (until the name is changed using PHP function), specify a value of true for this argument to make the agent send the transaction to the daemon. There is a slight performance impact as it takes a few milliseconds for the agent to dump its data. <em>From %s</em>', '<a href="https://newrelic.com/docs/php/the-php-api">New Relic PHP API doc</a>'), 'w3-total-cache');
?>
</span></p>
            </td>
        </tr>
    </table>
    <?php 
Util_Ui::button_config_save('extension_newrelic_behaviour');
?>
    <?php 
Util_Ui::postbox_footer();
?>
    </form>
</div>
<?php 
if ($view_metric) {
    ?>
<table>
<?php 
    foreach ($metric_names as $metric) {
        ?>
    <tr>
        <th style="text-align: right"><strong><?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 
}
?>
        </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';
</span>
                </th>
            </tr>
            <tr>
                <th colspan="2">
                    <?php 
$this->checkbox('browsercache.other.nocookies');
?>
 <?php 
Util_Ui::e_config_label('browsercache.other.nocookies');
?>
</label>
                    <br /><span class="description"><?php 
_e('Removes Set-Cookie header for responses.', 'w3-total-cache');
?>
</span>
                </th>
            </tr>
        </table>

        <?php 
Util_Ui::button_config_save('browsercache_media');
?>
        <?php 
Util_Ui::postbox_footer();
?>
    </div>
</form>

<?php 
include W3TC_INC_DIR . '/options/common/footer.php';
<?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();
Exemplo n.º 19
0
<?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();
Exemplo n.º 20
0
                        </td>
                    </tr>
                </table>
            </li>
            <?php 
}
?>
        </ul>
        <div id="mobile_groups_empty" style="display: none;"><?php 
_e('No groups added. All user agents recieve the same page and minify cache results.', 'w3-total-cache');
?>
</div>

        <?php 
if (!$groups['disabled']) {
    Util_Ui::button_config_save('mobile');
}
Util_Ui::postbox_footer();
Util_Ui::postbox_header(__('Note(s):', 'w3-total-cache'), '', 'notes');
?>
        <table class="form-table">
            <tr>
                <th colspan="2">
                    <ul>
                        <?php 
echo $groups['description'];
?>
                    </ul>
                </th>
            </tr>
        </table>