In `wp_delete_attachment()`: account for orphan sizes by looping over the sizes stored in metadata, instead of relying on the current sizes stored in `$_wp_additional_image_sizes`.

Props JoshuaAbenazer, desrosj, markoheijnen.
Fixes #24518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Network Admin Menu: 

* Don't display update count for Themes when the user doesn't have the 'update_themes' cap
* Don't display update count for Plugins when there aren't any/count is `0`

Props peterchester.
Fixes #29651.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `activate_plugin()`, do not re-run the activation routine for already-active network-wide plugins.

Adds unit test.

Props jbrinley.
Fixes #28651.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Always sanitize user_nicename in wp_insert_user().

Previously, a 'user_nicename' parameter passed into the function was
unsanitized. This could result in a mismatch between the sanitized nicename
generated automatically at user creation, resulting in broken author archive
permalinks.

Props joemcgill.

Fixes #29696.
Built from https://develop.svn.wordpress.org/trunk@29819


git-svn-id: http://core.svn.wordpress.org/trunk@29585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use a more consistent markup on taxonomy and user screens.

props paulwilde.
fixes #29842.
Built from https://develop.svn.wordpress.org/trunk@29820


git-svn-id: http://core.svn.wordpress.org/trunk@29586 1a063a9b-81f0-0310-95a4-ce76da25c4cd