Commit Graph

20269 Commits

Author SHA1 Message Date
Jb Audras
92e77c6793 Docs: Use third-person singular verbs for function descriptions in the WP_Network class.
See #55646.


git-svn-id: https://develop.svn.wordpress.org/trunk@53397 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-15 20:26:08 +00:00
Sergey Biryukov
3da312a954 Query: Check if $wp_query is set in is_main_query().
This avoids a PHP fatal error and triggers a `_doing_it_wrong()` notice if `is_main_query()` is called too early, bringing consistency with all the other `is_*()` conditionals: `is_single()`, `is_home()`, etc.

Follow-up to [16947], [17068], [17083], [18699], [37985].

Props vdankbaar, nhadsall, johnbillion, costdev, thijsoo, teunvgisteren, timkersten655, SergeyBiryukov.
Fixes #55104.

git-svn-id: https://develop.svn.wordpress.org/trunk@53395 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-14 15:08:58 +00:00
Sergey Biryukov
44cd1981b9 Database: Use generic references to a database server in ms_not_installed().
This replaces the references to “MySQL” with “your host’s database server” on the “Error establishing a database connection” page when Multisite could not be loaded. The generic “database server” term can refer to MySQL or MariaDB. Additionally, this brings some consistency with a similar error message in `wpdb::db_connect()`.

Follow-up to [52367], [52423].

Props tj692, hansjovisyoast, tobifjellner.
Fixes #55701.

git-svn-id: https://develop.svn.wordpress.org/trunk@53394 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-13 12:19:35 +00:00
Sergey Biryukov
0907c144a8 Docs: Replace Codex URL with a corresponding HelpHub article in the Additional CSS section in Customizer.
Follow-up to [45674-45677], [46740], [49912].

Props stevenlinx, audrasjb.
Fixes #55710. See #48987.

git-svn-id: https://develop.svn.wordpress.org/trunk@53393 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-12 17:55:30 +00:00
Jb Audras
e7962e19ad Taxonomy: Set use_desc_for_title to false by default in wp_list_categories()
This change removes the default `title` attribute of category links returned by `wp_list_categories()`, for better accessibility.

Props just0nequestion, joyously, andrija, audrasjb, sabernhardt.
Fixes #55530.
See #24766.


git-svn-id: https://develop.svn.wordpress.org/trunk@53392 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-12 14:04:59 +00:00
Sergey Biryukov
0366002fcf Menus: Replace "drop down" (noun) with "dropdown" in a few strings.
This makes the spelling more consistent with other instances of the word in core.

Follow-up to [23844], [27676].

Props NekoJonez, mukesh27, SergeyBiryukov.
Fixes #55661.

git-svn-id: https://develop.svn.wordpress.org/trunk@53391 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-11 13:20:13 +00:00
Jb Audras
4083456e42 Twenty Twenty-One: i18n fix for privacy policy section title.
This change makes the Twenty Twenty-One privacy policy section title translatable.

Props nlpro.
Fixes #55709.


git-svn-id: https://develop.svn.wordpress.org/trunk@53390 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-11 08:44:35 +00:00
Kelly Choyce-Dwan
c25f79f21a Administration: Update design of the Dashboard welcome panel.
This updates the panel to match the 6.0 About page styles, with the 6.0 graphic changing color based on the selected admin color scheme.

Props fcoveram, critterverse, joedolson, SergeyBiryukov.
Fixes #55532.



git-svn-id: https://develop.svn.wordpress.org/trunk@53383 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 16:43:44 +00:00
Kelly Choyce-Dwan
41ec9fc4e8 Help/About: Update the About section for 6.0.
Switch the images to use the s.w.org CDN. Update the font style and spacing on the About page. Update the header images for Credits, Freedoms, and Privacy.

Props fcoveram, peterwilsoncc, SergeyBiryukov.
Fixes #55434.



git-svn-id: https://develop.svn.wordpress.org/trunk@53382 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 16:31:30 +00:00
Greg Ziółkowski
619693e75f Editor: Update WordPress packages for 6.0 RC 2 (part 2)
Includes cherry-picked commit from the Gutenberg plugin that fix a bug discovere just before WordPress 6.0 RC 2.

Props hellofromtonya, zieladam, kebbet.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53378 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 15:55:57 +00:00
Greg Ziółkowski
7912e9f631 Editor: Update WordPress packages for 6.0 RC 2
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 RC 1.

Props zieladam, ndiego, hellofromtonya.
See #55567.




git-svn-id: https://develop.svn.wordpress.org/trunk@53377 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 14:47:10 +00:00
Sergey Biryukov
0ddfd1aa04 Coding Standards: Restore the $pieces variable for SQL clauses in query classes.
This is a defensive coding measure that aims to reduce confusion. With this change, `$pieces` is explicitly used for the names, and `$clauses` for the values of the clauses.

