46859 Commits

Author SHA1 Message Date
Peter Wilson
63df8812d4 Security: Improve accessibility of security policy.
Replace emoji indicators of support with "yes" and "no". This prevents "White Heavy Check Mark" indicating supported versions for screen-reader users.

Props audrasjb.
Fixes #57222.



git-svn-id: https://develop.svn.wordpress.org/trunk@54919 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-30 22:52:34 +00:00
Peter Wilson
82a3016a67 Security: Update supported WordPress versions in security policy.
Removes WordPress versions 3.7.x-4.0.x from the list of supported versions in the security policy.

Props audrasjb, peterwilsoncc.
Fixes #57217.



git-svn-id: https://develop.svn.wordpress.org/trunk@54918 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-30 22:31:53 +00:00
Sergey Biryukov
999b52eb75 Coding Standards: Fix a non-snake_case function name in WP_Block tests.
As the filter is only intended for a single test, it can be converted to a closure instead of being declared as a function in the global namespace. The `remove_filter()` part is redundant, as `WP_UnitTestCase_Base` saves the state of filter-related globals at `set_up()` and restores them on `tear_down()`.

Follow-up to [54175].

Props jrf, SergeyBiryukov.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54917 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-30 18:30:57 +00:00
Sergey Biryukov
2380400e44 Coding Standards: Remove redundant semicolon after get_template_hierarchy().
Follow-up to [54269].

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54916 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-30 17:34:59 +00:00
Sergey Biryukov
75aaa65770 Coding Standards: Fix indentation of multi-line chained method call in test_json_error_with_status().
Follow-up to [34928], [42228].

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54915 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-30 16:33:48 +00:00
Bernie Reiter
112d16165f Build/Test Tools: Stylistic changes to Gutenberg e2e test.
Make some stylistic changes (multiline comment formatting, test description) that had been suggested during code review and that didn't make it into the previous commit.

Props costdev.
Follows [54913].
See #57197.

git-svn-id: https://develop.svn.wordpress.org/trunk@54914 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-30 14:05:58 +00:00
Bernie Reiter
bb2f8a6d4f Build/Test Tools: Add basic e2e coverage for Gutenberg.
Add some minimal e2e test coverage to install and activate the Gutenberg plugin.

This will catch naming collisions between Core and Gutenberg and help avoid crashing WordPress installations that run the stable version of the Gutenberg plugin on top of Core trunk.

Props costdev.
Fixes #57197.

git-svn-id: https://develop.svn.wordpress.org/trunk@54913 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-30 13:16:00 +00:00
Jb Audras
0fa641caca Plugins: Correctly display spaces in installed plugins search results.
This changeset improves searched terms URL decoding in installed plugins search results.

Follow-up to [53844].

Props 254volkan, dilipbheda, audrasjb, adhun, syamraj24.
Fixes #57174.


git-svn-id: https://develop.svn.wordpress.org/trunk@54904 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 23:44:27 +00:00
Andrew Ozz
ef0c1d1dd2 Media: Fix the initialization of imgAreaSelect when cropping a header image or a site icon or logo.
Props alshakero, arthur791004, nmutua, desrosj, audrasjb, ironprogrammer, obenland, costdev, ajmaurya.
Fixes #54308, #55377.

git-svn-id: https://develop.svn.wordpress.org/trunk@54903 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 22:12:53 +00:00
Sergey Biryukov
32f884aa8c Twenty Seventeen: Fix comment indentation in twentyseventeen_setup().
Follow-up to [38833], [42343]

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54902 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 22:10:04 +00:00
Jb Audras
a2485d0e8b Coding Standards: Use consistent markup for line break tags on update-core.php.
This changeset replaces <br/> with <br /> on various places, as per WordPress Coding Standards.
See https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/#self-closing-elements

Follow-up to [54062].

Props rajanpanchal2028, alberuni-azad, sabernhardt.
Fixes #57226.
See #56791.


