https://github.com/tomodomoco/wp-asset-registrar
Slightly more intuitive asset registration API for WordPress
https://github.com/tomodomoco/wp-asset-registrar
library php wordpress
Last synced: about 2 months ago
JSON representation
Slightly more intuitive asset registration API for WordPress
- Host: GitHub
- URL: https://github.com/tomodomoco/wp-asset-registrar
- Owner: TomodomoCo
- License: mit
- Created: 2018-10-09T22:12:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-13T13:57:17.000Z (over 7 years ago)
- Last Synced: 2024-12-31T11:56:38.082Z (over 1 year ago)
- Topics: library, php, wordpress
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# WP Asset Registrar
WP Asset Registrar is a simple library that makes the process of registering and enqueueing assets in WordPress slightly more intuitive.
## Usage
```php
addScript('my-js-libs', '/assets/js/script.js', [
'dependencies' => [
'jquery',
],
]);
$registrar->addScript('my-js', '/assets/js/script.js', [
'dependencies' => [
'my-js-libs',
],
]);
$registrar->addStyle('my-css', '/assets/css/style.css');
});
add_action('wp_enqueue_scripts', [$registrar, 'enqueueScripts']);
add_action('wp_enqueue_scripts', [$registrar, 'enqueueStyles']);
```
## About Tomodomo
Tomodomo is a creative agency for magazine publishers. We use custom design and technology to speed up your editorial workflow, engage your readers, and build sustainable subscription revenue for your business.
Learn more at [tomodomo.co](https://tomodomo.co) or email us: [hello@tomodomo.co](mailto:hello@tomodomo.co)
## License & Conduct
This project is licensed under the terms of the MIT License, included in `LICENSE.md`.
All open source Tomodomo projects follow a strict code of conduct, included in `CODEOFCONDUCT.md`. We ask that all contributors adhere to the standards and guidelines in that document.
Thank you!