43731 Commits

Author SHA1 Message Date
Greg Ziółkowski
0df28171ed Editor: Enqueue assets for format library for the block editor
Ensures that `wp-format-library` assets are always loaded for the block editor. Otherwise, they have to be loaded individually for every screen that needs it. It's similar to how `wp-block-directory` assets are handled.

Props ellatrix.
See #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50620 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-31 05:50:50 +00:00
Jonathan Desrosiers
234c477159 External Libraries: Update polyfill versions in the script loader.
Follow up to [50615, 50617].

See #52854.

git-svn-id: https://develop.svn.wordpress.org/trunk@50619 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 17:55:05 +00:00
Sergey Biryukov
4a8aefaf72 Coding Standards: Remove some extra whitespace in _wp_translate_postdata().
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50618 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 15:17:05 +00:00
Jonathan Desrosiers
ac322e8d70 External Libraries: Update the path to polyfill-library files in Webpack.
Follow up to [50615].

Props gziolo.
Fixes #52854.

git-svn-id: https://develop.svn.wordpress.org/trunk@50617 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 14:47:04 +00:00
Sergey Biryukov
722ce44ead Docs: Add documentation for the ::setup_export_contents_test method used in personal data export tests.
Follow-up to [50613].

Props hellofromTonya.
See #51423.

git-svn-id: https://develop.svn.wordpress.org/trunk@50616 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 14:22:48 +00:00
Jonathan Desrosiers
04ff8f4561 External Libraries: Update several polyfill libraries.
This updates the following polyfill libraries:

- `formdata-polyfill` from `3.0.13` to `3.0.20`.
- `objectFitPolyfill` from `2.3.4` to `2.3.5`.
- `polyfill-library` from `3.42.0` to `3.104.0`.

Props gziolo, desrosj.
Fixes #52854.

git-svn-id: https://develop.svn.wordpress.org/trunk@50615 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-30 14:14:57 +00:00
David Baumwald
32e8cd1c2d Docs: Fix indentation for wp_term_query->construct method parameters.
The `fields` and `orderby` properties in `WP_Term_Query` are arrays and each accepts a variety of keys.  To properly indent each key in the docblock, a `*` should be used, not `-`.

Props whyisjake, audrasjb, SergeyBiryukov.
Fixes #52839.

git-svn-id: https://develop.svn.wordpress.org/trunk@50614 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-29 21:33:32 +00:00
Sergey Biryukov
1dafd53d20 Code Modernization: Check if the _export_data_grouped post meta is an array when generating a personal data export file.
This avoids a fatal error on PHP 8 in `wp_privacy_generate_personal_data_export_file()` if the `_export_data_grouped` post meta exists but is not an array.

Additionally, refactor unit tests for the function to:
* Reduce redundant code
* Switch to data provider
* Test on the full HTML output instead of select pieces of the output
* Expand unhappy path coverage

Follow-up to [43012], [44786], [47146], [47278].

Props hellofromTonya, jrf, xknown.
See #51423.

git-svn-id: https://develop.svn.wordpress.org/trunk@50613 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-29 19:35:36 +00:00
Sergey Biryukov
74162c8c39 Build/Test Tools: Remove explicit puppeteer dependency.
This was added in [48177] to fix an issue where Puppeteer was not being installed correctly as a dependency of `@wordpress/wp-scripts`. This has been fixed, so this explicit dependency can be removed.

Props isabel_brison, desrosj, SergeyBiryukov.
Fixes #52843.

git-svn-id: https://develop.svn.wordpress.org/trunk@50612 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-29 18:05:47 +00:00
Sergey Biryukov
6b8b57dfbb Login and Registration: Add the "Error:" prefix to some password reset messages.
This makes the messages more consistent with other error messages related to authentication and registration.

Follow-up to [50589].

Props dd32.
Fixes #52914.