git-svn-id: https://develop.svn.wordpress.org/trunk@54897 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 21:28:01 +00:00
Sergey Biryukov
8e44ab05a6 Coding Standards: Fix spacing for incrementors and decrementors in various files.
Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54896 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 21:11:42 +00:00
Sergey Biryukov
4b55a18d23 Coding Standards: Always use strict type check for in_array().
This fixes the currently flagged `WordPress.PHP.StrictInArray.MissingTrueStrict` issues:
* `Not using strict comparison for in_array; supply true for third argument.`

These all do comparisons with strings, so all the more reason why it is imperative that a strict comparison is used.

Follow-up to [47550], [47557], [54155], [53480].

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54895 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 20:58:26 +00:00
Dominik Schilling
35421f2b07 Query: Account for primed post caches without primed post meta/term caches.
In [54352] `update_post_caches()` was replaced by `_prime_post_caches()` to reduce excessive object cache calls. That's because `_prime_post_caches()` checks first if post IDs aren't already cached. Unfortunately this becomes an issue if a post itself is cached but not the meta/terms.
To fix this regression, `_prime_post_caches()` now always calls `update_postmeta_cache()` and `update_object_term_cache()` depending on the arguments passed to it. Both functions internally check whether IDs are already cached so the fix from [54352] remains in place.

Props peterwilsoncc, spacedmonkey, ocean90.
Fixes #57163.

git-svn-id: https://develop.svn.wordpress.org/trunk@54894 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 20:27:29 +00:00
Sergey Biryukov
e50c65caf4 Coding Standards: Always use parentheses when instantiating an object.
Note: This will be enforced by WPCS 3.0.0.

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54891 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 15:49:49 +00:00
Sergey Biryukov
6821cb07ef Coding Standards: Add visibility to properties in tests/phpunit/tests/.
Adds a `private` visibility to some test class properties where it was not explicitly specified. This continues the previous efforts to make sure visibility is declared on all properties. 

Note: This will be enforced by WPCS 3.0.0.

Follow-up to [49184], [51919], [52009], [52010], [54889].

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54890 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 12:40:08 +00:00
Sergey Biryukov
8f86cdb2e0 Coding Standards: Add visibility to methods in tests/phpunit/tests/.
Adds a `public` visibility to test fixtures, tests, data providers, and callbacks methods. This continues the previous efforts to make sure visibility is declared on all methods. 

Note: This will be enforced by WPCS 3.0.0.

Follow-up to [51919], [52009], [52010].

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54889 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-29 12:32:37 +00:00
Sergey Biryukov
5cb17e222d Comments: Make moderated or disallowed key check case-insensitive for non-Latin words.
The `check_comment()` and `wp_check_comment_disallowed_list()` functions are expected to be case-insensitive, but that only worked for words using Latin script and consisting of ASCII characters.

This commit adds the Unicode flag to the regular expression used for the check in these functions, so that both pattern and subject can be treated as UTF-8 strings.

Reference: [https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php PHP Manual: Pattern Modifiers].

Follow-up to [984], [2075], [48121], [48575].

Props bonjour52, SergeyBiryukov.
Fixes #57207.

git-svn-id: https://develop.svn.wordpress.org/trunk@54888 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-28 19:42:56 +00:00
Bernie Reiter
82c93776aa Twenty Twenty-Three: In page template, make post titles links.
In the "Blog (alternative)" page template, turn post titles into links. This is to better align with user expectations that individual post titles in a blog-like list of recent posts will be links to the corresponding blog posts.

Props scruffian.
Fixes #57175.

git-svn-id: https://develop.svn.wordpress.org/trunk@54887 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-28 15:11:03 +00:00
Sergey Biryukov
bdc2084b30 Twenty Twenty-One: Add a comment for the closing h2 tag in author info template.
This brings consistency with the `.comments-title` heading in the `comments.php` template.

Follow-up to [49216], [50234].

Props haritpanchal, sabernhardt, mukesh27.
Fixes #56476.

git-svn-id: https://develop.svn.wordpress.org/trunk@54886 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-27 10:32:44 +00:00
Jb Audras
176f9a787b Twenty Nineteen: Remove useless title attributes.
This changeset removes `title` attributes from links, as they are adding redundant information.

