Doing something before wpmu_create_blog()
is called seems to be indeed hard. Not sure if I miss something …
You can hook into the action check_admin_referer
and print your own error message:
if ( is_network_admin()
&& isset ( $_REQUEST[ 'action' ] )
&& 'add-site' === $_REQUEST[ 'action' ] )
{
add_action( 'check_admin_referer', function( $action )
{
if ( 'add-blog' !== $action )
return;
die( 'Nope.' );
// inspect $_POST, do something.
// Change $_POST['blog'] to get the best matching error message
});
}
Related Posts:
- How do I remove/delete an old super admin user?
- Setting up a wordpress network with third level domains
- How will self-hosted WordPress work with Google Page Speed Service?
- Troubleshooting a “You do not have sufficient permissions to access this page” error
- What is the best way to load the WP environment in a subdomain of my multisite WordPress install?
- Benefits or Problems for using Sub-Directory vs Sub-Domain install of WP Network
- What methods should be used to fend off splogs in a multiuser install? [closed]
- WordPress 3 Multisite using subdomains.- DNS on Cpanel question
- Remove Site Name from register form – Multisite
- Set up collaborative site
- How to disable Multisite sign-up page?
- Add role across network in multisite
- Transfer Subdomain site to Multisite setup
- WP REST API – Multisite – get posts from all sites
- How to Login Once to an Entire WP Multisite Network
- NGINX Multisite Rewrite rules
- On Multisite: Loop to Show First Four Images of Recent Posts Across Network
- “Preview Changes” button doesn’t show changes for previously published posts/pages
- Tax_query not working on multisite
- Get source from the_post_thumbnail
- Can I manage more wordpress sites with one wordpress administrator page? [closed]
- Add menu page on multisite
- Subsites in Multisite installation throwing 404 error on wp-admin in IIS 7
- Identical members roles on all sites in a multisite
- Fixing media links after importing to multisite
- How do I maintain static directories on multisite subdomains?
- WP-CLI can’t list posts
- Custom rewrite rule sends 404 header on multisite
- WordPress multisite subdirectory on nginx behind reverse proxy
- Multiple WordPress Blogs on one host, using 1 WordPress installation, using multiple templates
- How to use the “domain_exists()” function
- Retrieve taxonomies from arbitrary site
- Child Site doesn’t appear in the Network menu
- Multisite Pull Recent Image Attachments from Blog ID
- Avoid having infinite loops
- WordPress Multisite/Network – How to use a subdomain as main blog and subdomain for child sites
- The requested URL /login was not found on this server
- Multisite installation not in root – how to make live?
- Multisite – One user allowed access to all sites?
- Can’t view network plugins.php or upgrade-core.php on multisite
- Can I use WP to create a multisite importing the posts of 3 old WP website?
- Configuring multi-site with domain mapping
- Multisite theme control not working
- WordPress Multisite domain mapping with different IPs
- Multisite: Retain awareness of what posts came from which site?
- Merge Multisites with Shared Network Media Library
- Multisite – Lost Password Link is for wrong site
- Multisite – Looking for ideas to best manage a main site change
- Change Administrator to Super Administrator (multi-site)
- Networksite/multisite is disabled ?, Why?
- My subdomain on WordPress Multisite has gone
- Automatically login user across multisite
- Removing Mutlisite lines stop DB connection
- Multisite WPLANG won’t save
- How to display users with posts published between two dates (Sorted by Post-Count) [Multisite]
- How to move a WordPress multisite?
- get_option( ‘home’ ) not returning value in database
- Contact Form 7 in Multisite [closed]
- I want to create a 300 multi-site wordpress network using subdomains
- Child Theme Based on Toolbox Not Found
- Update blog option during create new blog?
- Cannot select signup_meta upon multisite user activation
- Create “/blog” sub-site on WP multisite network
- Create a CSS file in plugin folder when theme is activated
- $wpdb->update prefixes database name to table when executing query
- WP MultiSite: Can’t select database error after changing to new domain
- switch_to_blog() not functioning while querying post_types, Why?
- Different site different div content – Multisite
- Multisite default theme and child applied to network
- Multisite sites output on a single page
- can’t create user without email for an author after converting single site to multisite
- Multisite cookies are being shared across domains unwanted
- multisite – unable to connect to network administration
- Restrict users of site 1 to login in site 2 in wordpress multisite
- Unable to execute Ajax request, status code 400
- Redirect Function Prevents Images from Showing in Front-end Media Uploader
- multiple domains point to same site on WP-MU
- How to make the redirects right? IP to domain name folders
- WordPress multisite redirect one custom non www domain to www
- Multisite issue
- Max number of sub folders
- Can’t access 2nd site (sub) dashboard of WordPress Multisite
- wordpress multisite config issue needs help
- Domain mapping breaks some plugin scripts and css
- How to force WP to create a users table in multisite configuration?
- Creating a stand-alone site from a WordPress sub site
- Multisite read_more link displays URL twice
- WordPress and SQL – Update and Insert from another table if column value doesn’t exist
- Multisite: Run a subdomain install from a directory install
- Network – My sites are unavailable
- Updating themes customized by users
- Plugin data shared in Multisite
- WordPress and multisites, the rigth choice?
- Remove blog slug from WPMU?
- WordPress multisite and one database
- Planning on Multisite Before Creating A Network
- Can admins on network install view and edit users accounts?
- Unsure of my options, Multi-blog?
- WordPress Multisite with HTML template as Root
- Trying to create site-wide Active Directory sync with Multisite