bw_jquery_locate_script_file() – Locate a jQuery script file from the list of plugins given

You appear to be a bot. Output may be restricted

Description

Locate a jQuery script file from the list of plugins given

Usage

bw_jquery_locate_script_file( $plugin, $script, $debug );

Parameters

$plugin
( string ) required – a comma separated array of plugin script file locations
$script
( string ) required – the jQuery script name e.g. cycle or cycle.all
$debug
( book ) required – whether or not the debug version is required

Returns

void

Source

File name: oik/shortcodes/oik-jquery.php
Lines:

1 to 20 of 20
function bw_jquery_locate_script_file( $plugin, $script, $debug ) {
  $plugins = bw_as_array( $plugin );
  bw_trace2( $plugins, "plugins_array", true, BW_TRACE_VERBOSE );
  $found = false;
  for ( $p=0; !$found && ( $p < count( $plugins ) ) ; $p++ ) {
    $file = WP_PLUGIN_DIR;

    $file .= $plugins[$p];
    $file .= bw_jquery_filename( $script, $debug );
    if ( file_exists( $file ) ) {  
      $found = true;
    bw_jquery_file_version( bw_jquery_filemtime( $file ) );
    }  
  }
  if ( !$found ) { 
    $file = null;
    bw_jquery_file_version( 0 );
  }
  return( $file );  
}
 

 View on Trac