WordPress enqueue – what’s the connection between script name and script file?

When enqueue-ing a jQuery containing javascript script into the function.php file, what is the connection between the script name and the file containing the jQuery script? Is the script name just a made up name or does it take from the file name or the script contained within the referenced file? Thanks for the help.

ex:

function exp_script() {
wp_enqueue_script( 'script_name', get_template_directory_uri() . '/js/script_file.js', array( 'jquery' ), '1.0.0', true );
}

add_action( 'wp_enqueue_scripts', 'exp_script' );

Read more here: WordPress enqueue – what’s the connection between script name and script file?

Leave a Reply

Your email address will not be published. Required fields are marked *