Follow-up to [52974], [53175], [53370], [53375].

Props peterwilsoncc.
See #55699.

git-svn-id: https://develop.svn.wordpress.org/trunk@53376 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 11:19:51 +00:00
Sergey Biryukov
0c506aabc0 Coding Standards: Restore the $pieces variable in WP_Query::get_posts().
This is a defensive coding measure that aims to reduce confusion. With this change, `$pieces` is explicitly used for the names, and `$clauses` for the values of the clauses.

Follow-up to [52974], [53175], [53370].

Props peterwilsoncc.
See #55699.

git-svn-id: https://develop.svn.wordpress.org/trunk@53375 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 11:15:28 +00:00
Peter Wilson
f42475145f Media: Remove error suppression in wp_filesize().
Replace error suppressing in `wp_filesize()` with a `file_exists()` check before calling the native PHP `filesize()` function.

Follow up to [52837].

Props Cybr, johnbillion, spacedmonkey, antpb, azouamauriac, ironprogrammer, mukesh27, costdev, audrasjb, dlh.
Fixes #55678.
See #49412.


git-svn-id: https://develop.svn.wordpress.org/trunk@53372 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-10 05:00:15 +00:00
Sergey Biryukov
90f953603b Query: Restore late compact() call for the posts_clauses_request filter.
This addresses a backward compatibility break where `posts_join_request` and other filters were applied, but their results were subsequently discarded and earlier values were used instead.

Follow-up to [52974], [53175].

Props 5um17, johnbillion, SergeyBiryukov.
Fixes #55699.

git-svn-id: https://develop.svn.wordpress.org/trunk@53370 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-09 13:49:29 +00:00
Peter Wilson
d8ef0cd52e Script Loader: Explain why i18n prevents concatenation.
Add inline comment to `WP_Scripts::do_item()` explaining why the definition of a text domain prevents concatenation.

Follow up to [53360].

Fixes #55628.
Props SergeyBiryukov.



git-svn-id: https://develop.svn.wordpress.org/trunk@53366 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-08 23:57:19 +00:00
Sergey Biryukov
91fe405d61 Code Modernization: Rename parameters to match native PHP functions in wp-includes/compat.php.
This ensures that parameter names for PHP polyfills in WordPress core 100% match the native PHP parameter names. Otherwise using named parameters with those functions could cause fatal errors for installs where the polyfills kick in.

This commit:
* Renames the `$string` parameter to `$message` in `_()` polyfill.
* Renames the `$str` parameter to `$string` in `mb_substr()` and `mb_strlen()` polyfills.
* Renames the `$raw_output` parameter to `$binary` in `hash_hmac()` polyfill.
* Renames the `$a` and `$b` parameters to `$known_string` and `$user_string` in `hash_equals()` polyfill.
* Renames the `$var` parameter to `$value` in `is_countable()` and `is_iterable()` polyfills.
* Renames the `$arr` parameter to `$array` in `array_key_first()` and `array_key_last()` polyfills.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55650.

git-svn-id: https://develop.svn.wordpress.org/trunk@53365 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-08 00:27:41 +00:00
Sergey Biryukov
e4fbdea354 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/template.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 `$parent` parameter to `$parent_page` in `parent_dropdown()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55650.

git-svn-id: https://develop.svn.wordpress.org/trunk@53364 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-07 17:14:20 +00:00
Sergey Biryukov
3f7cfd9ac6 Coding Standards: Remove extra space in wp-admin/admin-ajax.php.
Props rajeshraval786, costdev.
Fixes #55692.

git-svn-id: https://develop.svn.wordpress.org/trunk@53363 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-07 16:19:53 +00:00
Peter Wilson
e17a83df22 Users: Allow any DB field to be returned by WP_User_Query.
Restore behaviour of `fields` parameter in `WP_User_Query` to allow developers to specify any database field to be returned either individually or as part of a subset. Add these fields to the documentation.

When a subset of `fields` includes the `id` paramater, include it in the results in both upper and lowercase to maintain backward compatibility.

Follow up to [53327].

Props dd32, pbearne, kraftbj, peterwilsoncc.
Fixes #53177.



git-svn-id: https://develop.svn.wordpress.org/trunk@53362 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-07 03:30:51 +00:00
Peter Wilson
09923cc040 Script Loader: Fix i18n edge case breaking dependencies.
Prevent concatenation of scripts if the text domain is defined to ensure the dependency order is respected. 

This accounts for an edge case in which replacing a core script via a plugin and a lack of translations (eg, for a US English site) could cause the JavaScript files to be ordered incorrectly.

Follow up to [52937].

Props audrasjb, boniu91, chaion07, costdev, hellofromtonya, jsnajdr, mukesh27, ndiego, ugyensupport.
Fixes #55628.


git-svn-id: https://develop.svn.wordpress.org/trunk@53360 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-07 02:51:54 +00:00
Sergey Biryukov
62040b8b9d Site Health: Remove unused variables in WP_Site_Health::get_test_plugin_version().
Follow-up to [44986].

Props david.binda, mukesh27.
Fixes #55683.

git-svn-id: https://develop.svn.wordpress.org/trunk@53355 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-05 16:27:30 +00:00
Kelly Choyce-Dwan
94e4dfdb23 Help/About: Add link to 6.0 Field Guide, fix missing placeholder in string.
Props audrasjb.
Follow-up to [53339].
See #55434.



git-svn-id: https://develop.svn.wordpress.org/trunk@53354 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-05 15:33:07 +00:00
Peter Wilson
b27069117e Quick/Bulk Edit: Remove duplicate HTML IDs.
Rename `#inline-edit-legend` to avoid duplicate HTML IDs. These have been renamed `#quick-edit-legend` and `#bulk-edit-legend` for the quick and bulk editors respectively.

