Setting comment text as required

You can hook into ‘pre_comment_on_post’ and inspect $_POST[‘comment’]: <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 Require comment text * Description: Dies if there is no comment text. * Plugin URI: http://wordpress.stackexchange.com/q/55679/73 * Version: 2012.07 * Author: Thomas Scholz * Author URI: http://toscho.de * License: MIT * License URI: http://www.opensource.org/licenses/mit-license.php */ if … Read more

Edit Comment_Field while using T5 Comment Textarea On Top-Plugin

Change the textarea earlier than the plugin. The plugin runs with a default priority of 10, so you could use 9: add_filter( ‘comment_form_defaults’, ‘wpse_61103_change_textarea’, 9 ); function wpse_61103_change_textarea( $fields ) { $fields[‘comment_field’] = ‘<div class=”comment-field-wrapper”>’ . $fields[‘comment_field’] . ‘</div>’; return $fields; }

How to allow only Admins or Logged In Users to post links in comments?

Additional info by the OP It seems that the OP “forgot” to tell, that he uses the following plugin: <?php /* Plugin Name: Remove Links in Comments Plugin URI: http://www.stefannilsson.com/remove-links-in-comments/ Description: Deactivate hyperlinks in comments. */ function remove_links($string = ”) { $link_pattern = “/<a[^>]*>(.*)<\/a>/iU”; $string = preg_replace($link_pattern, “$1”, $string); return $string; } add_filter(‘comment_text’, ‘remove_links’); The … Read more

multiple comment text areas

To add new fields, simply append them to the default fields with a plugin. <?php defined( ‘ABSPATH’ ) AND exit; /* Plugin Name: (#85059) Append form fields to comment form */ add_filter( ‘comment_form_default_fields’, ‘wpse85059_comment_form_extd’, 100 ); function wpse85059_comment_form_extd( $fields ) { // Append new fields … if ( ‘comment_form_default_fields’ === current_filter() ) { foreach ( … Read more

Comments: Approve when admin Replies, from the Front end

Well… All you have to do is to check what hooks are available during comment posting. The one I think might be helpful is wp_insert_comment. So you could do something like this: function my_wp_insert_comment($id, $comment) { if ( is_admin() && $comment->comment_parent ) { if ( wp_get_comment_status( $comment->comment_parent ) == ‘unapproved’ ) wp_set_comment_status( $comment->comment_parent, ‘approve’ ); … Read more

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