WordPress.org

Ready to get started?Download WordPress

Forums

Akismet
Remove Akismet Widget (8 posts)

  1. ashblue
    Member
    Posted 3 years ago #

    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?

  2. maorb
    Member
    Posted 3 years ago #

    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. :\

  3. ashblue
    Member
    Posted 3 years ago #

    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.

  4. 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.

  5. maorb
    Member
    Posted 3 years ago #

    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();
    }
  6. ashblue
    Member
    Posted 3 years ago #

    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.

  7. Joseph Scott
    Member
    Plugin Author

    Posted 3 years ago #

    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/

  8. ashblue
    Member
    Posted 3 years ago #

    Ticket has been officially opened here: http://plugins.trac.wordpress.org/ticket/1310

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags