Commit Graph

42014 Commits

Author SHA1 Message Date
Jake Spurlock bf93e9699f Upgrade/Install: Ensure cleanup after canceled update.
Ensure that the uploaded zip is hidden from the media library, where a task will remove failed installs after two hours.

Fixes #50612.

Props psykro, desrosj, joyously, azaozz, noisysocks, whyisjake. 


git-svn-id: https://develop.svn.wordpress.org/trunk@48417 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-10 06:06:46 +00:00
Jake Spurlock 3667d18943 Menus: Ensure that category menus with special characters can be updated.
Slashes and HTML encoding could cause some menus not to be updated.

Fixes #48011.

Props zaheerahmad, achyuthajoy, desrosj, pento, SergeyBiryukov, donmhico, audrasjb, birgire, mikeschroder.



git-svn-id: https://develop.svn.wordpress.org/trunk@48416 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-10 05:58:49 +00:00
Jake Spurlock 80e2a20c53 Coding Standards: Some missed code formatting.
Unprops: whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48415 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-10 00:59:58 +00:00
Jake Spurlock 36f9f6c70d Sitemaps: Add better support for RTL sites.
While the URLs are intended to be machine readable, they should always be LTR, while other data would be RTL in the sitemap.

Fixes #50449.

Props joyously, SergeyBiryukov, pbiron. apedog, ramiy.



git-svn-id: https://develop.svn.wordpress.org/trunk@48414 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-10 00:48:54 +00:00
Jake Spurlock 0802e754a2 Formatting: Ensure that wp_filter_object_list() will return an array when being passed an object with magic methods.
Fixes #50095.

Props johnjamesjacoby.


git-svn-id: https://develop.svn.wordpress.org/trunk@48413 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-10 00:29:48 +00:00
Jake Spurlock 0999a01956 Administration: Remove multiple viewport meta tags from mobile pages.
In addition, add the `wp_admin_viewport_meta()` function, paired to the `admin_viewport_meta` filter to control attributes of the meta tag.

Fixes #47369.
Props BettyJJ, mukesh27, SergeyBiryukov, ajayghaghretiya1, msaggiorato, talldanwp, davidbaumwald, donmhico, audrasjb.



git-svn-id: https://develop.svn.wordpress.org/trunk@48412 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-09 23:27:28 +00:00
Sergey Biryukov 9683101398 Docs: Synchronize and correct documentation for various metadata functions and filters.
Follow-up to [47390], [47611], [48192], [48402].

See #49572, #43941, #45464.

git-svn-id: https://develop.svn.wordpress.org/trunk@48411 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-09 11:24:43 +00:00
Sergey Biryukov c3993eb19d Widgets: Adjust formatting for displaying the closing `</nav>` tag in widgets for consistency with the opening tag.
Follow-up to [48349].

See #48170.

git-svn-id: https://develop.svn.wordpress.org/trunk@48410 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-08 13:42:30 +00:00
Sergey Biryukov c66bdb8b5a Widgets: Correct the logic for displaying the `after_widget` parameter of the Archives widget.
Follow-up to [48349].

Props mukesh27, joyously.
Fixes #50609.

git-svn-id: https://develop.svn.wordpress.org/trunk@48409 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-08 13:26:20 +00:00
Sergey Biryukov 8b89be2676 Docs: Miscellaneous DocBlock corrections.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48408 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-08 13:13:50 +00:00
Sergey Biryukov de37c09c7b Docs: Further improve documentation for `have_posts()` and `have_comments()`.
Follow-up to [48406]

Props stevenlinx.
See #50610.

git-svn-id: https://develop.svn.wordpress.org/trunk@48407 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-08 11:13:22 +00:00
Sergey Biryukov 3dc074ed1d Docs: Improve documentation for `have_posts()`, `have_comments()`, and their `WP_Query` counterparts.
Props stevenlinx.
Fixes #50610.

git-svn-id: https://develop.svn.wordpress.org/trunk@48406 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-08 11:09:08 +00:00
Sergey Biryukov e76307655d Upgrade/Install: Prevent the upgrade routine for updating the `comment_type` field in the comments table from running twice.
Follow-up to [47597], [48400].

See #50413, #49236.

git-svn-id: https://develop.svn.wordpress.org/trunk@48405 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-08 10:56:22 +00:00
Sergey Biryukov 660fc1703d Post WordPress 5.5 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@48404 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 21:51:26 +00:00
Sergey Biryukov a99e0fd425 WordPress 5.5 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@48403 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 20:59:16 +00:00
Timothy Jacobs 612eeb92a8 REST API, Meta: Introduce support for default metadata values.
The `register_meta()` API now officially supports specifying a default metadata value. When `get_metadata()` is called for a meta key that does not yet exist for the object, this default value will be returned instead of an empty string.

