Creating a function inside a custom WordPress Plugin [closed]
The reason you are getting error is because you are mixing PHP CODE with JavaScript and HTML. You cannot just write JavaScript CODE and HTML CODE within PHP. These functions will not work in PHP: function f(id) { document.getelementbyid(id); } function submitform() { f(“mybutton”).disabled = ‘true’; } For JavaScript you need you use wp_enqueue_script function … Read more