git-svn-id: https://develop.svn.wordpress.org/trunk@50611 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-28 10:22:10 +00:00
Sergey Biryukov
1b5f02c558 Docs: Spell "non-existent" in a consistent way.
See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50610 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-27 13:32:55 +00:00
Jonathan Desrosiers
7ef4f7c197 Build/Test Tools: Update some devDependencies.
This updates the following `devDependencies`:

- `sinon` from `9.2.4` to `10.0.0`.
- `uglify-js` from `3.13.1` to `3.13.2`.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50598 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 15:45:04 +00:00
Jonathan Desrosiers
b0ba22fcaf Twenty Twelve: Change theme version back to 3.3.
Because the changes in Twenty Twelve did not impact site look or functionality, version 3.4 of Twenty Twelve was not released in coordination with WordPress 5.7.

This reverts the portion of [50508] relevant to Twenty Twelve, changing the version back to 3.3 so that version 3.4 is not skipped accidentally when there are changes that should be released.

See #52704.

git-svn-id: https://develop.svn.wordpress.org/trunk@50596 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 15:26:08 +00:00
Jonathan Desrosiers
5e85c8fb69 Build/Test Tools: Run code coverage workflow when the file is updated.
When the workflow file is updated, it should always be run to verify changes.

Follow up to [50592].

See #52786.

git-svn-id: https://develop.svn.wordpress.org/trunk@50595 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 15:12:30 +00:00
Jonathan Desrosiers
0f636b823b Build/Test Tools: Run code coverage workflow using parallel jobs.
This splits the code coverage workflow into two separate jobs, allowing single site and multisite to run in parallel. This cuts the total workflow run time in half.

Fixes #52923.

git-svn-id: https://develop.svn.wordpress.org/trunk@50594 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 15:09:19 +00:00
Jonathan Desrosiers
1c293bc665 Build/Test Tools: Do not checkout the Importer plugin in the Code Coverage workflow.
Since [50285], the WordPress Importer plugin (which is required for the test suite to run successfully) has been installed as part of the `npm run env:install` script.

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50593 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 14:57:05 +00:00
Jonathan Desrosiers
6113803d12 Build/Test Tools: Fix code coverage reporting to generate report from src.
Since [50441-50442] switched the test workflows to run from `src` instead of `build`, code coverage reporting has stopped working. This was caused by the code coverage configuration continuing to reference `build`. This corrects the configuration so coverage reporting can resume.

This change also introduces the `workflow_dispatch` event to the workflow, which will allow committers to manually run the workflow when desired. For example, to confirm changes to the test suite do not break reporting.

This also adds the `phpunit.xml.dist` and `tests/phpunit/multisite.xml` files to the `paths` list. Since these files are responsible for configuring the test suite and code coverage reporting, any changes to them should verify that no problems were introduced.

Props jrf, johnbillion.
Fixes #52786. See #51734.

git-svn-id: https://develop.svn.wordpress.org/trunk@50592 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 13:23:52 +00:00
Jonathan Desrosiers
003ebb50f8 Build/Test Tools: Run test workflows on old branches on a schedule.
On TravisCI, old branches still receiving security updates were tested on a regular basis. This ensured tests continued to pass as time passed even if updates were not made to these branches.

On GitHub Actions, there is no interface to configure this (TravisCI had a UI), but there is a `schedule` event that can trigger workflow runs on cron that can be used to accomplish the same thing.

This introduces a workflow file that runs twice a month (on the 1st and 15th) to verify the tests within older branches.

Because the `schedule` event only runs within the primary branch, the appropriate workflows in each old branch will be triggered manually through the `workflow_dispatch` trigger using the GitHub REST API. `workflow_dispatch` will need to be added to all workflows in all old branches in order for the event to dispatch successfully.

Fixes #52653.

git-svn-id: https://develop.svn.wordpress.org/trunk@50590 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 13:06:43 +00:00
Sergey Biryukov
65b05ac3f2 Login and Registration: Restore the "Error:" prefix for the "Unknown username" message.
This makes the message more consistent with other error messages related to authentication and registration.

