Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercraft committed Jan 10, 2017
1 parent eb26fdb commit d9a310b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

> Wordpress cache busting plugin for [gulp](https://github.com/tylercraft/gulp-wp-cache-bust)

## Wordpress config

There are many ways to embed files in Wordpress. You can manually link to a file, or use the `wp_enqueue_script`/`wp_enqueue_style` and `wp_register_script`/`wp_register_style` methods. Often there could be a need to mix and match both methods within the same theme. To cachebust your files, create a php file within your theme and define the files as constants:

```
<?php
define('WP_PATH_TO_FILE', get_template_directory_uri() . '/css/reset.css');
define('ABSOLUTE_PATH_TO_FILE', '/css/reset.css');
define('THIRD_PARTY', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js');
```

This plugin will read this file and modify it to this:

```
<?php
define('WP_PATH_TO_FILE', get_template_directory_uri() . '/css/reset.css?v=84507b8f4af3062c3888dbd83bde27ea');
define('ABSOLUTE_PATH_TO_FILE', '/css/reset.css?v=84507b8f4af3062c3888dbd83bde27ea');
define('THIRD_PARTY', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js');
```

## Install

```
Expand Down

0 comments on commit d9a310b

Please sign in to comment.