Multisite Admin Bar Switcher
Require PHP 5.3 The Multisite Admin Bar Switcher is a plugin written for WordPress Multi-Site that makes switching between sites easier with large numbers of sites. This plugin replaces the built in ‘sites’ drop down with one which breaks the sites up by letter.
Require PHP 5.3
The Multisite Admin Bar Switcher is a plugin written for WordPress Multi-Site that makes switching between sites easier with large numbers of sites.
This plugin replaces the built in ‘sites’ drop down with one which breaks the sites up by letter.
A closer look.
- 01Upload multisite-admin-bar-switcher folder to the /wp-content/plugins/ directory
- 02Activate the plugin through the ‘Network/Plugins’ menu in WordPress The switcher will now appear on the Admin Menu
Multisite Admin Bar Switcher supports filters to change the way the site lists look.
mabs_blog_name – used to customise the way the blog names look in the site list
/** * Sets the blog name to show in the sites drop down * * @param string $name Blog name * @param stdClass $blog Blog details * * @return string Blog name */ add_filter('mabs_blog_name', function($name, $blog) { return sprintf("(%s) %s", $blog->userblog_id, $name); }, 10, 2);
mabs_blog_pages – used to add or remove subitems from blogs
/** * Sets the blog items to show under a site * * @param [type] $pages List of blog subitems * @param int $site_id Blog ID * @param WP_User $user User we're showing the list to * * @return array List of blog subitems */ add_filter('mabs_blog_pages', function($pages, $site_id, $user) { return array_merge($pages, array( 'products' => array('title' => 'Products', 'url' => 'edit.php?post_type=product', 'permission' => 'edit_products'), )); }, 10, 3);