Commit Graph

64 Commits

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

See #44360.

git-svn-id: https://develop.svn.wordpress.org/trunk@45932 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-03 00:39:13 +00:00
Sergey Biryukov
a7513ac8e0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45926 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-01 17:12:43 +00:00
Sergey Biryukov
7ef2679ec7 Users: Adjust [45806] to make sure $all_userids is always defined.
Props kbrownkd.
Fixes #47936.

git-svn-id: https://develop.svn.wordpress.org/trunk@45890 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-25 20:02:31 +00:00
Sergey Biryukov
a636529b7c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45806 602fd350-edb4-49c9-b593-d223f7449a82
2019-08-15 13:05:39 +00:00
Sergey Biryukov
ae8a620efb General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.

git-svn-id: https://develop.svn.wordpress.org/trunk@45674 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-25 22:44:48 +00:00
Gary Pendergast
6b61c34ded Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45599 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 01:44:41 +00:00
Gary Pendergast
9a1549767e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 12:50:14 +00:00
Sergey Biryukov
69fabdbd4d I18N: Merge duplicate strings in notifications displayed when a new user has been created or added to the site.
Props ramiy.
Fixes #35746.

git-svn-id: https://develop.svn.wordpress.org/trunk@45542 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-15 18:56:47 +00:00
Gary Pendergast
8efcc32fde 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45140 602fd350-edb4-49c9-b593-d223f7449a82
2019-04-08 22:58:49 +00:00
Sergey Biryukov
c86ff5da2d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@44967 602fd350-edb4-49c9-b593-d223f7449a82
2019-03-21 20:11:29 +00:00
Gary Pendergast
992184cf73 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@44574 602fd350-edb4-49c9-b593-d223f7449a82
2019-01-12 06:40:16 +00:00
Gary Pendergast
a75d153eee 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +00:00
John Blackbourn
d541798a64 Docs: Document more parameters and properties using typed array notation.
See #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@42875 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-25 18:09:56 +00:00
Peter Wilson
d002fde80e General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@42719 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-19 02:12:41 +00:00
Peter Wilson
f317869c7f 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@42648 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-05 02:29:53 +00:00
Gary Pendergast
8f95800d52 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-30 23:09:33 +00:00
Gary Pendergast
574821573a 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@42228 602fd350-edb4-49c9-b593-d223f7449a82
2017-11-26 23:56:25 +00:00
Sergey Biryukov
3dff531717 Help/About: Tweak Help tabs on Users screen for consistency with Posts screen.
Props bnap00, Arena94.
Fixes #40553.

git-svn-id: https://develop.svn.wordpress.org/trunk@41566 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 18:30:10 +00:00
John Blackbourn
d7fc80ca43 Users: Use more appropriate HTTP status codes for errors relating to user management.
Also re-uses one error message string.

Props tuanmh

Fixes #40230


git-svn-id: https://develop.svn.wordpress.org/trunk@40940 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 18:45:33 +00:00
Felix Arntz
816686b709 Multisite: Replace is_super_admin() with manage_network_users when trying to change the role of oneself.
Props abhishek kaushik.
Fixes #39204. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@39943 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-24 11:03:07 +00:00
Sergey Biryukov
33cf1046db Users: Preserve role filter in list table after entering a page number in paging input.
Props kailanitish90, sagarprajapati.
Fixes #39435.

git-svn-id: https://develop.svn.wordpress.org/trunk@39937 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-21 02:20:23 +00:00
Felix Arntz
539b85406d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39588 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-12 21:41:44 +00:00
Andrea Fercia
ee5b840228 Accessibility: Remove inappropriate content from the Users screen heading.
See #26601.


git-svn-id: https://develop.svn.wordpress.org/trunk@39534 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-07 18:28:49 +00:00
Sergey Biryukov
4e5fdda8f9 Text Changes: Merge strings referring to list_users capability.
See #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39312 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 02:15:10 +00:00
Sergey Biryukov
81353e76be Text Changes: Merge and clarify some permission error strings in the admin.
See #38857.

