WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP Super Cache] Delete cache button in Admin bar

[Plugin: WP Super Cache] Delete cache button in Admin bar

Viewing 8 replies - 1 through 8 (of 8 total)
  • yes that would be useful. but it should only clear the cache of current posting or page.

    snabbdesign
    Member

    @snabbdesign

    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.

    Plugin Author Donncha O Caoimh
    Member

    @donncha

    Good idea.

    Yeh that would be good! 🙂

    Plugin Author Donncha O Caoimh
    Member

    @donncha

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

    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');
    Plugin Author Donncha O Caoimh
    Member

    @donncha

    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.

    Chris Van Patten
    Participant

    @chrisvanpatten

    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!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WP Super Cache] Delete cache button in Admin bar’ is closed to new replies.