Commit Graph

391 Commits

Author SHA1 Message Date
Sergey Biryukov
a4dc43106c Remove <code> tags from translatable string in wp-admin/network/settings.php.
Add translator comment.

Props ramiy.
Fixes #34618.
Built from https://develop.svn.wordpress.org/trunk@35570


git-svn-id: http://core.svn.wordpress.org/trunk@35534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-08 01:34:26 +00:00
Helen Hou-Sandí
f3107e5842 Make some primary action buttons look primary.
* User deletion/removal
* Site status change (multisite)
* Network upgrade
* Import file upload
* Media browser upload

props Dezzy for the initial patch.
fixes #23738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-15 03:08:24 +00:00
Jeremy Felt
270d3f422c MS: Reflect falsy values for upload_space_check_disabled in UI.
If the network option for `upload_space_check_disabled` is missing or an empty string, we should reflect how it will be treated elsewhere in the UI.

Props stephenharris.
Fixes #33986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 00:01:24 +00:00
Sergey Biryukov
5399881b18 Merge two database update strings for consistency.
Props pavelevap.
Fixes #33514.
Built from https://develop.svn.wordpress.org/trunk@35000


git-svn-id: http://core.svn.wordpress.org/trunk@34965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 05:14:23 +00:00
Jeremy Felt
f8a05879e8 MS: Show an error if a new site slug conflicts with an existing username.
Props utkarshpatel, dipesh.kakadiya.
Fixes #33804.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 01:42:26 +00:00
Andrea Fercia
17f53091ed Bump H3 headings to H2 on the Network Admin > Sites > Edit Site screens.
The navigation tabs appear in an `<h3>` heading immediately following the main `<h1>` and need to have a proper hierarchy.
Also, fix the tabs focus style and introduce a new `.nav-tab-small` CSS class.

Fixes #34079.
Built from https://develop.svn.wordpress.org/trunk@34913


git-svn-id: http://core.svn.wordpress.org/trunk@34878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 17:35:24 +00:00
Jeremy Felt
9926983b66 Revert [34778], continue using _site_option() for the current network.
The `_network_option()` parameter order will be changing to accept `$network_id` first. The `_site_option()` functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 17:11:25 +00:00
Scott Taylor
0c2b2a0e3d List Tables/WP_Screen: in WP_Screen, add methods to store, retrieve, and render screen reader text, primarily used by list table screens.
These additions are based on an audit and recommendations by the Accessibility team. #a11y'all

Props afercia.
Fixes #32147.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 01:28:25 +00:00
Drew Jaynes
65133a89c1 Multisite: Introduce get_subdirectory_reserved_names(), which returns a filterable list of reserved subdirectory site names.
The function encapsulates the existing `subdirectory_reserved_names` filter and reduces the maintenance burden of keeping the value of (currently) two instances of the same hook in sync.

See #33615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-06 04:35:25 +00:00
Scott Taylor
3ef27f7929 oEmbed: add embed to $subdirectory_reserved_names.
Props jeremyfelt.
See #32522.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-06 03:45:25 +00:00
Jeremy Felt
54512d64cb 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
Andrea Fercia
5a2627d38a Bump H3 headings to H2 on the Network Site Users screen for better accessibility.
Fixes #34081.
Built from https://develop.svn.wordpress.org/trunk@34742


git-svn-id: http://core.svn.wordpress.org/trunk@34707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 14:33:26 +00:00
Scott Taylor
84dbb036d1 Network Upgrade: switch <h3> to <h2>.
Props afercia.
Fixes #34082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 21:29:13 +00:00
Andrea Fercia
9bb09f0e08 Bump H3 headings to H2 on the Network Settings screen for better accessibility.
Fixes #34078.
Built from https://develop.svn.wordpress.org/trunk@34695


git-svn-id: http://core.svn.wordpress.org/trunk@34659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 18:52:26 +00:00
Jeremy Felt
ea03ecbe66 Fixes #33816.
MS: Adjust formatting of code in `site-new.php` to improve readability.