A new function is introduced `get_metadata_raw` to retrieve the raw metadata value from the database, without applying the registered default.

Props spacedmonkey, flixos90, rmccue, kadamwhite, mnelson4, johnbillion, chrisvanpatten, TimothyBlynJacobs.
Fixes #43941.



git-svn-id: https://develop.svn.wordpress.org/trunk@48402 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 20:45:55 +00:00
Jonathan Desrosiers dd64c95f65 Administration: Fix failing tests as a result of [48397].
Because of changes to how PHP handles arrays used in `foreach()` loops in PHP >= 7.0, [48397] resulted in a failing test for PHP 5.6.

This calls `reset()` after using the `$results` array in the `foreach()` to ensure the array is treated the same and as expected.

Props azaozz, desrosj, SergeyBiryukov, xknown.
See #50448.

git-svn-id: https://develop.svn.wordpress.org/trunk@48401 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 20:36:41 +00:00
Jonathan Desrosiers 7d3b647a16 Upgrade/Install: Prevent some 5.5.0 upgrade routines from running twice.
This will prevent the options renamed for 5.5.0 from being converted twice. If a new update routine is added before 5.5 is released, the option values would be erased for anyone running `trunk` or nightlies without this change.

Props azaozz, desrosj, SergeyBiryukov, whyisjake.
Fixes #50413.

git-svn-id: https://develop.svn.wordpress.org/trunk@48400 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 19:19:03 +00:00
Jonathan Desrosiers 61803a37a4 Upgrade/Install: Add `hook_extra` parameter to the `upgrader_pre_download` filter.
This provides additional context to code running on this hook, including which plugin or theme update will be downloaded. It also brings consistency to this filter with others throughout the upgrade process.

Props obliviousharmony, desrosj.
Fixes #49686.

git-svn-id: https://develop.svn.wordpress.org/trunk@48399 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 19:13:30 +00:00
Jake Spurlock 86ffb51a33 Administration: Introduce extensibility to posts and comments list table views, for accessibility purposes.
At default, expands the excerpt view to become an extended view. Includes a new `table_view_mode` filter to allow further configuration.

Fixes #49715.
Props joedolson, audrasjb, afercia, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48398 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 19:10:46 +00:00
Jonathan Desrosiers bfb896ce08 Administration: Prevent repeat emails for identical plugin or theme auto-update attempt failures.
This change adds a throttle mechanism to plugin and theme auto-update failure emails using similar logic to the email sent for a Core auto-update.

The first time a plugin or theme auto-update fails, the package and `new_version` will be tracked in the `auto_plugin_theme_update_emails` option. An email for this specific update attempt will not be resent.

However, if this update fails again and non-repeat failures or successful updates are also present, then the failure information will be included in that email (an email needs to be sent for the new events regardless).

Props johnbillion, arpitgshah, desrosj, audrasjb, pbiron, earnjam.
Fixes #50448.

git-svn-id: https://develop.svn.wordpress.org/trunk@48397 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 18:58:32 +00:00
Dominik Schilling a7dc1bbef1 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/set-post-thumbnail.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50605.

git-svn-id: https://develop.svn.wordpress.org/trunk@48396 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 18:53:50 +00:00
Dominik Schilling 25417b5d49 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/comment.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50604.

git-svn-id: https://develop.svn.wordpress.org/trunk@48395 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 18:38:20 +00:00
Dominik Schilling 189f23fd27 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/nav-menu.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50603.

git-svn-id: https://develop.svn.wordpress.org/trunk@48394 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 18:28:41 +00:00
Sergey Biryukov 3591f4eba9 Comments: Allow passing a custom class to the form container element in `comment_form()`.
Props cjbj, yahil, mayankmajeji, andraganescu, SergeyBiryukov.
Fixes #41009.

git-svn-id: https://develop.svn.wordpress.org/trunk@48393 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 18:27:03 +00:00
Dominik Schilling f0c4b2c12e I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/plugin-install.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50602.