git-svn-id: https://develop.svn.wordpress.org/trunk@39308 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 01:37:25 +00:00
Sergey Biryukov
6e997f7cf9 Text Changes: Unify permission error messages in wp-admin/users.php.
Props ramiy.
Fixes #38804.

git-svn-id: https://develop.svn.wordpress.org/trunk@39258 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-15 22:24:30 +00:00
John Blackbourn
573912fcfd Administration: Standardise the docblocks for the handle_bulk_actions-* filters.
Props ericlewis, Veraxus
Fixes #16031


git-svn-id: https://develop.svn.wordpress.org/trunk@38958 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-26 14:44:57 +00:00
Andrea Fercia
050d2d9a25 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38723 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 07:09:12 +00:00
Sergey Biryukov
36e22efdfd Text Changes: Unify two more permission error messages.
Props ramiy.
Fixes #38158. See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@38666 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-28 00:16:44 +00:00
Eric Andrew Lewis
c75fb5e9ca 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@38647 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-23 20:32:48 +00:00
Dominik Schilling (ocean90)
206380180e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37914 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 15:15:40 +00:00
Andrea Fercia
18ef7d6225 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@37680 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-10 21:42:05 +00:00
Sergey Biryukov
11c47a6cb5 Use admin_url() for "Add New" links in wp-admin/users.php.
Props johnjamesjacoby.
Fixes #36186.

git-svn-id: https://develop.svn.wordpress.org/trunk@36902 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-09 19:08:58 +00:00
Drew Jaynes
66ec958a5f 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. 


git-svn-id: https://develop.svn.wordpress.org/trunk@36640 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 17:41:15 +00:00
Dominik Schilling (ocean90)
b17a2e9567 Add translators comments to wp-admin/users.php.
Props ramiy.
Fixes #35885.

git-svn-id: https://develop.svn.wordpress.org/trunk@36621 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 00:04:36 +00:00
Pascal Birchler
cc6fe1179d Allow searching for 0 throughout the admin.
Fixes #31025.

git-svn-id: https://develop.svn.wordpress.org/trunk@36302 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-14 20:05:06 +00:00
Dion Hulse
ec7fa69ef4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@36068 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-23 04:45:42 +00:00
Boone Gorges
ded2547b57 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@35790 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-06 20:56:11 +00:00
Drew Jaynes
4f8b9840e0 Docs: Add a missing version to the file header for wp-admin/users.php.
See #33701.


git-svn-id: https://develop.svn.wordpress.org/trunk@35558 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-06 21:53:53 +00:00
Helen Hou-Sandi
61ef1ff96f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@35182 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 03:07:48 +00:00
Scott Taylor
9e267b6e72 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34891 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 01:27:01 +00:00
Scott Taylor
8fa5426485 Users List Table: show the "Change role to" dropdown on the top and bottom. Currently only shows on top.
See #27743.


git-svn-id: https://develop.svn.wordpress.org/trunk@34636 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 19:10:08 +00:00
Drew Jaynes
aabead83e6 Docs: The User API is singular.
See #33701.


git-svn-id: https://develop.svn.wordpress.org/trunk@34393 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 12:30:43 +00:00
Scott Taylor
2deb9565c0 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. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34000 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 16:46:38 +00:00
Sergey Biryukov
55bb26c58a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@33888 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-03 09:02:13 +00:00
Sergey Biryukov
708cd13d77 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@33885 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-03 08:53:23 +00:00
Sergey Biryukov
be54cc64a9 Multisite: Introduce a singular string for user removal (we already have one for deletion).
props pavelevap.
fixes #32387.

git-svn-id: https://develop.svn.wordpress.org/trunk@33434 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-26 23:18:19 +00:00
Konstantin Obenland
8d40cdcb1b 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@33067 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-03 16:41:18 +00:00
Konstantin Obenland
e59592f87e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@32974 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-27 15:40:27 +00:00
Dominik Schilling (ocean90)
b0d6757918 Use HTTPS URLs for codex.wordpress.org.
see #27115.

git-svn-id: https://develop.svn.wordpress.org/trunk@32116 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-12 21:28:58 +00:00