This HTML ID is not required by the quick editor duplicated via JavaScript so is removed as part of the duplication process.

Follow up to [53096].

Props azaozz, costdev, greglone, hellofromtonya, ironprogrammer, joedolson, sabernhardt.
Fixes #55575.
See #35483.



git-svn-id: https://develop.svn.wordpress.org/trunk@53352 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-05 03:24:33 +00:00
Sergey Biryukov
ae9e0bb74f Trunk is now 6.1-alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@53344 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 17:38:14 +00:00
Sergey Biryukov
64025d0abe Post WordPress 6.0 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53341 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 17:13:20 +00:00
Sergey Biryukov
6d93192ee9 WordPress 6.0 RC1
git-svn-id: https://develop.svn.wordpress.org/trunk@53340 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 16:44:39 +00:00
Kelly Choyce-Dwan
2b17e69e72 Help/About: Update the About section for 6.0.
This is the start of the WordPress 6.0 about page, introducing new content and a first pass of the new style.

Props fcoveram, estelaris, JeffPaul, critterverse, chanthaboune, dansoschin, webcommsat, annezazu, marybaum, cbringmann, eidolonnight, laurlittle, sergeybiryukov.
See #55434.



git-svn-id: https://develop.svn.wordpress.org/trunk@53339 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 16:26:53 +00:00
Tonya Mork
4023853156 Editor: Update WordPress packages for 6.0 RC1.
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 Beta 4.

Props gziolo, zieladam, ndiego.

See #55567.

git-svn-id: https://develop.svn.wordpress.org/trunk@53338 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 14:58:54 +00:00
Jb Audras
929e4e4f9e General: Add missing strong tag to some error messages.
This changeset adds missing `strong` tag to some error messages and updates some AJAX messages, for better consistency.

Follow-up to [53118].

Props NekoJonez, audrasjb, ocean90.
Fixes #54437.


git-svn-id: https://develop.svn.wordpress.org/trunk@53337 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 14:51:41 +00:00
Tonya Mork
6dab53e93b Editor: Sets 'paged' query arg only when there are comments: build_comment_query_vars_from_block().
A SQL syntax error happened when a post has no comments and "Break comments into pages" is checked in Settings > Discussion. The fix sets the `'paged'` query arg only when there are comments. When there are no comments, `WP_Comment_Query` sets the default `'paged'` value to `1`.

Props bernhard-reiter, luisherranz, czapla, cbravobernal, davidbaumwald, hellofromTonya.

Follow-up to [53142], [53138].
Fixes #55658.

git-svn-id: https://develop.svn.wordpress.org/trunk@53336 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 14:31:12 +00:00
Sergey Biryukov
4558de543c Post WordPress 6.0 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53335 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 16:42:03 +00:00
Sergey Biryukov
74dd0397fc WordPress 6.0 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@53334 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 16:08:37 +00:00
Tonya Mork
dc3204ec1d REST API: Fixes /wp/v2/pattern-directory/patterns endpoint response for slug parameter.
[53218] introduced a bug of a wrong response from the `wp/v2/pattern-directory/patterns` endpoint with a `slug` parameter. As the response is cached, it can result in an incorrect list of available patterns supported by the current theme.

This commit resolves by:

* Limiting the `slug` to an `array` in the query parameters.
* When set, parsing and sorting the slug(s) and then serializing the sorted query args as part of the hashed transient keys.

Props antonvlasenko, timothyblynjacobs, spacedmonkey, costdev, hellofromTonya.

Follow-up to [53218], [53152], [51208].
Fixes #55617.

