novuso/novuso-wp-common

Common libraries for Novuso WordPress development

Installs: 51

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:wordpress-plugin

0.2.1 2015-02-07 19:36 UTC

This package is auto-updated.

Last update: 2024-03-29 02:34:02 UTC


README

Registers common libraries to allow plugins and themes to share a common dependency in WordPress.

Goal

Register CSS and JavaScript libraries that are not available in WordPress core.

Installation

If you use Composer to manage WordPress dependencies, simply add the following line to your composer.json file:

"novuso/novuso-wp-common": "~0.2"

And run composer update and this plugin will be installed in your configured plugin folder using the composer/installers project.

If you are not using Composer, you can download this project and place the entire contents in a novuso-wp-common folder in your plugins folder. In that case, you will need to periodically update manually (which sort of defeats the purpose).

Usage

Just use the normal process to enqueue scripts and styles in WordPress.

The handle names listed below are registered once the plugin is active.

Here are some examples of how to load the assets in a theme functions.php file:

// functions.php
function mytheme_load_assets() {
    wp_enqueue_script('bootstrap');
    wp_enqueue_style('bootstrap');
    wp_enqueue_script('marionette');
}
add_action('wp_enqueue_scripts', 'mytheme_load_assets');

Project Maintained CSS

Project Maintained JavaScript

License

MIT