WordPress/wp-admin/network
Felix Arntz 7e2ca92e69 Multisite: Introduce a can_add_user_to_blog filter to prevent adding a user to a site.
Under certain circumstances, it can be necessary that a user should not be added to a site, beyond the restrictions that WordPress core applies. With the new `can_add_user_to_blog` filter, plugin developers can run custom checks and return an error in case of a failure, that will prevent the user from being added.

The user-facing parts and the REST API route that interact with `add_user_to_blog()` have been adjusted accordingly to provide appropriate error feedback when a user could not be added to a site. Furthermore, two existing error feedback messages in the site admin's "New User" screen have been adjusted to properly show inside an error notice instead of a success notice.

Props jmdodd.
Fixes #41101.

Built from https://develop.svn.wordpress.org/trunk@41225


git-svn-id: http://core.svn.wordpress.org/trunk@41065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 21:41:45 +00:00
..
about.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
admin.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
credits.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
edit.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
freedoms.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
index.php Dashboard: Properly localize data for events 2017-05-18 14:34:43 +00:00
menu.php Multisite: Introduce an upgrade_network capability. 2017-04-10 21:11:43 +00:00
plugin-editor.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
plugin-install.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
plugins.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
profile.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
settings.php Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context. 2017-08-01 20:44:43 +00:00
setup.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
site-info.php Multisite: Remove help text duplication on Edit Site screens in the network admin. 2017-07-17 20:53:45 +00:00
site-new.php Multisite: Fix a user-facing message when adding a new site with a new user as admin. 2017-07-17 20:23:43 +00:00
site-settings.php Multisite: Remove help text duplication on Edit Site screens in the network admin. 2017-07-17 20:53:45 +00:00
site-themes.php Multisite: Remove help text duplication on Edit Site screens in the network admin. 2017-07-17 20:53:45 +00:00
site-users.php Multisite: Introduce a can_add_user_to_blog filter to prevent adding a user to a site. 2017-08-03 21:41:45 +00:00
sites.php Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context. 2017-08-01 20:44:43 +00:00
theme-editor.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
theme-install.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
themes.php Accessibility: Remove inappropriate content from the Network screens headings. 2016-12-09 18:57:42 +00:00
update-core.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
update.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
upgrade.php Docs: Reduce confusion in @since MU notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context. 2017-08-01 20:44:43 +00:00
user-edit.php Multisite: Remove redundant is_multisite() checks in network admin templates. 2016-09-27 15:39:29 +00:00
user-new.php Accessibility: Remove target=_blank from the Network screens help tabs links. 2016-10-04 07:03:31 +00:00
users.php Accessibility: Remove inappropriate content from the Network screens headings. 2016-12-09 18:57:42 +00:00