If I understand you, he hook you want (WordPress 3.5.1) is load-upload.php
.
Proof of concept:
function t_wpse_94284() {
wp_redirect(home_url());
exit;
}
add_action('load-upload.php','t_wpse_94284');
That hook should fire only on /wp-admin/upload.php
and, though I haven’t tested it, I think that your function should work just fine as it is.
Related Posts:
- How to redirect user after session timeout
- How To Add Custom Form Fields To The User Profile Page?
- Why are my roles not visible in a Multi-site/Network?
- How to use same email for multiple users
- Where can I find documentation on what characters are allowed in user names and why?
- Redirect Main Site to Subsite in Multisite WordPress
- Is there a is_user_logged_in() for multisite?
- Why is WordPress Multisite redirecting to wp-signup.php and how to fix it?
- WordPress Multisite allow site admin to add user without email confirmation
- wordpress multisite, how to keep user on subdomain throughout registration process?
- Network not displaying all sites and users
- WordPress Multisite – When a user signs-up on main site, how to add the user to a subsite
- How to use alias domain for multisite installation?
- Give to site admin the option to “skip confirmation email” when adding new user
- Different back-end colour scheme for the different sites of a multisite
- Set up collaborative site
- How to disable Multisite sign-up page?
- WordPress multisite,several different languages,page redirect?
- WordPress Multisite – Multiple subfolders for blogs
- WordPress multisite subdirectory redirect infinite loop issue
- Multisite 404 errors and non-www redirecting to home page
- How does WordPress connect sites and the wp_users table?
- multisite htaccess 301 redirects
- Prevent user creating new users with specific roles
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Allowing logged in users to comment without moderation across a multisite installation
- Redirect all users, except network administrators, from the main site to a subsite
- Multisite wp-admin redirect loop
- Multisite non-www domain redirects to sign-up
- Can you have multi-site WP and keep users separate?
- WordPress network (multisite) /wp-admin/ redirect loop (ERR_TOO_MANY_REDIRECTS)
- Domain redirect in WordPress multisite
- Multisite – Redirect All Users to Subsite Home Page on Subsite Login
- Multisite non www domain gives registration error but should redirect to www.domain.com
- 301 Redirects for posts, category, pages from original domain to sub-domain of multisite
- Trying to access second site dashboard on a multisite configuration proceeds to an error
- Redirect loop (only for multisite network admin)
- How to add multiple existing users to a multisite site?
- Why wordpress multisite redirect to wp-signup if site exists?
- the blog owner multisite
- How can I get multisite primary blog (url or path) for current user?
- Sub-subdomain getting redirected to main domain
- Why can’t I delete original user in multisite? Options for manual removal
- Can I use multisite functions in a single-site installation?
- How to add edit users capability to a custom role?
- Multisite network admin – URL / redirect error
- WPMU – new users are automatically subscribed to the main blog – how to prevent that?
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- Redirect subdomain homepage to domain specific page in wordpress multisite
- In MultiSite, can some users automatically have Site Admin rights on all sites, without granting them Network Admin access?
- WordPress multisite subdirectory on nginx behind reverse proxy
- Multisite Redirect issue
- How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
- Disable domain redirect
- Redirect users on logout
- How can I delete a user from entire multisite nework
- Multisite, multiple domains per site
- delete_user_meta : how to delete all the metadata of a given user (witout SQL)
- How to search users globally on a multisite install?
- Multisite Network menu links not updating
- How to disable the default WordPress redirect to non-www URLs?
- Update User Role Across Network when Main Site User is Updated
- Assign role to user on first login, if they are first (after admin)
- Get the User ID Who Owns a Given Blog ID in Multisite
- https redirect hell (adding www)
- Make a user administrator to a sub directory site and a contributor to main site in multisite network
- Displaying a message upon user registration
- Auto Redirect after login
- Query users by capability – uninstall/deactivate callback
- WPMU Development Environment
- Redirect subdomain in Multisite installation?
- Issue with htaccess redirection in WP Multisite
- Site kit Google Analytics setup giving Error: {“error”:”invalid ‘redirect_uri'”}
- All pages have 302 redirect, which I can’t remove
- How to change user starting role in WordPress MultiSite?
- Why my deleted url is redirecting to random post?
- Redirect only posts to New Domain
- Multsite redirecting to the main site
- Multisite setup help – plain domain/subsite always redirects to domain with subdir multisite
- Multisite – One user allowed access to all sites?
- Add a user to a specific blog when they register?
- Redirect & permalink problems after moving multisite to a new server
- Temp URL Redirect Loop
- Installed domain-based Multisite but can’t access wp-admin (redirect loop)
- How do you disable account activation in WPMU and then log the user in right away?
- Redirect Site Geologically
- How to configure Multisite Network with randomized hostnames?
- WordPress Multisite Strange Redirect on Primary Site
- Wrong Redirect/Rewrite Rules?
- Four columns in the wp_users table
- Htaccess file isn’t redirecting http sub-pages to https––they display 404 error instead, tried many solutions and none work
- WordPress Multi-Site on Ubuntu 18.04 LAMP Keeps Re-Directing
- Good way to block users within a multisite setup without deleting them?
- Subsite access without being a member of the subsite in wp multisite network
- URL without www redirect directly with submission page – Multiwordpress install
- Multisite Redirection to new domains
- Nginx config, how can I redirect primary multisite domain, but not its sub-folders, nor other domains?
- Redirect One Multisite to Another
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- WordPress Multisite + Erros with URLS and ADMIN