Props sabernhardt.
See #57199, #24766, #24203.


git-svn-id: https://develop.svn.wordpress.org/trunk@54885 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 22:41:42 +00:00
Jb Audras
720264ddbb Twenty Eleven: Remove useless title attributes.
This changeset removes `title` attributes from various links, as they are adding redundant information.

Props sabernhardt.
See #57199, #24766, #24203.


git-svn-id: https://develop.svn.wordpress.org/trunk@54884 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 22:37:20 +00:00
Jb Audras
dc47e5d6dc Docs: Add missing parameter descriptions in wp-admin/includes/template.php.
Props mahekkalola, costdev, audrasjb, riccardodicurti.
Fixes #57208.
See #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54883 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 22:16:27 +00:00
audrasjb
30cce7dd3f Twenty Ten: Fixes brace indentation in loop-attachment template.
Props mukesh27.
See #57210, #56791.


git-svn-id: https://develop.svn.wordpress.org/trunk@54882 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 22:01:01 +00:00
Jb Audras
1111d2b9e6 Coding Standards: Various brace indentation corrections.
Props mukesh27.
Fixes #57210.
See #56791.


git-svn-id: https://develop.svn.wordpress.org/trunk@54881 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 20:59:05 +00:00
Sergey Biryukov
4c0e7708b4 Coding Standards: Correct the deprecation version for _filter_query_attachment_filenames().
Follow-up to [54524].

Props jrf.
See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54878 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 16:11:01 +00:00
Jb Audras
78fc04c1cc Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul.
See #57069, #56792.



git-svn-id: https://develop.svn.wordpress.org/trunk@54877 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 09:37:18 +00:00
Jb Audras
b7931895c5 Coding Standards: Fix brace indentation in wp-align/includes/noop.php.
Props alberuni-azad.
Fixes #57209.
See #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54876 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-26 09:10:28 +00:00
Sergey Biryukov
b2a8c63881 Docs: Correct the type for _WP_Dependency::$src property.
The handle source can be set to `false`, which means the item is an alias of other items it depends on.

Follow-up to [7970], [25518], [43661], [47170], [48462], [54470].

Props mehulkaklotar, swissspidy, costdev.
Fixes #57206.

git-svn-id: https://develop.svn.wordpress.org/trunk@54875 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-25 15:10:48 +00:00
Jb Audras
808d6a1909 Docs: Various docblock fixes in Block Supports related functions.
See #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54874 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-24 22:50:16 +00:00
Jb Audras
3dc1236245 Docs: Use third-person singular verbs for Block Supports related function descriptions, as per docblocks standards.
See #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54873 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-24 22:34:13 +00:00
Jb Audras
d19f5f0170 Coding Standards: Remove extra slashes when concatenating ABSPATH with a path.
Since `ABSPATH` is defined and documented to end with a forward slash `/`, this changeset removes the first `/` from strings appended to `ABSPATH` in various files, leading to `//` in the resulting path.

Props TobiasBg, audrasjb, SergeyBiryukov, emanuelx.
Fixes #57074.
See #57071.


git-svn-id: https://develop.svn.wordpress.org/trunk@54872 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-24 22:09:39 +00:00
Jb Audras
bb948c5f6d Plugins: Improve "No plugin found" message alignement in Plugins screen.
This changeset centers the "No plugin found" message in plugin search results.

Follow-up to [54149].

Props sruthi90, aparnajl, krupalpanchal, audrasjb, anantajitjg.
Fixes #57194.
See #55721, #55272.


git-svn-id: https://develop.svn.wordpress.org/trunk@54871 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-24 15:36:42 +00:00
Sergey Biryukov
4e24a65a1b Coding Standards: Use HOUR_IN_SECONDS where appropriate.
This aims to clarify the time units for some time offset values.

Follow-up to [21996], [23823], [40108], [41626].

See #56791.

