{"id":22058,"date":"2013-02-17T22:29:34","date_gmt":"2013-02-17T22:29:34","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/multisite-admin-bar-switcher\/"},"modified":"2020-06-17T20:53:31","modified_gmt":"2020-06-17T20:53:31","slug":"multisite-admin-bar-switcher","status":"publish","type":"plugin","link":"https:\/\/yor.wordpress.org\/plugins\/multisite-admin-bar-switcher\/","author":7994462,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4.0","stable_tag":"1.4.0","tested":"5.4.19","requires":"3.2.1","requires_php":"","requires_plugins":"","header_name":"Multisite Admin bar Switcher","header_author":"Flyn San","header_description":"","assets_banners_color":"","last_updated":"2020-06-17 20:53:31","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.flynsarmy.com","header_author_uri":"http:\/\/www.flynsarmy.com\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":6805,"num_ratings":6,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"6"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1","1.0.1","1.0.10","1.0.11","1.0.12","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","1.1","1.1.1","1.1.2","1.1.3","1.2","1.2.1","1.2.2","1.2.3","1.2.4","1.2.5","1.2.6","1.3.1","1.3.2","1.3.3","1.3.4","1.4.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"669481","resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Multisite Admin bar Switcher in action"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[441,325,2414,1140,1541],"plugin_category":[51],"plugin_contributors":[97079],"plugin_business_model":[],"class_list":["post-22058","plugin","type-plugin","status-publish","hentry","plugin_tags-multisite","plugin_tags-network","plugin_tags-switch","plugin_tags-switcher","plugin_tags-toolbar","plugin_category-multisite","plugin_contributors-flynsarmy","plugin_committers-flynsarmy"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/multisite-admin-bar-switcher.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/multisite-admin-bar-switcher\/assets\/screenshot-1.png?rev=669481","caption":"Multisite Admin bar Switcher in action"}],"raw_content":"<!--section=description-->\n<p>Require PHP 5.3<\/p>\n\n<p>The Multisite Admin Bar Switcher is a plugin written for WordPress Multi-Site\nthat makes switching between sites easier with large numbers of sites.<\/p>\n\n<p>This plugin replaces the built in 'sites' drop down with one which breaks the\nsites up by letter.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>multisite-admin-bar-switcher<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Network\/Plugins' menu in WordPress\nThe switcher will now appear on the Admin Menu<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>Multisite Admin Bar Switcher supports filters to change the way the site lists look.<\/p>\n\n<p><strong>mabs_blog_name<\/strong> - used to customise the way the blog names look in the site list<\/p>\n\n<pre><code>\/**\n * Sets the blog name to show in the sites drop down\n *\n * @param  string   $name    Blog name\n * @param  stdClass $blog    Blog details\n *\n * @return string            Blog name\n *\/\nadd_filter('mabs_blog_name', function($name, $blog) {\n    return sprintf(\"(%s) %s\", $blog-&gt;userblog_id, $name);\n}, 10, 2);\n<\/code><\/pre>\n\n<p><strong>mabs_blog_pages<\/strong> - used to add or remove subitems from blogs<\/p>\n\n<pre><code>\/**\n * Sets the blog items to show under a site\n *\n * @param  [type]  $pages   List of blog subitems\n * @param  int     $site_id Blog ID\n * @param  WP_User $user    User we're showing the list to\n *\n * @return array            List of blog subitems\n *\/\nadd_filter('mabs_blog_pages', function($pages, $site_id, $user) {\n    return array_merge($pages, array(\n        'products' =&gt; array('title' =&gt; 'Products', 'url' =&gt; 'edit.php?post_type=product', 'permission' =&gt; 'edit_products'),\n    ));\n}, 10, 3);\n<\/code><\/pre>\n\n<p><strong>mabs_cache_duration<\/strong> - alter cache time (default 30 minutes)<\/p>\n\n<pre><code>\/**\n * Various DB-intensive lookups are cached. Use this filter to alter the cache time.\n *\n * @param  int     $cachetime Cache Time (default 30 minutes)\n *\n * @return int                Cache time\n *\/\nadd_filter('mabs_cache_duration', function($cachetime) {\n    return 60*60*30;\n});\n<\/code><\/pre>\n\n<!--section=changelog-->\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>2020-06-18<\/li>\n<li>PSR-2<\/li>\n<li>Removed unused 'user' argument in 'mabs_blog_pages' filter<\/li>\n<\/ul>\n\n<h4>1.3.4<\/h4>\n\n<ul>\n<li>Don't allow spaces in IDs<\/li>\n<\/ul>\n\n<h4>1.3.3<\/h4>\n\n<ul>\n<li>Fix version mismatch<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Network - Settings - Mabs - Clear Cache button now clears cache for everyone<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Remove some redundant database calls<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Cache admin URLs to avoid hitting the DB<\/li>\n<\/ul>\n\n<h4>1.2.6<\/h4>\n\n<ul>\n<li>Retrieve a much larger number of sites<\/li>\n<\/ul>\n\n<h4>1.2.5<\/h4>\n\n<ul>\n<li>wp_get_sites() deprecation fix<\/li>\n<\/ul>\n\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>Added mobile menu<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Performance improvement: More admin bar methods cached. WP_Admin_Bar has been replaced with MABS_Admin_Bar<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Performance improvement: Admin bar menus that we're removing shouldn't ever be loaded in the first place<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Switch from wp_cache API to site_transient API so caching happens on both backend and frontend<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Cache mabs_get_blogs_of_network function<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Add cache support to speed up admin bar generation<\/li>\n<li>'Network Settings' page for clearing cache<\/li>\n<\/ul>\n\n<h4>1.0.12<\/h4>\n\n<ul>\n<li>'My Sites' translation fix<\/li>\n<\/ul>\n\n<h4>1.0.11<\/h4>\n\n<ul>\n<li>Capitalization fix<\/li>\n<\/ul>\n\n<h4>1.0.10<\/h4>\n\n<ul>\n<li>Added mabs_blog_pages, mabs_blog_name filters - See documentation for usage instructions<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Disable autocomplete on filter field<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>Show all blogs to super admins<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Minor fixes<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<p>September 25, 2014<\/p>\n\n<ul>\n<li>Added site filter if 10 or more blogs<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<p>April 30, 2014<\/p>\n\n<ul>\n<li>Confirmed compatibility with WP 3.9<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>MABS now shows for all logged in users.<\/li>\n<li>Performance improvements<\/li>\n<li>Only applicable blogs show for each user<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>'My Sites' admin button now toggles between admin and frontend<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Minor readme updates<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<p>February 14, 2013<\/p>\n\n<ul>\n<li>First version released<\/li>\n<\/ul>","raw_excerpt":"Require PHP 5.3","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/22058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=22058"}],"author":[{"embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/flynsarmy"}],"wp:attachment":[{"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=22058"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=22058"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=22058"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=22058"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=22058"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/yor.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=22058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}