Fixes #34066.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 23:30:24 +00:00
Scott Taylor
c60b00fc20 Multisite: as a precaution, make wp-json a reserved subdirectory name.
Props austinginder.
Fixes #33789.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 04:21:25 +00:00
Helen Hou-Sandí
48befcf361 Superglobals: Revert [34059] until further notice.
see #33837.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 12:33:26 +00:00
Boone Gorges
85c00bd943 Move new user notification emails to add_action() callbacks.
When a new user is created in various places throughout the interface,
notifications are sent to the site admin and the new user. Previously, these
notifications were fired through direct calls to `wp_new_user_notification()`,
making it difficult to stop or modify the messages.

This changeset introduces a number of new action hooks in place of direct calls
to `wp_new_user_notification()`, and hooks the new wrapper function
`wp_send_new_user_notifications()` to these hooks.

Props dshanske, thomaswm, boonebgorges.
Fixes #33587.
Built from https://develop.svn.wordpress.org/trunk@34251


git-svn-id: http://core.svn.wordpress.org/trunk@34215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 22:19:24 +00:00
Boone Gorges
a7e229637e Improve validation of user_login and user_nicename length.
The `user_login` field only allows 60 characters, and `user_nicename` allows
50. However, there are no protections in the interface, and few in the code,
that prevent the creation of users with values in excess of these limits. Prior
to recent changes in `$wpdb`, users were generally created anyway, MySQL
having performed the necessary truncation. More recently, the `INSERT`s and
`UPDATE`s simply fail, with no real feedback on the nature of the failure.

This changeset addresses the issue in a number of ways:
* On the user-new.php and network/user-new.php panels, don't allow input in excess of the maximum field length.
* In `wp_insert_user()`, throw an error if the value provided for `'user_login'` or `'user_nicename'` exceeds the maximum field length.
* In `wp_insert_user()`, when using `'user_login'` to generate a default value for `'user_nicename'`, ensure that the nicename is properly truncated, even when suffixed for uniqueness (username-2, etc).

Props dipesh.kakadiya, utkarshpatel, tommarshall, boonebgorges.
Fixes #33793.
Built from https://develop.svn.wordpress.org/trunk@34218


git-svn-id: http://core.svn.wordpress.org/trunk@34182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 22:14:26 +00:00
Dominik Schilling
4af3a3374e Passwords: Deprecate second parameter of wp_new_user_notification().
The second parameter `$plaintext_pass` was removed in [33023] and restored as `$notify` in [33620] with a different behavior. If you have a plugin overriding `wp_new_user_notification()` which hasn't been updated you would get a notification with your username and the password "both".
To prevent this the second parameter is now deprecated and reintroduced as the third parameter.

Adds unit tests.

Props kraftbj, adamsilverstein, welcher, ocean90.
Fixes #33654.

