Osclass Support Forums

Osclass theme support => Ideas, improvements and tips => Topic started by: jcarrolo01 on May 08, 2020, 02:48:46 PM

Title: Plugins improvements
Post by: jcarrolo01 on May 08, 2020, 02:48:46 PM
I realize all of your themes and most part of plugins have this block

Code: [Select]
// ADMIN MENU
function ais_menu($title = NULL) {
  echo '<link href="' . osc_base_url() . 'oc-content/plugins/all_in_one/css/admin.css" rel="stylesheet" type="text/css" />';
  echo '<link href="' . osc_base_url() . 'oc-content/plugins/all_in_one/css/bootstrap-switch.css" rel="stylesheet" type="text/css" />';
  echo '<link href="' . osc_base_url() . 'oc-content/plugins/all_in_one/css/tipped.css" rel="stylesheet" type="text/css" />';
  echo '<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />';
  echo '<script src="' . osc_base_url() . 'oc-content/plugins/all_in_one/js/admin.js"></script>';
  echo '<script src="' . osc_base_url() . 'oc-content/plugins/all_in_one/js/tipped.js"></script>';
  echo '<script src="' . osc_base_url() . 'oc-content/plugins/all_in_one/js/bootstrap-switch.js"></script>';


So if i have for example 15 plugins, the site will load 15 times this extensions, who can consume some extra time....


So each plugin should have a switch to tell if it's necessary to load the extensions, or in other hand automatically detect if the extensions are loaded or not...


This is only an idea....



Best Regards
João










 



Title: Re: Plugins improvements
Post by: MB Themes on May 08, 2020, 08:21:38 PM
This is activated just on plugin site in ocadmin, so is shown just once and is already best possible