If you want to construct for example:
http://example.com/?ref=1,8,22
for multiple administrators of the current sub site, you can try the following (untested):
$uids = get_users(
array(
'blog_id' => get_current_blog_id(),
'role' => 'administrator',
'fields' => 'ID',
'order_by' => 'ID',
'order' => 'ASC',
)
);
echo $url = add_query_arg(
array( 'ref' => join( ',', $uids ) ),
'http://example.com'
);
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
- Exclude main blog from get_blogs_of_user
- 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
- 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?
- WP DB Location for “Next Post to Create” Index Value
- 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?
- List all blogs a user can admin [duplicate]
- How do I get the current edit page ID in the admin?
- WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
- SSL wildcard issue for wp multisite subdomains
- How to set configuration options for particular sub blogs?
- Perform action on WPMU blog deletion
- Changing Multisite themes on mass
- Organize uploaded media files
- How to upload images manually to wordpress?
- MU domain mapping login issue
- How to make WordPress use new Upload Path settings in Multisite Setup
- Import a regular WordPress blog into a MU installation
- Basic analytics across WordPress Multisite network [closed]
- How to make wp-signup.php a 1-step process [closed]
- Multiple Multisite networks on the same domain?
- How the mu-plugins Folder Works in a Multisite Installation?
- Get Permalink of Network Blog Post
- What is the best practice to get a site from local to online?
- Retrieving data from specific multisite blog
- Error 404 on Network Admin and others
- Retrieving multisite blog IDs, somehow failing to foreach them properly
- Get just subdirectory name from a multisite URL
- Why my deleted url is redirecting to random post?
- Reset a site in multisite
- Redirect Site Geologically
- WordPress Network admin options page: how to store options and where will they be stored?
- Wrong filepaths and admin page infinite reload after migrating to aws bitnami
- Multisite not using subdomains as hostname in from address when sending emails
- Cookie signed verification failed – wp-saving-post
- Do I need a Multisite? [closed]
- Error: reassigning content to a different user is not supported on multisite
- metaboxes disappear on saved pages
- User registration on two sites in same multisite
- 404 on page 2 multisite
- How many databases do I need?
- How can I append blog_id to … echo [functions-defined-constant]?
- WordPress Multisite Add User
- LimitInternalRecursion error
- Some permalinks are not working and show 404
- Should I use Multi Site to achieve different designs for different sections?
- WP MS: How to query over the network
- unable to access network admin of a blog
- WPMU on MySQL limited to 1GB of space?
- WordPress Multisite Permalinks on mapped domain = server 404 error
- Sites network with sub-folders
- Set my own password when registering a multisite user or site
- Efficient way to fetch all archived WPMS blogs
- Setup another new subdomain root on top of multisite configuration
- WordPress keeps deleting user account for multisite after loggin out i need your help please?
- Change main site / network admin site?
- Serve theme and plugins assets from correct domain on multi-domain multisite
- Themes are visible in Network, but invisible in sites
- logging out with/without confirmation – single site, multisite
- Multisite different domains mapping error on GGS
- WordPress Multisite wp-admin/ redirect loop but adding index.php works fine
- Can WP multisite manage multiple ccTLDs
- WordPress Multisite redirect loop
- WordPress Multisite Subsite WP admin not working
- Multiple WordPress sites on one hosting [closed]