If you put file3 in that box, for example, you might have this:
– Instead of:
http://domain.com/min/?f=file1.js,file2.js,file3.js
– you will get these two:
http://domain.com/min/?f=file1.js,file2.js
http://domain.com/min/?f=file3.js (separately printed out)
Thanks i understand that sorry by asking : ‘what does exactly the box minify script alone of the rest’ i mean what in the code is realy do to actualy inser the script alone ..
like a priority : add_action( $tag, $function_to_add, $priority,$accepted_args );
mmh i just want to put jquery alone but always alone and with no setting in option box i want to write dirrectly the setting instead of put jquery in the option box
you know what i mean ?
no box option setting but natif setting
Are you meaning that you want to minify jquery separately, but you don’t want to put anything in the option box?
Please take a look at these hook references:
http://betterwp.net/wordpress-plugins/bwp-minify/#references
bwp_minify_script_direct is probably the one you need.
Yes that’s it but what is the apropriate syntax for bwp_minify_script_direct ?
Thanks a lot by the way !
It’s a hook that you can filter, check this out:
http://codex.ww.wp.xz.cn/Function_Reference/add_filter
Remember to return an array 🙂
mmh like that .. ?
sorry i’m not a boss in php :p
add_filter(‘bwp_minify_script_direct’, ‘exclude_jquery’);
function exclude_jquery($excluded)
{
$excluded = array(‘jquery’);
return $excluded;
}
It’s not excluded to be exact, it’s ‘direct’. jQuery will be minified, but on its own.
And yes your codes look fine to me.
yeah sorry a cmd-c / v / your code that’s why i have exclude ^^
okey in function.php i test :
add_filter(‘bwp_minify_script_direct’, ‘direct_jquery’);
function direct_jquery($direct)
{
$direct = array(‘jquery’);
return $direct;
}
Okey i think it’s work perfectly 😉 THANKS A LOT DUDE !!!