Commit Graph

268 Commits

Author SHA1 Message Date
Pascal Birchler d2fb0bd81e General: Remove any usage of `wp_reset_vars()`.
The way `wp_reset_vars()` sets global variables based on `$_POST` and `$_GET` values makes code hard to understand and maintain. It also makes it easy to forget to sanitize input.

This change removes the few places where `wp_reset_vars()` is used in the admin to explicitly use `$_REQUEST` and sanitize any input.

Props swissspidy, audrasjb, davideferre, killua99, weijland, voldemortensen.
Fixes #38073.
Built from https://develop.svn.wordpress.org/trunk@58069


git-svn-id: http://core.svn.wordpress.org/trunk@57534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-01 18:01:12 +00:00
Aaron Jorbin d080076580 General: Add an option to configure the site icon in general settings.
This restores the site icon setting to its original home on the settings page where it lives with the title and tagline.

The base for this code was originally added in [32994] and then removed in [33329]. The majority of the modification to that version are to remove the no-js pieces and make the workflow completely inline rather than putting the cropping on a separate page.

Additionally, since image crops rely on the ability to upload an image, this setting is gated by the `upload_files` capability.

Follow-up to: [32994], [33329].

Props jorbin, audrasjb, mukesh27, joedolson, afercia, kebbet, swissspidy, obenland, jameskoster, kjellr, andraganescu, stacimc, mikeschroder, h71, krupajnanda, huzaifaalmesbah.
Fixes #54370.
See #16434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 21:57:09 +00:00
Peter Wilson 6876d19129 Options, Meta APIs: Prevent saving of invalid timezones.
Prevent the saving of invalid timezone string in to the database on the options pages. If an invalid timezone is submitted it is ignored and the setting remains unchanged.

This prevents a warning or fatal (depending on the PHP version) from being thrown by an invalid timezone setting on the Settings > General page.

Props ankit-k-gupta, costdev, huzaifaalmesbah, mrinal013, nicolefurlan, oglekler.
Fixes #58814.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 23:51:24 +00:00
joedolson 0f4010bd49 Administration: Use `wp_admin_notice()` in `/wp-admin/`.
Add usages of `wp_admin_notice()` and `wp_get_admin_notice()` on `.notice-[type]` in the root level of `/wp-admin/`. Ongoing task to implement new function across core.

Props costdev, joedolson.
See #57791.
Built from https://develop.svn.wordpress.org/trunk@56570


git-svn-id: http://core.svn.wordpress.org/trunk@56082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-14 00:54:19 +00:00
Sergey Biryukov 1ce5dc7444 Code Modernization: Replace usage of `strpos()` with `str_contains()`.
`str_contains()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) contains the given substring (needle).

WordPress core includes a polyfill for `str_contains()` on PHP < 8.0 as of WordPress 5.9.

This commit replaces `false !== strpos( ... )` with `str_contains()` in core files, making the code more readable and consistent, as well as better aligned with modern development practices.

Follow-up to [52039], [52040], [52326], [55703], [55710], [55987].

Props Soean, spacedmonkey, costdev, dingo_d, azaozz, mikeschroder, flixos90, peterwilsoncc, SergeyBiryukov.
Fixes #58206.
Built from https://develop.svn.wordpress.org/trunk@55988


git-svn-id: http://core.svn.wordpress.org/trunk@55500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-22 14:36:26 +00:00
Sergey Biryukov 6af7679802 Coding Standards: Correct the closing PHP tag placement in some admin files.
Follow-up to [1596], [1818], [11009], [16183], [16582], [16592].

Props faisalahammad, audrasjb.
Fixes #58053.
Built from https://develop.svn.wordpress.org/trunk@55618


git-svn-id: http://core.svn.wordpress.org/trunk@55130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-03 12:00:27 +00:00
audrasjb 73bd837100 Options, Meta APIs: Improve error messages in Options Management Administration Screen.
Props NekoJonez, costdev.
Fixes #57230.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-12-01 22:20:12 +00:00
audrasjb c7fe0f88d2 Coding Standards: Clarify time units for various timeout or expiration values.
This changeset implements a clearer and more consistent timeout/duration/expiration format. It updates time durations used in various files, as per WordPress coding standards:

- If the value can be represented as an integer (not a fractional) number of minutes (hours, etc.), use the appropriate constant (e.g.: `MINUTE_IN_SECONDS`) multiplied by that number.
- Otherwise, keep the value as is and add a comment with the units for clarity.

Follow-up to [11823], [13177], [21996], [37747], [53714].

Props hztyfoon, audrasjb, arrasel403, krupalpanchal, GaryJ, SergeyBiryukov, peterwilsoncc, rudlinkon, costdev, robinwpdeveloper.
Fixes #56293.
See #55647.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-09 08:16:18 +00:00
Sergey Biryukov 4e0b801910 Coding Standards: Use `MINUTE_IN_SECONDS` where appropriate.
This aims to clarify the time units for some timeout or expiration values.

Follow-up to [11823], [13177], [21996], [37747].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53714


git-svn-id: http://core.svn.wordpress.org/trunk@53273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-17 02:18:09 +00:00
audrasjb 7821fe08db Text Changes: Improve consistency of admin error notices in `wp-admin/options.php`.
This changeset replaces <strong>Error</strong>: with <strong>Error:</strong>, for better consistency.

Follow-up to [53458].

Fixes #50785.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-07 05:30:13 +00:00
Peter Wilson 5703931172 Options: Show error when updating all options exceeds `max_input_vars`.
On sites with a large number of options, the number of inputs when saving all options via the /wp-admin/options.php page may exceed PHP's `max_input_vars` setting, this will prevent saving.

An error is now shown if this is the case.

Props ishitaka, jorbin, maguijo, pento, sergeybiryukov. 
Fixes #45438.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 06:07:08 +00:00
Sergey Biryukov 65ebdf45d8 Coding Standards: Use strict comparison in `wp-admin/options.php`.
Follow-up to [21852], [47874], [51075].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52431


git-svn-id: http://core.svn.wordpress.org/trunk@52023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-03 21:28:01 +00:00
Sergey Biryukov 8a90b8691f Docs: Add a comment about the `$title` global usage in various admin files.
This should make it clear that the variable is used as part of the HTML `<title>` tag on admin screens.

Props ravipatel, hellofromTonya, sabernhardt, audrasjb, SergeyBiryukov.
Fixes #53729.
Built from https://develop.svn.wordpress.org/trunk@51475


git-svn-id: http://core.svn.wordpress.org/trunk@51086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-07-22 13:53:00 +00:00
Sergey Biryukov a885f914e4 Coding Standards: Add missing semicolon to some `endif` keywords.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50560


git-svn-id: http://core.svn.wordpress.org/trunk@50173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-21 13:05:04 +00:00
Sergey Biryukov f331ff5a7a Docs: Correct the alternative hook name for the deprecated `whitelist_options` hook.
Follow-up to [48121].

See #51800.
Built from https://develop.svn.wordpress.org/trunk@50373


git-svn-id: http://core.svn.wordpress.org/trunk@49984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-17 12:42:03 +00:00
Aaron Jorbin 6cab8cce22 General: Update code for readability and inclusion
There are two pieces in here:

1) The update to change blacklist to blocklist is moved to disallowed_list. "Block" has a meaning in our code, and there could be ambiguity between this code and code related to blocks.

2) This improves backwards compatibility for code that was accessing the now deprecated code.

Previously: [48477], [48405], [48400], [48121], [48122], [48124], [48142], [48566]

Props: desrosj, SergeyBiryukov, johnjamesjacoby
Fixes: #50413


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


git-svn-id: http://core.svn.wordpress.org/trunk@48337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 03:14:06 +00:00
whyisjake 413fae70e8 i18n: Merge similar translation strings in wp-admin/options.php
WARNING! is now Warning:

You have been warned.

Fixes #50715.
Props: ramiy, audrasjb, ocean90.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 22:21:03 +00:00
Sergey Biryukov d38a32bfac Coding Standards: Reformat some long `apply_filters_deprecated()` and `do_action_deprecated()` calls for better readability.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@48167


git-svn-id: http://core.svn.wordpress.org/trunk@47936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-25 12:06:07 +00:00
desrosj 4b60af1a6a General: Remove “whitelist” and “blacklist” in favor of more clear and inclusive language.
“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”

With this commit, all occurrences of “whitelist” and “blacklist” (with the single exception of the `$new_whitelist_options` global variable) are removed. A new ticket has been opened to explore renaming the `$new_whitelist_options` variable (#50434).

Changing to more specific names or rewording sentences containing these terms not only makes the code more inclusive, but also helps provide clarity. These terms are often ambiguous. What is being blocked or allowed is not always immediately clear. This can make it more difficult for non-native English speakers to read through the codebase.

Words matter. If one contributor feels more welcome because these terms are removed, this was worth the effort.

Props strangerstudios, jorbin, desrosj, joemcgill, timothyblynjacobs, ocean90, ayeshrajans, davidbaumwald, earnjam.
See #48900, #50434.
Fixes #50413.
Built from https://develop.svn.wordpress.org/trunk@48121


git-svn-id: http://core.svn.wordpress.org/trunk@47890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-22 17:26:13 +00:00
Andrea Fercia ae447adaf4 I18N: Restore the "Error:" prefix for error messages.
Partially reverts [48059] as there's no full consensus on the removal of the text prefix. Further actions should be taken to improve consistency and accessibility of the admin notices. Keeps some improvements to the translatable strings from [48059].

Fixes #47656.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-21 14:00:09 +00:00
Andrea Fercia f83c504b88 I18N: Remove the "Error:" prefix from error messages.
For a number of years, most of the WordPress error messages have been prefixed with "Error:". However, these messages appear in a context where it's already clear an error occurred. Whether it's an error, a warning, or any other classification, that's not so relevant for users. The content of the message is the relevant part. The "Error:" prefix doesn't add great value while it does add unnecessary complexity for the message readability.

Also, revises some of these messages to improve clarity and removes HTML from translatable strings.

Props garrett-eclipse, ramiy, SergeyBiryukov, afercia, sabernhardt, quadthemes, audrasjb. 
See #47003, #43037, #42945, #15887.
Fixes #47656.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-16 15:35:13 +00:00
Sergey Biryukov 1c176ffb1e Docs: Correct and clarify an inline comment about the `upload_url_path` and `upload_path` options in `wp-admin/options-media.php`.
Synchronize it with a similar comment in `wp-admin/options.php`.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@47874


git-svn-id: http://core.svn.wordpress.org/trunk@47648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 11:22:13 +00:00
Sergey Biryukov 7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov 38676936ba Coding Standards: Use strict type check for `in_array()` and `array_search()` where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47550


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Sergey Biryukov 5e6c949861 Coding Standards: Use Yoda conditions in some `wp-admin` files.
Props subrataemfluence, marcio-zebedeu, bookdude13, 1naveengiri, alishankhan.
Fixes #44365, #48455.
Built from https://develop.svn.wordpress.org/trunk@47218


git-svn-id: http://core.svn.wordpress.org/trunk@47018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:53:06 +00:00
Sergey Biryukov 47ed56f38f Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov c94722d9bc Docs: Improve inline comments in `wp-admin/options.php` per the documentation standards.
See #48303.
Built from https://develop.svn.wordpress.org/trunk@47159


git-svn-id: http://core.svn.wordpress.org/trunk@46959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-02 02:42:04 +00:00
Sergey Biryukov a0f8b7003b Administration: Include options page name in the "Options page not found" error message to provide better context for plugin developers.
Props tdlewis77, williampatton.
Fixes #42941.
Built from https://develop.svn.wordpress.org/trunk@47158


git-svn-id: http://core.svn.wordpress.org/trunk@46958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-01 22:42:06 +00:00
Sergey Biryukov 8e37999368 Docs: Correct DocBlock formatting for `register_setting()`.
Document the full list of whitelisted option key names.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47157


git-svn-id: http://core.svn.wordpress.org/trunk@46957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-01 22:01:07 +00:00
Sergey Biryukov deb1886078 Accessibility: Text Changes: Use sentence case for the word `Error` in various error messages, instead of all caps.
Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations.

Props afercia, ryokuhi, sabernhardt, garrett-eclipse.
See #47656, #43037, #42945.
Built from https://develop.svn.wordpress.org/trunk@47156


git-svn-id: http://core.svn.wordpress.org/trunk@46956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-01 21:38:04 +00:00
Sergey Biryukov 2fe7c95153 Text Changes: Capitalize error messages consistently.
Props Presskopp.
Fixes #42945.
Built from https://develop.svn.wordpress.org/trunk@47154


git-svn-id: http://core.svn.wordpress.org/trunk@46954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-01 20:55:05 +00:00
Sergey Biryukov 001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
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 be6bbe4b5d Administration: Replace legacy `updated` message type in `add_settings_error()` calls with `success`.
See #44640.
Built from https://develop.svn.wordpress.org/trunk@45818


git-svn-id: http://core.svn.wordpress.org/trunk@45629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-16 00:39:55 +00:00
Sergey Biryukov e8cd892ba4 Administration: Display a warning at the top of "All Settings" screen.
Props zodiac1978, donmhico, pixolin.
Fixes #47718.
Built from https://develop.svn.wordpress.org/trunk@45743


git-svn-id: http://core.svn.wordpress.org/trunk@45554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 13:03: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 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 702f7d4e8d I18N: Merge duplicate "not allowed to manage options" strings.
Props ramiy.
Fixes #42271.
Built from https://develop.svn.wordpress.org/trunk@45439


git-svn-id: http://core.svn.wordpress.org/trunk@45250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 16:00:52 +00:00
Sergey Biryukov b77cf42c0b Accessibility: Make sure layout tables across the admin are correctly linearized.
Adds `role="presentation"` to the `<table>` elements used for layout purposes.

Ideally, HTML tables should be used for tabular data. When tables are used for layout purposes, it's important to remove any native semantics so that assistive technologies can correctly announce the table content in a linearized fashion.

Props greatislander, afercia.
Fixes #46899.
Built from https://develop.svn.wordpress.org/trunk@45403


git-svn-id: http://core.svn.wordpress.org/trunk@45214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-24 21:56:54 +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
Sergey Biryukov a90f215d2c Privacy: Revert [43525].
The commenter cookies checkbox is not legally required, so should be disabled by default.

Fixes #44373.
Built from https://develop.svn.wordpress.org/trunk@43531


git-svn-id: http://core.svn.wordpress.org/trunk@43360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 17:06:24 +00:00
Sergey Biryukov d68b2b5a2b Privacy: Remove the setting to enable comment cookies consent added in [43469].
This needs some more work to ensure expected behaviour.

See #44373.
Built from https://develop.svn.wordpress.org/trunk@43525


git-svn-id: http://core.svn.wordpress.org/trunk@43354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 12:51:29 +00:00
Andrew Ozz 3b3542fe15 Privacy: Add a setting to disable comment cookie consent.
Fixes #44373.
Built from https://develop.svn.wordpress.org/trunk@43469


git-svn-id: http://core.svn.wordpress.org/trunk@43296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 09:08:26 +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
Sergey Biryukov a65ce4e34b Options: Avoid extra tabs in a textarea in `wp-admin/options.php`.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42671


git-svn-id: http://core.svn.wordpress.org/trunk@42499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:58:31 +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
Sergey Biryukov 1cda7b9667 Role/Capability: Make `install_languages` capability check less restrictive.
A user should still be able to have the capability, even when language packs cannot be automatically installed. The automatic installation part is separate from that now.

Props flixos90.
Fixes #42697.
Built from https://develop.svn.wordpress.org/trunk@42606


git-svn-id: http://core.svn.wordpress.org/trunk@42435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:42:30 +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
John Blackbourn 28eda6f4bc General: Improve terminology used when referring to installations of WordPress and its extensions.
"Install" is not a noun, and while it might be acceptable to use the verb as a noun, it is not correct. Using the correct
noun, "installation", increases clarity, especially for non-native English speakers.

This change fixes the usage in user-facing text and in developer documentation.

Fixes #41620

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


git-svn-id: http://core.svn.wordpress.org/trunk@41129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:52:48 +00:00