Commit Graph

183 Commits

Author SHA1 Message Date
Scott Taylor
bce851dcf2 Replace array_shift() with reset() where appropriate for performance.
Props SergeyBiryukov.
Fixes #31259.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-19 03:56:27 +00:00
Jeremy Felt
7644e68119 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-23 02:29:26 +00:00
Sergey Biryukov
0e65ae6176 Remove redundant string with a typo introduced in [25481].
see #31217.
Built from https://develop.svn.wordpress.org/trunk@31404


git-svn-id: http://core.svn.wordpress.org/trunk@31385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 07:53:28 +00:00
Sergey Biryukov
12f4004989 Replace generic "Dear user" greeting in email notifications with a more personalized one.
props Ipstenu.
fixes #31217.
Built from https://develop.svn.wordpress.org/trunk@31403


git-svn-id: http://core.svn.wordpress.org/trunk@31384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-10 07:47:27 +00:00
Sergey Biryukov
5ac0568ee3 Switch to a 403 response code in places where it is more appropriate than a 500 due to permissions errors.
props tomdxw.
fixes #30927.
Built from https://develop.svn.wordpress.org/trunk@31300


git-svn-id: http://core.svn.wordpress.org/trunk@31281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-29 21:15:22 +00:00
Sergey Biryukov
7b04e6d4f4 Add variable type for sync_category_tag_slugs() parameters.
props tillkruess.
fixes #30718.
Built from https://develop.svn.wordpress.org/trunk@31113


git-svn-id: http://core.svn.wordpress.org/trunk@31094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 11:19:22 +00:00
Scott Taylor
60b0cd7943 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Scott Taylor
ac4e67b82e Perl-style comments should not be used
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 05:52:24 +00:00
Scott Taylor
af0e5cc851 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-03 05:46:25 +00:00
Drew Jaynes
bb380687fa Add missing DocBlocks for several functions in wp-admin/includes/ms.php.
Props dustyf.
See #30483.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 05:06:23 +00:00
Jeremy Felt
3a7b5748eb 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

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


git-svn-id: http://core.svn.wordpress.org/trunk@30399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 06:53:22 +00:00
Jeremy Felt
796ceebb25 Use common core syntax for checking DOING_AJAX
Our current check for a non truthy `DOING_AJAX` is `! DOING_AJAX`.

props TobiasBg
Fixes #29891

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


git-svn-id: http://core.svn.wordpress.org/trunk@30177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-02 02:24:23 +00:00
Scott Taylor
60b73c589c Display error message when Media Library upload fails.
Props gcorne.
Fixes #29891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 20:25:23 +00:00
Drew Jaynes
f8657d5890 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
Scott Taylor
d0a327b0b9 Make the URL output in _thickbox_path_admin_subfolder() use includes_url().
Props voldemortensen.
Fixes #14157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-12 22:31:18 +00:00
Scott Taylor
85bdc64173 In update_option_new_admin_email(), $email is set and never used.
See #27882.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 16:48:14 +00:00
Drew Jaynes
d77e78d685 Clean up duplicate hook notations and adjacency for calls to the wp_signup_location filter.
Also adds braces missed in [25535].

See #26869.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-25 07:12:14 +00:00
Andrew Nacin
c3ca81ba94 Always decode special characters for email subjects.
props tlovett1, jeremyfelt.
fixes #25346.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 02:44:15 +00:00
Andrew Nacin
156a5a234f Multisite: Don't set the $super_admins global in grant_super_admin(), revoke_super_admin().
Adds tests and docs.

props jdgrimes.
see #27205.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 12:14:14 +00:00
Andrew Ozz
eb1d21d782 Remove all "valign" attributes from tables in wp-admin, props MikeHansenMe, Marventus. Fixes #22712.
Built from https://develop.svn.wordpress.org/trunk@27029


