Menu

Minifyer

Jair Milanes Junior

Welcom to Minifyer for OsClass Wiki

Load you ad's site faster than ever before!

This plugin is a wrapper for the php Minify library created by Steve Clay.

What it does?

It compresses sources of content (usually files), combines the result and serves it with appropriate HTTP headers. These headers can allow clients to perform conditional GETs (serving content only when clients do not have a valid cache) and tell clients to cache the file for a period of time.

Copied from https://github.com/mrclay/minify

Instructions

In order for this plugin to do it's job, the scripts need to be in the queue to be loaded, that means you you have to register and queue your scripts and styles ( obs: styles don't need to be registered ).


For scripts:

:::php
osc_register_script('my_theme', osc_plugin_url(__FILE__).'js/my_theme.js')
osc_enqueue_script('my_theme');

For styles:

:::php
osc_enqueue_style('my_theme', osc_plugin_url(__FILE__).'js/my_theme.js' );

Once you have this, all you have to do is enable the plugin and voalá, all your css and js are minified and cached.

If you want to know more about the Minify library go to it's page at Github - https://github.com/mrclay/minify

Created by Jair Milanes Junior

More OsClass plugins at blog.layoutz.com.br

Project Members:


MongoDB Logo MongoDB