You appear to be a bot. Output may be restricted
Description
Enqueue the defined jQuery source file(s)If the src= parameter is set and it's a numeric value then treat this as an attachment ID else treat it as the URL otherwise load the attached jQuery files and enqueue those.
Usage
bw_jquery_src( $atts );
Parameters
- $atts
- ( mixed ) required – array that may contain src=ID or src=URL
Returns
voidSource
File name: oik/shortcodes/oik-jquery.phpLines:
1 to 19 of 19
function bw_jquery_src( $atts ) { $src = bw_array_get( $atts, "src", null ); // bw_trace2( $src ); if ( $src ) { if ( is_numeric( $src ) ) { $src = wp_get_attachment_url( $src ); } $inline = bw_array_get( $atts, "inline", false ); $inline = bw_validate_torf( $inline ); if ( $inline ) { bw_jquery_javascript( $src ); } else { wp_enqueue_script( sanitize_key( $src ), $src, array( "jquery"), null ); } } else { bw_jquery_enqueue_attached_scripts(); } }View on GitHub View on Trac