Commit Graph

42 Commits

Author SHA1 Message Date
Jeremy Felt
3c177b8c6f MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function.

This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.

Props spacedmonkey.
See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34778 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 19:07:23 +00:00
Boone Gorges
5b9d9c7c07 Require numeric IDs in user deletion functions.
`wp_delete_user()` and `wpmu_delete_user()` both require an `$id` parameter.
Previously, the functions did not verify that the value passed was, in fact,
a number. As such, passing an object or any other entity that would be cast
to int `1` would result in user 1 being deleted. We fix this by enforcing
the requirement that `$id` be numeric.

Props dipesh.kakadiya, utkarshpatel, juliobox.
Fixes #33800.

git-svn-id: https://develop.svn.wordpress.org/trunk@34034 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 02:24:03 +00:00
Scott Taylor
b1a91e4a28 Move network_settings_add_js() from wp-admin/network/settings.php to wp-admin/includes/ms.php.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34026 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:23:47 +00:00
Scott Taylor
2fe412793e Move confirm_delete_users() from wp-admin/network/users.php to wp-admin/includes/ms.php.
See #33813.


git-svn-id: https://develop.svn.wordpress.org/trunk@34025 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:22:44 +00:00
Scott Taylor
3b8c5529cb foreach is a statement, not a function.
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33734 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-25 20:27:56 +00:00
Dominik Schilling (ocean90)
9f3217c8eb Multisite mails: Initialize $current_user before accessing $current_user->user_login.
props Toro_Unit.
see #31217.
fixes #33254.

git-svn-id: https://develop.svn.wordpress.org/trunk@33569 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-04 11:38:52 +00:00
Jeremy Felt
bb7f147703 Do not allow deletion of a super admin user through wpmu_delete_user().
In step with the UI provided by `wp-admin/network/users.php`, super admin privileges must be removed before a user can be deleted through the API.

Props @johnjamesjacoby, @jeremyfelt.
Fixes #32935.


git-svn-id: https://develop.svn.wordpress.org/trunk@33143 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-09 16:15:30 +00:00
Jeremy Felt
ea4baac6e8 Use the full site URL in choose_primary_blog() when a user is a member of only one site.
Aligns with the output used when a user is a member of multiple sites.

Fixes #32884.


git-svn-id: https://develop.svn.wordpress.org/trunk@33081 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-04 04:20:18 +00:00
Scott Taylor
3f29a2101d Don't loosely compare functions that return bool against a literal bool.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32730 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-12 17:18:38 +00:00
Scott Taylor
d55800a4f2 In the style of #30947 and default-filters.php, add 2 new files to wp-admin/includes:
`admin-filters.php`
`ms-admin-filters.php`

There are random actions and filters littered among files like `misc.php`. These files contain functions that won't work outside of admin context and are typically only loaded in files that have already loaded the admin bootstrap.

See #32529.


