wp-standard-handles icon indicating copy to clipboard operation
wp-standard-handles copied to clipboard

Typo in handler for 'enquire.js' and 'mustache.js'

Open Moonomo opened this issue 9 years ago • 4 comments

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', ... ).

Moonomo avatar Jun 04 '15 19:06 Moonomo

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.

grappler avatar Jun 04 '15 20:06 grappler

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', ... )

Moonomo avatar Jun 04 '15 20:06 Moonomo

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.

grappler avatar Jun 04 '15 20:06 grappler

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. :)

Moonomo avatar Jun 04 '15 20:06 Moonomo