wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
wp_register_script › WordPress Function
Da2.1.0
Deprecaton/a
› wp_register_script ( $handle, $src, $deps = array(), $ver = false, $args = array() )
| Parametri: (5) |
|
| Vedi: |
|
| Ritorna: |
|
| Definito a: |
|
| Codex: | |
| ChangeLog: |
|
Registers a new script.
Registers a script to be enqueued later using the wp_enqueue_script() function.Sorgenti
function wp_register_script( $handle, $src, $deps = array(), $ver = false, $args = array() ) {
if ( ! is_array( $args ) ) {
$args = array(
'in_footer' => (bool) $args,
);
}
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
$wp_scripts = wp_scripts();
$registered = $wp_scripts->add( $handle, $src, $deps, $ver );
_wp_scripts_add_args_data( $wp_scripts, $handle, $args );
return $registered;
}