loading

Minifyer

This is share svg Share this item

Minifyer makes your classified ad's website a lot faster, it reduces the number & size of files being loaded on your page, to acomplish that Minifyer:

  • Compresses all your css an js files
  • Concatenate all css and js files in one single call each
  • 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:

osc_enqueue_script('your-script-id');

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:

osc_enqueue_script('your-script-id');

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') ); 

 

Contact the Author

Please sign in to contact this author.

Nunc placerat mi id nisi interdum mollis. Praesent pharetra, justo ut sceleris que the mattis, leo quam aliquet congue placerat mi id nisi interdum mollis. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher. Nunc placerat mi id nisi interdum mollis. Praesent pharetra, justo ut sceleris que the mattis, leo quam aliquet congue placerat mi id nisi interdum mollis. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher .

Related Products

Yandex Maps PRO

Yandex Maps. This plugin work with new Yandex Maps API 2.1. The new api much more convenient and functional. Plugin can add Yandex Map on ever ...

Free

48

305

Watchlist

Don’t lose anything from your favourite ads! The plugin will display a link on your ads so that users can save items on a watchlist page. In thi ...

Free

48

598

Skrill

Plugin allow users pay Premium, Move to Top, Highlight and Pay Publication on the classified website. Osclass Skrill plugin allows you to work with Sk ...

$19

48

1

Wallet One

Osclass payment plugin Wallet One Plug-in to pay for Premium status, move to top, highlighting and paid publication on the  classified website Osclas ...

$29

48

0

Ready to Join Our Marketplace!

Join Us Today