Linux 软件免费装
Banner图

Autover

开发者 Presslabs
olarmarius
更新时间 2024年7月29日 21:03
捐献地址: 去捐款
PHP版本: 4.7 及以上
WordPress版本: 6.6
版权: GPLv2 or later
版权网址: 版权信息

标签

css pages javascript automatic style script js filter version auto ver head wp-enqueue versioning autover presslabs

下载

1.1 1.2 1.3 1.4 1.5 1.0

详情介绍:

Autover plugin will automatically version your CSS and JS files. This is especially useful when using a Content Distribution Network (CDN) for delivering static files like CSS and JavaScripts. The plugin appends to the resource URL a numeric version number generated by the filemtime() PHP function (e.g. style.css?ver=1359464809). This means the version number will be updated every time the CSS or JS file is being saved. IMPORTANT: this plugin only works with CSS and JS files that are enqueued using the standard WordPress functions wp_enqueue_style and wp_enqueue_script and/or admin_enqueue_style, admin_enqueue_script.

安装:

Installation
  1. Upload autover.zip to the /wp-content/plugins/ directory;
  2. Extract the autover.zip archive into the /wp-content/plugins/ directory;
  3. 通过 WordPress 的“插件”菜单激活插件。 Alternatively go into your WordPress dashboard and click on Plugins -> Add Plugin and search for Autover. Then click on Install, then on Activate Now.
用法 Just install and activate the plugin. The plugin will automatically start to version your CSS and JS files that are correctly enqueued into WordPress (by using wp_enqueue_style and wp_enqueue_script and/or admin_enqueue_style, admin_enqueue_script functions). Depending on the caching mechanism used, a purge of page (html) cache might be needed. If you want to version only CSS or only JS files, please use the constants AUTOVER_DISABLE_JS and AUTOVER_DISABLE_CSS.

屏幕截图:

  • After activation

升级注意事项:

1.4
  • Cleaned up the plugin code(remove the options from DB).
  • Now the plugin uses the constants AUTOVER_DISABLE_CSS / AUTOVER_DISABLE_JS to see if it needs to ignore a resource.
  • Removed the settings page (replaced by the constants AUTOVER_DISABLE_JS and AUTOVER_DISABLE_CSS).
  • Removed the file list.
1.3 Add file lists. 1.2 Settings tab is now separated for easier understanding and bug fixes. 1.1 Bug fix: fixed some settings error. 1.0 First version on WP.

常见问题:

Why should I use this plugin?

If you want to automatically version your CSS and JavaScript files, this will help to load your CSS and JS file into the cache memory only when you change the code from the files.

What is the difference between the wp_enqueue_script and admin_enqueue_script?

The 'admin_' hooks are designed for wp-admin area or so called Dashboard area, the 'wp_' hooks are designed for site.

更新日志:

1.5 1.4 1.3 1.2 1.1 1.0