wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_register_script › WordPress Function
Seit2.1.0
Veraltetn/v
› wp_register_script ( $handle, $src, $deps = array(), $ver = false, $args = array() )
| Parameter: (5) |
|
| Siehe: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: | |
| Changelog: |
|
Registers a new script.
Registers a script to be enqueued later using the wp_enqueue_script() function.Ähnliche Funktionen: wp_deregister_script, wp_register_script_module, wp_deregister_script_module, wp_register_style, wp_register_tinymce_scripts
Quellcode
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;
}