Writing your own plugin will help you understand WordPress better, subsequently enjoying it even more, beside you look like you are quite capable with some tiny bit of PHP, no?
When saving a post, the save_post
hook is pulled on. This passes along the $post_ID
and the $post
variables, containing everything you need to check for post_excerpt
(like if ( strlen( $post->post_excerpt ) < 10 ) ...
).
If you want to explicitly do this only when a post is published you can hook to {$old_status}_to_{$new_status}
hook.
To show a nice message or warning, tap into the post_updated_messages
hook. You can alter the $_GET['message']
variable inside the redirect_post_location
filter.
Alternatively, you can display the warning on the page at all times just by looking at the $post->post_excerpt
property. Style it as an alert or use jQuery to remove the publish button altogether until the field is filled. Lots of options, depends on how far you’re willing to take it.