Solution seems to be:
if(function_exists('get_sites')) {$sites= get_sites();}
elseif(function_exists('wp_get_sites')) {$sites= wp_get_sites();}
Related Posts:
- Programmatically create blogs with dummy content on a WPMU site
- How to individually set WP_DEBUG on a sub-directory multisite?
- Create multiple subdomains for multi-site from a database
- How to map a specific multi-site blog to a folder?
- 4 single sites VS multisite wordpress
- multisite htaccess 301 redirects
- using 1 form shortcode (si or cf7) for all multisite sites [closed]
- How to manage multiple domain with different languages on each domain with single wordpress installation?
- Is there any fundamental difference in developing a wordpress multi-network site?
- merging two multisites
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Should multi-language site using multi-site architecture have default language in base site?
- Redirect loop (only for multisite network admin)
- favicon and multi site
- Register email as username
- Deleting a user in multisite
- Recover from failed multisite conversion
- Multisite Subdomain Using More Resources Than Others?
- How to know if a site is using Multisite?
- Cookie nonce is invalid – Multisite
- Multisite setup on VVV with bedrock
- Trouble with switch_to_blog()
- WordPress Multisite prevent direct access to subdomain
- WordPress mutisite migration
- How can I delete a user from entire multisite nework
- Using A Shared/Common Theme Across Multiple Sites
- Multisite, multiple domains per site
- delete_user_meta : how to delete all the metadata of a given user (witout SQL)
- Activate Child Theme with Codex
- Multisite Network Localisation
- Can set_transient() be used in multi-site?
- Why does my multisite blog doesn’t show users?
- What would you recommend for hosting 10+ individual wordpress websites?
- Redirect only posts to New Domain
- Image problem – Multisite image upload broken
- problem with main site (root domain) redirects to subdomain (multisite)
- Switch a single site to a multi-site
- Why can’t I login to my “network sites”?
- migrate a MU sub blog to a single install
- Preferred method of setting user role only works on Main Site in Network
- Create a database for each site created in multisite?
- Adding a existing developed site to a multisite installation of WordPress
- Register submenu on network menu from the subsite
- How can i define the order of blogs in a multisite network manually (like pages)?
- new multisite, old db
- How can I hide certain sidebars from some users?
- Create a page for a theme only
- How do I create a multi site network?
- Hosting 2 WordPress websites in /public_html/ & /public_html/subdirectory/ at the same time
- Can’t access Dashboard of a Multisite WordPress. Chrome results in “ERR_TOO_MANY_REDIRECTS”
- How do I get the site url from a Block (within the block editor)
- wp_get_attachment_image_src returns incorrect URL on multisite
- Locking one blog of many in a multi user/blog WordPress installation
- How do I disable XML-RPC in WordPress Multisite?
- Multisite – One Site with multiple URLs
- Delete all user’s meta without knowing all the ‘key’
- Is this possible? A multisite with “www.example.com/en/blog/” and “www.example.com/cn/blog/” (two directories deep)
- Allow editors to switch sites (Multisite)
- How to modify wp_config file for set up subdirectory?
- Sharing users across multiple sites, each on their own database
- Activation Account Email
- moving tables between multisite installs
- Stylesheet and JS linking error in WP multisite nested path
- Can I run multiple blogs from my local machine
- Trouble with SQL SELECT inside switch_to_blog()
- How to automatically translate plugin using translate.wordpress.org
- May I do multiple micro-sites with different themes in a single wordpress without subdirectory nor subdomain separation?
- Multisite htaccess file causing segfault (Segmentation fault 11)
- How do I export a single site in a multisite content without using a plugin? The default WP export does not catch all
- Multisite Smtp Server
- Images uploaded after adding multisite do not get loaded in any domain of the multisite network
- Migrating from domain mapping plugin to native domain mapping
- When hooking wp-cron to system
- “Multisite support is not enabled.” After Multisite Config Changes
- WordPress network, add extra directory to subsite urls
- Register a user only to the root blog – WP Multisite
- Update Same Contents on every Page
- Search returns “Nothing Found” on a sub directory
- WooCommerce API Returns 401
- Define default settings for new sites on multisite network with mu-plugin
- Users getting linked unwanted to main mu in WordPress multisite (WPMU)
- Multisite + wp_mail – Route Via Site Conditionally
- WordPress automatic Login on other page?
- Multisite: How to bypass wpmu_signup_user_notification and add my own notification logic?
- MU domain mapping without using a plugin
- Multisite authorization error 401
- Multisite Demo Data for New Site
- Responsive Wordress Site – Serve different post types to each device
- How create a multisite setup with “phantom” accounts and passwords?
- is there a if multisite have posts function?
- Multisite – mix sites that use subdomains with sites that use paths
- How to apply specific plugins to affect all sites (Multisite Network)
- Primary site file uploads failing, subdirectory subsites upload fine
- Subdomain Wp-Admin Not Found
- Is there a way to have wordpress 301 versus 302 urls by default?
- Pick your brain on wp-config.php if statement for multisite
- first load of the page gives 404 error
- Some Subdomains on a Multisite Install Not Found
- Multi site root site installed on subdomain, with child sites as subdirectories
- WordPress Multisite restict user access