(Don't ask for new pluggables kthxbye)
Built from https://develop.svn.wordpress.org/trunk@34116


git-svn-id: http://core.svn.wordpress.org/trunk@34084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 12:43:26 +00:00
Scott Taylor
cd7c0f0b0d Introduce wp_validate_action( $action = '' ), a helper function that checks $_REQUEST for action and returns it, or empty string if not present. If $action is passed, it checks to make sure they match before returning it, or an empty string. Strings are always returned to avoid returning multiple types.
Implementing this removes 27 uses of direct superglobal access in the admin.

For more reading:
https://codeclimate.com/github/WordPress/WordPress/wp-admin/edit-comments.php

See #33837.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 21:08:26 +00:00
Scott Taylor
5918b30cdd Move network_settings_add_js() from wp-admin/network/settings.php to wp-admin/includes/ms.php.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 22:24:24 +00:00
Scott Taylor
2d2e3c911e Move confirm_delete_users() from wp-admin/network/users.php to wp-admin/includes/ms.php.
See #33813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 22:23:46 +00:00
Jeremy Felt
cc1aade8f5 Multisite: Display content attribution drop down when deleting a user
The previous move from `echo()` to `_e()` left some of the output hanging. Introduced in [32333].

Props figureone.
Fixes #33811 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 20:26:24 +00:00
Scott Taylor
3d8199c4eb Multisite: Don't allow sites to be created with the following reserved slugs: wp-admin, wp-content, wp-includes
Props austinginder.
Fixes #33615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-08 19:32:24 +00:00
Jeremy Felt
af557379da Multisite: Update help tab text for site-info.php to reference "site URL".
In [32759] and [33586], we combined the domain and path entry for a site to a single "Site URL" field. This updates the help text to reflect that.

Fixes #33748. See #22383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:53:24 +00:00
John Blackbourn
4d76ce2521 Implement a language chooser on the Network Admin -> Sites -> Add New screen.
Props DrewAPicture
Fixes #33528

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


git-svn-id: http://core.svn.wordpress.org/trunk@33889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:47:24 +00:00
Jeremy Felt
122862b570 Multisite: Pass the ID of the site being updated to wpmu_update_blog_options action.
Props @swissspidy, @MikeHansenMe.
Fixes #32907.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-05 20:39:24 +00:00
Sergey Biryukov
bc8af88903 Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/network/site-users.php.
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33683. see #14530.
Built from https://develop.svn.wordpress.org/trunk@33888


git-svn-id: http://core.svn.wordpress.org/trunk@33857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 09:03:24 +00:00
Scott Taylor
ef87172270 foreach is a statement, not a function.
See #33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 20:28:22 +00:00
Scott Taylor
c15a1c2bab Replace some hyphens with &mdash;s in admin help tabs.
Props pixolin.
Fixes #30605.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-19 04:53:25 +00:00
Konstantin Obenland
e6bc6242ad Passwords: Restore second parameter for wp_new_user_notification().
After [33023] users would always be notified, this restores previous behavior.

Props markjaquith, ocean90.
Fixes #33358.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-17 14:25:27 +00:00
Helen Hou-Sandí
d03082323e Network admin: Internationalize some existing strings that were missed in [33186].
Also adds the trailing slash to the `get_home_url()` calls.

props johnbillion.
fixes #33317.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-10 18:11:25 +00:00
Jeremy Felt
1e5b0ff0fa Multisite: Use single URL input when editing sites in a subdirectory configuration
In [32759], we adjusted `site-info.php` to display a single input for a site's full URL if the network was configured for subdomains. We also enforced path only editing for non-subdomain networks, which is a regression in expected behavior.

The full URL of a site can now be edited in both subdomain and subdirectory configurations.

Props @michaelryanmcneill.
Fixes #22383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-05 03:34:25 +00:00
Mark Jaquith
05965d87e4 Make the multisite new user messages reflect that reset links are sent, not passwords.
fixes #33175
Built from https://develop.svn.wordpress.org/trunk@33494


git-svn-id: http://core.svn.wordpress.org/trunk@33461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 19:04:25 +00:00
Jeremy Felt
1d95cf1886 Handle MS Sites bulk action verification separately from individual actions.
After [33173], bulk actions would not process due to broken verification of the `bulk-sites` action. This reintroduces the proper action and treats bulk actions differently than individual site actions.

See #32963.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 17:24:24 +00:00
Jeremy Felt
a5f6dd3ea1 Network Admin: Improved header information in Edit Site tabs.
* Use the site's name rather than URL in the Edit Site header.
* Provide "Visit" and "Dashboard" links for the site on all tabs.

Props @Fab1en, @jeremyfelt.
Fixes #32525.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 00:27:24 +00:00
Jeremy Felt
9f0506e3b2 Add better handling for actions and messaging in MS Sites List Table row actions
* Simplify URLs used for row actions to remove messaging and site domain/path.
* Use confirmation messaging from a managed list of actions when handling the request.
* Find the site address from the site ID rather than using information passed in the URL.

Fixes #32963.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-12 02:36:26 +00:00
Jeremy Felt
0dbe4d6c95 Set autocapitalize to none, autocorrect to off for new username inputs on iOS.
This corrects both the standard wp-admin new user form and the network new user form.

Props @brad2dabone, @sunnnyratilal.
Fixes #32644.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-11 02:35:24 +00:00
Jeremy Felt
8431399e2e Fix missing period in missing site error.
Props @ocean90.
See #32934.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-09 16:33:25 +00:00
Jeremy Felt
eb26a74073 Avoid PHP notice when attempting to edit a site that does not exist.
Show a more explicit error - "The requested site does not exist."

Fixes #32934.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-09 16:29:24 +00:00
Jeremy Felt
67142f5a2f Don't autocapitalize or autocorrect domain or path when adding a new site in iOS.
Props @ohryan.
Fixes #32646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-04 04:40:25 +00:00
Sergey Biryukov
ddff6fe471 Don't capitalize words in a sentence after comma.
props bjornjohansen, netweb.
fixes #31927.
Built from https://develop.svn.wordpress.org/trunk@33079


git-svn-id: http://core.svn.wordpress.org/trunk@33050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-04 00:50:25 +00:00
Konstantin Obenland
bd974d7bf2 Use a less element-specific class name for links within page titles.
After [32974] these links are no longer within an `h2`, making the class name
inaccurate. `add-new-h1` has the potential to expose the same problem for in a
possible future change.

Fixes #31650.


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


git-svn-id: http://core.svn.wordpress.org/trunk@33038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-03 16:42:24 +00:00
Konstantin Obenland
7dc1d06e64 Proper heading for admin screens.
First step towards restoring a good heading structure in wp-admin.
The previous `<h1>` contained the site title and a link to the front page and was removed with the toolbar refactoring in 3.2.

Props joedolson, afercia.
Fixes #31650.


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


git-svn-id: http://core.svn.wordpress.org/trunk@32945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 15:41:25 +00:00
Helen Hou-Sandí
e3ae4f9d7e Multisite: Use an email input for new user email address.
We also need to set novalidate on the form due to some browsers rejecting valid email addresses containing an IDN. We should holistically investigate whether this is still an issue in any major browsers at some point.

props earnjam.
fixes #32643.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 20:41:27 +00:00
Jeremy Felt
8daec04557 Remove a now unused switch_to_blog() and restore_current_blog() in site-info.php
Now that we decide when to automatically update `home` and `siteurl`, we no longer need to switch to the site while displaying the form output.

See #32503.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 08:23:26 +00:00
Jeremy Felt
da35c25fb7 Remove the "Update siteurl and home as well" checkbox when editing a site
Rather than provide a checkbox to update the `siteurl` and `home` options, we can make an educated decision based on the current state. If the home and/or siteurl domain and path match the existing domain and path of the site, then we update with the new information.

Also, while scheme is not stored in `wp_blogs` along with a site, the scheme of the `home` and `siteurl` options can now be modified via the Site URL setting in `site-info.php` when the `home` and/or `siteurl` options match the existing domain.

Props @hugobaeta, @earnjam, @jeremyfelt.
Fixes #32503, see #22383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 07:52:24 +00:00
Jeremy Felt
186c37a325 Capture domain and path when editing sites on a subdomain network
When a network is configured as subdomain, allow for the input of arbitrary domain and path combinations when editing a site rather than just the domain.

This takes a step or two toward #32503.

Props @scribu, @ericlewis, @jeremyfelt.
See #22383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 07:09:25 +00:00
Jeremy Felt
f996e163b8 Improve code readability in site-info.php
In advance of some other work here, clean up some braces and spaces.

See #22383.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 05:01:28 +00:00