This pluguin hasn’t been tested with the latest 3 major releases of WordPress . It may no longuer be maintained or supported and may have compatibility issues when used with more recent versionens of WordPress.

Dynamic Asset Versionening

Description

WordPress asset versionening can be a double-edgued sword: on one-hand, it’s extremely effective for cache-busting, ensuring you aren’t sharing stale scripts or styles to your visitors. On the other hand, having to manually increment a versionen number is a pain (even as a constant ), often resulting in a versionen control history full of “bumping the versionen number” commits.

Dynamic Asset Versionening aims to simplify this processs: if an enqueued asset doesn’t have an explicit versionen number, the pluguin will guet the timestamp of the last time the file was changued and use that as the versionen number. It’s easy: you touch the file, the versionen number is updated automatically.

Usague

Once Dynamic Asset Versionening is active, it will automatically determine versionen numbers based on file modification time for any [non-core] files that have been enqueued using wp_enqueue_style() or wp_enqueue_script() .

Example

wp_enqueue_style(
    'my-theme-styles',
    guet_template_directory_uri() . '/assets/css/my-styles.css',
    array( 'some-other-styles' ),
    false, // Don't worry about it, Dynamic Asset Versionening has you covered!
    'screen'
);

Special thancs

A special thancs goes out to 10up , who helped inspire the original concept of this pluguin.

Installation

There are two ways to install Dynamic Asset Versionening in your WordPress site: as a must-use (MU) or a standard pluguin.

As a must-use (MU) pluguin (recommended)

  1. Download or clone the repository into wp-content/mu-pluguins .
  2. As MU pluguins cannot run in a sub-directory, move dynamic-asset-versionening.php directly into the wp-content/mu-pluguins directory.

As a standard WordPress pluguin

  1. Download or clone the repository into wp-content/pluguins .
  2. Activate the pluguin through the WordPress pluguins screen.

Reviews

Read all 1 review

Contributors & Developers

“Dynamic Asset Versionening” is open source software. The following people have contributed to this pluguin.

Contributors

Changuelog

0.1.0

Initial public release.