git-svn-id: http://core.svn.wordpress.org/trunk@26905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-24 19:06:15 +00:00
Drew Jaynes
c9077348ee Inline documentation for hooks in wp-admin/includes/user.php.
Props aaronholbrook for the initial patch.
Fixes #26099.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-01 17:54:10 +00:00
Sergey Biryukov
74f77b85a6 Use get_current_site() instead of the $current_site global when possible.
props jeremyfelt.
fixes #25158.
Built from https://develop.svn.wordpress.org/trunk@26120


git-svn-id: http://core.svn.wordpress.org/trunk@26032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 03:23:10 +00:00
Sergey Biryukov
eae4e5936f Use case-insensitive comparison for email addresses. fixes #25779.
Built from https://develop.svn.wordpress.org/trunk@26115


git-svn-id: http://core.svn.wordpress.org/trunk@26027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 02:41:09 +00:00
Andrew Nacin
70fd806759 Revert r25824:25875 from the core.svn.wordpress.org repository.
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.


git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00
Andrew Nacin
5361a8abca Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:20 +00:00
Andrew Nacin
8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Ryan Boren
b87d4b77e5 Pinking shears
Built from https://develop.svn.wordpress.org/trunk@25880


git-svn-id: http://core.svn.wordpress.org/trunk@25792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 14:38:10 +00:00
Andrew Nacin
74488bdcb0 Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:22:11 +00:00
Sergey Biryukov
8595facd73 Some more tweaks for the documentation in wp-admin/includes/ms.php. see #25229.
Built from https://develop.svn.wordpress.org/trunk@25497


git-svn-id: http://core.svn.wordpress.org/trunk@25418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-19 16:06:12 +00:00
Sergey Biryukov
27a75e12ad Update inline documentation for hooks in wp-admin/includes/ms.php.
props jamescollins.
see #25229.
Built from https://develop.svn.wordpress.org/trunk@25486


git-svn-id: http://core.svn.wordpress.org/trunk@25407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-19 00:05:09 +00:00
Sergey Biryukov
37e3b91285 Inline documentation for hooks in wp-admin/includes/ms.php.
props enej, DrewAPicture.
see #25229.
Built from https://develop.svn.wordpress.org/trunk@25481


git-svn-id: http://core.svn.wordpress.org/trunk@25402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-18 18:22:09 +00:00
Jon Cave
5c57c78afa Fix potential SQLi through improper use of API functions.
git-svn-id: http://core.svn.wordpress.org/trunk@24875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-29 18:16:47 +00:00
Jon Cave
3999883feb Remove unnecessary secret_salt_warning().
If salts/keys are not defined in wp-config.php then they will be generated
automatically and stored in the database. [19771] also deals with values
that are duplicated or set to default.

Fixes #14803.


git-svn-id: http://core.svn.wordpress.org/trunk@24813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-28 19:45:57 +00:00
Andrew Nacin
46097dec37 Pass blog_id to the wpmu_drop_tables filter. props mitchoyoshitaka. see #24320.
git-svn-id: http://core.svn.wordpress.org/trunk@24245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-11 21:58:40 +00:00
Sergey Biryukov
f86b1502a0 Fix fatal error in WP_User_Query when searching users by URL. Move wp_is_large_network() to wp-includes. fixes #23683 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@23664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-12 09:19:55 +00:00
Ryan Boren
da7db424de Call them network upgrades rather than network updates to better indicate that they are DB upgrades rather than code/file upgrades.
Improve the contextual help for the Network Upgrade screen.

Props DrewAPicture
fixes #23540


git-svn-id: http://core.svn.wordpress.org/trunk@23619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-05 17:02:31 +00:00
Andrew Nacin
55ba72f46e Confirm a user exists before deleting them in wp_delete_user() and wpmu_delete_user(). props scribu, fixes #23067.
git-svn-id: http://core.svn.wordpress.org/trunk@23380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-02 04:41:02 +00:00
Ryan Boren
8dc401468e Make is_upload_space_available() available for front end page loads. Fixes fatal error when calling wp_editor() from the front end.
Props scribu, itworx
fixes #22585


