Commit Graph

357 Commits

Author SHA1 Message Date
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov
16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
Sergey Biryukov
fe0b22cd67 Users: Adjust [45806] to make sure $all_userids is always defined.
Props kbrownkd.
Fixes #47936.
Built from https://develop.svn.wordpress.org/trunk@45890


git-svn-id: http://core.svn.wordpress.org/trunk@45701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-25 20:03:57 +00:00
Sergey Biryukov
ab0b860db9 Users: When deleting users, exclude the current user from the content existence check.
The current user cannot be deleted, so the check is redundant in that context and should only be done for other users.

Props mt8.biz, SergeyBiryukov.
Fixes #47851.
Built from https://develop.svn.wordpress.org/trunk@45806


git-svn-id: http://core.svn.wordpress.org/trunk@45617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 13:06:55 +00:00
Sergey Biryukov
8e85299a00 General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45674


git-svn-id: http://core.svn.wordpress.org/trunk@45485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:45:57 +00:00
Gary Pendergast
a02b5cc2a8 Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 01:45:56 +00:00
Gary Pendergast
cf3fa9f7c8 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 12:52:01 +00:00
Sergey Biryukov
4e4ef1170b I18N: Merge duplicate strings in notifications displayed when a new user has been created or added to the site.
Props ramiy.
Fixes #35746.
Built from https://develop.svn.wordpress.org/trunk@45542


git-svn-id: http://core.svn.wordpress.org/trunk@45353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-15 18:57:52 +00:00
Gary Pendergast
4487551344 Help: Update support forum links.
There are a lot of places in Core that link to https://wordpress.org/support/ for the support forums, but that's now the URL for HelpHub. The new forums link is https://wordpress.org/support/forums/.

Props jitendrabanjara1991, dilipbheda, mukesh27, ianbelanger.
Fixes #46790.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 22:59:56 +00:00
Sergey Biryukov
1fc763e85e Users: Introduce users_have_additional_content filter to indicate whether the users being deleted have additional content associated with them outside of the post_author and link_owner relationships.
Props garrett-eclipse, xkon, birgire.
Fixes #36860.
Built from https://develop.svn.wordpress.org/trunk@44967


git-svn-id: http://core.svn.wordpress.org/trunk@44798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 20:12:50 +00:00
Gary Pendergast
7a617078fa Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:41:52 +00:00
Gary Pendergast
56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
John Blackbourn
b13e73d05c Docs: Document more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 18:10:32 +00:00
Peter Wilson
e6ccdf161f General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 02:13:32 +00:00
Peter Wilson
0d39b35c11 General: Replace Cheatin’ uh? with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 02:30:34 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Gary Pendergast
c90cfa3b50 General: Fix some precision alignment formatting warnings.
The WPCS `WordPress.WhiteSpace.PrecisionAlignment` rule throws warnings for a bunch of code that will likely cause issues for `wpcbf`. Fixing these manually beforehand gives us better auto-fixed results later.

See #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-26 23:57:55 +00:00
Sergey Biryukov
c2dcfa5278 Help/About: Tweak Help tabs on Users screen for consistency with Posts screen.
Props bnap00, Arena94.
Fixes #40553.
Built from https://develop.svn.wordpress.org/trunk@41566


git-svn-id: http://core.svn.wordpress.org/trunk@41399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-22 18:31:48 +00:00
John Blackbourn
a507248146 Users: Use more appropriate HTTP status codes for errors relating to user management.
Also re-uses one error message string.

Props tuanmh

Fixes #40230

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


git-svn-id: http://core.svn.wordpress.org/trunk@40790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 18:46:44 +00:00
Felix Arntz
6fcb0e8b7f Multisite: Replace is_super_admin() with manage_network_users when trying to change the role of oneself.
Props abhishek kaushik.
Fixes #39204. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-24 11:04:44 +00:00
Sergey Biryukov
8f0e75db16 Users: Preserve role filter in list table after entering a page number in paging input.
Props kailanitish90, sagarprajapati.
Fixes #39435.
Built from https://develop.svn.wordpress.org/trunk@39937


