Author can only see own post comment and can moderate

The default author role does not have the moderate_comments capabilities so you need to add that capability to the author role, so add this to your plugin: function add_theme_caps() { $role = get_role( ‘author’ ); // gets the author role $role->add_cap( ‘moderate_comments’ ); // would allow the author to moderate comments } add_action( ‘admin_init’, ‘add_theme_caps’);

Sync comment data

After some more thought, I got it figured out. It involves multiple functions to go through each step of the process, but here it is: https://gist.github.com/4355955

Turning off trackbacks & comments

To prevent comments receiving add following line to your functions.php file: add_filter( ‘comments_open’, ‘__return_false’ ); And to prevent trackbacks receiving just add this snippet: add_filter( ‘pings_open’, ‘__return_false’ );

How to make all the posts commentable by default? Imputs in Settings/Discussions are not saved

A common method to keep all the posts open for comments, is to add this line into the file functions.php in the current theme directory : add_filter(‘comments_open’, ‘__return_true’); where __return_true is just a core function that always returns true. ps: since this seems to be helpful, regarding to the problem described by @user27309, it’s better … Read more

Highlighting the current users comment

assumes that your theme is using comment_class(); example (to be added to functions.php of your theme): add_filter( ‘comment_class’, ‘comment_class_logged_in_user’ ); function comment_class_logged_in_user( $classes ) { global $comment; if ( $comment->user_id > 0 && is_user_logged_in() ) { global $current_user; get_currentuserinfo(); $logged_in_user = $current_user->ID; if( $comment->user_id == $logged_in_user ) $classes[] = ‘comment-author-logged-in’; } return $classes; } requires … Read more

Auto-fill Custom comment fields

You can store these values in cookies and fill them when you are creating form inputs. So in save_comment_meta_data add something like this: $commenter_data = array( ‘phone’ => $phone, … ); setcookie(‘commenter_data’, serialize($commenter_data), time()+1209600, COOKIEPATH, COOKIE_DOMAIN, false); And then when you’re creating form: $commenter_data = isset($_COOKIE[‘commenter_data’]) ? unserialize($_COOKIE[‘commenter_data]) : array(); echo ‘<p class=”comment-form-title”>’. ‘<label for=”phone”>’ … Read more

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