I see no purpose for the Akismet widget in a theme I recently created. I can't seem to find the widget's class to use the unregister_widget() class and remove it. Anybody have an idea what the class is?
I see no purpose for the Akismet widget in a theme I recently created. I can't seem to find the widget's class to use the unregister_widget() class and remove it. Anybody have an idea what the class is?
Have you found the way to remove it? I just tried now and also can't find its class.. It appears to register itself without a class. :\
Yeah I've scoured the code on the widget and can't find anything. I would expect such a widely used WordPress widget to be properly registered. Maybe I'm missing something but I think this is a problem.
It's pretty old and predates a lot of the standards we all use today. What's the harm in leaving the widget there? I'm assuming you mean it shows up in the Apperance -> Widgets section.
Yes, it shows up in the Appearenace > Widgets section.
When I develop sites to customers, I usually add some custom widgets (Which I use also CSS to make them appear in that page in other than the default ones) and I also unregister any of the default widgets that should not be used on each particular site. In that, I minimize mistakes and makes the admin panel being specified to the needs of each site. (I also remove other un-needed menus and do so other customizations).
Anyway, I couldn't unregister that Akismet widget, so in order to hide it in this case I just use cdd to hide it.
@ashblue, if you want you can add this to theme's functions.php file, it will not unregister the widget, but will just hide it, which in this case is good enough -
add_action('admin_print_scripts', 'tc_additional_admin_css');
function tc_additional_admin_css() {
ob_start();?>
<style>
#widget-1_akismet {display:none;}
</style>
<?php echo $x = ob_get_clean();
}Well you have a point Ipstenu, but I'm just perplexed that a plugin that comes packaged with WordPress wouldn't follow current standards. I don't think it would be too hard for Akismet to fix the widget or remove it entirely from the plugin as I've never seen a website display their anti-spam block.
Good idea maorb, I'll just add some CSS to my admin.css stylesheet. Not too sure why I didn't think of that earlier.
Agreed, the widget item in the Akismet plugin could stand a code update.
If you are interesting you can submit patches for that via a new ticket at http://plugins.trac.wordpress.org/
Ticket has been officially opened here: http://plugins.trac.wordpress.org/ticket/1310
This topic has been closed to new replies.