I want to add simple html form without breaking the extisiting design or license of Classic Editor plugin which is GPLv2
I added simple code in classic-edior.php file (I'm not sure If it's the best way but I'm making a wp-plugin that must this simple form comes in Classic Edior creating post page so I can't use adding short code maybe?.
function myfunction()
{
// after this next, plain HTML
?>
<!-- HTML !-->
<!-- HTML !-->
<div style=" ">
<button class="button-2" role="button" style=" display: flex; margin-left:25%; justify-content: center; ">Button</button>
<form action="/action_page.php" style=" margin: auto; width: 50%;border: 3px solid black; padding: 10px;">
<label for="fname">Action:</label><br>
<input type="text" id="fname" name="fname" value=" "><br>
<input type="submit" value="Submit">
</form>
</div>
<!-- more HTML code here -->
<?php // back to PHP
// .. some more PHP stuff
return;
}
myfunction();
text area of creating post of Classic Editor itself
action_page.php
is a massive security problem, and will cause issues, standalone PHP files are a development dead end and the opposite of what you need to do to achieve your goal here