WP Tutorial: Remove admin name in comments class


Sponsored Links






Batovasan, create nicely WordPress Tutorial. The reason create this tutorial is Small Security Hole on WordPress.

Remove admin name in comments class - Miranda Kerr Pictures

Remove admin name in comments class - Miranda Kerr Pictures

Like we all know by default, when the blog admin left a comment on his blog, WordPress use the name in the comment css class. This is useful for styling, but it will also let people know about your admin login name. This is not good, because some hacker or whatever we call it, can use this info to crack our WordPress site.

The Solutions is simple, put this code on your functions.php

function remove_comment_author_class( $classes ) {
	foreach( $classes as $key => $class ) {
		if(strstr($class, "comment-author-")) {
			unset( $classes[$key] );
		}
	}
	return $classes;
}
add_filter( 'comment_class' , 'remove_comment_author_class' );

The code above will clean comment_class for the author. I hope you enjoy this tiny tricks on WordPress. Thanks for WP Recipes to share it

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

The Right Way Highlight Author Comments in WordPress

This Tricks original written by AEXT.net and we only share and to make it more clearly, especially for me. How To Highlight Author Comments in WordPress in the right way. This code is better for the future and better for … Read More

Another Ways Remove all nofollow attributes from comments

I has written some tutorial How To Remove nofollow on Comments Text. Today tricks I will give another ways to do it, with more complex code and of course better code than before. The ways to do this is simple … Read More

How To Remove WordPress 3.1 Admin Bar

There are a lot of new features on WordPress 3.1, one popular feature is display WordPress Admin bar. This bar is added automatically by WordPress 3.1. This bar will be activated on your dashboard and the site itself (front page). … Read More

How to remove admin bar WordPress 3.1

Some people feels admin bar from WordPress 3.1 quite disturbing. I think its cool feature but if you want to remove this function, here it is some alternative that I’ve collected from this blog. Copy this code below and paste … Read More

How To Delete All WordPress Spam Comments Using phpMyAdmin

I have website that attacker more than 2000 spam each days. And I am so unhappy with it. I know I haven't installed any Comment Preventing system.  The WordPress spam comment attack is pretty smart because it is definitely automated … Read More

Remove nofollow attributes from comment text

WordPress added nofollow attributes on comment text url, this is bad for some commeter that needed some backlinks, if you want remove nofollow attributes from comment text in your WordPress site is easely, all need to do just added some … Read More

WP Tutorial: Remove admin name in comments class / WordPress

Daily The Best WordPress Tricks and WordPress Tips to make your WordPress nice read more

Source: http://wptricks.net/wp-tutorial-remove-admin-name-in-comments-class/

Removing the WordPress Version Number / WordPress Tricks & Tips

WP Tutorial: Remove admin name in comments class. Batovasan, create nicely WordPress Tutorial. The reason create this tutorial is Small Security Hole on WordPress. read more

Source: http://wptricks.net/removing-the-wordpress-version-number/

Disable Admin Bar in WordPress 3.3 | Wptuts+

In today's WordPress tutorial we will cover style>'; } add_filter('wp_head','remove_admin_bar_style You can replace the class name with "js," "css," "sql read more

Source: http://wp.tutsplus.com/tutorials/how-to-disable-the-admin-bar-in-wordpress-3-3/

Customizing WordPress For Your Clients | Wptuts+

com" target="_blank">Your Name'; } add_filter('admin_footer_text', 'remove bar-wp-logo,#wp-admin-bar-comments,#wp-admin You can replace the class name with read more

Source: http://wp.tutsplus.com/tutorials/customizing-wordpress-for-your-clients/

Common set of custom functions for wordpress : Live Experience

// smart jquery inclusion if (!is_admin()) { wp_deregister_script wordpress Trash; Put HTML tags into wordpress post title; Remove admin name in wordpress comments class read more

Source: http://www.livexp.net/wordpress/common-set-of-custom-functions-for-wordpress.html


2 Responses to WP Tutorial: Remove admin name in comments class

  1. Pingback: Tweets that mention How To Remove admin name in comments class # WordPress Tricks & Tips -- Topsy.com

  2. Pingback: Display Clean Pingbacks and Trackbacks | Unlock IMEI Cellphones

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>