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?
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?
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
It turns out that we need to get a date string from our DateTime object and pass that into the comment_date parameter instead. $comment_date = $the_date->format(‘Y-m-d H:i:s’);
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; }
I had to get some band reviews that were already in Disqus from my old site into my new WordPress band site. I only wanted the reviews on our home page so here’s what I did… I looked at the code on my old site and grabbed the disqus_identifier value from there. I defined and … Read more
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
What you need are two new containers: one for the single line fields, one for the textarea. Looking at the default comment form, we can see where their start and end tags should appear. I have added some comments to make that easier to see: <form action=”<?php echo site_url( ‘/wp-comments-post.php’ ); ?>” method=”post” id=”<?php echo … Read more
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
I am not so clear where exactly you would want to “inject” this JS . “After a new comment has been made” , in WP terms and php workflow, can mean several things . (for example when the $POST request is made , when the action is triggered ,when it is getting checked, sanitized , … Read more
ok.. so I did it like this. Maybe will help some. Used the code from Last comment page first with full number of comments? but altered it a bit to fit my needs. So this goes into your template page where you call the comments (or you can wrap it in a function and put … Read more