Is there a hook for comment author link?

The other two answers probably answer your question, but here’s a way look at WordPress source code to be able to determine for yourself whether a certain hook exists for your purposes. You ask whether there is a hook for the comment author link. So let’s look at the source for that function: comment_author_link(). We … Read more

Sticky Comments

I was curious about any existing plugins and searched the plugin directory. There exists an old Sticky Comments plugin, I’m not related to it. It seems to use a sticky meta key. It uses a LEFT JOIN query but creates it’s own version of the whole comments_template() core function, to override the current query. One … Read more

comment_reply_link() not showing up

You should try to replace <?php comment_reply_link(); ?> with: <?php comment_reply_link( $args ); ?> and to make sure the $args[‘depth’] is not zero or greater or equal than the $args[‘max depth’]. There will be no output if that’s not the case. If that doesn’t work, you could try to add the comment ID or the … Read more

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

List Recent Comments from Across a Multi-site Network

Ok, I did some research based on בניית אתרים‘s solution here, as I’m interested in this too. First you need to get a list of blog IDs, and get_blog_list() is deprecated because it seems to be a “suicidal database query” 🙂 Anyway looks like there will be a alternative in WP 3.2 called wp_get_sites(). So … Read more

Facebook Comment Count

Final version of code used: function fb_comment_count($link = ‘link’) { global $post; $url=”https://graph.facebook.com/”; $posturl = get_permalink($post->ID); $url .= $posturl; $filecontent = wp_remote_retrieve_body(wp_remote_get($url, array(‘sslverify’=>false))); $json = json_decode($filecontent); $count = $json->comments; if ($count == 0 || !isset($count)) { $count = 0; } $comments = $count; if ($count == 1) { $comments .= ‘ Comment’; } elseif ($count … Read more