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?
- WordPress Multisite allow site admin to add user without email confirmation
- Network not displaying all sites and users
- 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 subdirectory redirect infinite loop issue
- multisite htaccess 301 redirects
- Prevent user creating new users with specific roles
- Multisite – Redirect All Users to Subsite Home Page on Subsite Login
- Trying to access second site dashboard on a multisite configuration proceeds to an error
- How to add multiple existing users to a multisite site?
- the blog owner multisite
- How can I get multisite primary blog (url or path) for current user?
- How to exclude a directory from WordPress permalinks in a Multisite environment?
- Redirect subdomain homepage to domain specific page in wordpress multisite
- 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
- How can I delete a user from entire multisite nework
- 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
- WPMU Development Environment
- Redirect subdomain in Multisite installation?
- Why my deleted url is redirecting to random post?
- Multisite – One user allowed access to all sites?
- Temp URL Redirect Loop
- Installed domain-based Multisite but can’t access wp-admin (redirect loop)
- Redirect Site Geologically
- WordPress Multisite Strange Redirect on Primary Site
- Wrong Redirect/Rewrite Rules?
- Four columns in the wp_users table
- Subsite access without being a member of the subsite in wp multisite network
- Nginx config, how can I redirect primary multisite domain, but not its sub-folders, nor other domains?
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- Redirect old uploads after moving to multisite
- WordPress stuck in deleting user
- How to split existing blog into WordPress Multisites without breaking links?
- How to write RewriteRule for login in multisite
- Network Admin URL is shown to anyone before accessing a blog
- How to display users with posts published between two dates (Sorted by Post-Count) [Multisite]
- 404 redirecting to home [closed]
- Get users registered 30 days ago(or more)
- Copy user role on multisite so the user can access subsites with same role
- How To Disable Add new users On Subsites In Multisite?
- 301 Redirection After Comment
- Wait ajax to complete before continue loop
- Combining user database tables while keeping all other data in seperate for multiple sites?
- How to delete user from MU site when the user is removed from their site?
- WordPress Multisite Add User
- Customize or avoid new admin email address notification
- How to share User Database between Two Multisite Installations + More
- How to get the blogs owned by a user?
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- Two installs conflicting – Pages redirecting
- can’t create user without email for an author after converting single site to multisite
- Restrict users of site 1 to login in site 2 in wordpress multisite
- “My Sites” incorrectly showing all network sites for all logged in users
- How to use the same users table on multiple wordpress sites
- Redirect a WordPress Multisite url after it has been change to a new one
- Easily adding multiple existing users to a multisite site
- Redirect Function Prevents Images from Showing in Front-end Media Uploader
- multisite 404 subfolder same name slug as site
- How to make the redirects right? IP to domain name folders
- Possible to have duplicate usernames on different two multisites
- Multisite – each site with it’s own set of users
- WordPress multisite redirect one custom non www domain to www
- Multisite – site user limited only for this site
- Can’t activate a user on multisite install
- How do I point two urls to the same child site in a multisite config
- A different role for each site in a multisite
- Redirecting two Multisite domains to Single site on different host
- Multisite install in a subfolder won’t work with www
- WordPress Multisite redirect loop
- Get current user outside of WordPress Multisite
- How to create child/sub user under parent user
- WordPress MU users – how are they organized?
- Multisite move server giving redirect loop
- Is there any way to give all users access to one blog in a multisite network without using a plugin?
- Pages redirect me to the homepage
- Multisite redirect loop for a single www domain
- Using a number for limiting registering or banning on multisite
- WordPress 3.0 Multisite – Child sites and backends appearing blank
- Nice font not working when http to https – SSL Issue
- Unsure of my options, Multi-blog?
- WordPress Multisite (Network) some site users added to main site users list as subscriber
- WordPress Multisite restict user access
- Multisite Primary Domain Broken All Subsites Work
- Make multisite non-existing subdomains go to homepage instead of Index of/ page
- Change a subsite Admin role of a WordPress Multisite after 24 hours registering