I am not calling it inside of a hook but just straight away as the first thing in a MU plugin.
At that point all the info you are requesting won’t be available. That’s running before any hook and before WP is fully loaded.
Use a hook like wp_loaded
, admin_init
, after_setup_theme
… whatever serves your purpose best.
Related Posts:
- Multisite Conditional (if blog_id?) in a page template?
- Whats a good strategy for localising WordPress post and page content?
- How to use WordPress Multisite With Different Domain Names?
- Can i merge 2 new WP_Query($variable) ‘s?
- How to reliably flush rewrite rules on multisite?
- multisite: use a virtual subfolder for subblogs
- WP Multisite – multilanguage – swich to other language by click, but “same” content
- How To Provide Sub-Blogs Their Own Domain Names?
- “You need a higher level of permission” after admin changing. Why?
- Advanced Custom Fields Multisite Upload/Imagery Issue [closed]
- Prevent user creating new users with specific roles
- What is the correct form action URL for network options pages?
- Lock one of WP Network sites for not registered users
- How can I manage all multisite pending comments in one place?
- WordPress Multisite Network installation and dev questions
- BuddyPress on Multisite [closed]
- List all sites in multisite
- Migrating WPMS from apache to IIS7 causes Database Error
- Turn off trackback/pingbacks and comments on all existing multisite sites
- Subfolder multisite issue. Themes and plugin files 404
- Creating Admin Options Page where users can make changes to a theme
- htmll lang=”de” but admin page in English
- Multisite list all pages in site
- Dissolve Multisite while making site #5 the main site?
- Disable domain redirect
- Multisite setup on IIS with subdomains
- Partially translated dashboard in one of network’s site
- How can I fix a Virtual Multiblog install that has no errors, but won’t show all my sites?
- Disabling outbound connectivity on web servers [closed]
- Depth > 2 possible with multisite?
- What are Attributes used for in a WordPress Multisite?
- Make a user administrator to a sub directory site and a contributor to main site in multisite network
- How to store custom user data on the database?
- NGINX rewrite rules for sub subdomains
- Temp URL Redirect Loop
- wordpress multisite dashboard link in admin bar
- Multisite – user email activation links broken
- Multisite with subfolders- can’t access main site- Error establishing a database connection
- WP MU Register User across all blogs
- multisite subdomain behind reverse proxy
- Set default settings for all new multisites?
- How to disable a network enabled plugin on all sites, excepting on one?
- Multisite Subdirectory with same domain subdomain
- wp_mail() not sending email in multisite subdomain
- What are good approaches to routing some urls to a second WordPress install?
- Show content of other domain inside WordPress
- Moving a remote WordPress multisite installation to local
- Multisite redirecting wrong when without WWW
- Multisite, domain mapping and SSL?
- Google Apps SMTP for WP MultiSite?
- Get users registered 30 days ago(or more)
- How can I create blog specific database table in multisite?
- Save uploads directly in the uploads folder (on a multisite)
- Missing images after moving servers
- How to query blogs posts of WordPress sub domain?
- how to list all subdomain in wordpress multiuser
- Can you please verify my robots.txt for wordpress
- Share contents/posts between sites in a WordPress 5.6
- Wait ajax to complete before continue loop
- sub-page settings saving in NETWORK DASHBOARD
- Check if current site ID and value exist in WPDB
- Multi-vendor with custom shop site for each vendor
- You need to login with a user that has edit posts capacity?
- WPMU add custom colum
- How to publish some default pages in Multisite creation?
- Change WP-LOGIN and WP-SIGNUP for any request
- Remove W3 Total Cache minified files on custom page outside of WordPress [closed]
- Pros and Cons of Post Types vs. Multiple Blogs
- How to automate setup of theme, pages, widgets, etc for a new site in multi-site?
- Multisite ‘Welcome User Email’ SITE_NAME returns ‘network’ name, not the name of the blog
- “My Sites” incorrectly showing all network sites for all logged in users
- Merge posts of more than one site by using one database with the WordPress network
- User registration on wordpress multisite
- Redirect a WordPress Multisite url after it has been change to a new one
- Structure of multilingual and multiregional directory listing website for translation
- multisite 404 subfolder same name slug as site
- Website creation for multiple clients but from a single account on multiple host name
- Is mature Multisite
- What is the optimal solution: WP Multisite vs InfiniteWP
- Best way to have multiple custom domains associated with a site within a multisite installation
- Subdomain multisite instances having same content
- Can I add a rewrite rule in htaccess to remove the multisite subdirectory from the URL?
- allow multisite in the installation process
- How to Add Super Admin for WordPress multi-site
- WordPress single sign on using cookies with shared user role functionality between more than 2 wordpress subdomains
- How do I point two urls to the same child site in a multisite config
- How to split database of WordPress multi-site network into multiple database
- what if one user in WPMU change the theme files?
- Multisite /files/ URLs broken after server move
- WordPressMU: URL change and broken permalinks/links
- Extended URLs created using multisite feature not loading CSS/JS
- White pages on sub domains after server transfer
- No input file specified after enabling multi site
- How do I enable Multisite on WP 3.7.1?
- Using common slider in all sites
- Letting clients use visual builders plugins/themes on WordPress Multisite installation
- Registration Page
- WordPress Multisite (Network) some site users added to main site users list as subscriber
- Moving a WordPress Multisite site to a new install
- Multisite subdomain microsite on secondary domain