Disable admin bar for customers. Closes #772.
This commit is contained in:
parent
6c64be6cbc
commit
cdbcda7dab
|
@ -152,6 +152,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Menu tweaks + new icons
|
||||
* My account ssl (added by justinstern)
|
||||
* Prevented order save code running multiple times
|
||||
* Disable admin bar for customers when admin access if locked down
|
||||
|
||||
= 1.5.1 - 08/03/2012 =
|
||||
* Persistent (logged-in) customer carts (thanks dominic-p)
|
||||
|
|
|
@ -58,6 +58,16 @@ if (!function_exists('woocommerce_empty_cart')) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WooCommerce disable admin bar
|
||||
*
|
||||
**/
|
||||
if (!function_exists('woocommerce_disable_admin_bar')) {
|
||||
function woocommerce_disable_admin_bar() {
|
||||
add_filter('show_admin_bar', '__return_false');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the cart upon login
|
||||
**/
|
||||
|
|
|
@ -110,9 +110,11 @@ add_filter( 'wp_nav_menu_items', 'woocommerce_nav_menu_items', 10, 2 );
|
|||
|
||||
/* Clear the cart */
|
||||
if (get_option('woocommerce_clear_cart_on_logout')=='yes') add_action( 'wp_logout', 'woocommerce_empty_cart' );
|
||||
|
||||
add_action( 'wp', 'woocommerce_clear_cart_after_payment' );
|
||||
|
||||
/* Disable admin bar */
|
||||
if (get_option('woocommerce_lock_down_admin')=='yes') add_action( 'init', 'woocommerce_disable_admin_bar' );
|
||||
|
||||
/* Catalog sorting/ordering */
|
||||
add_action( 'init', 'woocommerce_update_catalog_ordering' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue