sourceboat / wp-laravel-elixir
Get versioned Laravel Elixir file paths in WordPress.
Installs: 4 274
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 0
Type:wordpress-muplugin
Requires (Dev)
This package is auto-updated.
Last update: 2020-11-19 08:22:59 UTC
README
⚠️ Deprecated: This project is not actively maintained anymore. Use it at your own risk.
WP Laravel Elixir
Get versioned Laravel Elixir file paths in WordPress.
Installation
To use this plugin you need to setup your WordPress installation via a Composer setup like Bedrock. Then you can install it via:
$ composer require sourceboat/wp-laravel-elixir
Usage
This plugin exposes the elixir('path/to/file.ext')
helper method, known from the Laravel Framework. It expects your files in the dist
directory of the active theme.
You can use the helper method like this:
add_action('wp_enqueue_scripts', function () { wp_register_style('main-css', elixir('css/main.css'), null, null); wp_enqueue_style('main-css'); wp_register_script('main-js', elixir('js/main.js'), null, null, true); wp_enqueue_script('main-js'); });