44017 Commits

Author SHA1 Message Date
Sergey Biryukov
8bb7054907 Coding Standards: Use consistent formatting for _wp_posts_page_notice() and _wp_block_editor_posts_page_notice().
Remove redundant casting to `int` for post ID, which is always an integer.

Follow-up to [51116].

See #45537, #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@51158 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 15:49:22 +00:00
Sergey Biryukov
68be2fe3c9 I18N: Use consistent pattern for placeholder references in translator comments for some bundled theme strings.
Follow-up to [42827], [44562], [50234].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@51157 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 15:37:13 +00:00
Riad Benguella
dcd5506edc Block Editor: Second batch of fixes for 5.8 beta 2
This includes:

 - Fix regression emptying post content block in template mode.
 - Legacy Widget: Don't display "No preview" when widget has image tags.

See #53397. 


git-svn-id: https://develop.svn.wordpress.org/trunk@51156 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 15:28:52 +00:00
Sergey Biryukov
de961a8bbd Coding Standards: Remove a one-time $message variable in WordPress version requirement notices for bundled themes.
This makes the formatting of these messages more consistent.

Follow-up to [23816], [51154].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@51155 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 15:23:07 +00:00
Sergey Biryukov
f04ebe2daf Coding Standards: Remove a one-time $message variable in some _doing_it_wrong() calls.
This brings some consistency with most other calls.

Follow-up to [23378], [25605], [34745], [36219], [44108], [46111], [48156].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@51154 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 15:21:50 +00:00
Sergey Biryukov
8490fcbda3 Editor, I18N: Remove code from a translatable string in wp_migrate_old_typography_shape().
Replace a `trigger_error()` call with `_doing_it_wrong()` for consistency with how similar messages are displayed elsewhere in core.

Follow-up to [51089].

See #52991.

git-svn-id: https://develop.svn.wordpress.org/trunk@51153 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 14:01:57 +00:00
Sergey Biryukov
ddd4ac93a1 Docs: Document the VALID_ORIGINS constant in WP_Theme_JSON.
Follow-up to [51149].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@51152 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 11:23:09 +00:00
Sergey Biryukov
ca539afd54 Docs: Document the usage of $wp_embed global in WP_oEmbed_Controller::get_proxy_item().
Follow-up to [48135].

Fixes #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@51151 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 10:23:57 +00:00
Sergey Biryukov
f31de914f1 Docs: Document the usage of $_wp_current_template_content global in a few block template functions.
Follow-up to [51003], [51149].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@51150 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 10:20:54 +00:00
Riad Benguella
0068f2646c Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2.
This includes:

**Various**

 - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536
 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896
 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589
 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581
 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088

**Template Editor**

 - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427
 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451

**Widgets Editor**

 - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569
 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534
 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573
 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585
 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572
 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501
 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625
 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580

**Global Styles (theme.json)**
 
 - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622
 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627

**Performance**

 - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567

Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf.
See #53397.


git-svn-id: https://develop.svn.wordpress.org/trunk@51149 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 08:50:26 +00:00
Jonathan Desrosiers
15c8c705bc Editor: Replace a Gutenberg specific function with the Core equivalent.
This replaces a stray instance of `gutenberg_experimental_set()` with the WordPress Core version of this function, `_wp_array_set()`.

A stray `gutenberg` text domain is also removed from a `__()` call.

Props walbo, chaion07, JeffPaul.
Fixes #53369.

git-svn-id: https://develop.svn.wordpress.org/trunk@51148 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 23:43:21 +00:00
Jonathan Desrosiers
e40fec89ab Coding Standards: Apply some alignment fixes.
Follow up to [51145].
See #50105.

git-svn-id: https://develop.svn.wordpress.org/trunk@51147 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 23:41:07 +00:00
Jonathan Desrosiers
825a9c7b97 Build/Test Tools: Replace the deprecated @babel/polyfill.
This replaces the dependency of the deprecated `@babel/polyfill` package with the `core-js` package through `@wordpress/babel-preset-default`.

Previously, the file consisted of a generalized group of polyfills, and not all of them were required. This change allows the contents of this file to be built according to the exact needs as dictated by the `@wordpress/babel-preset-default` package, which takes into account the current browser support.

Props gziolo, youknowriad. 
Fixes #52941.

git-svn-id: https://develop.svn.wordpress.org/trunk@51146 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 23:16:27 +00:00
Joe Dolson
18ebf26bc3 Media: Restore AJAX response data shape in media library.
Restore the original shape of the AJAX response data in the media library after removing infinite scroll, and pass total number of attachments in the response headers `X-WP-Total` and `X-WP-TotalPages`. 