Follow-up to [46417].

Props dd32.
See #52914, #52915.

git-svn-id: https://develop.svn.wordpress.org/trunk@50589 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 12:12:30 +00:00
Peter Wilson
42b05c397c Media: Conditionally pass 2nd parameter to getimagesize().
In the wrapper function `wp_getimagesize()` check if the second parameter was passed before sending it to the PHP function `getimagesize()`. 

The PHP function has a different execution path depending on the number of parameters passed, this ensures the wrapper function follows the appropriate path.

Follow up to [50552].
Props azaozz, hellofromtonya, Mista-Flo, peterwilsoncc, rinatkhaziev, RogerTheriault, SergeyBiryukov, terriann, whyisjake.
Fixes #52826.


git-svn-id: https://develop.svn.wordpress.org/trunk@50586 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-26 00:07:26 +00:00
David Baumwald
7a4d7fc045 Privacy: Print screen reader text for the "Copy suggested policy text..." action button.
This change switches out `sprintf` for `printf` on the "Copy suggested policy text from..." button screen reader text.  Also, wrap the actual button text in a `<span aria-hidden="true">` to prevent both the button text and the screen reader text from being spoken.

Props mukesh27, SergeyBiryukov, sabernhardt.
Fixes #52891.

git-svn-id: https://develop.svn.wordpress.org/trunk@50585 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-25 20:19:57 +00:00
David Baumwald
d27f6650fe Docs: Fix description for $htmlhint argument in code editor settings.
Introduced in [41558].

Props sabernhardt.
See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50583 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-25 19:58:50 +00:00
David Baumwald
22eb45a644 Posts, Post Types: Remove / from non-self-closing "clear" div tags.
In [49178], self-closing `br` tags were switched to non-self-closing `div` elements for "clearing" purposes, but the self-closing "/" remained in place.  This fix removes the unnecessary slash.

Props pavelvisualcomposer, audrasjb, sabernhardt, akabarikalpesh, SergeyBiryukov.
Fixes #52878.

git-svn-id: https://develop.svn.wordpress.org/trunk@50582 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-25 19:31:49 +00:00
Jonathan Desrosiers
85907da8a4 Build/Test Tools: Disable fail-fast for the NPM testing workflow.
This disables the `fail-fast` option in the GitHub Actions workflow for testing NPM. This allows all jobs in the test matrix to complete, even if one fails, painting a clear picture of where the issue lies.

Follow up to [50435].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50579 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-25 15:09:00 +00:00
Kelly Choyce-Dwan
7efa96da8a Login, Registration: Prevent button misalignment on login screen.
Replace the float CSS removed in [50569], which is used to align the login & register buttons.

Props mukesh27, audrasjb.
Fixes #52834.



git-svn-id: https://develop.svn.wordpress.org/trunk@50577 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-25 14:21:19 +00:00
Sergey Biryukov
146ad7b142 Query: Consistently include a space in parentheses in WP_Meta_Query::get_sql_for_clause().
Props jillebehm, kaavyaiyer, hareesh-pillai.
Fixes #49279.

git-svn-id: https://develop.svn.wordpress.org/trunk@50576 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-25 12:37:49 +00:00
Peter Wilson
d95ce1cb5b Script Loader: Escape HTML5 boolean attribute names.
Add escaping of boolean attribute names in `wp_sanitize_script_attributes()` for themes supporting HTML5 script elements.

Props tmatsuur, johnbillion, joyously.
Fixes #52894.


git-svn-id: https://develop.svn.wordpress.org/trunk@50575 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-25 00:25:37 +00:00
Sergey Biryukov
26fd2405f6 Accessibility: Administration: Use a darker gray color for various admin UI items.
This ensures that the color meets the WCAG 2.0 AA recommended contrast ratio.

Follow-up to [50025], [50525].

Props sabernhardt, ryelle.
Fixes #52760.

