Make post_content an other custom fields required

What’s the best way to set the required atribute on html forms in wordpress, for instance I would like post-content to be required, so this code need to be changed:

<textarea class="wp-editor-area" style="height: 300px; margin-top: 37px;" autocomplete="off" cols="40" name="content" id="content"></textarea>

To appear like this:

<textarea required class="wp-editor-area" style="height: 300px; margin-top: 37px;" autocomplete="off" cols="40" name="content" id="content"></textarea>

How can do it by a hook filter?
This same solution I will also use it for other fields in the publish post form

Read more here: Make post_content an other custom fields required

Leave a Reply

Your email address will not be published. Required fields are marked *