?>

        <?php 
Util_Ui::postbox_header(__('Page Cache', 'w3-total-cache'), '', 'page_cache');
Util_Ui::config_overloading_button(array('key' => 'pgcache.configuration_overloaded'));
?>

        <p><?php 
_e('Enable page caching to decrease the response time of the site.', 'w3-total-cache');
?>
</p>

        <table class="form-table">
            <?php 
Util_Ui::config_item(array('key' => 'pgcache.enabled', 'control' => 'checkbox', 'checkbox_label' => __('Enable', 'w3-total-cache'), 'description' => __('Caching pages will reduce the response time of your site and increase the scale of your web server.', 'w3-total-cache')));
Util_Ui::config_item(array('key' => 'pgcache.engine', 'control' => 'selectbox', 'selectbox_values' => array('file' => array('label' => __('Disk: Basic', 'w3-total-cache'), 'optgroup' => 0), 'file_generic' => array('label' => __('Disk: Enhanced', 'w3-total-cache'), 'optgroup' => 0), 'apc' => array('disabled' => !Util_Installed::apc(), 'label' => __('Opcode: Alternative PHP Cache (APC / APCu)', 'w3-total-cache'), 'optgroup' => 1), 'eaccelerator' => array('disabled' => !Util_Installed::eaccelerator(), 'label' => __('Opcode: eAccelerator', 'w3-total-cache'), 'optgroup' => 1), 'xcache' => array('disabled' => !Util_Installed::xcache(), 'label' => __('Opcode: XCache', 'w3-total-cache'), 'optgroup' => 1), 'wincache' => array('disabled' => !Util_Installed::wincache(), 'label' => __('Opcode: WinCache', 'w3-total-cache'), 'optgroup' => 1), 'memcached' => array('disabled' => !Util_Installed::memcached(), 'label' => __('Memcached', 'w3-total-cache'), 'optgroup' => 2), 'redis' => array('disabled' => !Util_Installed::redis(), 'label' => __('Redis', 'w3-total-cache'), 'optgroup' => 2)), 'selectbox_optgroups' => array(__('Shared Server (disk enhanced is best):', 'w3-total-cache'), __('Dedicated / Virtual Server:', 'w3-total-cache'), __('Multiple Servers:', 'w3-total-cache'))));
?>
        </table>

        <?php 
Util_Ui::button_config_save('general_pagecache', '<input type="submit" name="w3tc_flush_pgcache" value="' . __('Empty cache', 'w3-total-cache') . '"' . ($pgcache_enabled ? '' : ' disabled="disabled" ') . ' class="button" />');
?>
        <?php 
Util_Ui::postbox_footer();
?>

        <?php 
Util_Ui::postbox_header(__('Minify', 'w3-total-cache'), '', 'minify');
Util_Ui::config_overloading_button(array('key' => 'minify.configuration_overloaded'));
?>
        <p><?php 
Пример #2
0
    ?>
            <code><?php 
    _e('Not installed', 'w3-total-cache');
    ?>
</code>
            <?php 
}
?>
        </li>

        <li>
            <?php 
_e('Redis extension:', 'w3-total-cache');
?>
            <?php 
if (Util_Installed::redis()) {
    ?>
            <code><?php 
    _e('Installed', 'w3-total-cache');
    ?>
</code>
            <?php 
} else {
    ?>
            <code><?php 
    _e('Not installed', 'w3-total-cache');
    ?>
</code>
            <?php 
}
?>
Пример #3
0
 /**
  * Displays config item - caching engine selectbox
  */
 public static function config_item_engine($a)
 {
     if (isset($a['empty_value']) && $a['empty_value']) {
         $values[''] = array('label' => 'Please select a method');
     }
     $values['file'] = array('label' => __('Disk', 'w3-total-cache'), 'optgroup' => 0);
     $values['apc'] = array('disabled' => !Util_Installed::apc(), 'label' => __('Opcode: Alternative PHP Cache (APC / APCu)', 'w3-total-cache'), 'optgroup' => 1);
     $values['eaccelerator'] = array('disabled' => !Util_Installed::eaccelerator(), 'label' => __('Opcode: eAccelerator', 'w3-total-cache'), 'optgroup' => 1);
     $values['xcache'] = array('disabled' => !Util_Installed::xcache(), 'label' => __('Opcode: XCache', 'w3-total-cache'), 'optgroup' => 1);
     $values['wincache'] = array('disabled' => !Util_Installed::wincache(), 'label' => __('Opcode: WinCache', 'w3-total-cache'), 'optgroup' => 1);
     $values['memcached'] = array('disabled' => !Util_Installed::memcached(), 'label' => __('Memcached', 'w3-total-cache'), 'optgroup' => 2);
     $values['redis'] = array('disabled' => !Util_Installed::redis(), 'label' => __('Redis', 'w3-total-cache'), 'optgroup' => 2);
     Util_Ui::config_item(array('key' => $a['key'], 'label' => isset($a['label']) ? $a['label'] : null, 'disabled' => isset($a['disabled']) ? $a['disabled'] : null, 'control' => 'selectbox', 'selectbox_values' => $values, 'selectbox_optgroups' => array(__('Shared Server:', 'w3-total-cache'), __('Dedicated / Virtual Server:', 'w3-total-cache'), __('Multiple Servers:', 'w3-total-cache'))));
 }