Does WordPress Allow Blank/Empty Comment Submissions In WordPress?

Short answer: It doesn’t, but you can get around this: add_filter(‘comment_form_field_comment’, ‘my_comment_form_field_comment’); function my_comment_form_field_comment($default){ return false; } add_action(‘pre_comment_on_post’, ‘my_pre_comment_on_post’); function my_pre_comment_on_post($post_id){ $some_random_value = rand(0, 384534); $_POST[‘comment’] = “Default comment. Some random value to avoid duplicate comment warning: {$some_random_value}”; } If you want this only for certain pages, then you should create a custom page template, … Read more

Comments Reply Form

Ensure that you have Threaded Comments enabled: go to Dashboard -> Settings -> Discussion and enable the option to thread comments Ensure that your Theme enqueues the comment-reply script. Look for the following, usually in header.php, functions.php, etc.: <?php wp_enqueue_script( ‘comment-reply’ ); ?> Note: this call is usually wrapped in a conditional, such as: <?php … Read more

Why are default comments deprecated?

You shouldn’t copy that file, precisely because it is too bulky. About half of it is implementation of submission form, which was entirely replaced with comment_form() function around that time. So the answer why was it deprecated is roughly: Newer code is more compact Markup belongs in theme For better and more relevant comments.php example … Read more

Deep customization of the comment form?

This is hard. Output buffering could solve that: add_action( ‘comment_form_field_comment’, ‘ob_start’ ); add_action( ‘comment_form’, ‘wpse_83898_replace_submit’ ); function wpse_83898_replace_submit() { $html = ob_get_clean(); # do some magic echo $html; } Just an idea, not tested.

Why does comment_reply_link launch the reply form at the wrong spot on the comment section?

Because that’s done in javascript, and you have to enqueue that javascript for it to work, as stated in the docs: If JavaScript is enabled and the comment-reply.js JavaScript is loaded the link moves the comment form to just below the comment. https://codex.wordpress.org/Function_Reference/comment_reply_link e.g. function wpse289875_enqueue_comments_reply() { if ( is_singular() && get_option( ‘thread_comments’ ) ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)