Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp_register_script

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;
}
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+4 =