Commit Graph

20 Commits

Author SHA1 Message Date
audrasjb 223cda987f Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.

Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 16:25:03 +00:00
Sergey Biryukov 8cdec43675 Coding Standards: Use `esc_url()` instead of `esc_attr()` for some URLs.
Follow-up to [2063], [2182], [4656], [6952], [9098], [11109], [11204], [17887], [22505], 

Props kebbet.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52957


git-svn-id: http://core.svn.wordpress.org/trunk@52546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-19 20:31:12 +00:00
Sergey Biryukov d6589948ca Code Modernization: Rename parameters that use reserved keywords in `wp-admin/includes/class-custom-image-header.php`.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$object` variable in `Custom_Image_Header` class methods to `$attachment` for clarity and consistency, as the variable type is actually an array, and updates the documentation accordingly.

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.
Built from https://develop.svn.wordpress.org/trunk@52946


git-svn-id: http://core.svn.wordpress.org/trunk@52535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-17 20:19:10 +00:00
audrasjb 99bac7e17c Docs: Replace "Current theme" with "Active theme" in various DocBlocks.
This change replaces "Current theme" with "Active theme" in various DocBlocks for better consistency with user-facing strings.

Follow-up to [52580].

Props Presskopp, audrasjb, costdev.
Fixes #54831.
See #54770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-20 23:53:05 +00:00
audrasjb e05557e222 Administration: Replace "Current theme" with "Active theme" in user facing strings.
This change replaces "Current theme" with "Active theme" in user-facing strings. It brings better consistency across the Administration.

Props Presskopp, audrasjb, costdev.
Fixes #54770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-15 08:44:03 +00:00
hellofromTonya 5c414db9ad External Libraries: Further fix jQuery deprecations in WordPress core.
Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50547].

Props chaion07, Clorith, costdev, desrosj, malthert, peterwilsoncc, presskopp, promz, sabernhardt, SergeyBiryukov, toro_unit, wpnomad.
Fixes #51519.
Built from https://develop.svn.wordpress.org/trunk@52285


git-svn-id: http://core.svn.wordpress.org/trunk@51877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 17:18:01 +00:00
Sergey Biryukov a274a14bdd Coding Standards: Use strict comparison in `wp-admin/includes/class-custom-image-header.php`.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50707


git-svn-id: http://core.svn.wordpress.org/trunk@50316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-13 19:05:04 +00:00
Sergey Biryukov d3d78e755b Coding Standards: Add a space before `/` character in some self-closing HTML tags.
While this has no effect on the code, it fixes a minor inconsistency with the rest of core.

Props laxman-prajapati.
Fixes #52870.
Built from https://develop.svn.wordpress.org/trunk@50556


git-svn-id: http://core.svn.wordpress.org/trunk@50169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-20 18:30:08 +00:00
antpb f80e5d0919 Media: Avoid suppressing errors when using `getimagesize()`.
Previously, all logic utilizing `getimagesize()` was supressing errors making it difficult to debug usage of the function. 

A new `wp_getimagesize()` function has been added to allow the errors to no longer be suppressed when `WP_DEBUG` is enabled.

Props Howdy_McGee, SergeyBiryukov, mukesh27, davidbaumwald, noisysocks, hellofromTonya.
Fixes #49889.

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


git-svn-id: http://core.svn.wordpress.org/trunk@49825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-02 16:53:04 +00:00
desrosj 1050613168 Coding standards: Modify escaping functions to avoid potential false positives.
Props xknown, zieladam, peterwilsoncc.
Merges [49375] to trunk.
Built from https://develop.svn.wordpress.org/trunk@49384


git-svn-id: http://core.svn.wordpress.org/trunk@49143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-29 18:03:11 +00:00
Sergey Biryukov be16bb9fba Docs: Remove extra spaces from `@param` tags.
Per the documentation standards, `@param` tags should be aligned with each other, but not with the `@return` tag.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:58:10 +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
John Blackbourn 7004afe4f4 Docs: Various docblock corrections and improvements.
See #49572
Built from https://develop.svn.wordpress.org/trunk@47461


git-svn-id: http://core.svn.wordpress.org/trunk@47248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-16 18:40:07 +00:00
Sergey Biryukov 641c632b0c Coding Standards: Use Yoda conditions where appropriate.
See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:55:09 +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 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
desrosj e7c8b21e71 Coding Standards: Dynamic hooks should be named using interpolation not concatenation.
Props arena, desrosj.
Fixes #47052.
Built from https://develop.svn.wordpress.org/trunk@45881


git-svn-id: http://core.svn.wordpress.org/trunk@45692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-22 19:08:55 +00:00
Gary Pendergast 24d08a9463 Coding Standards: Move `wp-admin/custom-header.php` to `wp-admin/includes/class-custom-image-header.php`
This renames the file containing the `Custom_Image_Header` class to conform to the coding standards.

This commit also includes:
- A new `custom-header.php` that includes the new file, for anyone that may've been including the file directly.
- Replaces references to the old filename with the new filename.

See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-17 06:17:56 +00:00