Although - if you allow me to share a small thought - if you are using the hash, you do not need filemtime. I mean, the purpose of the hash is to avoid whatever new code you create from being cached...I guess it's a way to make the browser "think" it's a new file... WordPress handles this is by adding ?v=XXX to the end of your path where XXX is whatever you pass as the last argument for the wp_register_script function.
So, to make your code just a smidge more performant, I would replace filemtime with null (or simply remove the argument) :D
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Awesome!!
Although - if you allow me to share a small thought - if you are using the hash, you do not need
filemtime. I mean, the purpose of the hash is to avoid whatever new code you create from being cached...I guess it's a way to make the browser "think" it's a new file... WordPress handles this is by adding?v=XXXto the end of your path where XXX is whatever you pass as the last argument for thewp_register_scriptfunction.So, to make your code just a smidge more performant, I would replace
filemtimewithnull(or simply remove the argument) :D