Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function request: queue_script/style 'local' parameter
#3
I am not sure either it's the proper solution and I agree they should write it properly, but in practice... Anyway I don't really mind the implementation, it would just be really really nice if there was a built-in way to narrow down the asset's scope. I'm saying because it sucks having to request modifying other plugins' cores to make them compatible with yours. I've been using this until now:

PHP Code:
<?php
  
if (isset($_GET['id']) && $_GET['id'] === 'custom_settings') {
    
register_script('adminxml-plus'$SITEURL 'plugins/adminxml_plus/adminxml-plus.js''1'TRUE);
    
queue_script('adminxml-plus',GSBACK); 
  }
?>

I'd also thought of a solution similar to the one you suggested. In yours, I suppose $condition is a function that should return either true or false. But if plugin devs can't be bothered with a simple if clause, I doubt that it will help at all. 

Perhaps the documentation is lacking on this part?
Reply


Messages In This Thread
RE: Function request: queue_script/style 'local' parameter - by Tyblitz - 2015-10-28, 06:36:48



Users browsing this thread: 1 Guest(s)