Lz Minifyer – Make your OsClass website faster than ever before

Minifyer makes your classified ad’s website a lot faster, it drasticly reduces the number & size of files being loaded on your page, dropping your webpage loading time to a much lower number, to acomplish that Minifyer:

  1. Compresses all your css an js files
  2. Concatenate all css and js files in one single call each
  3. Serve  the compressed versions and cache it, so the next times it will load even faster.

Using Minifyer contributes to a much better user experience with much shorter loding times.

To use it just install and enable it, the plugin also depends on the theme you are using, that is because it works on enqueued files only, this means that, if your theme does not enqueue css and js files properly the minifyer plugin won’t work.

But how to properly enqueue css and js files on my theme?

The OsClass plataform has two great functions, to help you register and render your css and js files, no matter if you are making a theme or a plugin, the Minifyer plugin optimizes it all if enqueued.

To enqueue your theme css files:
osc_enqueue_style('your-style-id', osc_current_web_theme_url('css/your-css-filename.css') );
To enqueue your plugin css files:
osc_enqueue_style('your-style-id', osc_plugin_url('your-plugin-name/css').'css/your-css-filename.css' );
To enqueue your theme js files first you have to register each script:
osc_register_script( 'your-script-id', osc_current_web_theme_url('js/your-js-filename.js') );
Than enqueue it:
The same is done for plugin js files, just change the url of the script:
osc_register_script( 'your-script-id', osc_plugin_url('your-plugin-name/js').'js/your-js-filename.js' );
Than enqueue it:


Good Practice

T register your script files on your functions.php file plugin index.php file, and than enqueue this css and js files in the “header” hook, a simple functions file would look something like this:

function my_theme_header_hook(){ 
			osc_enqueue_style('jquery-ui', osc_current_web_theme_url('css/your-css-filename.css') ); osc_enqueue_style('jquery-ui', osc_current_web_theme_url('css/your-second-css-filename.css') ); osc_enqueue_script('your-script-id'); osc_enqueue_script('your-second-script-id'); 
		osc_add_hook('header', 'my_theme_header_hook'); 
		osc_register_script( 'your-script-id', osc_current_web_theme_url('js/your-js-filename.js') ); osc_register_script( 'your-second-script-id', osc_current_web_theme_url('js/your-second-js-filename.js') ); 

Here is a OsClass documentation that explains it in even more detail:

Using the Enqueue functions


Try it out

Let me know what you think or if you have any problems.

Download now

Download Details

Lz Minifyer – Make your OsClass website faster than ever before

0 sales

Download now
Release date:2015-06-01
Last updated:2015-06-01
Current version:2.0.1
Product type:OsClass Plugin
File format:.zip
File size:185KB
Requirements:OsClass 3.3+, PHP 5.4+
Price:$0.00 USD

Copyright 2017