Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/firstandthird/wp-assets
Wordpress plugin to load assets
https://github.com/firstandthird/wp-assets
wordpress-plugin
Last synced: 3 days ago
JSON representation
Wordpress plugin to load assets
- Host: GitHub
- URL: https://github.com/firstandthird/wp-assets
- Owner: firstandthird
- Created: 2014-05-26T18:54:57.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-30T19:50:59.000Z (over 10 years ago)
- Last Synced: 2024-04-08T15:13:20.836Z (10 months ago)
- Topics: wordpress-plugin
- Language: PHP
- Size: 137 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
First+Third Assets
=========Wordpress plugin to load assets
## Installation
Install to plugin directory.
## Usage
```php
do_action($action, $param...);
```| Action | Params | |
| :-------------------------- | :----------------------------- | :----------------------------- |
| ftasset_loadStyle | Path to file | |
| ftasset_loadScript | Path to file | Location: `header` or `footer` |
| ftasset_addStyle | String of text | |
| ftasset_addLinkedStyle | Url to stylesheet | |
| ftasset_addScript | String of text | Location: `header` or `footer` |
| ftasset_addLinkedScript | Url to script | Location: `header` or `footer` |
| ftasset_outputStyles | | |
| ftasset_outputLinkedStyles | | |
| ftasset_outputScripts | Location: `header` or `footer` | |
| ftasset_outputLinkedScripts | Location: `header` or `footer` | |### Add vs. Load vs. Linked
Add and Load are essentially the same thing. Load will grab the contents of the file and renders it inline on the page, the same as Add.
Linked will create an external reference to a file. Contents of these files are not parsed or their existence validated.
## Example
page.php
```phpTest template
```
functions.php
```php```