git-svn-id: https://develop.svn.wordpress.org/trunk@50571 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-24 16:39:39 +00:00
Greg Ziółkowski
2382765afa Editor: Add image default size to block editor settings
Related: https://github.com/WordPress/gutenberg/pull/29966

Add new imageDefaultSize value to block editor settings.

Props Mamaduka.
Fixes #52896.




git-svn-id: https://develop.svn.wordpress.org/trunk@50570 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-24 07:31:37 +00:00
Peter Wilson
bcdbedff60 Login, Registration: Prevent button misalignment on password reset screen.
Prevent misalignment of "generate password" and "save password" buttons on the password reset screen on narrow screens and in languages requiring longer text than English.

Props audrasjb, grapplerulrich, ryelle.
Fixes #52834.


git-svn-id: https://develop.svn.wordpress.org/trunk@50569 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-24 00:20:06 +00:00
Peter Wilson
ffea5d4452 Privacy: Wrap text in buttons on privacy policy guide.
On narrow screens allow the text to wrap in the copy buttons on the privacy policy guide screen to avoid horizontal overflow of the parent container.

Props audrasjb, davidbaumwald, jaymanpandya, paaljoachim, palmiak, sabernhardt, SergeyBiryukov, sumitsingh.
Fixes #52751.


git-svn-id: https://develop.svn.wordpress.org/trunk@50568 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-24 00:02:53 +00:00
Peter Wilson
e2fff3fddc REST API: Prevent database error when deleting meta data.
Add a check to `WP_REST_Meta_Fields::delete_meta_value()` ensuring meta data is set before attempting to delete it from the database. If the data does not exist, the delete is considered successful as the data matches the desired state.

Props BrechtVds, goaroundagain, TimothyBlynJacobs.
Fixes #52787.


git-svn-id: https://develop.svn.wordpress.org/trunk@50567 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-23 23:34:59 +00:00
Peter Wilson
6388364fec Robots: Remove contradictory directive check in wp_robots().
Removes the mutually exclusive directives check in `wp_robots()`, ie allow both `follow` and `nofollow` to be specified and for `archive` and `noarchive` to be specified.

This fixes a bug in which WordPress would defer to the most permissive over the least permissive. When contradictory instructions are included, WordPress will defer to the search engine's or archivist's resolution policy: generally this is to observe the least, not most permissive.

Props Cybr, flixos90.
Fixes #52713.



git-svn-id: https://develop.svn.wordpress.org/trunk@50566 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-23 23:00:03 +00:00
Sergey Biryukov
accdb47ffb Taxonomy: Use a consistent check for the $rewrite['hierarchical'] parameter.
This avoids a "Trying to access array offset on value of type bool" PHP warning in `get_term_link()` if the `$rewrite` parameter of `register_taxonomy()` is set as `false`.

Props Tkama, SergeyBiryukov.
Fixes #52882.

git-svn-id: https://develop.svn.wordpress.org/trunk@50565 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-23 13:53:50 +00:00
Greg Ziółkowski
4179f10b7a Editor: Add new theme category for block types
Related: https://github.com/WordPress/gutenberg/pull/30020.

Introduces a new "theme" category to the default set to use with template-parts and other FSE blocks.

Props matveb.
Fixes #52883. 



git-svn-id: https://develop.svn.wordpress.org/trunk@50564 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-23 09:00:03 +00:00
Sergey Biryukov
b50376d557 Code Modernization: Correct expected data type for WP_User_Search::$page property.
This fixes erroneous parentheses placement and applies the type cast to the variable it was intended for.

Follow-up to [3864].

Props hellofromTonya, jrf, xknown.
See #51423.