git-svn-id: https://develop.svn.wordpress.org/trunk@54870 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-24 14:16:18 +00:00
Jb Audras
a9c3d2a2ed Twenty Nineteen: Remove the incorrect "flexible-header" tag.
This changeset removes the "flexible-header" tag from Twenty Nineteen, since the requirements for using this tag is that the theme includes support for a custom header with the flex-height and/or flex-width parameters, and Twenty Nineteen does not have support for header image.

Props poena, mukesh27, laurelfulford, audrasjb.
Fixes #46213.


git-svn-id: https://develop.svn.wordpress.org/trunk@54869 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-23 22:21:20 +00:00
Jb Audras
34ffd3a466 Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul.
See #57069, #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54868 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-23 21:34:24 +00:00
Jb Audras
54d392e8d7 Docs: Improve various globals documentation, as per documentation standards.
Props upadalavipul, mukesh27, krupalpanchal, jigar-bhanushali.
See #57069, #56792.


git-svn-id: https://develop.svn.wordpress.org/trunk@54867 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-23 21:28:15 +00:00
Sergey Biryukov
04f55a430e Docs: Revise comments using “we” in WordPress root directory files.
This updates some inline comments to better match the guidelines and recommendations set forth in the make/core and make/docs handbooks:

> In general, use second person in your documentation. Second person depicts a friendly tone, with a perfect focus on the reader. In addition to this, directly addressing the reader helps avoid passive voice; thereby preventing unwanted confusion.
> ...
> the word “we” should be avoided (...) unless its made very clear which group is speaking.

Includes:
* Replacing first-person usage of "we" with second person point of view.
* Making small clarification adjustments where the voice is much too casual or lacks clear context, especially for non-native English speakers.

