wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_register_script › WordPress Function
Since2.1.0
Deprecatedn/a
› wp_register_script ( $handle, $src, $deps = array(), $ver = false, $in_footer = false )
Parameters: (5) |
|
See: |
|
Returns: |
|
Defined at: |
|
Codex: | |
Change Log: |
|
Registers a new script.
Registers a script to be enqueued later using the wp_enqueue_script() function.Related Functions: wp_deregister_script, wp_register_tinymce_scripts, wp_register_style, wp_register, wp_print_scripts
Source
function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); $wp_scripts = wp_scripts(); $registered = $wp_scripts->add( $handle, $src, $deps, $ver ); if ( $in_footer ) { $wp_scripts->add_data( $handle, 'group', 1 ); } return $registered; }