The difference between two almost similar enqueue codes
-
According to some closed threads I have a question, that I hope someone could answer.
Can anyone tell me the difference of these two enqueue codes.
Nr. 1
function my_enqueue_parent_theme_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}
add_action( ‘wp_enqueue_scripts’, ‘my_enqueue_parent_theme_styles’);Nr. 2
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_theme_style’ );
function enqueue_parent_theme_style() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}They both seem to work, but I wonder why there are two different ones. And then I think that maybe one of them might not work suddenly in a particular situation.
- The topic ‘The difference between two almost similar enqueue codes’ is closed to new replies.