wp-standard-handles
wp-standard-handles copied to clipboard
Typo in handler for 'enquire.js' and 'mustache.js'
I guess it would be 'enquire-js and 'mustache-js' respectively, for the handler.
For example: wp_enqueue_script( 'enquire.js', ... )
would be wp_enqueue_script( 'enquire-js', ... )
.
It was not a typo as I thought we could use the script name which would be "enquire.js" http://wicky.nillia.ms/enquire.js/
On the other hand we could just exclude the js as it is not needed.
We could keep the '-js' for consistency. Few lib comes with additional CSS- it could be like:
wp_enqueue_style( 'example-css', ... )
wp_enqueue_script( 'example-js', ... )
I would like to keep the handle as the script name and not add "css" to handle as it is clear from the function and file that it is a CSS file. Developers like to name their JS scripts with JS at the end.
Not keeping '-js' or '-css' makes sense.
They come into play once you want to put names into variables and reuse in many places. Adding '-js' and '-css' just add clarity- I find that reduce the possibility to mix things up some cases. :)