Linked Questions

Popular Questions

Dashes in functions.php

Asked by At

WordPress 5.0.3

I'm reading my first book on WordPress.

I'm just creating a child theme of an existing Twenty Seventeen theme.

In the book it is said for me to create functions.php and paste this:

add_action( 'wp_enqueue_scripts', 'wpquickstart_enqueue_styles' ); 
function wpquickstart_enqueue_styles() { 
    wp_enqueue_style( 'twenty-seventeen-style', get_template_directory_uri() . '/style.css' ); 
    wp_enqueue_style( 'wpquickstart-style',    get_stylesheet_directory_uri() . '/style.css', 
        array('twenty-seventeen-style')    ); 
}

Well, being framed in it works, which is strange to me. What bothers me is the first dash in twenty-seventeen-style.

I mean this also works (attention to twentyseventeen-style, to dashes in it):

<?php
add_action( 'wp_enqueue_scripts', 'wpquickstart_enqueue_styles' ); 
function wpquickstart_enqueue_styles() { 
    wp_enqueue_style( 'twentyseventeen-style', get_template_directory_uri() . '/style.css' ); 
    wp_enqueue_style( 'wpquickstart-style',    get_stylesheet_directory_uri() . '/style.css', 
        array('twentyseventeen-style')    ); 
}
?>

Could you tell me whether dashes are ignored? Where can I read some documentaion on this moment?

Related Questions