Let user edit his own comment
You can add the following code in function.php $subscriber= get_role(‘subscriber’); $subscriber->add_cap(‘edit_comment’); Meanwhile edit_comment is only supported in version 3.1 or newer Or you can use this plugin link
You can add the following code in function.php $subscriber= get_role(‘subscriber’); $subscriber->add_cap(‘edit_comment’); Meanwhile edit_comment is only supported in version 3.1 or newer Or you can use this plugin link
As per the documentation: $page[‘comment_status’] = ‘closed’; // allowed values: ‘closed’ or ‘open’
Create a page template to display the comments for the particular “review” aka post. Then you can link to that page and include the post ID in the url and $_GET the post ide from the url on the new page, then query the post and display its comments. This should point you in the … Read more
The wp_notify_postauthor() function is pluggable meaning that you can copy the code and paste it into a plugin file or theme functions file keeping the same function name and WordPress will use your version rather than its own. Edit your version of the function to send as much or as little information as you like.
It looks like WP_Comment_Query() only supports a single post type. You can adjust it, by using the comments_clauses filter. Try for example: $defaults = array( ‘number’ => 5, ‘post_type’ => array( ‘post’,’authors’,’movies’ ), ); add_filter( ‘comments_clauses’, ‘wpse_121051’, 10, 2 ); $comments = get_comments($defaults) where /** * Support for multiple post types for comments * * … Read more
As paginate_comments_links() is pretty much just a already customized version for comments of paginate_links(), see the documentation for a deeper insight, you can use the parameter type for this. paginate_comments_links( array( ‘type’ => ‘list’ ) );
I’m pretty sure that function tnc-remove_default_menu is not defined anywhere in your code. (You shouldn’t use – character in function name in PHP). So most probably there is a function called tnc_remove_default_menu, and you’ve misspelled it’s name in add_action/add_filter. If there is no such function anywhere in your code, then you should remove this filter/action … Read more
The third parameter, $commentdata can be used to get the ID for the post that the comment was made on: function wpse211367_comment( $comment_ID, $comment_approved, $commentdata ) { // The id for the post that the comment is related to is available // in the $commentdata array: $comment_post_id = $commentdata[‘comment_post_ID’]; } add_action( ‘comment_post’, ‘wpse211367_comment’, 10, 3 … Read more
It seems that WordPress handles the comment field separately than the other fields. If you look at comment_form() in wp-includes/comment-template.php, you can see this. It’s possible to set $defaults[‘comment_field’] to false in alpha_comments_defaults() then add the comment field markup to $fields[‘comment_field’] in alpha_comments_fields() in the desired order, but this could cause trouble with plugins. I’ve … Read more
The source of the text in question lives in wp-includes/widgets/class-wp-widget-recent-comments.php I found it by searching the WP files for the id of the widget, recentcomments, which I gathered by inspecting the HTML of the widget. So, here’s where that on is coming from, with a bit of extra code for context: foreach ( (array) $comments … Read more