Display commenter’s registration date on comments?

In your wp_list_comments callback function, you can call get_userdata to get any additional comment author data: $userdata = get_userdata( $comment->user_id ); echo ‘Registered: ‘ . $userdata->user_registered; // format the date // Sunday January 13th 2013 echo ‘Registered: ‘ . date( ‘l F jS Y’, strtotime( $userdata->user_registered ) );

How do I create comment-reply-button using element not

You can generate a custom comment reply element like so: This will replace the **** HERE <SPAN> ELEMENT FOR REPLY-BUTTON WILL BE PLACED ****. <?php if ( get_option( ‘comment_registration’ ) && ! is_user_logged_in() ) : ?> <a rel=”nofollow” class=”comment-reply-login” href=”https://wordpress.stackexchange.com/questions/321913/<?php // wrapped echo esc_url( wp_login_url( get_permalink() ) ); ?>”>Log in to Reply</a> <?php else : … Read more

How to refresh the page when an admin trashes a comment from Comments in the admin site?

The Comments admin page uses AJAX when trashing a comment via the “Trash” link, but only if the link element (the <a> tag) contains an attribute named data-wp-lists — see the delBefore() function in /wp-admin/js/edit-comments.js. So because the attribute is added via PHP (see line 764 in wp-admin/includes/class-wp-comments-list-table.php), then you can use the comment_row_actions filter … Read more

Comment moderation on custom post types

Yes, this is possible. Comment moderation is an option, and is retrieved like any other option: get_option(‘comment_moderation’); the get_option function applies a filter before returning the value… return apply_filters( ‘option_’ . $option, maybe_unserialize( $value ) ); So what you’ll want to do is add_filter(‘option_comment_moderation’, ‘check_moderable_post_types’) and in your check_moderable_post_types function, check to see if the … Read more

customize comment form

This code will allow you to customize the comment field labels and will move the comment form below the fields. Add the code to your functions.php or to a plugin. To change the labels, modify the Name CUSTOMIZED, Email CUSTOMIZED, and Website CUSTOMIZED, and Comment * CUSTOMIZED text. /** * Customize comment form default fields. … Read more

SQL query to delete comments older than 90 days?

Regarding comments- what about the case where a comment older than 90 days has child replies younger than 90 days? for comment and pingback status, this should do it: UPDATE wp_posts SET comment_status=”closed”, ping_status=”closed” WHERE post_date < DATE_SUB(NOW(), INTERVAL 3 MONTH) AND post_status=”publish”;

How do I make wordpress comment fields required?

First of all, I highly recommend using the comment_form() function. It’s all of the above code in one line (more if you need to tweak parts of the code). You can designate name and email as required in the settings section of your admin area:

How do I turn comments off for pages, but not posts?

The Front-End Solution: Trick your templates You could fake that comments are open for specific post types. The following code works for all templates, that wrap the comment form (or whatever comment related code/UI elements) inside a conditional comments_open() check. The little magic … wrapped up in a quick’n’small plugin. /** * Plugin Name: Disable … Read more

Comments Feed & Custom Post Statuses

Found the filter: comment_feed_where to filter the WHERE clause, which by default only looks for posts with status = publish. function comment_feed_where_status($where) { return str_replace( “post_status=”publish””, “post_status=”publish” OR post_status=”resolved” OR post_status=”unresolved””, $one); } add_filter(‘comment_feed_where’, __NAMESPACE__ . ‘\\comment_feed_where_status’); I found this by debugging with “SAVEQUERIES” enabled and dumping the queries array on the feed page.

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