This solution works for me:
$user = get_current_user_id();
$blogs = get_blogs_user_can_admin($user);
function get_blogs_user_can_admin($user) {
$blogs = get_blogs_of_user( $user, true );
foreach($blogs as $key => $blog) {
switch_to_blog($blog->userblog_id);
if( !current_user_can('manage_options') ) unset( $blogs[$key] );
restore_current_blog();
}
return $blogs;
}
Related Posts:
- Add WordPress MU Network Admin via Database
- How Can I Centralize Content Usage and Approval in a WordPress Multi-Site installation
- WordPress Multisite allow site admin to add user without email confirmation
- How to hide admin account in BuddyPress? (for security reasons)
- Restrict Admin Capabilities in MultiSite
- How to add super admin to all sites
- Uploading Images to Multi-Site Causes Failure to HTTP Error
- ID’s being stripped out of editor for Admin user in Multi-Site
- How to add multiple existing users to a multisite site?
- current_user_can(‘Administrator’) does not return true in multisite if user is Administrator but NOT Super Admin
- Can I manage more wordpress sites with one wordpress administrator page? [closed]
- Add menu page on multisite
- Why is my multisite installation not showing all the available sites?
- How to get the site administrator/s by blog id
- PHP Notices appear when browsing any page in admin, but only for child theme, using code from WP Codex
- Restrict Admin Capabilities in MultiSite
- current_user_can() always returns true if user is super admin
- Display site administrator’s id by current blog id inside link
- Unable to apply theme to WordPress Network Site install
- Four columns in the wp_users table
- WordPress Multisite dashboards redirect to homepage
- Limit entries number on network/sites.php
- Multisite User cannot access dashboard
- InfiiniteWP and WP Networks (multisite)
- Site’s admin created with wpmu_create_blog accessible only on 2nd attempt
- Where to set individual blog quotas?
- How do I check if the user is a site owner in a network?
- how to have __() translating in languages different from admin?
- MultiSite: new Sites not showing up
- Is There A Plugin to Create WP Multisite Installs programatically
- WordPress multisite, allow non super admins to create sites
- Function to Load Admin CSS for Super Admin on Multisite
- Admin users not able to see network menus
- Hook into ‘admin_url’ but only on Mysites admin bar menu
- WordPress Multisite FQDN Admin Access
- Delete all blogs on multisite
- How to create 30 new sites from an export of a master site?
- Pages redirect me to the homepage
- Not an admin on a multisite setup but I want to change the fonts
- Can admins on network install view and edit users accounts?
- How do I remove/delete an old super admin user?
- Setting up a wordpress network with third level domains
- Troubleshooting a “You do not have sufficient permissions to access this page” error
- Benefits or Problems for using Sub-Directory vs Sub-Domain install of WP Network
- What methods should be used to fend off splogs in a multiuser install? [closed]
- WordPress 3 Multisite using subdomains.- DNS on Cpanel question
- Remove Site Name from register form – Multisite
- Set up collaborative site
- Add role across network in multisite
- NGINX Multisite Rewrite rules
- On Multisite: Loop to Show First Four Images of Recent Posts Across Network
- “Preview Changes” button doesn’t show changes for previously published posts/pages
- Tax_query not working on multisite
- Identical members roles on all sites in a multisite
- Fixing media links after importing to multisite
- WP-CLI can’t list posts
- Woocommerce and different checkout field for different countries
- Why is multisite rest API keep giving me results for root site only?
- How to stay logged in on a multisite with different domains?
- wordpress multisite subsite rewrite rules not working for videos
- What should I do? A multisite, a single website or many websites? [closed]
- Can a user spread virus on my Multisite?
- Use another author.php if different multisite subsite?
- What is best forum script available to integrate with wordpress?
- Link to Network Admin Broken After Switching to HTTPS
- Multi-site get_bloginfo(‘stylesheet_directory’) referring to sub-folder
- How to convert multi-site to single site
- Use WordPress MultiSite (WPMS) with a remote database for each created site
- Redirect old uploads after moving to multisite
- URL for images folder on Multisite
- Admin permission for creating blogs in multisite
- Will WP work on a multi-server environment? [duplicate]
- Amazon EC2 and static page Caching (Multisite): How to enable Caching with multiple instances?
- How to check if page exists in Multisite?
- WordPress MU wp_posts table
- WordPress Multisite (sub-directory based), change subsite URL
- 403 forbidden when changing settings on WP Multisite non-main sites
- WordPress multisite with only two level of sub-domains?
- WordPress multisite with separate domains
- Multisite are not creating folders for the subsites
- After setting up multisite on localhost, requests to localhost redirect to production domain
- How to use same theme in different languages?
- Blog & Portfolio setup
- How can I create network with different domains?
- Problem moving wordpress multisite
- WordPress Multsite Network site under another network site
- Activate User account for Sub Site broken
- new WPMS site not working / Q setting up new site/subdomain
- Redirecting two Multisite domains to Single site on different host
- How to add ping list in WordPress multi site?
- Can I run a second wordpress site as a subdomain without using multisite?
- Problem in adding new site on WP multisite
- How to configure WordPress for multiple blogs without using multisite?
- New wordpress uploads are broken
- Show all posts on a twentythirteen multisite
- Is there a way to add a function that will get run after a blog is created?
- Add blog languages to blog-name inside my-site-list in admin-bar
- Merging versions of wp_posts based on post_title
- Trying to create site-wide Active Directory sync with Multisite
- WordPress Network / Multisite login to one site allow access to all