git-svn-id: https://develop.svn.wordpress.org/trunk@48392 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 18:13:14 +00:00
Dominik Schilling 849e7bfdc8 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/inline-edit-post.js` and `wp-admin/js/inline-edit-tax.js`.
This removes the usage of `wp_localize_script()` for passing translations to the scripts and instead adds the translatable strings in the scripts directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50601.

git-svn-id: https://develop.svn.wordpress.org/trunk@48391 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 18:00:37 +00:00
Andrew Ozz 289c28637c Upgrade/install: Allow plugin and theme updates from a uploaded .zip file.
Props mariovalney, cyberhobo, imath, shaunandrews, mariovalney, earnjam, desrosj, dd32, folletto, swissspidy, melchoyce, pento, joshuawold, psykro, clorith, ahortin, galbaras, pingram3541, joyously, doobeedoo, karmatosed, poena, whyisjake, earnjam, sergeybiryukov, audrasjb, azaozz.

Fixes #9757.

git-svn-id: https://develop.svn.wordpress.org/trunk@48390 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 17:47:37 +00:00
Andrea Fercia 2bdd712204 Accessibility: Widgets: Further improve spacing between Widgets checkboxes and radio buttons in the admin interface.
Follow-up to [47598]:
- further improves the spacing after [47598] by better scoping the CSS to avoid layout glitches for custom widgets
- changes the RSS widget form to wrap the checkboxes in one single paragraph

Ideally, multiple related checkboxes and radio buttons should be grouped within a fieldset element with a legend. This will be addressed in a new Trac ticket.

Props mukesh27, SergeyBiryukov, sabernhardt.
Fixes #49228.


git-svn-id: https://develop.svn.wordpress.org/trunk@48389 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 17:27:38 +00:00
Andrea Fercia 233dc322bf Docs: Reference the documentation of the new `navigation_widgets_format` filter instead of repeating it.
Follow-up to [48349].

Props johnbillion.
Fixes #48170.


git-svn-id: https://develop.svn.wordpress.org/trunk@48388 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 17:04:05 +00:00
Dominik Schilling 8c42273b7a I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/widgets.js`.
This removes the usage of `$scripts->add_inline_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Fixes #50600.

git-svn-id: https://develop.svn.wordpress.org/trunk@48387 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:59:22 +00:00
Andrew Ozz 7377c28728 Media, REST API: Allow media edit endpoint to find remote files.
Props jonsurrell.
Fixes #50595.

git-svn-id: https://develop.svn.wordpress.org/trunk@48386 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:49:30 +00:00
Dominik Schilling dd353bf815 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/post.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50599.

git-svn-id: https://develop.svn.wordpress.org/trunk@48385 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:47:14 +00:00
Dominik Schilling b24fbd088b I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/media.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50597.

git-svn-id: https://develop.svn.wordpress.org/trunk@48384 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:12:14 +00:00
Dominik Schilling e39812fe53 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/color-picker.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50596.

git-svn-id: https://develop.svn.wordpress.org/trunk@48383 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:07:25 +00:00
Riad Benguella e16565b2d4 Block Editor: Add a script to run Gutenberg end 2 end tests on Core.
The script is not part of CI yet because the job takes 40mn to run
and it's not useful in all PRs/commits.

Fixes #50469.


git-svn-id: https://develop.svn.wordpress.org/trunk@48382 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:06:43 +00:00
Timothy Jacobs 9c4288687e REST API: Use new `rest_get_route_for_post()` in the post search handler.
In [48273] the rest_get_route_for_post function was introduced. This simplifies determining the REST API route for any given post object and adds a filter for custom controllers.

Props ravatparmar.
Fixes #50529.


git-svn-id: https://develop.svn.wordpress.org/trunk@48381 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 15:29:22 +00:00
John Blackbourn f4b381b640 Administration: Reinstate the description for the `admin_xml_ns` hook which was accidentally removed in [47771].
See #46015.

git-svn-id: https://develop.svn.wordpress.org/trunk@48380 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:55:51 +00:00
Ella van Durpe 84d3fe2b67 Editor: update packages
Fixes #50589.



git-svn-id: https://develop.svn.wordpress.org/trunk@48379 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:41:35 +00:00
Sergey Biryukov d2ec3ab82d Themes: Allow passing a custom class to post and comment pagination functions.
This affects:
* `get_the_post_navigation()`
* `get_the_posts_navigation()`
* `get_the_posts_pagination()`
* `get_the_comments_navigation()`
* `get_the_comments_pagination()`

Props jfarthing84, markparnell, davidbaumwald, SergeyBiryukov.
Fixes #39378.

git-svn-id: https://develop.svn.wordpress.org/trunk@48378 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:13:37 +00:00
John Blackbourn 5f88132794 Docs: Correct some `@since` entries added in 5.5.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48377 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:12:38 +00:00
Riad Benguella 286aae8b64 Administration: Fix remove links color.
Fix regression introduced in [48332] where the specificity
of the admin scheme link colors was higher than the remove link colors.

Props afercia.
Fixes #50536.


git-svn-id: https://develop.svn.wordpress.org/trunk@48376 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 13:45:30 +00:00
Andrea Fercia ab3ce946c9 Accessibility: Media: Improve accessibility of the status and error messages in the Image Editor.
- improves focus management by moving focus to the notices, if any, or to the first "tabbable" element
- this avoids a focus loss and helps Braille-only and screen magnification users to be aware of the messages
- adds an ARIA role `alert` to all the notices 
- uses `wp.a11y.speak()` to announce messages to assistive technology
- this way, all visual users will see the messages while assistive technology users will get an audible message
- uses `wp.i18n` for translatable strings in `wp-admin/js/image-edit.js`

Props anevins, ryanshoover, antpb, SergeyBiryukov, afercia.
See #20491.
Fixes #47147.


git-svn-id: https://develop.svn.wordpress.org/trunk@48375 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 13:43:43 +00:00
Sergey Biryukov 41e572858d Plugins: Make sure the HTML ID attributes in plugin action links are unique.
Follow-up to [47588].

Props mukesh27, roytanck, SergeyBiryukov.
Fixes #49916.

git-svn-id: https://develop.svn.wordpress.org/trunk@48374 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 13:41:30 +00:00
Andrea Fercia 337b3295fe Accessibility: Allow post boxes on the Dashboard and Classic Editor pages to be reordered by using the keyboard.
So far, it has been possible to rearrange into a new order the post boxes (also known as "widgets" on the Dashboard and "meta boxes" on the Edit post page) only by using a pointing device, for example a mouse.

This change adds new controls and functionality to allow the boxes to be rearranged also with the keyboard. Additionally, audible messages are sent to the admin ARIA live region to notify screen reader users of the reorder action result.

Props joedolson, anevins, antpb, audrasjb, xkon, MarcoZ, karmatosed, afercia.
Fixes #39074.


git-svn-id: https://develop.svn.wordpress.org/trunk@48373 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 12:58:10 +00:00
Sergey Biryukov 30201a396f Bootstrap/Load: Set `WP_DEBUG` to true by default on `development` environments.
Props johnbillion, kraftbj, Clorith, joostdevalk, dlh.
Fixes #33161.

git-svn-id: https://develop.svn.wordpress.org/trunk@48372 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 12:55:26 +00:00
Riad Benguella f3d3e1df31 Customizer: Adapt the colors to the selected admin scheme colors.
Uses the $highlight-color variable to override the hardcoded colors used in the customizer UI.

Props dlh, joen.
Fixes #50547.


git-svn-id: https://develop.svn.wordpress.org/trunk@48371 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 11:28:12 +00:00
Sergey Biryukov 4e78b0acd9 Themes: Allow template loading functions to pass additional arguments to the template via the `$args` parameter.
This affects:
* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`
* `locate_template()`
* `load_template()`

Note: `get_search_form()` already passes additional arguments to the template as of [44956].

Props enrico.sorcinelli, sc0ttkclark, scribu, nacin, wonderboymusic, GeertDD, beatpanda, amaschas, mintindeed, ysalame, caiocrcosta, bigdawggi, julianm, eddiemoya, shawnz, sayedwp, shamai, mboynes, mihai2u, guidobras, Mte90, apedog, stuffradio, overclokk, johnbillion, joyously, afercia, audrasjb, justlevine, SergeyBiryukov.
See #21676.

git-svn-id: https://develop.svn.wordpress.org/trunk@48370 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 11:00:21 +00:00
Sergey Biryukov 3eb2bd9f5b Upload: Introduce `pre_wp_unique_filename_file_list` filter to allow for short-circuiting the `scandir()` call in `wp_unique_filename()`.
This allows plugins to override the file fetching behavior to provide performance improvements for large directories.

Props joehoyle.
Fixes #50587.

git-svn-id: https://develop.svn.wordpress.org/trunk@48369 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 10:18:25 +00:00
Andrea Fercia 7348112444 Accessibility: Improve color contrast for the blue links `:hover` state.
For a number of years, WordPress has been using a `#00a0d2` blue shade for the links `:hover` state. This blue shade doesn't have a sufficient color contrast with the various (too many) background colors used in the admin interface.

The new `#006799` blue shade is part of the official WordPress color palette and does have a sufficient color contrast with most of the admin backgrounds.

Props ryokuhi, audrasjb, joedolson, mapk.
See #47682.


git-svn-id: https://develop.svn.wordpress.org/trunk@48368 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 10:09:23 +00:00