Improve backwards compatibility for plugins intercepting the ajax response. Headers match the structure and count calculation used in REST API responses.

Fix an issue with hiding the spinner after the load is completed and ensure that the load more view is created when changing tabs in the media library modal.

Follow up to [50829].

props adamsilverstein, spacedmonkey, joedolson.
Fixes #50105.

git-svn-id: https://develop.svn.wordpress.org/trunk@51145 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 20:49:05 +00:00
Aaron Jorbin
d9a79d339d Block Editor: Prevent duplicate queries
When passing args to `WP_Query::__construct` method (in this case, but creating a `new WP_Query`, this one internally executes the `WP_Query::get_posts` method and stores the result in the `WP_Query::posts` property. When calling the `WP_Query::get_posts` again, the same SQL query gets executed, and the result is again stored in the `WP_Query::posts` property.

This was introduced in [51003].

Props david.binda, jorbin.
Fixes #53280. See #53176.


git-svn-id: https://develop.svn.wordpress.org/trunk@51144 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 20:38:38 +00:00
Jonathan Desrosiers
4787fb116e Site Health: Display a list of file formats supported by the GD library.
This adds the list of file formats supported by the GD library to the Media Handling section in Site Health.

This will help site owners debug any issues they encounter as support for newer, more modern image formats is added (such as WebP in [50810]).

Follow up to [50817].
Props adamsilverstein, jorbin. 
Fixes #53022.

git-svn-id: https://develop.svn.wordpress.org/trunk@51143 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 18:58:48 +00:00
Sergey Biryukov
848a678861 Docs: Update documentation for some WP_Customize_Widgets methods per the documentation standards.
* Add missing `@since` tags for the `$id_base` parameter of ::sanitize_widget_instance()` and `::sanitize_widget_js_instance()`.
* Document the usage of `$wp_widget_factory` global in `::sanitize_widget_instance()`.
* Use multi-line comment syntax for a comment in `::enqueue_scripts()`.

Follow-up to [50996], [51141].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@51142 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 15:15:26 +00:00
Sergey Biryukov
24f57d1227 Docs: Document the usage of $wp_widget_factory global in WP_Customize_Widgets::sanitize_widget_instance().
Follow-up to [50996].

Props jontyravi, audrasjb.
Fixes #53394.

git-svn-id: https://develop.svn.wordpress.org/trunk@51141 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-14 11:01:42 +00:00
Sergey Biryukov
132984c20f Tests: Fix typo in a retrieve_widgets() test name.
Correct parameter description for `data_wp_widget_get_field_name()`.

Follow-up to [34780], [41555].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@51140 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-13 16:27:38 +00:00
Sergey Biryukov
376840b83c Tests: Fix typo in a get_bookmarks() test name.
Follow-up to [44546].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@51139 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-12 15:47:08 +00:00
Sergey Biryukov
98c9ab835e Docs: Correct DocBlock formatting for some revision tests.
Follow-up to [50949], [51124].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@51138 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-11 12:34:09 +00:00
Sergey Biryukov
d4b2fae838 Tests: Use assertSameSets() in some newly introduced tests.
This ensures that not only the array values being compared are equal, but also that their type is the same.

Going forward, stricter type checking by using `assertSameSets()` or `assertSameSetsWithIndex()` should generally be preferred, to make the tests more reliable.

Follow-up to [48939], [49925], [50157], [50959], [50960], [50995], [51079].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@51137 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-10 19:18:15 +00:00
Peter Wilson
5bee644258 Widgets: Improve unit tests for RSS Widget.
Prevent unit tests from making HTTP requests to wordpress.org. Specify URLs as https rather than http.

Follow up to [51107].

Props hellofromTonya.
Fixes #53278.


git-svn-id: https://develop.svn.wordpress.org/trunk@51136 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 23:50:14 +00:00
Sergey Biryukov
81e84e12e8 Tests: Ignore EOL differences in some tests using multiline string assertions.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

Follow-up to [48466], [50995], [51079].

See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@51135 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 19:41:47 +00:00
Jonathan Desrosiers
b0eadda6e6 Upgrade/Install: Built files should not be included in the $_old_files list.
Follow up to [51133].
Unprops desrosj.
See #53367.

git-svn-id: https://develop.svn.wordpress.org/trunk@51134 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 16:20:11 +00:00
Jonathan Desrosiers
20d1075ed0 Upgrade/Install: Update the $_old_files list for 5.8.
Follow up to [50761], [50794], [51021].
Props kapilpaul, desrosj.
See #52991, #52846, #53246.
Fixes #53367.

git-svn-id: https://develop.svn.wordpress.org/trunk@51133 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 15:53:49 +00:00
Jonathan Desrosiers
676fb1bc18 Post WordPress 5.8 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@51132 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 02:39:44 +00:00
Jonathan Desrosiers
1707206579 WordPress 5.8 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@51131 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 02:01:05 +00:00
Jonathan Desrosiers
c83d315d52 Build/Test Tools: Silence jQuery Migrate console warnings when running E2E tests.
These warnings will still be visible in the browser console. The majority of the warnings are coming from jQuery UI, which is still waiting for a new update to be released that is jQuery >= 3.0 friendly.

This change makes the E2E test results more readable without having to tread through the large number of warnings.

Props isabel_brison.
Fixes #52860.

git-svn-id: https://develop.svn.wordpress.org/trunk@51130 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 01:35:26 +00:00
Anthony Burchell
1c418298bf Privacy: Improve naming of user confimed action email filters.
The filters `user_confirmed_action_email_content`, `user_erasure_complete_email_subject`, and `user_erasure_complete_email_headers` have been deprecated.

They have been replaced with `user_erasure_fulfillment_email_content`, `user_erasure_fulfillment_email_subject`, and `user_erasure_fulfillment_email_headers`.

Props desrosj, garrett-eclipse, birgire, DrewAPicture, lifeforceinst, ocean90, pbiron, pento, coffee2code, TZ-Media, SergeyBiryukov, johnbillion, audrasjb, davidbaumwald, hellofromTonya, helen, xkon, antpb, peterwilsoncc, lukecarbis.
Fixes #44314.



git-svn-id: https://develop.svn.wordpress.org/trunk@51129 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 01:34:09 +00:00
Jonathan Desrosiers
a2969fb07f Tests: Introduce some E2E tests for the Quick Draft dashboard widget.
Props isabel_brison, johnbillion.
Fixes #523905.

git-svn-id: https://develop.svn.wordpress.org/trunk@51128 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-09 00:19:25 +00:00
Jake Spurlock
c4373a7004 Widgets: Don't decode HTML entities ahead of the widget constructor.
This reverts the changes from [51114]. 

See #53138.

Unprops whyisjake. 


git-svn-id: https://develop.svn.wordpress.org/trunk@51127 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 23:38:50 +00:00
Jonathan Desrosiers
387f3eebf2 Login and Registration: Improve the unknown username error message
The new message is more clear and makes the next step more clear to the user. 

Props dd32, SergeyBiryukov, audrasjb, desrosj, dlh, marybaum, chanthaboune, jeffpaul.
Fixes #52915.

git-svn-id: https://develop.svn.wordpress.org/trunk@51126 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 23:33:16 +00:00
Jake Spurlock
d56d4afd02 Permalinks: Revert the changes stemming from pagination limits.
In [51118], an attempt was made to add pagination limits. The added tests need to be updated to ensure that they pass with the new changes.

Reverts [51118].

See #50233.


git-svn-id: https://develop.svn.wordpress.org/trunk@51125 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 23:31:46 +00:00
Jake Spurlock
1eb777209d Revisions: Check and return errors for insertions to revisions.
Fixes #30009.

Props rmccue, adamsilverstein, coreymckrill, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@51124 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 23:23:12 +00:00
Anthony Burchell
9f9261f051 Media: Allow multi-uploads in Galleries.
Previously, when more than one media item was uploaded using a gallery, failures occurred on the second upload.

Props glendaviesnz, Mista-Flo, hellofromTonya.
Fixes #53169.



git-svn-id: https://develop.svn.wordpress.org/trunk@51123 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 23:12:23 +00:00
Jake Spurlock
38232f655d Media: Add new functions to return the previous/next attachment links.
New functions:

* get_adjacent_image_link()
* get_next_image_link()
* get_previous_image_link()

Fixes #45708.

Props flixos90, DrewAPicture, mor10, antpb, hellofromTonya, whyisjake.




git-svn-id: https://develop.svn.wordpress.org/trunk@51122 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 23:12:22 +00:00
Anthony Burchell
c2313c6934 Feeds: Avoid notices in get_post_comments_feed_link().
When an feed request is made to a non-existent page, surpress the notice.

Props dd32, SergeyBiryukov, mukesh27, hellofromTonya.
Fixes #52814.



git-svn-id: https://develop.svn.wordpress.org/trunk@51121 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:59:19 +00:00
Jonathan Desrosiers
de69bbd713 Coding Standards: Use single quotes when there are no variables within the string.
Follow up to [51117].

See #48743.

git-svn-id: https://develop.svn.wordpress.org/trunk@51120 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:54:59 +00:00
Jonathan Desrosiers
37d7346ea2 Administration: Adjust Internet Explorer message to be a bit more clear.
This moves “Internet Explorer” to the beginning of the sentence introduced in [51117] to make the reason the user is seeing this message more clear.

Props chanthaboune, jeffpaul, desrosj.
Fixes #48743.

git-svn-id: https://develop.svn.wordpress.org/trunk@51119 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:53:10 +00:00
Jake Spurlock
346e47b176 Permalinks: Limit pagination for posts with comments.
Additionally, redirect pages back to the source page if comments don't exist.

Props devrekli, carike, sumanm, mukesh27, chaion07, audrasjb, whyisjake, SergeyBiryukov.

Fixes #50233.


git-svn-id: https://develop.svn.wordpress.org/trunk@51118 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:49:27 +00:00
Anthony Burchell
7b2793e242 Administration: Introduce dashboard notice to discourage use of out of date browser.
If a browser matches Internet Explorer, the dashboard will display a notice recommending a more modern browser.

Props youknowriad, sabernhardt, afercia, SergeyBiryukov, davidbaumwald, netweb, johnbillion, jeherve.
See #48743.



git-svn-id: https://develop.svn.wordpress.org/trunk@51117 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:47:00 +00:00
Jake Spurlock
69d7762ad4 Editor: Ensure that the block editor can be used on the page post type.
Additionally, add a notice for when you are editing the "latest posts" page.

Fixes #45537.

Props cameronjonesweb, swissspidy, hannahmalcolm, Fantasy1125, ArnaudBan, grantmkin, youknowriad, knutsp, SergeyBiryukov, audrasjb, whyisjake. 


git-svn-id: https://develop.svn.wordpress.org/trunk@51116 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:37:34 +00:00
Jake Spurlock
5001efad74 Administration: Escape the values of data-colname.
Adds a `esc_attr` wrapper to `strip_all_tags`.

See [33016].

Fixes #40401.

Props rellect, SergeyBiryukov, hareesh-pillai, audrasjb.



git-svn-id: https://develop.svn.wordpress.org/trunk@51115 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:20:42 +00:00
Jake Spurlock
fe1ef97ef3 Widgets: Ensure that HTML entities are converted in widget descriptions.
Fixes #53138.

Props justinahinon, audrasjb.


git-svn-id: https://develop.svn.wordpress.org/trunk@51114 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:16:03 +00:00
Jonathan Desrosiers
f64478d67c Emoji: Update the Twemoji library to version 13.1.0.
This version introduces support for the latest Emoji added in version Emoji 13.1, which includes “face in clouds”, “face exhaling”, and of course, “face with spiral eyes”.

A new corresponding folder has been pushed to WordPress.org in [dotorg:17419].

Rages deep within, ❤️‍🔥.

Props kraftbj., desrosj.
Fixes #52852.

git-svn-id: https://develop.svn.wordpress.org/trunk@51113 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:13:27 +00:00
Jake Spurlock
68b6298828 Build/Test Tools: Ensure that we are using https:// urls.
Fix from automated install.

See [51111], #39589.


git-svn-id: https://develop.svn.wordpress.org/trunk@51112 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:11:37 +00:00
Jake Spurlock
3f41775f27 Media: Ensure that post_id variable is initiated ahead of usage.
This prevents warnings when using custom bulk actions in the media library.

Props gitlost, achbed, Boniu91, wpgurudev, hellofromTonya.

Fixes #39589.


git-svn-id: https://develop.svn.wordpress.org/trunk@51111 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 22:06:32 +00:00
Kelly Choyce-Dwan
cea3994d29 Twenty Thirteen: Add "No Shadow" style to button block.
This creates a new block style without a shadow, and fixes colors on outline buttons.

Props melchoyce, kjellr, scruffian.
Fixes #51223.



git-svn-id: https://develop.svn.wordpress.org/trunk@51110 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 20:36:36 +00:00
Kelly Choyce-Dwan
b98d11e680 Block Editor: Ignore generated CSS files in Page List and Post Template blocks.
Add SVN ignore property to match existing rule in `.gitignore`.

Follow up to [51101], [51105].
See #52991, #53309.



git-svn-id: https://develop.svn.wordpress.org/trunk@51109 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 20:08:50 +00:00