WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Delete cache button in Admin bar (9 posts)

  1. hakonorri
    Member
    Posted 3 years ago #

    Hi,
    a feature request. Can we get a "Delete Cache and refresh page" button in the new Admin bar?

    thanks,
    Hakon

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. hebbet
    Member
    Posted 3 years ago #

    yes that would be useful. but it should only clear the cache of current posting or page.

  3. snabbdesign
    Member
    Posted 3 years ago #

    Yes, this would be good. You should have the option to let/allow different user roles access the button.

    Option to delete all pages or only delete current page. Maybe two buttons in the admin panel under the update button.

  4. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Good idea.

  5. Matt Lovett
    Member
    Posted 2 years ago #

    Yeh that would be good! :)

  6. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    I added this feature a few days ago. Go look at the development version on the "Other Versions" page.

  7. Darko Mitrovic
    Member
    Posted 2 years ago #

    Add this code in function.php:

    function my_admin_bar_menu() {
    	global $wp_admin_bar;
    	if ( !is_super_admin() || !is_admin_bar_showing() )
    		return;
    	$wp_admin_bar->add_menu( array(
    	'id' => 'custom_menu',
    	'title' => __( 'Delete Cache'),
    	'href' => 'http://www.yoursite.com/wp-admin/options-general.php?page=wpsupercache&tab=contents' ) );
    }
    add_action('admin_bar_menu', 'my_admin_bar_menu');
  8. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    No, just try the development version. Here's everything you need to know all in one handy post. It's really close to 1.0 so I need testers.

  9. Chris Van Patten
    Member
    Posted 2 years ago #

    Is there a way to remove this new admin bar link? Hooking into wp_before_admin_bar_render and removing it by its link ID (presumably delete-cache?) with the remove_menu function isn't working as I would have expected.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic