isset($_POST[‘submit’]) ignored on comment submission

This might not directly answer your question (because I haven’t even thought about why the $_POST[‘submit’] would be ignored or if it is even correct), but you should use filters/actions whenever possible. The correct filter for filtering comment text is pre_comment_content, and you should use it like this: function my_filter_comment_for_swear_words( $comment_content ) { // Verify … Read more

How to Pass ID through Short Code

Your short code function receives the attributes as the first argument: function shortcode_function( $attributes ) { Here $attributes is an array, and the attributes/values are inside that variable, e.g. for [my-shortcode abc=”123″ xyz=”789″]: echo $attributes[‘abc’]; // prints 123 echo $attributes[‘xyz’]; // prints 789 You should also provide defaults and an opportunity to filter: $attributes = … Read more