wp_enqueue_style unique handle name and dependency
-
Hi Alberto,
It’s not an issue but more recommendation. I noticed that you’re using ‘css’ to enqueue plugin’s style in clean-login.php
wp_register_style( 'css', plugins_url( 'content/style.css', __FILE__ ) ); wp_enqueue_style( 'css' );
It would better if you will use something unique, e.g. ‘clean-login’
wp_register_style( 'clean-login', plugins_url( 'content/style.css', __FILE__ ) ); wp_enqueue_style( 'clean-login' );
It’s not only a good naming practice. In my case I want to load custom styling file only if Clean Login is active. For this I need to use handle in my wp_enqueue_style() function and using dependency name such as ‘css’ is not future proof ??
Hope you will improve this.
Thanks!
Roman
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_enqueue_style unique handle name and dependency’ is closed to new replies.