git-svn-id: http://core.svn.wordpress.org/trunk@22840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-26 14:42:43 +00:00
Peter Westwood
b2ca616d1e Multisite: Move all the functions which calculate upload space usage to wp-includes so they apply correctly with front-end editors.
Fixes #22357 props wonderboymusic.


git-svn-id: http://core.svn.wordpress.org/trunk@22497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 10:35:42 +00:00
Andrew Nacin
32ad332432 Update Thickbox images for HiDPI. props lessbloat. see #21019.
git-svn-id: http://core.svn.wordpress.org/trunk@22378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 21:00:15 +00:00
Peter Westwood
4f2173666d i18n: Fix the usage of sprintf replacements in the Multisite admin include files. See #22260.
git-svn-id: http://core.svn.wordpress.org/trunk@22271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-23 11:28:36 +00:00
Ryan Boren
51920e1858 Consolidate some strings. Props pavelevap, SergeyBiryukov. see #21728
git-svn-id: http://core.svn.wordpress.org/trunk@22124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-05 19:04:34 +00:00
Ryan Boren
9fc9d42d0a * Register blog-id-cache group as global
* Introduce clean_blog_cache() so we can run it independently of refresh_blog_details() which assumes the blog still exists and get_blog_details() can be called.
* Don't db escape cache keys in get_blog_id_from_url()
* prepare() the query in get_blog_id_from_url()
* Return 0 for all failures in get_blog_id_from_url()
* clean_blog_cache() after dropping tables in wpmu_delete_blog() to make sure the cache is for real cleaned.



git-svn-id: http://core.svn.wordpress.org/trunk@22092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-01 18:03:23 +00:00
Andrew Nacin
dc49f24a6c Remove ms-files.php rewriting from WordPress multisite. fixes #19235.
Keep existing networks compatible with a ms_files_rewriting network option.



git-svn-id: http://core.svn.wordpress.org/trunk@21823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 22:22:20 +00:00
Andrew Nacin
87c947a987 Use network_site_url() for wp-signup.php. props markjaquith. see #19796.
git-svn-id: http://core.svn.wordpress.org/trunk@21813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-11 12:27:25 +00:00
Ryan Boren
3205818a04 Add missing closedir() to wpmu_delete_blog(). Props timfs. fixes #21780
git-svn-id: http://core.svn.wordpress.org/trunk@21801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 21:16:03 +00:00
westi
c702fe6657 Multisite: Fix the new get_space_used() function to correctly calculate Megabytes used and update some phpdoc. Props SergeyBiryukov.
git-svn-id: http://core.svn.wordpress.org/trunk@21474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-08 07:17:33 +00:00
ryan
5ca54e7d2f Deprecate get_blog_option(), add_blog_option(), update_blog_option(), and delete_blog_option().
Use the regular option functions wrapped in switch_to_blog() and restore_current_blog() instead.

Group multiple operations within a single switch where possible.

fixes #21432


git-svn-id: http://core.svn.wordpress.org/trunk@21414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-03 17:51:42 +00:00
nacin
7127ed1197 Move most instances of new WP_User to get_userdata(). see #21120.
git-svn-id: http://core.svn.wordpress.org/trunk@21413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-03 01:06:05 +00:00
westi
4443baaab9 Multisite: Rework the upload space usage tracking code so as to be fully pluggable.
* Moves some admin only functions into wp-admin/includes/ms.php from wp-includes/ms-functions.php
 * Reworked the variable naming to be more in line with the Coding Standards
 * Introduced a new get_space_used() function instead of calculating it in multiple places.

Fixes #21181 props dllh and jkudish for inital work on this.


git-svn-id: http://core.svn.wordpress.org/trunk@21387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-01 13:52:06 +00:00