You can use the global variable $current_screen
. It has the property is_network
, with a boolean value, that indicates if we are in /wp-admin/network/
or not.
add_action( 'admin_print_scripts', 'network_scripts_wpse_91699' );
function network_scripts_wpse_91699()
{
global $current_screen;
if( !$current_screen->is_network )
return;
wp_register_script( 'test', plugins_url( 'test.js', __FILE__) );
wp_enqueue_script( 'test' );
}
This action hook can also be used like
add_action( 'admin_print_scripts-site-new.php', 'callback' );`
and it will only print in the screen /wp-admin/network/site-new.php
, so there’s no need to check if the current screen is a network one or not.
Related Posts:
- Add additional Network constants to wp-config.php dynamically
- How do I change the Multisite URL?
- Post and Page Inheritance to subsites in a WordPress Network
- Roles other than Super admin accessing manage_network_themes
- How to add super admin to all sites
- Listing of all site options in dashboard
- Multisite: How to store global options vs. site options?
- Single-user registration to access all sites in WordPress MultiSite Network
- WPMU vs WordPress MultiSite is there a difference anymore?
- Generate a user list per site to communicate upgrade plans
- Force Network Admin Dashboard to 1 column on wordpress multisite
- Timeout While Upgrading Network in Multi-site
- “Upgrade Network” error: stuck with SSL certificate verification
- Multisite sub-site dashboard redirects to /wp-admin/
- WordPress Multisite Layered Admins
- Trying to access second site dashboard on a multisite configuration proceeds to an error
- Add new domain to ‘My Sites’ using network admin
- Favicon plugin for WordPress running in network mode (multisite)? [closed]
- How To Remove Dashboard Menu Items for Multisite Users?
- No Network/Super admin after enabling Network
- How to remove Broken Link Checker widget from admin menu
- Problem in Internationalizing a plugin built for network level usage
- Multisite network admin – URL / redirect error
- Change Username?
- Why does the My Site dropdown show only a single domain?
- wp_redirect not working on admin menu page
- WP Multisite – domain mapping to domain.com and separate site to domain.com/help
- Is there a way to run upgrade.php for one blog?
- Cannot access WordPress Multisite Main Dashboard
- Multsite redirecting to the main site
- Include only a domain path in multisite Network
- Adding new sites to Multisite won’t register in Dashboard
- WordPress Network admin options page: how to store options and where will they be stored?
- WordPress Multisite dashboards redirect to homepage
- Multisite gives Error if i want to enter Dashboard or Site
- Multi-Site Subdomain: Show master site under subdomain if no sub site exists
- How to force change Network site multi language subdirectory base URL?
- Merge Multisites with Shared Network Media Library
- Multisite Subdirectory with same domain subdomain
- How to create a Multi-Network subsite?
- Create Custom Multisite User Role to Reduce Capabilities
- Renaming admin user on multisite install by MySQL
- HTTPS Warning and Certificate Error when Updating Network
- Multisite, with virtual root
- How to exclude specified from all list of Multisite
- How to wordpress multi site [closed]
- Network of multisites in WordPress, create new site with all the contents of the main
- How do I check if the user is a site owner in a network?
- Locking one blog of many in a multi user/blog WordPress installation
- Where are the files that control the multisite user dashboard?
- Programmatically creating site in a network
- switch_to_blog() not functioning while querying post_types, Why?
- WordPress Multisite with subdomains on different domains
- Can’t create a subdomain network – and WP is installed in webroot, not a folder
- How to have one installation at blog.example.com and multiple blogs in sub folders such as blog.example.com/userA?
- Forward and mask a WordPress website
- WordPress multisite with same content
- Can I use the same Folder name as a Multisite Blog?
- unable to access network admin of a blog
- Website not listed under Sites (in a Network environment)
- Sites network with sub-folders
- Is there something I need to know in order to use WordPress on foreign (Swedish) TLDs?
- How can I create network with different domains?
- multisite – unable to connect to network administration
- Add Network Sites are not working
- “My Sites” incorrectly showing all network sites for all logged in users
- Getting stylesheet error after setting subdomain to false in multisite
- Admin users not able to see network menus
- How to hold posts and accounts for moderation on WordPress Network site
- My Sites link in multisite is incorrect
- Multisite network admin login redirect
- Multisite network subdomains doesn’t work
- Multisite Dashboard not working
- Cannot enable WordPress Network – ‘MULTISITE’ already defined and false
- Change header.php of a specific WordPress Multisite
- Modify new user email notification in network admin screen wp multisite
- the menu of the network does not display my second website
- WordPress Multisite – Auto enable theme
- Issue when transforming an existing site to multi-site with subfolders setup
- network admin pages not linked to correctly
- How to split database of WordPress multi-site network into multiple database
- Move two independent sites to network
- How to configure CNAMES to be part of a WordPress Network
- Cannot access network admin panel on multi site
- How to apply specific plugins to affect all sites (Multisite Network)
- Admin user getting redirected to /wp-admin/user
- Getting 404 after Update in Multisite
- Unable to login to admin dashboard after setting up multisite
- 4th Network Site Database Errors?
- Can admins on network install view and edit users accounts?
- How to display update message only to admin
- How to disable admin access on new site registration for user in Multisite?
- WordPress Multisite (Network) some site users added to main site users list as subscriber
- Programmatically create blogs with dummy content on a WPMU site
- add_rewrite_rule on multisite doesn’t work
- How do I disable XML-RPC in WordPress Multisite?
- Is this possible? A multisite with “www.example.com/en/blog/” and “www.example.com/cn/blog/” (two directories deep)
- How do I export a single site in a multisite content without using a plugin? The default WP export does not catch all
- When hooking wp-cron to system
- Subdomain Wp-Admin Not Found