Badges for Guests based on their comment counts [closed]

Please don’t use addslashes to escape things for SQL (it’s potentially dangerous), use $wpdb->prepare(“SQL with %s placeholders”, $string). It will put the data into the placeholder’s … place and take care of escaping, giving you SQL that is safe to execute. Anyway. Your question is how to give them a different background color based on … Read more

Comments editor not rendering &nbsp and tag

The standard comment form functionality renders the br tag and &nbsp on the front end. You can see this in the image below (which uses Divi). You might want to check the comments.php file on your theme if you find a different behavior for your comments text. Alternatively, if I have not understood the question, … Read more

How to see in Edit Comments if comment is from User and her Roles

Solved with: function myplugin_comment_columns( $columns ) { return array_merge( $columns, array( ‘ruolo’ => __( ‘Ruolo’ ) ) ); } add_filter( ‘manage_edit-comments_columns’, ‘myplugin_comment_columns’ ); function myplugin_comment_column( $column, $comment_ID ) { switch ( $column ) { case ‘ruolo’: if(get_comment($comment_ID)->user_id != “0”) { if(get_comment($comment_ID)->user_id != “1”) { $ruolo = “”; $user_meta=get_userdata(get_comment($comment_ID)->user_id); $ruolo = “Registrato”; if(in_array(‘vip’, ( array )$user_meta->roles)) … Read more

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