git-svn-id: http://core.svn.wordpress.org/trunk@39874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-21 02:21:43 +00:00
Felix Arntz
f704fc808a Multisite: Handle capability check for removing oneself via map_meta_cap().
Site administrators should not be able to remove themselves from a site. This moves the enforcement of this rule from `wp-admin/users.php` to `remove_user_from_blog()` via the `remove_user` capability, which furthermore allows us to get rid of two additional clauses and their `is_super_admin()` checks in `wp-admin/users.php`. A unit test for the new behavior has been added.

Fixes #39063. See #37616.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 21:42:42 +00:00
Andrea Fercia
87882d0463 Accessibility: Remove inappropriate content from the Users screen heading.
See #26601.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 18:29:38 +00:00
Sergey Biryukov
dca7d8d0ea Text Changes: Merge strings referring to list_users capability.
See #38857.
Built from https://develop.svn.wordpress.org/trunk@39312


git-svn-id: http://core.svn.wordpress.org/trunk@39252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 02:16:30 +00:00
Sergey Biryukov
b1ed607578 Text Changes: Merge and clarify some permission error strings in the admin.
See #38857.
Built from https://develop.svn.wordpress.org/trunk@39308


git-svn-id: http://core.svn.wordpress.org/trunk@39248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-19 01:38:31 +00:00
Sergey Biryukov
a7af7c89a4 Text Changes: Unify permission error messages in wp-admin/users.php.
Props ramiy.
Fixes #38804.
Built from https://develop.svn.wordpress.org/trunk@39258


git-svn-id: http://core.svn.wordpress.org/trunk@39198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 22:25:30 +00:00
John Blackbourn
bc5c87710e Administration: Standardise the docblocks for the handle_bulk_actions-* filters.
Props ericlewis, Veraxus
Fixes #16031

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


git-svn-id: http://core.svn.wordpress.org/trunk@38901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 14:45:29 +00:00
Andrea Fercia
2eda436430 Accessibility: Remove target=_blank from the Users and Widgets screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38217. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 07:10:31 +00:00
Sergey Biryukov
ee109482db Text Changes: Unify two more permission error messages.
Props ramiy.
Fixes #38158. See #34521.
Built from https://develop.svn.wordpress.org/trunk@38666


git-svn-id: http://core.svn.wordpress.org/trunk@38609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 00:17:28 +00:00
Eric Lewis
d27606936b Allow custom bulk actions in admin list tables.
Bulk action filtering was introduced in 3.1, but only to remove default bulk actions, not add new ones.

Bulk actions can now be registered for all admin list table dropdowns via the `bulk_actions-{get_current_screen()->id}` filter. Handling custom bulk actions can be performed in the corresponding and newly introduced `handle_bulk_actions-${get_current_screen()->id}` filter.

Props scribu, flixos90, Veraxus.
See #16031.


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


git-svn-id: http://core.svn.wordpress.org/trunk@38590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-23 20:33:30 +00:00
Dominik Schilling
25e66e4f1e Text Changes: Unify permission error messages.
The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.

Props ramiy, Presskopp.
Fixes #34521.
Built from https://develop.svn.wordpress.org/trunk@37914


git-svn-id: http://core.svn.wordpress.org/trunk@37855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-29 15:16:29 +00:00
Andrea Fercia
d01b200e6e Accessibility: Help text improvements.
Avoid references to "visual" positions in favour of positions in the document
structure. The help text shouldn't assume users can see.

Also, in the Posts screen don't mention specific types of posts and use a more
generic text instead.

Props odysseygate, pansotdev, zakb8.
Fixes #34761.
Built from https://develop.svn.wordpress.org/trunk@37680


git-svn-id: http://core.svn.wordpress.org/trunk@37646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 21:43:29 +00:00
Sergey Biryukov
90c7ce63d9 Use admin_url() for "Add New" links in wp-admin/users.php.
Props johnjamesjacoby.
Fixes #36186.
Built from https://develop.svn.wordpress.org/trunk@36902


