WordPress.org

Plugin Directory

Changeset 428862


Ignore:
Timestamp:
08/26/11 04:17:56 (3 years ago)
Author:
fredericktownes
Message:
 
Location:
w3-total-cache
Files:
410 added
12 edited

Legend:

Unmodified
Added
Removed
  • w3-total-cache/trunk/inc/define.php

    r420800 r428862  
    66 
    77define('W3TC', true); 
    8 define('W3TC_VERSION', '0.9.2.4b'); 
     8define('W3TC_VERSION', '0.9.2.4'); 
    99define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION); 
    1010define('W3TC_EMAIL', 'w3tc@w3-edge.com'); 
     
    681681 
    682682/** 
     683 * Returns home domain 
     684 * 
     685 * @return string 
     686 */ 
     687function w3_get_home_domain() { 
     688    $home_url = w3_get_home_url(); 
     689    $parse_url = @parse_url($home_url); 
     690 
     691    if ($parse_url && isset($parse_url['host'])) { 
     692        return $parse_url['host']; 
     693    } 
     694 
     695    return w3_get_host(); 
     696} 
     697 
     698/** 
    683699 * Returns home path 
    684700 * 
  • w3-total-cache/trunk/inc/options/general.php

    r419604 r428862  
    7171                    <select name="pgcache.engine"> 
    7272                        <optgroup label="Shared Server (disk enhanced is best):"> 
    73                             <option value="file_generic"<?php selected($this->_config->get_string('pgcache.engine'), 'file_generic'); ?><?php if (! $check_rules): ?> disabled="disabled"<?php endif; ?>>Disk: enhanced</option> 
    74                             <option value="file"<?php selected($this->_config->get_string('pgcache.engine'), 'file'); ?>>Disk: basic</option> 
     73                            <option value="file"<?php selected($this->_config->get_string('pgcache.engine'), 'file'); ?>>Disk: Basic</option> 
     74                            <option value="file_generic"<?php selected($this->_config->get_string('pgcache.engine'), 'file_generic'); ?><?php if (! $check_rules): ?> disabled="disabled"<?php endif; ?>>Disk: Enhanced</option> 
    7575                        </optgroup> 
    7676                        <optgroup label="Dedicated / Virtual Server:"> 
     
    252252        <?php echo $this->postbox_footer(); ?> 
    253253 
    254         <?php echo $this->postbox_header('Network Performance &amp; Security powered by CloudFlare'); ?> 
    255         <p> 
    256             CloudFlare protects and accelerates websites. <a href="https://www.cloudflare.com/sign-up.html?affiliate=w3edge&amp;seed_domain=<?php echo w3_get_host(); ?>&amp;email=<?php echo htmlspecialchars($cloudflare_signup_email); ?>&amp;username=<?php echo htmlspecialchars($cloudflare_signup_user); ?>" target="_blank">Sign up now for free</a> to get started, 
    257             or if you have an account simply log in to obtain your <acronym title="Application Programming Interface">API</acronym> key from the <a href="https://www.cloudflare.com/my-account.html">Account Page</a> to enter it below. 
    258             Contact the CloudFlare <a href="http://www.cloudflare.com/help.html" target="_blank">support team</a> with any questions. 
    259         </p> 
    260  
    261         <table class="form-table"> 
    262             <tr> 
    263                 <th>CloudFlare:</th> 
    264                 <td> 
    265                     <input type="hidden" name="cloudflare.enabled" value="0" /> 
    266                     <label><input class="enabled" type="checkbox" name="cloudflare.enabled" value="1"<?php checked($cloudflare_enabled, true); ?> />&nbsp;<strong>Enable</strong></label> 
    267                 </td> 
    268             </tr> 
    269             <tr> 
    270                 <th><label for="cloudflare_email">CloudFlare account email:</label></th> 
    271                 <td> 
    272                     <input id="cloudflare_email" class="w3tc-ignore-change" type="text" name="cloudflare.email" value="<?php echo htmlspecialchars($this->_config->get_string('cloudflare.email')); ?>" size="60" /> 
    273                 </td> 
    274             </tr> 
    275             <tr> 
    276                 <th><label for="cloudflare_key"><acronym title="Application Programming Interface">API</acronym> key:</label></th> 
    277                 <td> 
    278                     <input id="cloudflare_key" class="w3tc-ignore-change" type="password" name="cloudflare.key" value="<?php echo htmlspecialchars($this->_config->get_string('cloudflare.key')); ?>" size="60" /> (<a href="https://www.cloudflare.com/my-account.html">find it here</a>) 
    279                 </td> 
    280             </tr> 
    281             <tr> 
    282                 <th>Domain:</th> 
    283                 <td> 
    284                     <input id="cloudflare_zone" type="text" name="cloudflare.zone" value="<?php echo htmlspecialchars($this->_config->get_string('cloudflare.zone', w3_get_host())); ?>" size="40" /> 
    285                 </td> 
    286             </tr> 
    287             <tr> 
    288                 <th>Security level:</th> 
    289                 <td> 
    290                     <input type="hidden" name="cloudflare_seclvl_old" value="<?php echo $cloudflare_seclvl; ?>" /> 
    291                     <select name="cloudflare_seclvl_new" class="w3tc-ignore-change"> 
    292                         <?php foreach ($cloudflare_seclvls as $cloudflare_seclvl_key => $cloudflare_seclvl_label): ?> 
    293                         <option value="<?php echo $cloudflare_seclvl_key; ?>"<?php selected($cloudflare_seclvl, $cloudflare_seclvl_key); ?>><?php echo $cloudflare_seclvl_label; ?></option> 
    294                         <?php endforeach; ?> 
    295                     </select> 
    296                 </td> 
    297             </tr> 
    298             <tr> 
    299                 <th>Development mode:</th> 
    300                 <td> 
    301                     <input type="hidden" name="cloudflare_devmode_old" value="<?php echo $cloudflare_devmode; ?>" /> 
    302                     <select name="cloudflare_devmode_new" class="w3tc-ignore-change"> 
    303                         <?php foreach ($cloudflare_devmodes as $cloudflare_devmode_key => $cloudflare_devmode_label): ?> 
    304                         <option value="<?php echo $cloudflare_devmode_key; ?>"<?php selected($cloudflare_devmode, $cloudflare_devmode_key); ?>><?php echo $cloudflare_devmode_label; ?></option> 
    305                         <?php endforeach; ?> 
    306                     </select> 
    307                     <?php if ($cloudflare_devmode_expire): ?> 
    308                     Will automatically turn off at <?php echo date('m/d/Y H:i:s', $cloudflare_devmode_expire); ?> 
    309                     <?php endif; ?> 
    310                 </td> 
    311             </tr> 
    312         </table> 
    313  
    314         <p class="submit"> 
    315             <?php echo $this->nonce_field('w3tc'); ?> 
    316             <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
    317             <input id="cloudflare_purge_cache" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Purge cache"<?php if (! $cloudflare_enabled): ?> disabled="disabled"<?php endif; ?> /> 
    318         </p> 
    319         <?php echo $this->postbox_footer(); ?> 
    320  
    321         <?php echo $this->postbox_header('Varnish'); ?> 
    322         <table class="form-table"> 
    323             <tr> 
    324                 <th colspan="2"> 
    325                     <input type="hidden" name="varnish.enabled" value="0" /> 
    326                     <label><input class="enabled" type="checkbox" name="varnish.enabled" value="1"<?php checked($varnish_enabled, true); ?> /> Enable varnish cache purging</label><br /> 
    327                 </th> 
    328             </tr> 
    329              <tr> 
    330                  <th><label for="pgcache_varnish_servers">Varnish servers:</label></th> 
    331                  <td> 
    332                     <textarea id="pgcache_varnish_servers" name="varnish.servers" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('varnish.servers'))); ?></textarea><br /> 
    333                     <span class="description">Specify the IP addresses of your varnish instances above. Your <acronym title="Varnish Configuration Language">VCL</acronym>'s <acronym title="Access Control List">ACL</acronym> must allow this request.</span> 
    334                 </td> 
    335             </tr> 
    336         </table> 
    337  
    338         <p class="submit"> 
    339             <?php echo $this->nonce_field('w3tc'); ?> 
    340             <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
    341         </p> 
    342         <?php echo $this->postbox_footer(); ?> 
    343  
    344         <?php echo $this->postbox_header('Content Delivery Network'); ?> 
     254        <?php echo $this->postbox_header('Browser Cache'); ?> 
     255        <p>Reduce server load and decrease response time by using the cache available in site visitor's web browser.</p> 
     256 
     257        <table class="form-table"> 
     258            <tr> 
     259                <th>Browser Cache:</th> 
     260                <td> 
     261                    <input type="hidden" name="browsercache.enabled" value="0" /> 
     262                    <label><input class="enabled" type="checkbox" name="browsercache.enabled" value="1"<?php checked($browsercache_enabled, true); ?> />&nbsp;<strong>Enable</strong></label> 
     263                    <br /><span class="description">Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression and add headers to reduce server load and decrease file load time.</span> 
     264                </td> 
     265            </tr> 
     266        </table> 
     267 
     268        <p class="submit"> 
     269            <?php echo $this->nonce_field('w3tc'); ?> 
     270            <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
     271        </p> 
     272        <?php echo $this->postbox_footer(); ?> 
     273 
     274        <?php echo $this->postbox_header('<acronym title="Content Delivery Network">CDN</acronym>'); ?> 
    345275        <p>Host static files with your content delivery network provider to reduce page load time.</p> 
    346276 
     
    385315        <?php echo $this->postbox_footer(); ?> 
    386316 
    387         <?php echo $this->postbox_header('Browser Cache'); ?> 
    388         <p>Reduce server load and decrease response time by using the cache available in site visitor's web browser.</p> 
    389  
    390         <table class="form-table"> 
    391             <tr> 
    392                 <th>Browser Cache:</th> 
    393                 <td> 
    394                     <input type="hidden" name="browsercache.enabled" value="0" /> 
    395                     <label><input class="enabled" type="checkbox" name="browsercache.enabled" value="1"<?php checked($browsercache_enabled, true); ?> />&nbsp;<strong>Enable</strong></label> 
    396                     <br /><span class="description">Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression and add headers to reduce server load and decrease file load time.</span> 
    397                 </td> 
    398             </tr> 
    399         </table> 
    400  
    401         <p class="submit"> 
    402             <?php echo $this->nonce_field('w3tc'); ?> 
    403             <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
     317        <?php echo $this->postbox_header('Varnish'); ?> 
     318        <table class="form-table"> 
     319            <tr> 
     320                <th colspan="2"> 
     321                    <input type="hidden" name="varnish.enabled" value="0" /> 
     322                    <label><input class="enabled" type="checkbox" name="varnish.enabled" value="1"<?php checked($varnish_enabled, true); ?> /> Enable varnish cache purging</label><br /> 
     323                </th> 
     324            </tr> 
     325             <tr> 
     326                 <th><label for="pgcache_varnish_servers">Varnish servers:</label></th> 
     327                 <td> 
     328                    <textarea id="pgcache_varnish_servers" name="varnish.servers" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('varnish.servers'))); ?></textarea><br /> 
     329                    <span class="description">Specify the IP addresses of your varnish instances above. Your <acronym title="Varnish Configuration Language">VCL</acronym>'s <acronym title="Access Control List">ACL</acronym> must allow this request.</span> 
     330                </td> 
     331            </tr> 
     332        </table> 
     333 
     334        <p class="submit"> 
     335            <?php echo $this->nonce_field('w3tc'); ?> 
     336            <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
     337        </p> 
     338        <?php echo $this->postbox_footer(); ?> 
     339 
     340        <?php echo $this->postbox_header('Network Performance &amp; Security powered by CloudFlare'); ?> 
     341        <p> 
     342            CloudFlare protects and accelerates websites. <a href="https://www.cloudflare.com/sign-up.html?affiliate=w3edge&amp;seed_domain=<?php echo w3_get_host(); ?>&amp;email=<?php echo htmlspecialchars($cloudflare_signup_email); ?>&amp;username=<?php echo htmlspecialchars($cloudflare_signup_user); ?>" target="_blank">Sign up now for free</a> to get started, 
     343            or if you have an account simply log in to obtain your <acronym title="Application Programming Interface">API</acronym> key from the <a href="https://www.cloudflare.com/my-account.html">account page</a> to enter it below. 
     344            Contact the CloudFlare <a href="http://www.cloudflare.com/help.html" target="_blank">support team</a> with any questions. 
     345        </p> 
     346 
     347        <table class="form-table"> 
     348            <tr> 
     349                <th>CloudFlare:</th> 
     350                <td> 
     351                    <input type="hidden" name="cloudflare.enabled" value="0" /> 
     352                    <label><input class="enabled" type="checkbox" name="cloudflare.enabled" value="1"<?php checked($cloudflare_enabled, true); ?> />&nbsp;<strong>Enable</strong></label> 
     353                </td> 
     354            </tr> 
     355            <tr> 
     356                <th><label for="cloudflare_email">CloudFlare account email:</label></th> 
     357                <td> 
     358                    <input id="cloudflare_email" class="w3tc-ignore-change" type="text" name="cloudflare.email" value="<?php echo htmlspecialchars($this->_config->get_string('cloudflare.email')); ?>" size="60" /> 
     359                </td> 
     360            </tr> 
     361            <tr> 
     362                <th><label for="cloudflare_key"><acronym title="Application Programming Interface">API</acronym> key:</label></th> 
     363                <td> 
     364                    <input id="cloudflare_key" class="w3tc-ignore-change" type="password" name="cloudflare.key" value="<?php echo htmlspecialchars($this->_config->get_string('cloudflare.key')); ?>" size="60" /> (<a href="https://www.cloudflare.com/my-account.html">find it here</a>) 
     365                </td> 
     366            </tr> 
     367            <tr> 
     368                <th>Domain:</th> 
     369                <td> 
     370                    <input id="cloudflare_zone" type="text" name="cloudflare.zone" value="<?php echo htmlspecialchars($this->_config->get_string('cloudflare.zone', w3_get_host())); ?>" size="40" /> 
     371                </td> 
     372            </tr> 
     373            <tr> 
     374                <th>Security level:</th> 
     375                <td> 
     376                    <input type="hidden" name="cloudflare_seclvl_old" value="<?php echo $cloudflare_seclvl; ?>" /> 
     377                    <select name="cloudflare_seclvl_new" class="w3tc-ignore-change"> 
     378                        <?php foreach ($cloudflare_seclvls as $cloudflare_seclvl_key => $cloudflare_seclvl_label): ?> 
     379                        <option value="<?php echo $cloudflare_seclvl_key; ?>"<?php selected($cloudflare_seclvl, $cloudflare_seclvl_key); ?>><?php echo $cloudflare_seclvl_label; ?></option> 
     380                        <?php endforeach; ?> 
     381                    </select> 
     382                </td> 
     383            </tr> 
     384            <tr> 
     385                <th>Development mode:</th> 
     386                <td> 
     387                    <input type="hidden" name="cloudflare_devmode_old" value="<?php echo $cloudflare_devmode; ?>" /> 
     388                    <select name="cloudflare_devmode_new" class="w3tc-ignore-change"> 
     389                        <?php foreach ($cloudflare_devmodes as $cloudflare_devmode_key => $cloudflare_devmode_label): ?> 
     390                        <option value="<?php echo $cloudflare_devmode_key; ?>"<?php selected($cloudflare_devmode, $cloudflare_devmode_key); ?>><?php echo $cloudflare_devmode_label; ?></option> 
     391                        <?php endforeach; ?> 
     392                    </select> 
     393                    <?php if ($cloudflare_devmode_expire): ?> 
     394                    Will automatically turn off at <?php echo date('m/d/Y H:i:s', $cloudflare_devmode_expire); ?> 
     395                    <?php endif; ?> 
     396                </td> 
     397            </tr> 
     398        </table> 
     399 
     400        <p class="submit"> 
     401            <?php echo $this->nonce_field('w3tc'); ?> 
     402            <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
     403            <input id="cloudflare_purge_cache" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Purge cache"<?php if (! $cloudflare_enabled): ?> disabled="disabled"<?php endif; ?> /> 
    404404        </p> 
    405405        <?php echo $this->postbox_footer(); ?> 
     
    423423        <p>If you want to manually place a link, here is the code:</p> 
    424424        <p><textarea cols="80" rows="4">Performance Optimization &lt;a href=&quot;http://www.w3-edge.com/wordpress-plugins/&quot; rel=&quot;external&quot;&gt;WordPress Plugins&lt;/a&gt; by W3 EDGE</textarea></p> 
     425 
     426        <p class="submit"> 
     427            <?php echo $this->nonce_field('w3tc'); ?> 
     428            <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
     429        </p> 
     430        <?php echo $this->postbox_footer(); ?> 
     431        <?php echo $this->postbox_header('Miscellaneous'); ?> 
     432        <table class="form-table"> 
     433            <?php if (w3_is_nginx()): ?> 
     434            <tr> 
     435                <th>Nginx server configuration file path</th> 
     436                <td> 
     437                    <input type="text" name="config.path" value="<?php echo htmlspecialchars($this->_config->get_string('config.path')); ?>" size="80" /> 
     438                    <br /><span class="description">If empty the default path will be used..</span> 
     439                </td> 
     440            </tr> 
     441            <?php endif; ?> 
     442            <tr> 
     443                <th colspan="2"> 
     444                    <input type="hidden" name="config.check" value="0" /> 
     445                    <label><input type="checkbox" name="config.check" value="1"<?php checked($this->_config->get_boolean('config.check'), true); ?> /> Verify rewrite rules</label> 
     446                    <br /><span class="description">Notify of server configuration errors, if this option is disabled, the server configuration for active settings can be found on the <a href="admin.php?page=w3tc_install">install</a> tab.</span> 
     447                </th> 
     448            </tr> 
     449            <tr> 
     450                <th colspan="2"> 
     451                    <input type="hidden" name="file_locking" value="0"<?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> 
     452                    <label><input type="checkbox" name="file_locking" value="1"<?php checked($file_locking, true); ?><?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> Enable file locking</label> 
     453                    <br /><span class="description">Not recommended for "slow" network-based file systems.</span> 
     454                </th> 
     455            </tr> 
     456            <tr> 
     457                <th colspan="2"> 
     458                    <input type="hidden" name="file_nfs" value="0"<?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> 
     459                    <label><input type="checkbox" name="file_nfs" value="1"<?php checked($file_nfs, true); ?><?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> Optimize disk enhanced page and minify caching for <acronym title="Network File System">NFS</acronym></label> 
     460                    <br /><span class="description">Try this option if your hosting environment uses a network based file system for a possible performance improvement.</span> 
     461                </th> 
     462            </tr> 
     463            <tr> 
     464                <th colspan="2"> 
     465                    <input type="hidden" name="widget.latest.enabled" value="0" /> 
     466                    <label><input type="checkbox" name="widget.latest.enabled" value="1"<?php checked($this->_config->get_boolean('widget.latest.enabled'), true); ?> /> Enable news dashboard widget</label> 
     467                    <br /><span class="description">Display latest tweets and support tips on the WordPress dashboard.</span> 
     468                </th> 
     469            </tr> 
     470            <tr> 
     471                <th colspan="2"> 
     472                    <input type="hidden" name="widget.pagespeed.enabled" value="0" /> 
     473                    <label><input type="checkbox" name="widget.pagespeed.enabled" value="1"<?php checked($this->_config->get_boolean('widget.pagespeed.enabled'), true); ?> />  Enable Google Page Speed dashboard widget</label> 
     474                    <br /><span class="description">Display Google Page Speed results on the WordPress dashboard.</span> 
     475                </th> 
     476            </tr> 
     477            <tr> 
     478                <th><label for="widget_pagespeed_key">Page Speed <acronym title="Application Programming Interface">API</acronym> Key:</label></th> 
     479                <td> 
     480                    <input id="widget_pagespeed_key" type="text" name="widget.pagespeed.key" value="<?php echo $this->_config->get_string('widget.pagespeed.key'); ?>" size="60" /><br /> 
     481                    <span class="description">To acquire an <acronym title="Application Programming Interface">API</acronym> key, visit the <a href="https://code.google.com/apis/console" target="_blank"><acronym title="Application Programming Interface">API</acronym>s Console</a>. Go to the Project Home tab, activate the Page Speed Online <acronym title="Application Programming Interface">API</acronym>, and accept the Terms of Service. 
     482                    Then go to the <acronym title="Application Programming Interface">API</acronym> Access tab. The <acronym title="Application Programming Interface">API</acronym> key is in the Simple <acronym title="Application Programming Interface">API</acronym> Access section.</span> 
     483                </td> 
     484            </tr> 
     485        </table> 
    425486 
    426487        <p class="submit"> 
     
    459520        </p> 
    460521        <?php echo $this->postbox_footer(); ?> 
    461  
    462         <?php echo $this->postbox_header('Miscellaneous'); ?> 
    463         <table class="form-table"> 
    464             <?php if (w3_is_nginx()): ?> 
    465             <tr> 
    466                 <th>Nginx server configuration file path</th> 
    467                 <td> 
    468                     <input type="text" name="config.path" value="<?php echo htmlspecialchars($this->_config->get_string('config.path')); ?>" size="80" /> 
    469                     <br /><span class="description">If empty the default path will be used..</span> 
    470                 </td> 
    471             </tr> 
    472             <?php endif; ?> 
    473             <tr> 
    474                 <th colspan="2"> 
    475                     <input type="hidden" name="config.check" value="0" /> 
    476                     <label><input type="checkbox" name="config.check" value="1"<?php checked($this->_config->get_boolean('config.check'), true); ?> /> Verify rewrite rules</label> 
    477                     <br /><span class="description">Notify of server configuration errors, if this option is disabled, the server configuration for active settings can be found on the <a href="admin.php?page=w3tc_install">install</a> tab.</span> 
    478                 </th> 
    479             </tr> 
    480             <tr> 
    481                 <th colspan="2"> 
    482                     <input type="hidden" name="file_locking" value="0"<?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> 
    483                     <label><input type="checkbox" name="file_locking" value="1"<?php checked($file_locking, true); ?><?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> Enable file locking</label> 
    484                     <br /><span class="description">Not recommended for "slow" network-based file systems.</span> 
    485                 </th> 
    486             </tr> 
    487             <tr> 
    488                 <th colspan="2"> 
    489                     <input type="hidden" name="file_nfs" value="0"<?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> 
    490                     <label><input type="checkbox" name="file_nfs" value="1"<?php checked($file_nfs, true); ?><?php if (! $can_empty_file): ?> disabled="disabled"<?php endif; ?> /> Optimize disk enhanced page and minify caching for <acronym title="Network File System">NFS</acronym></label> 
    491                     <br /><span class="description">Try this option if your hosting environment uses a network based file system for a possible performance improvement.</span> 
    492                 </th> 
    493             </tr> 
    494             <tr> 
    495                 <th colspan="2"> 
    496                     <input type="hidden" name="widget.latest.enabled" value="0" /> 
    497                     <label><input type="checkbox" name="widget.latest.enabled" value="1"<?php checked($this->_config->get_boolean('widget.latest.enabled'), true); ?> /> Enable news dashboard widget</label> 
    498                     <br /><span class="description">Display latest tweets and support tips on the WordPress dashboard.</span> 
    499                 </th> 
    500             </tr> 
    501             <tr> 
    502                 <th colspan="2"> 
    503                     <input type="hidden" name="widget.pagespeed.enabled" value="0" /> 
    504                     <label><input type="checkbox" name="widget.pagespeed.enabled" value="1"<?php checked($this->_config->get_boolean('widget.pagespeed.enabled'), true); ?> />  Enable Google Page Speed dashboard widget</label> 
    505                     <br /><span class="description">Display Google Page Speed results on the WordPress dashboard.</span> 
    506                 </th> 
    507             </tr> 
    508             <tr> 
    509                 <th><label for="widget_pagespeed_key">Page Speed <acronym title="Application Programming Interface">API</acronym> Key:</label></th> 
    510                 <td> 
    511                     <input id="widget_pagespeed_key" type="text" name="widget.pagespeed.key" value="<?php echo $this->_config->get_string('widget.pagespeed.key'); ?>" size="60" /><br /> 
    512                     <span class="description">To acquire an <acronym title="Application Programming Interface">API</acronym> key, visit the <a href="https://code.google.com/apis/console" target="_blank"><acronym title="Application Programming Interface">API</acronym>s Console</a>. Go to the Project Home tab, activate the Page Speed Online <acronym title="Application Programming Interface">API</acronym>, and accept the Terms of Service. 
    513                     Then go to the <acronym title="Application Programming Interface">API</acronym> Access tab. The <acronym title="Application Programming Interface">API</acronym> key is in the Simple <acronym title="Application Programming Interface">API</acronym> Access section.</span> 
    514                 </td> 
    515             </tr> 
    516         </table> 
    517  
    518         <p class="submit"> 
    519             <?php echo $this->nonce_field('w3tc'); ?> 
    520             <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" /> 
    521         </p> 
    522         <?php echo $this->postbox_footer(); ?> 
    523522    </div> 
    524523</form> 
  • w3-total-cache/trunk/inc/options/pgcache.php

    r423354 r428862  
    5555                </th> 
    5656            </tr> 
     57            <tr> 
     58                <th> 
     59                    <input type="hidden" name="pgcache.check.domain" value="0" /> 
     60                    <label><input type="checkbox" name="pgcache.check.domain" value="1"<?php checked($this->_config->get_boolean('pgcache.check.domain'), true); ?> /> Cache requests only for <?php echo w3_get_home_domain(); ?> hostname</label><br /> 
     61                    <span class="description">Cache only requests with the same <acronym title="Uniform Resource Indicator">URL</acronym> as the site's <a href="options-general.php">site address</a>.</span> 
     62                </th> 
     63            </tr> 
    5764            <tr> 
    5865                <th> 
  • w3-total-cache/trunk/lib/W3/Config.php

    r420800 r428862  
    5959        'pgcache.memcached.servers' => 'array', 
    6060        'pgcache.memcached.persistant' => 'boolean', 
     61        'pgcache.check.domain' => 'boolean', 
    6162        'pgcache.cache.query' => 'boolean', 
    6263        'pgcache.cache.home' => 'boolean', 
     
    391392        ), 
    392393        'pgcache.memcached.persistant' => true, 
     394        'pgcache.check.domain' => true, 
    393395        'pgcache.cache.query' => true, 
    394396        'pgcache.cache.home' => true, 
  • w3-total-cache/trunk/lib/W3/PgCache.php

    r419604 r428862  
    559559 
    560560        /** 
     561         * Check hostname 
     562         */ 
     563        if ($this->_config->get_boolean('pgcache.check.domain') && w3_get_host() != w3_get_home_domain()) { 
     564            $this->cache_reject_reason = 'Hostname mismatch'; 
     565 
     566            return false; 
     567        } 
     568 
     569        /** 
    561570         * Don't cache 404 pages 
    562571         */ 
  • w3-total-cache/trunk/lib/W3/Plugin/PgCacheAdmin.php

    r423354 r428862  
    627627 
    628628        /** 
     629         * Check hostname 
     630         */ 
     631        if ($this->_config->get_boolean('pgcache.check.domain')) { 
     632            $use_cache_rules .= "    RewriteCond %{HTTP_HOST} =" . w3_get_home_domain() . "\n"; 
     633        } 
     634 
     635        /** 
    629636         * Check permalink structure trailing slash 
    630637         */ 
     
    815822        $rules .= "    set \$w3tc_rewrite 0;\n"; 
    816823        $rules .= "}\n"; 
     824 
     825        /** 
     826         * Check hostname 
     827         */ 
     828        if ($this->_config->get_boolean('pgcache.check.domain')) { 
     829            $rules .= "if (\$http_host != \"" . w3_get_home_domain() . "\") {\n"; 
     830            $rules .= "    set \$w3tc_rewrite 0;\n"; 
     831            $rules .= "}\n"; 
     832        } 
    817833 
    818834        /** 
  • w3-total-cache/trunk/lib/W3/Plugin/TotalCacheAdmin.php

    r423354 r428862  
    258258     */ 
    259259    function admin_init() { 
    260         wp_register_style('w3tc-chosen', plugins_url('pub/css/chosen.css', W3TC_FILE)); 
    261260        wp_register_style('w3tc-options', plugins_url('pub/css/options.css', W3TC_FILE)); 
    262261        wp_register_style('w3tc-lightbox', plugins_url('pub/css/lightbox.css', W3TC_FILE)); 
     
    264263 
    265264        wp_register_script('w3tc-metadata', plugins_url('pub/js/metadata.js', W3TC_FILE)); 
    266         wp_register_script('w3tc-chosen', plugins_url('pub/js/chosen.js', W3TC_FILE)); 
    267265        wp_register_script('w3tc-options', plugins_url('pub/js/options.js', W3TC_FILE)); 
    268266        wp_register_script('w3tc-lightbox', plugins_url('pub/js/lightbox.js', W3TC_FILE)); 
     
    383381     */ 
    384382    function admin_print_styles() { 
    385         wp_enqueue_style('w3tc-chosen'); 
    386383        wp_enqueue_style('w3tc-options'); 
    387384        wp_enqueue_style('w3tc-lightbox'); 
     
    395392    function admin_print_scripts() { 
    396393        wp_enqueue_script('w3tc-metadata'); 
    397         wp_enqueue_script('w3tc-chosen'); 
    398394        wp_enqueue_script('w3tc-options'); 
    399395        wp_enqueue_script('w3tc-lightbox'); 
  • w3-total-cache/trunk/pub/css/options.css

    r405393 r428862  
    195195 
    196196#cdn_cnames li:hover { 
    197     background: #f9f9f9; 
     197    background: #e9e9e9; 
    198198} 
    199199 
     
    206206    cursor: ns-resize; 
    207207    list-style: none; 
    208     background: #f9f9f9; 
     208    background: #f0f0f0; 
    209209    margin-bottom: 1em; 
    210210    border-radius: 8px; 
     
    215215#mobile_groups li:hover, 
    216216#referrer_groups li:hover { 
    217     background: #eee; 
     217    background: #e9e9e9; 
    218218} 
    219219 
     
    242242    padding: 2px; 
    243243    list-style: none; 
    244     background: #f9f9f9; 
     244    background: #f0f0f0; 
    245245    cursor: ns-resize; 
    246246    border-radius: 8px; 
     
    251251 
    252252.minify-files li:hover { 
    253     background: #eee; 
     253    background: #e9e9e9; 
    254254} 
    255255 
  • w3-total-cache/trunk/pub/js/lightbox.js

    r423354 r428862  
    201201        url: 'admin.php?page=w3tc_minify&w3tc_minify_recommendations&_wpnonce=' + nonce, 
    202202        callback: function(lightbox) { 
    203             jQuery('select', this.container).chosen(); 
    204  
    205203            var theme = jQuery('#recom_theme').val(); 
    206204 
     
    325323        url: 'admin.php?page=w3tc_general&w3tc_cdn_s3_bucket_location&type=' + type + '&_wpnonce=' + nonce, 
    326324        callback: function(lightbox) { 
    327             jQuery('select', this.container).chosen(); 
    328  
    329325            jQuery('.button', lightbox.container).click(function() { 
    330326                lightbox.close(); 
  • w3-total-cache/trunk/pub/js/options.js

    r423354 r428862  
    266266 
    267267jQuery(function() { 
    268     // chosen 
    269     jQuery('#w3tc select').chosen(); 
    270  
    271268    // general page 
    272269    w3tc_toggle('enabled'); 
  • w3-total-cache/trunk/readme.txt

    r423354 r428862  
    11=== Plugin Name === 
    22Contributors: fredericktownes 
    3 Tags: user experience, cache, caching, page cache, css cache, js cache, db cache, disk cache, disk caching, database cache, http compression, gzip, deflate, minify, cdn, content delivery network, media library, performance, speed, multiple hosts, css, merge, combine, unobtrusive javascript, compress, optimize, optimizer, javascript, js, cascading style sheet, plugin, yslow, yui, google, google rank, google page speed, mod_pagespeed, s3, cloudfront, aws, amazon web services, cloud files, rackspace, cotendo, max cdn, limelight, cloudflare, microsoft, microsoft azure, iis, nginx, apache, varnish, xcache, apc, eacclerator, wincache, mysql, w3 total cache, batcache, wp cache, wp super cache, buddypress 
     3Tags: user experience, cache, caching, page cache, css cache, js cache, db cache, disk cache, disk caching, database cache, http compression, gzip, deflate, minify, cdn, content delivery network, media library, performance, speed, multiple hosts, css, merge, combine, unobtrusive javascript, compress, optimize, optimizer, javascript, js, cascading style sheet, plugin, yslow, yui, google, google rank, google page speed, mod_pagespeed, s3, cloudfront, aws, amazon web services, cloud files, rackspace, cotendo, max cdn, limelight, cloudflare, microsoft, microsoft azure, iis, nginx, litespeed, apache, varnish, xcache, apc, eacclerator, wincache, mysql, w3 total cache, batcache, wp cache, wp super cache, buddypress 
    44Requires at least: 2.8 
    55Tested up to: 3.2.1 
    6 Stable tag: 0.9.2.3 
     6Stable tag: 0.9.2.4 
    77 
    88Improve site performance and user experience via caching: browser, page, object, database, minify and content delivery network support. 
     
    8585To use all features in the suite, a minimum of version WordPress 2.8 with PHP 5 is required. Earlier versions will benefit from our Media Library Importer to get them back on the upgrade path and into a CDN of their choosing. 
    8686 
    87 = What about comments? Does the plugin slow down the rate at which comments appear? = 
    88  
    89 On the contrary, as with any other action a user can perform on a site, faster performance will encourage more of it. The cache is so quickly rebuilt in memory that it's no trouble to show visitors the most current version of a post that's experiencing Digg, Slashdot, Drudge Report, Yahoo Buzz or Twitter effect. 
    90  
    91 = Will the plugin interfere with other plugins or widgets? = 
    92  
    93 No, on the contrary if you use the minify settings you will improve their performance by several times. 
    94  
    95 = Does this plugin work with WordPress in network mode? = 
    96  
    97 Indeed it does. 
    98  
    99 = Does this plugin work with BuddyPress (bbPress)? = 
    100  
    101 Yes. 
    102  
    103 = Will this plugin speed up WP Admin? = 
    104  
    105 Yes, indirectly - if you have a lot of bloggers working with you, you will find that it feels like you have a server dedicated only to WP Admin once this plugin is enabled; the result, increased productivity. 
    106  
    107 = Which web servers do you support? = 
    108  
    109 We are aware of no incompatibilities with [apache](http://httpd.apache.org/) 1.3+, [IIS](http://www.iis.net/) 5+ or [litespeed](http://litespeedtech.com/products/webserver/overview/) 4.0.2+. If there's a web server you feel we should be actively testing (e.g. [lighttpd](http://www.lighttpd.net/)), we're [interested in hearing](http://www.w3-edge.com/contact/). 
    110  
    111 = Is this plugin server cluster and load balancer friendly? = 
    112  
    113 Yes, built from the ground up with scale and current hosting paradigms in mind. 
    114  
    115 = What is the purpose of the "Media Library Import" tool and how do I use it? = 
    116  
    117 The media library import tool is for old or "messy" WordPress installations that have attachments (images etc in posts or pages) scattered about the web server or "hot linked" to 3rd party sites instead of properly using the media library. 
    118  
    119 The tool will scan your posts and pages for the cases above and copy them to your media library, update your posts to use the link addresses and produce a .htaccess file containing the list of of permanent redirects, so search engines can find the files in their new location. 
    120  
    121 You should backup your database before performing this operation. 
    122  
    123 = How do I find the JS and CSS to optimize (minify) them with this plugin? = 
    124  
    125 Use the "Help" button available on the Minify settings tab. Once open, the tool will look for and populate the CSS and JS files used in each template of the site for the active theme. To then add a file to the minify settings, click the checkbox next to that file. The embed location of JS files can also be specified to improve page render performance. Minify settings for all installed themes can be managed from the tool as well by selecting the theme from the drop down menu. Once done configuring minify settings, click the apply and close button, then save settings in the Minify settings tab. 
    126  
    127 = I don't understand what a CDN has to do with caching, that's completely different, no? = 
    128  
    129 Technically no, a CDN is a high performance cache that stores static assets (your theme files, media library etc) in various locations throughout the world in order to provide low latency access to them by readers in those regions. 
    130  
    13187= Who do you recommend as a CDN (Content Delivery Network) provider? = 
    13288 
    13389That depends on how you use your site and where most of your readers read your site (regionally). Here's a short list: 
    13490 
     91* [MaxCDN](http://bit.ly/pXZ4t1) 
     92* [EdgeCast](http://bit.ly/bIjSWC) 
    13593* [Amazon Cloudfront](http://bit.ly/ao1sGt) 
    13694* [Rackspace Cloud Files](http://bit.ly/9hpX8T) 
    137 * [MaxCDN](http://bit.ly/acaXXt) 
    13895* [VPS NET (Level 3)](http://bit.ly/d5hfFt) 
    139 * [EdgeCast](http://bit.ly/bIjSWC) 
    14096* [Cotendo](http://bit.ly/bnVs0a) 
    14197* [Limelight Networks](http://bit.ly/aCW04j) 
    14298* [Akamai](http://bit.ly/a5GBLV) 
    143 * [SimpleCDN](http://bit.ly/93EAKK) 
     99 
     100= What about comments? Does the plugin slow down the rate at which comments appear? = 
     101 
     102On the contrary, as with any other action a user can perform on a site, faster performance will encourage more of it. The cache is so quickly rebuilt in memory that it's no trouble to show visitors the most current version of a post that's experiencing Digg, Slashdot, Drudge Report, Yahoo Buzz or Twitter effect. 
     103 
     104= Will the plugin interfere with other plugins or widgets? = 
     105 
     106No, on the contrary if you use the minify settings you will improve their performance by several times. 
     107 
     108= Does this plugin work with WordPress in network mode? = 
     109 
     110Indeed it does. 
     111 
     112= Does this plugin work with BuddyPress (bbPress)? = 
     113 
     114Yes. 
     115 
     116= Will this plugin speed up WP Admin? = 
     117 
     118Yes, indirectly - if you have a lot of bloggers working with you, you will find that it feels like you have a server dedicated only to WP Admin once this plugin is enabled; the result, increased productivity. 
     119 
     120= Which web servers do you support? = 
     121 
     122We are aware of no incompatibilities with [apache](http://httpd.apache.org/) 1.3+, [IIS](http://www.iis.net/) 5+ or [litespeed](http://litespeedtech.com/products/webserver/overview/) 4.0.2+. If there's a web server you feel we should be actively testing (e.g. [lighttpd](http://www.lighttpd.net/)), we're [interested in hearing](http://www.w3-edge.com/contact/). 
     123 
     124= Is this plugin server cluster and load balancer friendly? = 
     125 
     126Yes, built from the ground up with scale and current hosting paradigms in mind. 
     127 
     128= What is the purpose of the "Media Library Import" tool and how do I use it? = 
     129 
     130The media library import tool is for old or "messy" WordPress installations that have attachments (images etc in posts or pages) scattered about the web server or "hot linked" to 3rd party sites instead of properly using the media library. 
     131 
     132The tool will scan your posts and pages for the cases above and copy them to your media library, update your posts to use the link addresses and produce a .htaccess file containing the list of of permanent redirects, so search engines can find the files in their new location. 
     133 
     134You should backup your database before performing this operation. 
     135 
     136= How do I find the JS and CSS to optimize (minify) them with this plugin? = 
     137 
     138Use the "Help" button available on the Minify settings tab. Once open, the tool will look for and populate the CSS and JS files used in each template of the site for the active theme. To then add a file to the minify settings, click the checkbox next to that file. The embed location of JS files can also be specified to improve page render performance. Minify settings for all installed themes can be managed from the tool as well by selecting the theme from the drop down menu. Once done configuring minify settings, click the apply and close button, then save settings in the Minify settings tab. 
     139 
     140= I don't understand what a CDN has to do with caching, that's completely different, no? = 
     141 
     142Technically no, a CDN is a high performance cache that stores static assets (your theme files, media library etc) in various locations throughout the world in order to provide low latency access to them by readers in those regions. 
    144143 
    145144= What if I don't want to work with a CDN right now, is there any other use for this feature? = 
     
    254253== Press: Mentions, Tutorials &amp; Reviews == 
    255254 
     255** Auguest 2011 ** 
     256 
     257* [Matt Mullenweg: State of the Word 2011 (4:49)](http://wordpress.tv/2011/08/14/matt-mullenweg-state-of-the-word-2011/), Matt Mullenweg 
     258* [W3 Total Cache Setup with CloudFlare and CDN : Complete Tutorial Guide](http://thecustomizewindows.com/2011/08/w3-total-cache-setup-with-cloudflare-and-cdn-complete-tutorial-guide/), Abhishek Ghosh 
     259 
    256260**July 2011:** 
    257261 
     262* [Speeding Up Your Blog – Part II: WordPress & Cloudflare Integration](http://www.thewebhostinghero.com/tutorials/wordpress-cloudflare.html) 
    258263* [How Your Website Loses 7% of Potential Conversions](http://www.clickz.com/clickz/column/2097323/website-loses-potential-conversions), Bryan Eisenberg 
    259264* [How to Integrate Google Page Speed with W3 Total Cache](http://geekscalling.com/google/how-to-integrate-google-page-speed-with-w3-total-cache), Anish 
     
    461466* Added support for Microsoft SQL Server 
    462467* Added API support for MediaTemple ProCDN (EdgeCast) 
     468* Added set_time_limit to self test 
     469* Fixed LiteSpeed web server support 
     470* Fixed native hostname 301 redirect 
     471* Fixed redundant object origin push export 
    463472* Fixed WSOD (white screen of death) caused by minify in some hosting configurations 
    464473* Fixed text encoding in feeds 
     
    469478* Fixed object cache write issue in WP Admin 
    470479* Improved (reduced) memory utilization by up to 70% 
     480* Improved disk enhanced page caching performance 
     481* Improved object caching performance 
    471482* Improved activation reliability 
    472483* Improved reliability of minify auto mode 
  • w3-total-cache/trunk/w3-total-cache.php

    r410604 r428862  
    33Plugin Name: W3 Total Cache 
    44Description: The highest rated and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress. 
    5 Version: 0.9.2.4b 
     5Version: 0.9.2.4 
    66Plugin URI: http://www.w3-edge.com/wordpress-plugins/w3-total-cache/ 
    77Author: Frederick Townes 
Note: See TracChangeset for help on using the changeset viewer.