Execute script only on certain admin pages
-
30-10-2019 - |
Question
To solve this problem i've used this in my js file:
var location = String(window.location);
//only runs in post.php and post-new.php
if(location.search('post.php') != -1 || location.search('post-new.php') != -1 )
{
}
But it's does not seem like i solid solution. Are there any other way?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange