Another alternative is to look at the hook map_meta_cap and remove the user’s capability to delete_site
. If you have a restricted set of users or context when you want to allow delete_site
then you can allow the capability.
Related Posts:
- How do I create a custom role capability?
- Prevent network activation of plugin
- Uninstall script for a plugin in Multisite
- Changing Plugin Load Order
- What is wrong with using add_option with Multisite instead of add_blog_option in a plugin
- How to Get a List of Sub Blogs without Using get_blog_list()?
- Cron firing my function everytime wp-admin is visited
- Error getting correct blog_id on MU from functions.php
- How do I make specific plugin functionality apply to different sites in a network?
- WordPress multisite apply different options over each site from same plugin
- Filters ‘request’ and ‘parse_query’ not firing in sites.php nor link-manager.php
- Multisite, sharing content by URL
- Only allow plugin to be activated on root site of multisite
- How to use wp_set_password in a plugin?
- WordPress Media mime type filter problem 4.0
- Where should I store global data for my multi-site WordPress plugin?
- unable to stop loop when using wp_insert_post with publish_post hook
- Customize multisite site creation with user data
- Multisite plugin development and wp_enqueue_script
- Plugin Uninstall and Deactivate via Options Menu
- how to activate plugin network-wide, and save setting across sites
- Sharing a common set of image files for media library, across all sites within multisite
- What is difference between blog id and site id?
- How to create a Tools menu on the Network Admin dashboard from a plugin
- Override the default Add/Edit site forms of the Network Panel in custom plugin
- How to set “Site Address (URL)” programmatically on WP multisite?
- How to associate an existing user to a site in a multisite setup programmatically
- WordPress Multisite with Azure B2C redirect_urls after Login
- How To Change Post Author Default?
- Adding (blog-specific) links to “My Sites” admin page
- Plugin menu addition in multisite
- What should happen when a WordPress Plugin is activated across the network (Network Wide Activation)
- Multiple Plugin best practice in Multisite
- Selectively update themes in WordPress multisite
- Problem with context in multisite – getting main site data in every blog (get_pages())
- how to invoke wordpress API from other existing PHP system
- WP Multisite login not working on one subsite. Possibly cookies/ history issue?
- register_activation_hook on multisite
- WordPress multisite,use same cookies across all website?
- WP: Search and replace in DB programmatically
- How to get current logged-in user details in multisite?
- add_action wp_ajax_ not loading in plugin file WP Network
- Clean way to initialize plugin in newly-added site when plugin has been network activated?
- How to share user data across multiple WordPress websites?
- Is there anything special required to make a plugin work in a multisite environment?
- How to edit wp-signup.php content using plugin
- How do I ensure I can loop through every enqueued script and CSS?
- Custom Plugin activation error in Multisite
- Replace “content-area” of themes 404 page with plugin?
- Multisite and the JSON REST API: How to?
- Testing Plugins for Multisite
- Same header/footer in Admin, across all network sites in multisite
- Change Admin menu placement using hooks
- Force remove parent theme CSS/JS and call them from Child theme
- How are bulk actions handled in custom list table classes?
- Creating Settings Page with dropdowns for Plugin
- Empty POST data on server on AJAX request using Angular $http
- Custom Nav Menu items default to ‘menu-item-type’ => ‘custom’. How to make a “page” menu item?
- Implementing namespaces in plugin template
- How to get current page name in my wordpress plugin
- Use register_taxonomy() in register_activation_hook()
- Calling apply_filters on non-documented hooks
- Commit changes to WordPress Plugin SVN with TortoiseSVN
- WordPress Admin Post Type Table Class Filter Hook
- How to get the ID of the currently logged in user?
- Using a Shortcode to Replace Themes Stylesheet?
- Slow WP_query due to nested wp_query. Need Suggestions
- How to modify product page for Jigoshop
- Is @wordpress/env locked to node v14 or can I also use node v16?
- Intermittent database errors when accessing WordPress database
- what is the standard ulr for wordpress plugin development?
- Create a custom capability to allow an ‘Editor’ to edit only ‘Subscriber’ users
- global $current_user not current user
- What is the proper way to get logged in user id in a plugin?
- Custom WordPress Plugin will install new and not update
- How can I add a simple custom field to my plugin?
- Ajax is not working in a loop
- Inserted double quote when prepending to the_content
- unable to wp_enqueue_script(‘suggest’);
- Plugin development – loading Javascript and Flash
- Update variable value via add_filter
- Run uninstall.php if a checkbox is checked from settings page
- Gravity Forms Anchor only on Front Page?
- Multiple page plugin settings
- how to get the top 10 popular blogs
- Set page to draft on plugin deactivation
- Can one plugin activate another plugin via script?
- Do I lose translations when I change my Text domain for my plugin on wp.org?
- Override woocommerce loop-start.php from theme using plugin?
- Get value of custom checkbox from Gutenberg sidebar in plugin
- Hiding class namespace from plugin’s extensions
- Relational / Associate tables using native WordPress functionality
- Pull commentdata for pre_comment_on_post from comment_post_ID
- Woo-commerce: Adding additional page sections using a child theme
- How to get html tag ids from template?
- How to Rewrite WordPress URL for a Plugin
- How to Prove Ownership of plugin [closed]
- Reading the inside of
- WordPress, GIT, Renamed Plugin Dir + files – Working Code now Broken [closed]
- get_term_by() returning null on plugin