You appear to be a bot. Output may be restricted
Description
Determine whether or not the jQuery file is a .pack or .min or .dev or something else.
For WordPress 5.5 and above. I've changed the default suffix to .min and renamed most of the files. So the $packormins array is not really necessary anymore. I can't remember the reason for adding dev when the script is form.
Usage
$string = bw_jquery_filename( $script, $debug );
Parameters
- $script
- ( string ) required – the jQuery script e.g. cycle
- $debug
- ( bool ) required – whether or not script debugging is required
Returns
string the script file e.g. jquery.cycle.min.js
Source
File name: oik/shortcodes/oik-jquery.php
Lines:
1 to 11 of 11
function bw_jquery_filename( $script, $debug ) { if ( !$debug ) { $packormins = array( "cycle.all" => ".min", "countdown" => ".min", "fancybox" => '.min' ); $extra = bw_array_get( $packormins, $script, ".min" ); } else { $devs = array( "form" => "dev" ); $extra = bw_array_get( $devs, $script, null ); } $file = "jquery.$script$extra.js"; return $file; }