跳到内容

Cache Time

v1.02

wesg · 2008年5月16日 上架

Cache Time is a simple, but yet advanced plugin that displays the time that the current page was cached.

正在使用
10 以下
评分
暂无
累计下载
2,645
最近更新
2008年7月29日
需要 WordPress 2.0+已测试到 2.6

贡献者

Cache Time displays the time that the current page was cached, and prints it via the cache_time(); function. It takes into account the different time zones of the WordPress blog, and whether or not WP-Cache has blocked the current URL for caching.

It has been tested with WP 2.6 and WP-Cache only, so please contact me with any questions or concerns with other systems. WP-Super-Cache should work, but it is not officially tested.

Be sure to check out my other plugins at my WordPress profile.

USAGE

  1. Anywhere inside the WordPress template pages, copy <?php cache_time(); ?> to print the plugin’s output.

CUSTOMIZATION

There are 3 elements that can be customized with Cache Time:

  1. Text displayed when page is cached — Open cache-time.php inside the Cache-time folder with your favorite text editor and find line 27 that says $cached = 'Page cached on: ';. Change the text between the quotes for your own message.
  2. Text displayed if no cache is present — Similar to above, find line 29 that says $not_cached = 'Time is now: '; and change the text between the quotes.
  3. Date Format — Again inside the cache-time.php file, line 36 can be changed to display your choice of information. More details about customizing the date can be found at w3schools.

LIMITATIONS

  1. Currently Cache Time only works with WP-Cache, though theoretically it should work with WP-Super-Cache as well.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums