Adding another arg to comments_popup_link

Filter ‘comments_number’. You get the translated number and the real number as arguments. Return what fits best. Sample code: add_filter( ‘comments_number’, ‘wpse_31328_comments_number_i18n’, 10, 2 ); function wpse_31328_comments_number_i18n( $text, $number ) { if ( 2 === $number ) { return _x( ‘2 comments’, ‘comments number’, ‘your_text_domain’ ); // or hard coded: // return ‘2 komentarja’; } … Read more

Private replies for comments

No, there is no way in the WordPress Core to send private messages. That’s what the email address is for. But why would you want an extra contact form for that?

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

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)