References:
* [https://make.wordpress.org/docs/style-guide/language-grammar/grammatical-person/ Style Guide: Grammatical person]
* [https://make.wordpress.org/docs/handbook/documentation-team-handbook/handbooks-style-and-formatting-guide/ Handbooks & HelpHub Style and Formatting Guide]
* [https://make.wordpress.org/core/handbook/best-practices/post-comment-guidelines/#style-and-substance Post & Comment Guidelines: Style and Substance]

Follow-up to [2176], [3430], [4676], [6009], [7991], [12688], [12762], [26008], [28978], [44488], [44962], [51979], [53131], [53132], [53156], [53131], [54200].

Props ironprogrammer, costdev, jorbin, SergeyBiryukov.
See #57052.

git-svn-id: https://develop.svn.wordpress.org/trunk@54866 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-23 15:41:39 +00:00
Sergey Biryukov
e385beb747 Tests: Correct references to set_up() and tear_down() in various DocBlocks.
The `setUp()` and `tearDown()` methods were renamed to `set_up()` and `tear_down()`, respectively, as part of implementing the `void` return type solution for PHPUnit 8.0.

Follow-up to [29120], [29251], [30277], [32173], [32806], [38829], [42379], [50450], [51276], [51568].

See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54865 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-22 21:25:27 +00:00
Sergey Biryukov
95d11878b0 Tests: Clean up test file in wpmu_delete_blog() tests.
This makes sure there are no leftover files after the tests from the `multisite` directory are run separately.

Follow-up to [30404].

See #56793.

git-svn-id: https://develop.svn.wordpress.org/trunk@54864 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-22 20:17:08 +00:00
Sergey Biryukov
ea651b1fc1 Tests: Add unit tests for attachment’s file size being included in metadata.
These tests ensure that `wp_generate_attachment_metadata()` stores the file size of all newly uploaded attachments under the `filesize` array key. The tests were initially supposed to be committed with [52837].

Follow-up to [52837], [52932], [54861].

Props spacedmonkey, johnwatkins0, mitogh, adamsilverstein, pbearne, SergeyBiryukov.
Fixes #57171.

git-svn-id: https://develop.svn.wordpress.org/trunk@54863 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-22 19:43:25 +00:00
Sergey Biryukov
9ed27339b1 Tests: Add a public visibility to wp_filesize() tests.
Follow-up to [52010], [52837], [52932], [54861].

See #57171.

git-svn-id: https://develop.svn.wordpress.org/trunk@54862 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-22 15:09:33 +00:00
Sergey Biryukov
e507aee79f Tests: Move wp_filesize() tests to their own file.
This aims to make the tests more discoverable and easier to expand.

Includes splitting the `wp_filesize` and `pre_wp_filesize` filter tests into a separate test case.

Follow-up to [52837], [52932], [54402].

Props pbearne, spacedmonkey, SergeyBiryukov.
See #57171.

git-svn-id: https://develop.svn.wordpress.org/trunk@54861 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-22 15:02:26 +00:00
Sergey Biryukov
239a6c33ec Site Editor: Show correct theme per template or template part.
Child themes inherit templates and template parts from the parent theme. In Site Editor, the "Added by" column for a template defaults to displaying the child theme, even though it is inherited from the parent, creating confusion as to where the actual templates are located.

This commit ensures that the parent theme is correctly displayed in that scenario.

Follow-up to [51003], [52062].

Props ptahdunbar, WoutPitje, petaryoast, costdev, poena, audrasjb, SergeyBiryukov.
Fixes #55437.

git-svn-id: https://develop.svn.wordpress.org/trunk@54860 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-21 16:48:33 +00:00
Sergey Biryukov
d2f420493d Docs: Fix typo and improve DocBlock formatting in wp-admin/install-helper.php.
Follow-up to [236], [265], [8645], [30542].

See #56792.

git-svn-id: https://develop.svn.wordpress.org/trunk@54859 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-20 14:08:38 +00:00
Sergey Biryukov
cfd09a4127 Coding Standards: Fix WPCS issues in wp-admin/install-helper.php.
This commit adds inline comments instructing PHPCS to ignore some lines for database queries. An explanation is provided with each instruction.

This resolves a few WPCS warnings along the lines of:
{{{
Use placeholders and $wpdb->prepare(); found interpolated variable $table_name at "DESC $table_name"
}}}

Follow-up to [236], [265], [5778].

Props jipmoors, costdev, jrf, SergeyBiryukov.
Fixes #43761.

git-svn-id: https://develop.svn.wordpress.org/trunk@54858 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-19 15:40:11 +00:00
Sergey Biryukov
868709a4e7 Users: Add missing escaping on the Add New User screen.
While the `$type` and `$label` variables are set to values that do not currently require escaping, this may change in the future, so it is preferable to add the escaping as a defensive coding measure.

Follow-up to [16294], [29030].

Props monzuralam, rudlinkon, hztyfoon, peterwilsoncc.
Fixes #57133.

git-svn-id: https://develop.svn.wordpress.org/trunk@54857 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-18 15:19:07 +00:00
Jonathan Desrosiers
4b5931521b Build/Test Tools: Improve how Composer dependencies are installed.
To improve how Composer dependencies are installed and managed within GitHub Actions, the `ramsey/composer-install` third-party action is now used consistently throughout all workflows.

Previously, some workflows manually ran `composer` commands while others already used `ramsey/composer-install`.

The `ramsey/composer-install` action manages caching dependencies across workflow runs internally, which is something that was manually handled before this change.

Props jrf, desrosj.
Fixes #53841.

git-svn-id: https://develop.svn.wordpress.org/trunk@54856 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-18 14:50:52 +00:00
Sergey Biryukov
acbbee8a11 Docs: Update various DocBlocks and inline comments per the documentation standards.
Includes minor formatting edits for consistency.

Follow-up to [53/tests], [12179], [12946], [35288], [37884], [38810], [38928], [46596], [48131], [52955], [53548], [53813], [53873], [54118], [54316], [54420], [54421], [54803].

See #56792.

git-svn-id: https://develop.svn.wordpress.org/trunk@54855 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-17 18:13:47 +00:00
Sergey Biryukov
a71d7373ad Docs: Update wp_count_posts and wp_count_attachments filter descriptions.
This aims to match the wording generally used for other filters as per the documentation standards.

Follow-up to [25554], [25578], [25579], [53456].

See #56792.

git-svn-id: https://develop.svn.wordpress.org/trunk@54854 602fd350-edb4-49c9-b593-d223f7449a82
2022-11-17 17:05:21 +00:00