git-svn-id: https://develop.svn.wordpress.org/trunk@50563 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-22 22:40:29 +00:00
Sergey Biryukov
ccb4474b4a Docs: Fix typo in pre_term_link filter description.
See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50562 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-22 19:17:45 +00:00
Sergey Biryukov
4cc3f127df Coding Standards: Move some translator comments to the correct place.
Follow-up to [48172].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50561 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-21 13:11:11 +00:00
Sergey Biryukov
89e6e2d31e Coding Standards: Add missing semicolon to some endif keywords.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50560 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-21 13:03:14 +00:00
Sergey Biryukov
133b6a9f91 Tests: Move the get_current_commenter() method next to the test it's used in.
Follow-up to [48133].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50559 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-21 12:53:24 +00:00
Sergey Biryukov
05566e992d Coding Standards: Use strict comparison for return type checks in a few functions:
* `get_bookmark()`
* `get_comment()`
* `get_post()`
* `get_children()`
* `wp_get_recent_posts()`
* `wp_get_post_revision()`
* `wp_get_nav_menu_items()`

Follow-up to [45710] for `get_term()`, [48507] for `wpdb::get_row()` and `wpdb::get_results()`.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50558 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-21 12:39:25 +00:00
Sergey Biryukov
eea4f303a1 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-upgrader.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50557 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-21 12:10:55 +00:00
Sergey Biryukov
f552384ebd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50556 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-20 18:28:32 +00:00
Sergey Biryukov
b40cf64e6a I18N: Update list of continents and cities for the timezone selection.
Props wangql, mukesh27.
Fixes #52861.

git-svn-id: https://develop.svn.wordpress.org/trunk@50555 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-19 15:40:22 +00:00
Sergey Biryukov
97037b3ab8 I18N: Remove duplicate entries from the list of continents and cities.
Follow-up to [37554].

See #52861.

git-svn-id: https://develop.svn.wordpress.org/trunk@50554 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-19 15:19:12 +00:00
Jake Spurlock
140bd894d6 Media: Pass the appropriate reference into wp_getimagesize.
With changes that were introduced in [49889] the second parameter for getimagesize() function is expecting a a reference.

Previously, most calls did not pass the 2nd param, and as a result, we are getting unexpected results.

This was only a problem with applications that are using a custom stream wrapper, and the image contained EXIF data.

For more see:

* https://github.com/humanmade/S3-Uploads/issues/496
* https://github.com/aws/aws-sdk-php/issues/1923

Fixes #52826.
Props terriann, SergeyBiryukov, Mista-Flo, hellofromTonya, rinatkhaziev, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@50552 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-18 23:59:12 +00:00
Kelly Choyce-Dwan
a6d69a3298 Pointers: Make pointer border darker to match arrow tip.
Props johnjamesjacoby, melchoyce, SergeyBiryukov.
Fixes #52670.



git-svn-id: https://develop.svn.wordpress.org/trunk@50551 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-18 23:24:04 +00:00
Peter Wilson
1710b4bdbc External libraries: Update generated script loader version hashes.
Update the generated file `src/wp-includes/assets/script-loader-packages.php` following the clipboard.js update in [50544].

See #52850.


git-svn-id: https://develop.svn.wordpress.org/trunk@50550 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-18 22:43:41 +00:00
Kelly Choyce-Dwan
e2bb839d08 Administration: Make focus states consistent in admin menu when collapsed.
When collapsed or on a small screen, these styles would override the color schemes, causing a dark background to appear regardless of the color scheme's settings. This change also uses `focus-within` to show or hide the menu item's arrow, consistent with how the arrow behaves on hover.

Props afercia, Bueltge.
Fixes #32579.



git-svn-id: https://develop.svn.wordpress.org/trunk@50549 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-18 21:42:12 +00:00
Jonathan Desrosiers
2111085dff Emoji: Update the Twemoji library to version 13.0.2.
This point release does not add any new Emoji and only slightly modifies 14 existing Emoji without changing their meanings.

Because of this, the same CDN location (currently `/images/core/emoji/13.0.1`) can be updated with the new versions and sites running WordPress 5.6 or higher will start using the updated versions once their cache expires.

See #52852.

git-svn-id: https://develop.svn.wordpress.org/trunk@50548 602fd350-edb4-49c9-b593-d223f7449a82
2021-03-18 19:18:12 +00:00