git-svn-id: https://develop.svn.wordpress.org/trunk@32653 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 17:03:13 +00:00
Scott Taylor
23ce2efd12 Add @global annotations for wp-admin/*.
See #32444.


git-svn-id: https://develop.svn.wordpress.org/trunk@32642 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 21:40:27 +00:00
Sergey Biryukov
2b8e7270d5 Multisite: Add translator comments to default email messages with non-typical placeholders.
props yoavf.
fixes #32263.

git-svn-id: https://develop.svn.wordpress.org/trunk@32381 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-06 09:11:18 +00:00
Drew Jaynes
5a45289302 Add a missing @return tag to the DocBlock for site_admin_notice().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@32339 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-04 01:05:48 +00:00
Scott Taylor
2f20da29b5 Replace array_shift() with reset() where appropriate for performance.
Props SergeyBiryukov.
Fixes #31259.


git-svn-id: https://develop.svn.wordpress.org/trunk@31829 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-19 03:55:39 +00:00
Jeremy Felt
ff0b2f7a6f Provide proper label associations and descriptions throughout the network admin
* Add labels previously missing for many inputs throughout the network admin screen.
* Add proper `aria-describedby` attributes to provide better descriptions.
* Wrap grouped inputs with `fieldset` elements.
* Remove now unneeded `title` attributes when appropriate.

Props cfoellmann, afercia, rianrietveld.

Fixes #38406.


git-svn-id: https://develop.svn.wordpress.org/trunk@31517 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-23 02:28:41 +00:00
Sergey Biryukov
d0c0ba43eb Remove redundant string with a typo introduced in [25481].
see #31217.

git-svn-id: https://develop.svn.wordpress.org/trunk@31404 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 07:52:38 +00:00
Sergey Biryukov
edeb3f3ae3 Replace generic "Dear user" greeting in email notifications with a more personalized one.
props Ipstenu.
fixes #31217.

git-svn-id: https://develop.svn.wordpress.org/trunk@31403 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-10 07:46:50 +00:00
Sergey Biryukov
dcb278f006 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
props tomdxw.
fixes #30927.

git-svn-id: https://develop.svn.wordpress.org/trunk@31300 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-29 21:14:54 +00:00
Sergey Biryukov
68191cc15c Add variable type for sync_category_tag_slugs() parameters.
props tillkruess.
fixes #30718.

git-svn-id: https://develop.svn.wordpress.org/trunk@31113 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-09 11:18:22 +00:00
Scott Taylor
6fd11624d1 The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
Scott Taylor
5d6cc49628 Perl-style comments should not be used
See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31079 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 05:51:39 +00:00
Scott Taylor
47f2c42528 Inline <script>s that are only printed in the admin for pages that are served with the HTML5 doctype absolutely do not need CDATA comments.
Props tw2113 for the initial patch.
See #18788.


git-svn-id: https://develop.svn.wordpress.org/trunk@31034 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 05:45:17 +00:00
Drew Jaynes (DrewAPicture)
9d74e43a4b Add missing DocBlocks for several functions in wp-admin/includes/ms.php.
Props dustyf.
See #30483.


git-svn-id: https://develop.svn.wordpress.org/trunk@30630 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 05:05:36 +00:00
Jeremy Felt
3223d4a4b3 Prevent wpmu_delete_blog from removing the wrong uploads directory
`wp_upload_dir()` includes some logic to fall back to the default site's upload directory if a specific directory for the requested site cannot be found. Because of this, if `wpmu_delete_blog()` is fired twice in a row for the same site, the main site's upload directory could be deleted as well.

This adds some checks in `wpmu_delete_blog()` so that we are confident in the site and it's upload directory's existence before dropping the site. Tests are added for when `ms_files_rewriting` is enabled or disabled.

Fixes #30121


git-svn-id: https://develop.svn.wordpress.org/trunk@30404 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-20 06:52:07 +00:00
Jeremy Felt
90aa65e0f7 Use common core syntax for checking DOING_AJAX
Our current check for a non truthy `DOING_AJAX` is `! DOING_AJAX`.

props TobiasBg
Fixes #29891


git-svn-id: https://develop.svn.wordpress.org/trunk@30177 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-02 02:23:28 +00:00
Scott Taylor
bdf71f89ad Display error message when Media Library upload fails.
Props gcorne.
Fixes #29891.


git-svn-id: https://develop.svn.wordpress.org/trunk@30156 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-01 20:24:13 +00:00
Drew Jaynes (DrewAPicture)
3cc10d77a0 Remove redundant and erroneous @uses tag from most core inline documentation.
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.

Fixes #30191.


git-svn-id: https://develop.svn.wordpress.org/trunk@30105 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 01:04:55 +00:00
wonderboymusic
578609d31e Make the URL output in _thickbox_path_admin_subfolder() use includes_url().
Props voldemortensen.
Fixes #14157.


git-svn-id: https://develop.svn.wordpress.org/trunk@29741 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-12 22:30:03 +00:00
Scott Taylor
e518d0d652 In update_option_new_admin_email(), $email is set and never used.
See #27882.



git-svn-id: https://develop.svn.wordpress.org/trunk@28299 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 16:47:56 +00:00
Drew Jaynes (DrewAPicture)
609cf29058 Clean up duplicate hook notations and adjacency for calls to the wp_signup_location filter.
Also adds braces missed in [25535].

See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28215 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-25 07:11:32 +00:00
Andrew Nacin
98ac075d8b Always decode special characters for email subjects.
props tlovett1, jeremyfelt.
fixes #25346.


git-svn-id: https://develop.svn.wordpress.org/trunk@27801 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-28 02:43:04 +00:00
Andrew Nacin
3e28e2fae8 Multisite: Don't set the $super_admins global in grant_super_admin(), revoke_super_admin().
Adds tests and docs.

props jdgrimes.
see #27205.


git-svn-id: https://develop.svn.wordpress.org/trunk@27706 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-25 12:13:40 +00:00
Andrew Ozz
48d24f6bf5 Remove all "valign" attributes from tables in wp-admin, props MikeHansenMe, Marventus. Fixes #22712.
git-svn-id: https://develop.svn.wordpress.org/trunk@27029 602fd350-edb4-49c9-b593-d223f7449a82
2014-01-24 19:05:15 +00:00
Drew Jaynes
720930f356 Inline documentation for hooks in wp-admin/includes/user.php.
Props aaronholbrook for the initial patch.
Fixes #26099.


git-svn-id: https://develop.svn.wordpress.org/trunk@26503 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-01 17:53:18 +00:00
Sergey Biryukov
39d55fddb8 Use get_current_site() instead of the $current_site global when possible.
props jeremyfelt.
fixes #25158.

git-svn-id: https://develop.svn.wordpress.org/trunk@26120 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 03:22:48 +00:00
Sergey Biryukov
7cd8d225a3 Use case-insensitive comparison for email addresses. fixes #25779.
git-svn-id: https://develop.svn.wordpress.org/trunk@26115 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-13 02:40:28 +00:00
Ryan Boren
30f822b8ee Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@25880 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-23 14:37:54 +00:00
Andrew Nacin
c87ad6023d Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.


git-svn-id: https://develop.svn.wordpress.org/trunk@25868 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-22 17:21:32 +00:00
Sergey Biryukov
24db2253b3 Some more tweaks for the documentation in wp-admin/includes/ms.php. see #25229.
git-svn-id: https://develop.svn.wordpress.org/trunk@25497 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-19 16:05:21 +00:00
Sergey Biryukov
a4f3fc3489 Update inline documentation for hooks in wp-admin/includes/ms.php.
props jamescollins.
see #25229.

git-svn-id: https://develop.svn.wordpress.org/trunk@25486 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-19 00:04:16 +00:00
Sergey Biryukov
8834a52e40 Inline documentation for hooks in wp-admin/includes/ms.php.
props enej, DrewAPicture.
see #25229.

git-svn-id: https://develop.svn.wordpress.org/trunk@25481 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-18 18:21:46 +00:00
Andrew Nacin
b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00