git-svn-id: https://develop.svn.wordpress.org/trunk@53333 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:58:48 +00:00
Jb Audras
9e6e4b5893 Docs: Correct parameter types for serialize_block() and serialize_blocks().
This changeset clarifies the expected type for the first parameter passed to `serialize_block()` and `serialize_blocks()` functions.

Props manooweb.
Fixes #55648.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53332 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:30:47 +00:00
Sergey Biryukov
50f2d7da7d Docs: Remove @return void from various DocBlocks.
Per the documentation standards, it should not be used outside of the default bundled themes.

Follow-up to [38767], [47055], [49697], [50956], [51003], [52069], [53255].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53331 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:11:07 +00:00
Sergey Biryukov
a913b7312d Docs: Improve plugin_install_action_links filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Follow-up to [53074], [53328].

Props afragen, pbiron.
See #55480.

git-svn-id: https://develop.svn.wordpress.org/trunk@53330 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:05:53 +00:00
Greg Ziółkowski
e0837a8b18 Editor: Update WordPress packages for 6.0 Beta 4
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 3.

Props zieladam, ndiego, darerodz.
See #55567.




git-svn-id: https://develop.svn.wordpress.org/trunk@53329 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 10:36:45 +00:00
Peter Wilson
1b9551de27 Plugins: Improve plugin_install_description filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Props afragen, pbiron, SergeyBiryukov, costdev.
Fixes #55480.



git-svn-id: https://develop.svn.wordpress.org/trunk@53328 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 02:44:04 +00:00
Peter Wilson
63f3914e51 Users: Validate WP_User_Query's fields argument.
Improve validation of `WP_User_Query`'s `fields` argument when passed as an array to ensure it only accepts permitted values. This prevents the invalid values being included in the generated database query.

Expand unit tests to include passing invalid values as part of an array, the lower case value `id`. Correct earlier unit tests to limit database query to one result.

Follow up to [53255].

Props felipeelia.
Fixes #53177.



git-svn-id: https://develop.svn.wordpress.org/trunk@53327 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 00:11:48 +00:00
Jb Audras
a6afe726b9 Coding standards: Remove extra spaces in docblocks of the Walker_PageDropdown class.
Follow-up to [51779].

See #54728.


git-svn-id: https://develop.svn.wordpress.org/trunk@53325 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 21:59:49 +00:00
Jb Audras
50add1e31b Docs: Clarify the name and description of some parameters in the Walker class.
Follow-up to [53323].
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53324 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 21:45:56 +00:00
Jb Audras
4cfee4c129 Docs: Docblock adjustements in the Walker class.
This changeset ensures third-person singular verbs are used for function descriptions in the `Walker` class, and adjusts some non-standard docblock descriptions for various properties and methods of the class.

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53323 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 21:39:02 +00:00
John Blackbourn
84be1644cd Docs: Improve documentation of the walker argument for various functions.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53318 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 19:27:00 +00:00
John Blackbourn
09cdb9a9bf Docs: Formatting corrections for various docblocks.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53317 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 19:22:56 +00:00
John Blackbourn
08fb48315a Docs: Corrections and improvements to docblocks for function and hooks relating to fatal error handling.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53316 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 19:15:57 +00:00
John Blackbourn
5612331504 REST API: Correct the schema for the wp/v2/block-directory/search endpoint.
Props zieladam, TimothyBlynJacobs, spacedmonkey, johnbillion

Fixes #53621


git-svn-id: https://develop.svn.wordpress.org/trunk@53315 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 16:53:55 +00:00
Sergey Biryukov
b840fb84ee Docs: Further clarify a comment for the main part of wp-login.php.
Follow-up to [52945].

Fixes #54746.

git-svn-id: https://develop.svn.wordpress.org/trunk@53313 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 14:35:01 +00:00
Greg Ziółkowski
2b0a984227 Editor: Fix core 'Featured' pattern category registration
Backports changes from https://github.com/WordPress/gutenberg/pull/40650.

Patch fixes regression, and moves core "Featured" pattern category registration from `_load_remote_featured_patterns` into `_register_core_block_patterns_and_categories`.

Follow-up [53152].
Props mamaduka, ntsekouras.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53312 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 14:08:44 +00:00
Jonny Harris
5866165adf Taxonomy: Increase cache hits in WP_Term_Query when using include and exclude parameters.
Ensure that empty values of include and exclude passed to the parameters of `WP_Term_Query`, reused existing caches by 
resetting values to an empty array. 

Props Spacedmonkey, peterwilsoncc, hellofromtonya.
Follow-up to [52970].
See #55352.



git-svn-id: https://develop.svn.wordpress.org/trunk@53309 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 12:34:35 +00:00