git-svn-id: http://core.svn.wordpress.org/trunk@36870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-09 19:09:50 +00:00
Drew Jaynes
54ab5fa68c Users: Pass the array of user IDs being deleted to the delete_user_form action hook in two places.
Also updates documentation for the first parameter, `$current_user`, to clarify that it holds the `WP_User` object for the _current_ user, not the one being deleted.

Props usermrpapa.
Fixes #35063. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@36607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 17:42:27 +00:00
Dominik Schilling
e512f158df Add translators comments to wp-admin/users.php.
Props ramiy.
Fixes #35885.
Built from https://develop.svn.wordpress.org/trunk@36621


git-svn-id: http://core.svn.wordpress.org/trunk@36588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 00:05:28 +00:00
Pascal Birchler
aaa11d6207 Allow searching for 0 throughout the admin.
Fixes #31025.
Built from https://develop.svn.wordpress.org/trunk@36302


git-svn-id: http://core.svn.wordpress.org/trunk@36269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-14 20:06:25 +00:00
Dion Hulse
04bca9732b Users: When determining whether to show the reassign content option during user delete, don't rely upon WP_Query as it doesn't return all forms of content wp_delete_user() operates on.
This restores the reassign form when a user has a non-public post type or links assigned to them.

Props swissspidy & tharsheblows for initial patches.
Fixes #34993 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 04:46:28 +00:00
Boone Gorges
714be37ea5 Show user_login in Dashboard user dropdowns.
User dropdowns in wp-admin have traditionally shown the users' display names.
However, this causes ambiguity when users share display names. To correct this,
we now show the unique user_login in parentheses after the display name.

The new `display_name_with_login` value for the `show` parameter of
`wp_dropdown_users()` enables this functionality. The default value of `show`
has not been changed, for backward compatibility, but all instances of
`wp_dropdown_users()` in core wp-admin have been switched.

This changeset also reduces some duplicated logic when assembling a user list
when `include_selected` is true.

Props krogsgard, boonebgorges.
Fixes #31251.
Built from https://develop.svn.wordpress.org/trunk@35790


git-svn-id: http://core.svn.wordpress.org/trunk@35754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 20:57:26 +00:00
Drew Jaynes
efdc838019 Docs: Add a missing version to the file header for wp-admin/users.php.
See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-06 21:54:33 +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
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
Scott Taylor
f78170934a Users List Table: show the "Change role to" dropdown on the top and bottom. Currently only shows on top.
See #27743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 19:11:26 +00:00
Drew Jaynes
35246a957f Docs: The User API is singular.
See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 12:31:26 +00:00
Scott Taylor
49b8ccec79 When deleting via User List Table, don't prompt for re-attribution if the user(s) do(es) not have any posts.
Props rajnikmit, wojtek.szkutnik, benjmay, wonderboymusic.
Fixes #6405. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@33969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 16:47: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
Sergey Biryukov
ce05b02a59 Provide more helpful feedback than just "Cheatin' uh?" for permission errors in wp-admin/users.php.
props ericlewis, kraftbj, lukecarbis, mrmist.
fixes #33679. see #14530.
Built from https://develop.svn.wordpress.org/trunk@33885


git-svn-id: http://core.svn.wordpress.org/trunk@33854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 08:54:24 +00:00
Sergey Biryukov
a883227772 Multisite: Introduce a singular string for user removal (we already have one for deletion).
props pavelevap.
fixes #32387.
Built from https://develop.svn.wordpress.org/trunk@33434


git-svn-id: http://core.svn.wordpress.org/trunk@33401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-26 23:19:24 +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
Dominik Schilling
64fc7294b6 Use HTTPS URLs for codex.wordpress.org.
see #27115.
Built from https://develop.svn.wordpress.org/trunk@32116


git-svn-id: http://core.svn.wordpress.org/trunk@32095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-12 21:29:32 +00:00