Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```php

Test template

```

functions.php
```php

```