Commit Graph

29266 Commits

Author SHA1 Message Date
Sergey Biryukov
a6fed0173d Themes: Correct closing tag for the "Enable auto-updates" button in the JS template for theme auto-update setting.
Follow-up to [48418].

See #50516.
Built from https://develop.svn.wordpress.org/trunk@48428


git-svn-id: http://core.svn.wordpress.org/trunk@48197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 22:03:04 +00:00
Sergey Biryukov
4645084c09 Docs: Improve description for the JS function that hides the update button for expired plugin or theme uploads.
Add missing `@since` tag.

Follow-up to [48417].

See #50612.
Built from https://develop.svn.wordpress.org/trunk@48427


git-svn-id: http://core.svn.wordpress.org/trunk@48196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 21:15:03 +00:00
Sergey Biryukov
8ef38d34fc Docs: Improve @return tags for various conditional tags.
Props stevenlinx, SergeyBiryukov.
Fixes #50626.
Built from https://develop.svn.wordpress.org/trunk@48426


git-svn-id: http://core.svn.wordpress.org/trunk@48195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 20:23:06 +00:00
Sergey Biryukov
376435ac9a Sitemaps: Remove some extra space from WP_Sitemaps_Stylesheet::get_stylesheet_css().
Follow-up to [48414].

See #50449.
Built from https://develop.svn.wordpress.org/trunk@48425


git-svn-id: http://core.svn.wordpress.org/trunk@48194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 16:12:03 +00:00
Sergey Biryukov
51856d435b Administration: Bring some consistency to handling list table view modes.
* Remove duplicate variables and DocBlocks.
* Add missing description for the `$mode` global.
* Use sentence case for "Compact view" and "Extended view" labels.

Follow-up to [48398], [48423].

Props afercia, Offereins, SergeyBiryukov.
See #49715.
Built from https://develop.svn.wordpress.org/trunk@48424


git-svn-id: http://core.svn.wordpress.org/trunk@48193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 16:04:05 +00:00
Sergey Biryukov
0f92086ca0 Administration: Make some adjustments to WP_Screen::render_view_mode():
* Restore the `$mode` global for backward compatibility.
* Remove redundant check, as `$mode` is already set at this point, and already defaults to `list` via `get_user_setting()`'s second argument.
* Use sentence case for "View mode" and "Extended view" labels.

Follow-up to [48398].

See #49715.
Built from https://develop.svn.wordpress.org/trunk@48423


git-svn-id: http://core.svn.wordpress.org/trunk@48192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 16:02:05 +00:00
Adam Silverstein
7d0162bc2e Revisions: optimize performance when post has large number of revisions.
Improve speed and reduce the memory footprint when loading posts with many revisions.

* Use a direct query in `wp_get_post_autosave` to avoid loading all revisions.
* Query for IDs vs full objects in `register_and_do_post_meta_boxes`.

Props pdfernhout, johnnyb, miqrogroove, ocean90, senatorman, DBrumbaugh10Up, martijn-van-der-kooij, pavelevap, mackensen, mikeyarce, whyisjake.
Fixes #34560.


Built from https://develop.svn.wordpress.org/trunk@48422


git-svn-id: http://core.svn.wordpress.org/trunk@48191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 15:13:07 +00:00
Sergey Biryukov
3df6964fc8 Coding Standards: Use strict comparison in WP_List_Util::filter().
Correct comments per the documentation standards.

See #49542, #49572.
Built from https://develop.svn.wordpress.org/trunk@48421


git-svn-id: http://core.svn.wordpress.org/trunk@48190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 12:46:09 +00:00
Sergey Biryukov
b03053eb2a Docs: Correct documentation for customize_controls_head hook and _customizer_mobile_viewport_meta() function.
Follow-up to [48412].

See #47369.
Built from https://develop.svn.wordpress.org/trunk@48420


git-svn-id: http://core.svn.wordpress.org/trunk@48189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 11:36:07 +00:00
whyisjake
edb4943a9d Administration: Better align labels on the discussion options page.
The labels for Comment Moderation, and Comment Blocklist are now aligned properly with the adjacent text.

Fixes #37384.
Props ankit-k-gupta, karmatosed, FolioVision, desrosj, valentinbora, samful, whyisjake.

Built from https://develop.svn.wordpress.org/trunk@48419


git-svn-id: http://core.svn.wordpress.org/trunk@48188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 06:48:06 +00:00
whyisjake
28a390c2b2 Upgrade/Install: Use ARIA button class on plugin and theme auto-updates action links
According to the [accesability guidelines](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/#semantics-for-controls), the control should be a link when JavaScript is not available and a button the rest of the time.

In addition, handlers were added for spacebar usage, and some changes to the a11y speak verbiage.

Fixes #50516.
Props ryokuhi, audrasjb, afercia, whyisjake/



Built from https://develop.svn.wordpress.org/trunk@48418


git-svn-id: http://core.svn.wordpress.org/trunk@48187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 06:18:04 +00:00
whyisjake
836ad98276 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. 

Built from https://develop.svn.wordpress.org/trunk@48417


git-svn-id: http://core.svn.wordpress.org/trunk@48186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 06:08:06 +00:00
whyisjake
2c3672d2d1 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.


Built from https://develop.svn.wordpress.org/trunk@48416


git-svn-id: http://core.svn.wordpress.org/trunk@48185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 06:00:08 +00:00
whyisjake
9397ad46ba Coding Standards: Some missed code formatting.
Unprops: whyisjake.


Built from https://develop.svn.wordpress.org/trunk@48415


git-svn-id: http://core.svn.wordpress.org/trunk@48184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 01:01:03 +00:00
whyisjake
68e56464c4 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.


Built from https://develop.svn.wordpress.org/trunk@48414


git-svn-id: http://core.svn.wordpress.org/trunk@48183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 00:50:04 +00:00
whyisjake
35257c2e2d Formatting: Ensure that wp_filter_object_list() will return an array when being passed an object with magic methods.
Fixes #50095.

Props johnjamesjacoby.

Built from https://develop.svn.wordpress.org/trunk@48413


git-svn-id: http://core.svn.wordpress.org/trunk@48182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 00:31:06 +00:00
whyisjake
1158166d9c 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.


Built from https://develop.svn.wordpress.org/trunk@48412


git-svn-id: http://core.svn.wordpress.org/trunk@48181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-09 23:29:08 +00:00
Sergey Biryukov
d322fb66de Docs: Synchronize and correct documentation for various metadata functions and filters.
Follow-up to [47390], [47611], [48192], [48402].

See #49572, #43941, #45464.
Built from https://develop.svn.wordpress.org/trunk@48411


git-svn-id: http://core.svn.wordpress.org/trunk@48180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-09 11:26:07 +00:00
Sergey Biryukov
c4a2b9a9e4 Widgets: Adjust formatting for displaying the closing </nav> tag in widgets for consistency with the opening tag.
Follow-up to [48349].

See #48170.
Built from https://develop.svn.wordpress.org/trunk@48410


git-svn-id: http://core.svn.wordpress.org/trunk@48179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 13:44:04 +00:00
Sergey Biryukov
6fc76c162d Widgets: Correct the logic for displaying the after_widget parameter of the Archives widget.
Follow-up to [48349].

Props mukesh27, joyously.
Fixes #50609.
Built from https://develop.svn.wordpress.org/trunk@48409


git-svn-id: http://core.svn.wordpress.org/trunk@48178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 13:28:03 +00:00
Sergey Biryukov
6bf6bc451f Docs: Miscellaneous DocBlock corrections.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48408


git-svn-id: http://core.svn.wordpress.org/trunk@48177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 13:15:03 +00:00
Sergey Biryukov
755766f286 Docs: Further improve documentation for have_posts() and have_comments().
Follow-up to [48406]

Props stevenlinx.
See #50610.
Built from https://develop.svn.wordpress.org/trunk@48407


git-svn-id: http://core.svn.wordpress.org/trunk@48176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 11:15:04 +00:00
Sergey Biryukov
3311bc8783 Docs: Improve documentation for have_posts(), have_comments(), and their WP_Query counterparts.
Props stevenlinx.
Fixes #50610.
Built from https://develop.svn.wordpress.org/trunk@48406


git-svn-id: http://core.svn.wordpress.org/trunk@48175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 11:11:04 +00:00
Sergey Biryukov
c358ba7112 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.
Built from https://develop.svn.wordpress.org/trunk@48405


git-svn-id: http://core.svn.wordpress.org/trunk@48174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 10:58:05 +00:00
Sergey Biryukov
acee95fc07 Post WordPress 5.5 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@48404


git-svn-id: http://core.svn.wordpress.org/trunk@48173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 21:53:03 +00:00
Sergey Biryukov
354d8b90b8 WordPress 5.5 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@48403


git-svn-id: http://core.svn.wordpress.org/trunk@48172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 21:01:05 +00:00
TimothyBlynJacobs
13b10697bf 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.


Built from https://develop.svn.wordpress.org/trunk@48402


git-svn-id: http://core.svn.wordpress.org/trunk@48171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 20:47:05 +00:00
desrosj
500508884e 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.
Built from https://develop.svn.wordpress.org/trunk@48401


git-svn-id: http://core.svn.wordpress.org/trunk@48170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 20:38:03 +00:00
desrosj
a8521d48ac 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.
Built from https://develop.svn.wordpress.org/trunk@48400


git-svn-id: http://core.svn.wordpress.org/trunk@48169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 19:21:06 +00:00
desrosj
8381fad76e 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.
Built from https://develop.svn.wordpress.org/trunk@48399


git-svn-id: http://core.svn.wordpress.org/trunk@48168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 19:15:06 +00:00
whyisjake
dcdabb5bb3 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.


Built from https://develop.svn.wordpress.org/trunk@48398


git-svn-id: http://core.svn.wordpress.org/trunk@48167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 19:12:03 +00:00
desrosj
48da753ff0 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.
Built from https://develop.svn.wordpress.org/trunk@48397


git-svn-id: http://core.svn.wordpress.org/trunk@48166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 19:00:02 +00:00
Dominik Schilling
4377e9a44e 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.
Built from https://develop.svn.wordpress.org/trunk@48396


git-svn-id: http://core.svn.wordpress.org/trunk@48165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 18:55:04 +00:00
Dominik Schilling
0dc81cc24f 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.
Built from https://develop.svn.wordpress.org/trunk@48395


git-svn-id: http://core.svn.wordpress.org/trunk@48164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 18:40:05 +00:00
Dominik Schilling
291f3d76ec 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.
Built from https://develop.svn.wordpress.org/trunk@48394


git-svn-id: http://core.svn.wordpress.org/trunk@48163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 18:31:05 +00:00
Sergey Biryukov
ca1b6f324c Comments: Allow passing a custom class to the form container element in comment_form().
Props cjbj, yahil, mayankmajeji, andraganescu, SergeyBiryukov.
Fixes #41009.
Built from https://develop.svn.wordpress.org/trunk@48393


git-svn-id: http://core.svn.wordpress.org/trunk@48162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 18:29:04 +00:00
Dominik Schilling
ac4f93a5be 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.
Built from https://develop.svn.wordpress.org/trunk@48392


git-svn-id: http://core.svn.wordpress.org/trunk@48161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 18:15:03 +00:00
Dominik Schilling
daf060bbd2 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.
Built from https://develop.svn.wordpress.org/trunk@48391


git-svn-id: http://core.svn.wordpress.org/trunk@48160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 18:02:05 +00:00
Andrew Ozz
49bbff551b 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.
Built from https://develop.svn.wordpress.org/trunk@48390


git-svn-id: http://core.svn.wordpress.org/trunk@48159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 17:49:05 +00:00
Andrea Fercia
bc15db7b97 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.

Built from https://develop.svn.wordpress.org/trunk@48389


git-svn-id: http://core.svn.wordpress.org/trunk@48158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 17:29:04 +00:00
Andrea Fercia
a5721358e1 Docs: Reference the documentation of the new navigation_widgets_format filter instead of repeating it.
Follow-up to [48349].

Props johnbillion.
Fixes #48170.

Built from https://develop.svn.wordpress.org/trunk@48388


git-svn-id: http://core.svn.wordpress.org/trunk@48157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 17:06:04 +00:00
Dominik Schilling
4a21cda313 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.
Built from https://develop.svn.wordpress.org/trunk@48387


git-svn-id: http://core.svn.wordpress.org/trunk@48156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 17:01:06 +00:00
Andrew Ozz
d1dc207128 Media, REST API: Allow media edit endpoint to find remote files.
Props jonsurrell.
Fixes #50595.
Built from https://develop.svn.wordpress.org/trunk@48386


git-svn-id: http://core.svn.wordpress.org/trunk@48155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 16:51:04 +00:00
Dominik Schilling
2b32883f8b 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.
Built from https://develop.svn.wordpress.org/trunk@48385


git-svn-id: http://core.svn.wordpress.org/trunk@48154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 16:49:05 +00:00
Dominik Schilling
964c506fb3 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.
Built from https://develop.svn.wordpress.org/trunk@48384


git-svn-id: http://core.svn.wordpress.org/trunk@48153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 16:14:06 +00:00
Dominik Schilling
7e7b70cd1a 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.
Built from https://develop.svn.wordpress.org/trunk@48383


git-svn-id: http://core.svn.wordpress.org/trunk@48152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 16:10:05 +00:00
youknowriad
ef78b5ba5a 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.

Built from https://develop.svn.wordpress.org/trunk@48382


git-svn-id: http://core.svn.wordpress.org/trunk@48151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 16:08:28 +00:00
TimothyBlynJacobs
0615a9ab37 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.

Built from https://develop.svn.wordpress.org/trunk@48381


git-svn-id: http://core.svn.wordpress.org/trunk@48150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 15:31:02 +00:00
John Blackbourn
3c41801c5c Administration: Reinstate the description for the admin_xml_ns hook which was accidentally removed in [47771].
See #46015.
Built from https://develop.svn.wordpress.org/trunk@48380


git-svn-id: http://core.svn.wordpress.org/trunk@48149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 14:57:02 +00:00
ellatrix
c3e3c7ed6c Editor: update packages
Fixes #50589.


Built from https://develop.svn.wordpress.org/trunk@48379


git-svn-id: http://core.svn.wordpress.org/trunk@48148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 14:43:35 +00:00
Sergey Biryukov
30747fab22 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.
Built from https://develop.svn.wordpress.org/trunk@48378


git-svn-id: http://core.svn.wordpress.org/trunk@48147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 14:16:03 +00:00
John Blackbourn
913f5aaab9 Docs: Correct some @since entries added in 5.5.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48377


git-svn-id: http://core.svn.wordpress.org/trunk@48146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 14:14:04 +00:00
youknowriad
b3f1fa4edc 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.

Built from https://develop.svn.wordpress.org/trunk@48376


git-svn-id: http://core.svn.wordpress.org/trunk@48145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 13:47:02 +00:00
Andrea Fercia
aee4324b9e 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.

Built from https://develop.svn.wordpress.org/trunk@48375


git-svn-id: http://core.svn.wordpress.org/trunk@48144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 13:45:02 +00:00
Sergey Biryukov
181717c9ab Plugins: Make sure the HTML ID attributes in plugin action links are unique.
Follow-up to [47588].

Props mukesh27, roytanck, SergeyBiryukov.
Fixes #49916.
Built from https://develop.svn.wordpress.org/trunk@48374


git-svn-id: http://core.svn.wordpress.org/trunk@48143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 13:43:02 +00:00
Andrea Fercia
22d0cd6c96 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.

Built from https://develop.svn.wordpress.org/trunk@48373


git-svn-id: http://core.svn.wordpress.org/trunk@48142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 13:00:02 +00:00
Sergey Biryukov
3ba7789829 Bootstrap/Load: Set WP_DEBUG to true by default on development environments.
Props johnbillion, kraftbj, Clorith, joostdevalk, dlh.
Fixes #33161.
Built from https://develop.svn.wordpress.org/trunk@48372


git-svn-id: http://core.svn.wordpress.org/trunk@48141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 12:57:04 +00:00
youknowriad
4fbd235b25 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.

Built from https://develop.svn.wordpress.org/trunk@48371


git-svn-id: http://core.svn.wordpress.org/trunk@48140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 11:30:01 +00:00
Sergey Biryukov
4518255c93 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.
Built from https://develop.svn.wordpress.org/trunk@48370


git-svn-id: http://core.svn.wordpress.org/trunk@48139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 11:01:59 +00:00
Sergey Biryukov
82d9974f8c 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.
Built from https://develop.svn.wordpress.org/trunk@48369


git-svn-id: http://core.svn.wordpress.org/trunk@48138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 10:20:03 +00:00
Andrea Fercia
afa6bb4f1a 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.

Built from https://develop.svn.wordpress.org/trunk@48368


git-svn-id: http://core.svn.wordpress.org/trunk@48137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 10:11:05 +00:00
Sergey Biryukov
24ed3a9a30 REST API: Correct the check for $version argument in rest_handle_doing_it_wrong().
Move `WP_REST_Response` and `WP_Error` class names out of the translatable string.

Follow-up to [48327], [48361].

See #36271.
Built from https://develop.svn.wordpress.org/trunk@48367


git-svn-id: http://core.svn.wordpress.org/trunk@48136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 09:56:02 +00:00
Sergey Biryukov
371dbf6dcf Docs: Miscellaneous DocBlock corrections.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48365


git-svn-id: http://core.svn.wordpress.org/trunk@48134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 09:30:04 +00:00
Sergey Biryukov
156fcc21be Docs: Improve DocBlocks in wp-includes/nav-menu-template.php per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48364


git-svn-id: http://core.svn.wordpress.org/trunk@48133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 09:28:01 +00:00
Sergey Biryukov
adb9f003ed Site Health: Correct translator comment for the message displayed after clicking "remind me later" on the admin email confirmation.
Adjust the logic for displaying the message for better readability.

Follow-up to [48359].

See #48333.
Built from https://develop.svn.wordpress.org/trunk@48363


git-svn-id: http://core.svn.wordpress.org/trunk@48132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 09:20:02 +00:00
Andrea Fercia
b7ed7cb184 Administration: Fix typo in forms.css after [46866].
A stray `e` made browsers ignore a CSS ruleset preventing select elements from changing color on hover.

Props ryokuhi.
See #48420.
Fixes #50580.

Built from https://develop.svn.wordpress.org/trunk@48362


git-svn-id: http://core.svn.wordpress.org/trunk@48131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 07:05:03 +00:00
whyisjake
ad1c6c9586 REST API: Trigger _doing_it_wrong() if wp_send_json() is used on a REST API request
In addition to triggering the `_doing_it_wrong()` logging, also adds a `X-WP-DoingItWrong` header.

Fixes #36271.

Props rmccue, TimothyBlynJacobs.


Built from https://develop.svn.wordpress.org/trunk@48361


git-svn-id: http://core.svn.wordpress.org/trunk@48130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 05:01:07 +00:00
whyisjake
93b69e27d4 Administration: Ensure that disabled buttons look disabled.
This change removes the disabled state from the admin scheme specific styles.

Fixes #48709.

Props drw158, SergeyBiryukov, afercia, kennethroberson5556, melchoyce, joedolson, valentinbora, audrasjb, larrach, nrqsnchz, youknowriad.


Built from https://develop.svn.wordpress.org/trunk@48360


git-svn-id: http://core.svn.wordpress.org/trunk@48129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 04:21:07 +00:00
whyisjake
aad1fa48ea Site Health: Ensure that the user will be notified after a successful snooze action.
After clicking remind me later, the user is shown an admin notification.

Fixes #48333.

Props desrosj, sathyapulse, Clorith, azaozz, audrasjb, afragen, whyisjake.
 

Built from https://develop.svn.wordpress.org/trunk@48359


git-svn-id: http://core.svn.wordpress.org/trunk@48128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 03:59:02 +00:00
whyisjake
6542769c56 Coding standards: Fix a few phpcs errors to get tests passing.
See [48356], #43517.

Built from https://develop.svn.wordpress.org/trunk@48358


git-svn-id: http://core.svn.wordpress.org/trunk@48127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 03:55:02 +00:00
TimothyBlynJacobs
d76e635459 REST API: Add support for the uniqueItems keyword.
Props sorenbronsted.
Fixes #48821.

Built from https://develop.svn.wordpress.org/trunk@48357


git-svn-id: http://core.svn.wordpress.org/trunk@48126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 03:22:03 +00:00
whyisjake
49d23a2bbe Taxonomy: Add support for default terms for custom taxonomies.
The new default_term argument is added to `register_taxonomy()` allowing a user to define the default term `name` and optionally `slug` and `description`. 

Fixes #43517.

Props enrico.sorcinelli, SergeyBiryukov, desrosj, davidbaumwald, whyisjake.


Built from https://develop.svn.wordpress.org/trunk@48356


git-svn-id: http://core.svn.wordpress.org/trunk@48125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 00:55:03 +00:00
whyisjake
a7ad4e288e Bundled theme: Ensure appropriate title for author archives for that don't have posts.
Rather then displaying `Author: `, show `Nothing Found`.

Fixes #50421.

Props SGr33n, williampatton, ianbelanger, rebasaurus, priyomukul, virginienacci, audrasjb.


Built from https://develop.svn.wordpress.org/trunk@48355


git-svn-id: http://core.svn.wordpress.org/trunk@48124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 23:12:03 +00:00
whyisjake
216ea50a03 Coding Standards: Add newlines to package files.
See [48353].


Built from https://develop.svn.wordpress.org/trunk@48354


git-svn-id: http://core.svn.wordpress.org/trunk@48123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 23:03:05 +00:00
whyisjake
8dfe21b246 Coding standards: Revert the changes from [48352] to package.json and package-lock.json.
These changes were included accidentally. 

See [48352].

Unprops: whyisjake.

Built from https://develop.svn.wordpress.org/trunk@48353


git-svn-id: http://core.svn.wordpress.org/trunk@48122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 22:09:19 +00:00
whyisjake
81b809e3d6 Administration: Move more table strings to sentence casing.
WordPress as a project has moved largely to sentence casing for UI elements in the admin. This commit moves several string$

* Move to trash
* Mark as spam
* Permanently delete comment
* Approve comment
* In response to
* Bulk actions
* Not spam
* Sumitted on
* Delete permanently
* Add media
* Upload files
* Upload images
* Add media
* Bulk select
* Restore from trash
* Search media
* Attachment details
* Create gallery
* Edit gallery
* Cancel gallery
* Add to gallery
* Image details
* Replace image
* Cancel edit
* Edit image
* Choose image
* Select and crop
* Skip cropping
* Crop image
* Audio details
* Replace audio
* Add audio source
* Video details
* Replace video
* Add video source
* Select poster image
* Add subtitles
* Create audio playlist
* Edit audio playlist.
* Cancel audio playlist
* Create video playlist
* Edit video playlist
* Add to video playlist
* Filter media


Fixes #40244.
Props afercia, bhargavbhandari90, rcutmore, webzunft, manojlovic, jeremyfelt, desrosj, lschuyler, SergeyBiryukov, whyisjake. 


Built from https://develop.svn.wordpress.org/trunk@48352


git-svn-id: http://core.svn.wordpress.org/trunk@48121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 21:52:21 +00:00
Dominik Schilling
93662e1d32 I18N: Fix typo in [48348].
Props swizzzpidy.
See #50578.
Built from https://develop.svn.wordpress.org/trunk@48351


git-svn-id: http://core.svn.wordpress.org/trunk@48120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 21:34:04 +00:00
Dominik Schilling
3d95a45675 I18N: Use wp.i18n for translatable strings in wp-admin/js/tags-box.js and wp-admin/js/tags-suggest.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 #50579.
Built from https://develop.svn.wordpress.org/trunk@48350


git-svn-id: http://core.svn.wordpress.org/trunk@48119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 21:00:03 +00:00
Andrea Fercia
04921ffd45 Accessibility: Widgets: Add theme support to make widgets output list of links wrapped within a <nav> element.
Widgets that output list of links can now be wrapped within `<nav>` elements to improve semantics and accessibility.

The `<nav>` elements are also native landmark regions, which helps assistive technology users to navigate through them. Themes can opt-in to this new behavior by declaring support for the new `html5` feature `navigation-widgets`.

Props joedolson, simonjanin, audrasjb, afercia.
Fixes #48170.

Built from https://develop.svn.wordpress.org/trunk@48349


git-svn-id: http://core.svn.wordpress.org/trunk@48118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 20:44:02 +00:00
Dominik Schilling
1145607a85 I18N: Use wp.i18n for translatable strings in wp-admin/js/edit-comments.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 #50578.
Built from https://develop.svn.wordpress.org/trunk@48348


git-svn-id: http://core.svn.wordpress.org/trunk@48117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 20:17:02 +00:00
Dominik Schilling
31d93c553a I18N: Use wp.i18n for translatable strings in wp-admin/js/tags.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 #50577.
Built from https://develop.svn.wordpress.org/trunk@48347


git-svn-id: http://core.svn.wordpress.org/trunk@48116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:47:03 +00:00
Dominik Schilling
163e0ac228 I18N: Use wp.i18n for translatable strings in wp-admin/js/theme-plugin-editor.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.

Fixes #50576.
Built from https://develop.svn.wordpress.org/trunk@48346


git-svn-id: http://core.svn.wordpress.org/trunk@48115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:35:07 +00:00
desrosj
bc7de32645 Coding Standards: Correct two coding standards issues introduced in [48277] and [48334].
See #50504, #50550.
Built from https://develop.svn.wordpress.org/trunk@48345


git-svn-id: http://core.svn.wordpress.org/trunk@48114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:23:02 +00:00
desrosj
77af0e5982 Docs: Correct instances of “auto update” with “auto-update” for consistency.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48344


git-svn-id: http://core.svn.wordpress.org/trunk@48113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:15:03 +00:00
desrosj
ef0881750c Docs: Correct typo introduced in [48288].
See #42775.
Built from https://develop.svn.wordpress.org/trunk@48343


git-svn-id: http://core.svn.wordpress.org/trunk@48112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:10:02 +00:00
youknowriad
1fd50f7b2d Administration: Adapts the secondary buttons colors to the admin schemes.
The admin schemes that don't meet the contrast guidelines are excluded from this change.

Props mapk, michaelarestad, mcsf, ocean90.
Closes #50537.

Built from https://develop.svn.wordpress.org/trunk@48342


git-svn-id: http://core.svn.wordpress.org/trunk@48111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 19:00:04 +00:00
Sergey Biryukov
ecd07ddada Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.
See #50573.
Built from https://develop.svn.wordpress.org/trunk@48341


git-svn-id: http://core.svn.wordpress.org/trunk@48110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 18:22:02 +00:00
Andrea Fercia
454dab13c1 Accessibility: Administration: Improve the sortable postboxes areas on the Dashboard and Classic Editor pages.
- makes the postboxes areas in the Dashboard visible also on large screens 
- uses a more meaningful text when all postboxes areas are empty instead of "Drag boxes here"
- restores the ability to drag boxes to the "advanced" area in the Classic Editor page
- makes the postboxes areas in the Classic Editor page visible while dragging so that users have a clue what the available areas are
- improves the color contrast of the postboxes areas while dragging
- uses `wp.i18n` for translatable strings in `wp-admin/js/postbox.js`

Props xkon, karmatosed, audrasjb, ocean90, joedolson, afercia, azaozz.
See #20491.
Fixes #49288, #47541.

Built from https://develop.svn.wordpress.org/trunk@48340


git-svn-id: http://core.svn.wordpress.org/trunk@48109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 18:03:02 +00:00
Sergey Biryukov
5ad2cf365e Coding Standards: Fix JSHint issue in js/_enqueues/lib/auth-check.js
See #49573.
Built from https://develop.svn.wordpress.org/trunk@48339


git-svn-id: http://core.svn.wordpress.org/trunk@48108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 16:27:02 +00:00
Sergey Biryukov
b99cce4e7a Tests: Add some assertions to PDF tests for better debugging.
Props enrico.sorcinelli.
See #50573.
Built from https://develop.svn.wordpress.org/trunk@48338


git-svn-id: http://core.svn.wordpress.org/trunk@48107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 16:16:02 +00:00
Andrew Ozz
b93b409976 Heartbeat: Do not disable the login prompts when the user needs to log in again but has closed the log in modal. Add a 5 minutes timeout before asking them to log in again.
Props dsixinetu, adamsilverstein, azaozz.
Fixes #49573.
Built from https://develop.svn.wordpress.org/trunk@48337


git-svn-id: http://core.svn.wordpress.org/trunk@48106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 16:14:04 +00:00
youknowriad
f867b02772 Block Editor: Requires title and content when registering block patterns.
Props poena.
See #50550.

Built from https://develop.svn.wordpress.org/trunk@48336


git-svn-id: http://core.svn.wordpress.org/trunk@48105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 12:04:02 +00:00
youknowriad
4fa05e90e8 Block Editor: Remove the Testimonials block pattern.
This ensures we have the same patterns used in the Gutenberg plugin.

Props poena.
See #50550.

Built from https://develop.svn.wordpress.org/trunk@48335


git-svn-id: http://core.svn.wordpress.org/trunk@48104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 11:19:04 +00:00
youknowriad
777872bdb1 Block Editor: Add the initial set of block patterns.
Included patterns:

text-two-columns
two-buttons
two-images
text-two-columns-with-images
text-three-columns-buttons
large-header
large-header-paragraph
three-buttons
quote
testimonials

Props mcsf, nrqsnchz.
See #50550.

Built from https://develop.svn.wordpress.org/trunk@48334


git-svn-id: http://core.svn.wordpress.org/trunk@48103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 10:50:02 +00:00
Sergey Biryukov
c69101301b Tests: Correct hardcoded "3 months ago" assertion in tests/rest-api/rest-block-directory-controller.php.
Now that more than 3 months have passed since 2020-03-23, this was causing test failures.

Follow-up to [48242].

See #50321.
Built from https://develop.svn.wordpress.org/trunk@48333


git-svn-id: http://core.svn.wordpress.org/trunk@48102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 09:51:03 +00:00
youknowriad
82487d4b29 Administration: Fix link colors for admin schemes that personalize it using the $link SASS variable.
The new "moderne" admin scheme color personalizes the link color using the $link SASS variable.
The link color doesn't apply consistently in the admin to all links, especiall button links.

Fixes #50536.

Built from https://develop.svn.wordpress.org/trunk@48332


git-svn-id: http://core.svn.wordpress.org/trunk@48101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 09:25:02 +00:00
Sergey Biryukov
234d0aff5c Coding Standards: Fix WPCS issues in tests/media.php.
See #50543.
Built from https://develop.svn.wordpress.org/trunk@48331


git-svn-id: http://core.svn.wordpress.org/trunk@48100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 09:19:05 +00:00
Sergey Biryukov
8a815f22e7 Privacy: Simplify the logic for updating the meta values for personal data export requests from absolute to relative paths.
Follow-up to [48127].

See #44038.
Built from https://develop.svn.wordpress.org/trunk@48330


git-svn-id: http://core.svn.wordpress.org/trunk@48099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-06 00:34:04 +00:00
Andrew Ozz
08dbc4c3bb Media:
- Introduce `wp_image_file_matches_image_meta()` utility function to check whether the image meta (retrieved by attachment ID) matches an image path or URI. A mismatch may happen in some cases, for example after the posts have been exported from one website and imported in another.
- Add unit tests for the new function.
- Improve `wp_image_src_get_dimensions()` a bit and use the new function to prevent these edge cases.

Fixes #50543.
Built from https://develop.svn.wordpress.org/trunk@48329


git-svn-id: http://core.svn.wordpress.org/trunk@48098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 23:32:03 +00:00
Sergey Biryukov
4e3bad1770 Query: Make sure the found_posts property of WP_Query is always an integer, to match the documented type.
This makes the property consistent with similar properties of other classes:
* `WP_Comment_Query::$found_comments`
* `WP_Network_Query::$found_networks`
* `WP_Site_Query::$found_sites`
* `WP_User_Query::$total_users`

Props birgire, PressLabs.
Fixes #42469.
Built from https://develop.svn.wordpress.org/trunk@48328


git-svn-id: http://core.svn.wordpress.org/trunk@48097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 21:34:02 +00:00
Sergey Biryukov
69e7e7681b Plugins: Consistently use an empty string as the default value for $replacement and $message parameters in:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `apply_filters_deprecated()`
* `do_action_deprecated()`

This matches the documented type of `string` for these parameters and removes unnecessarily strict `! is_null()` checks.

Follow-up to [46792].

Props jignesh.nakrani, renathoc, SergeyBiryukov.
Fixes #49698.
Built from https://develop.svn.wordpress.org/trunk@48327


git-svn-id: http://core.svn.wordpress.org/trunk@48096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 21:09:03 +00:00
Sergey Biryukov
87f464c283 Plugins: Use include_once instead of include in uninstall_plugin(), in case the plugin file is already included.
Props valchovski, pcfreak30.
Fixes #47796.
Built from https://develop.svn.wordpress.org/trunk@48326


git-svn-id: http://core.svn.wordpress.org/trunk@48095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 20:32:03 +00:00
Sergey Biryukov
514ba95009 Docs: Fix typos in comments in tests/dependencies/jquery.php.
Props hareesh-pillai.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48325


git-svn-id: http://core.svn.wordpress.org/trunk@48094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 20:29:00 +00:00
Andrew Ozz
e0d2307ec5 Build/Test Tools: update PHPUnit tests after [48323]. Disable and keep the specific jQuery Migrate dependency tests for use in WP 5.6.
See #37110.
Built from https://develop.svn.wordpress.org/trunk@48324


git-svn-id: http://core.svn.wordpress.org/trunk@48093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 19:24:08 +00:00
Andrew Ozz
bc54b15893 External Libraries: First step of updating jQuery. Disable jQuery Migrate 1.4.1, keep jQuery at 1.12.4-wp, and UI at 1.11.4. Also keep the jquery-core script handle for full backwards compatibility.
Props jorbin, adamsilverstein, westonruter, retlehs, pento, onokazu, galbaras, netweb, zakkath, dmethvin, LittleBigThing, markgoho, iandunn, remzicavdar, bigcloudmedia, jacklinkers, levdbas, a4jpcom, azaozz.

See #37110.
Built from https://develop.svn.wordpress.org/trunk@48323


git-svn-id: http://core.svn.wordpress.org/trunk@48092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 18:28:04 +00:00
Sergey Biryukov
f14f0c1ddf XML-RPC: Explicitly unset the reference to the parser resource after calling xml_parser_free() to avoid memory leaks in PHP 7.0.0 or higher.
Props procifer, ayeshrajans.
Fixes #49700.
Built from https://develop.svn.wordpress.org/trunk@48322


git-svn-id: http://core.svn.wordpress.org/trunk@48091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 15:22:01 +00:00
Sergey Biryukov
b0703f3749 Options, Meta APIs: Introduce register_setting and unregister_setting actions.
Props Howdy_McGee, Pionect.
Fixes #37245.
Built from https://develop.svn.wordpress.org/trunk@48321


git-svn-id: http://core.svn.wordpress.org/trunk@48090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 15:07:06 +00:00
Sergey Biryukov
93abb3b3d0 Docs: Improve documentation for various option functions.
Props andfinally, david.binda, SergeyBiryukov.
Fixes #49566.
Built from https://develop.svn.wordpress.org/trunk@48320


git-svn-id: http://core.svn.wordpress.org/trunk@48089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 14:46:03 +00:00
Dominik Schilling
310db57c48 Administration: Add delete_count to wp_removable_query_args().
It's a single-use URL parameter that does not need to be passed to canonical URLs in the admin.

Props opurockey.
Fixes #50464.
Built from https://develop.svn.wordpress.org/trunk@48319


git-svn-id: http://core.svn.wordpress.org/trunk@48088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 13:57:03 +00:00
Dominik Schilling
56afcf2d68 Posts: Provide a HiDPI version for the avatar used in post locked dialogs.
Props wpdesk, audrasjb, ocean90.
Fixes #39633.
Built from https://develop.svn.wordpress.org/trunk@48318


git-svn-id: http://core.svn.wordpress.org/trunk@48087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 13:00:07 +00:00
Sergey Biryukov
618eeabba8 Tests: Remove ja_JP locale from Tests_DB::test_locale_floats().
This test is only relevant for locales using a comma as a decimal separator, while `ja_JP` uses a dot.

Props gh640, johnjamesjacoby, SergeyBiryukov.
Fixes #49690.
Built from https://develop.svn.wordpress.org/trunk@48317


git-svn-id: http://core.svn.wordpress.org/trunk@48086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 12:52:04 +00:00
Sergey Biryukov
201c7fbf97 Administration: Bring the update nag in line with other admin notices.
In addition to more consistent display, this gives it a visible border on the About page.

Props desrosj, nikhilbhansi, afercia, SergeyBiryukov.
Fixes #50372.
Built from https://develop.svn.wordpress.org/trunk@48316


git-svn-id: http://core.svn.wordpress.org/trunk@48085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 11:57:04 +00:00
Dominik Schilling
6496c61741 Multisite: Delete the signup entry when a user is deleted from the database.
When a user has registered with incorrect data and got the account deleted immediately, it currently wasn't possible to register with the same login or email address again due to the existing signup entry. They had to wait for two days until the entry gets automatically deleted. Now the associated signup entry gets deleted as part of the account deletion.

Fixes #43232.
Built from https://develop.svn.wordpress.org/trunk@48315


git-svn-id: http://core.svn.wordpress.org/trunk@48084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 11:21:03 +00:00
Sergey Biryukov
de751a91db Taxonomy: Introduce saved_term and saved_{$taxonomy} actions to complement created_term and created_{$taxonomy}.
This allows for hooking into both the create and update events with a single callback, in the same way that is already possible for posts via the `save_post` and `save_post_{$post->post_type}` actions.

Props dlh.
Fixes #48416.
Built from https://develop.svn.wordpress.org/trunk@48314


git-svn-id: http://core.svn.wordpress.org/trunk@48083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 11:13:03 +00:00
Dominik Schilling
5b7774722e Users: Pass the WP_User object to the wpmu_delete_user, delete_user, and deleted_user actions.
See #43232.
Built from https://develop.svn.wordpress.org/trunk@48313


git-svn-id: http://core.svn.wordpress.org/trunk@48082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:57:01 +00:00
Sergey Biryukov
e0be0aef8b Posts, Post Types: Clarify some "Error in deleting" messages, use more specific strings for attachments.
Props dingo_d.
See #50546.
Built from https://develop.svn.wordpress.org/trunk@48312


git-svn-id: http://core.svn.wordpress.org/trunk@48081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:41:10 +00:00
Dominik Schilling
40a660461e Administration: Make all color schemes available when running from /src.
To run WordPress from /src you have to use the `--dev` flag which also builds the color scheme stylesheets thus the restriction is no longer required.

See #44492.
Fixes #50558.
Built from https://develop.svn.wordpress.org/trunk@48311


git-svn-id: http://core.svn.wordpress.org/trunk@48080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:40:02 +00:00
Sergey Biryukov
9f92384fe7 Post Thumbnails: Change the return value of get_post_thumbnail_id() for a non-existing post to false instead of an empty string.
This further makes the function more consistent with `get_the_ID()` or `wp_get_post_parent_id()`, both returning `false` for a non-existing post.

Additionally, document that `get_post_thumbnail_id()` returns `0` if the thumbnail image is not set.

Follow-up to [47160].

Props theMikeD, dingo_d, netpassprodsr, SergeyBiryukov.
Fixes #49832. See #40096.
Built from https://develop.svn.wordpress.org/trunk@48310


git-svn-id: http://core.svn.wordpress.org/trunk@48079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 10:17:02 +00:00
Andrea Fercia
e661df6b9e Docs: Replace @returns tag in media/views/attachment/details.js with @return.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.

Follow-up to [46800], [48232].
See #49572.

Built from https://develop.svn.wordpress.org/trunk@48309


git-svn-id: http://core.svn.wordpress.org/trunk@48078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 08:03:01 +00:00
TimothyBlynJacobs
0386c0ae6c REST API: Remove specific multi-type schema handling from the themes controller.
Multi-type schema handling was improved in [48306]. In particular, it now allows for sanitizing a multi-typed value that wouldn't validate. Removing this handling will make 3rd party registered theme features more robust.

Fixes #50562.

Built from https://develop.svn.wordpress.org/trunk@48308


git-svn-id: http://core.svn.wordpress.org/trunk@48077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 01:06:02 +00:00
TimothyBlynJacobs
e6f620570d REST API: Correct the return type of rest_sanitize_value_from_schema.
Fixes #45486.
Props birgire, Jean-David, mukesh27, priyankkpatel.

Built from https://develop.svn.wordpress.org/trunk@48307


git-svn-id: http://core.svn.wordpress.org/trunk@48076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 00:19:02 +00:00
TimothyBlynJacobs
77b474c905 REST API: Make multi-typed schemas more robust.
A multi-type schema is a schema where the `type` keyword is an array of possible types instead of a single type. For instance, `[ 'object', 'string' ]` would allow objects or string values.

In [46249] basic support for these schemas was introduced. The validator would loop over each schema type trying to find a version that matched. This worked for valid values, but for invalid values it provided unhelpful error messages. The sanitizer also had its utility restricted.

In this commit, the validators and sanitizers will first determine the best type of the passed value and then apply the schema with that set type. In the case that a value could match multiple types, the schema of the first matching type will be used.

To maintain backward compatibility, if unsupported schema types are used, the value will always pass validation. A doing it wrong notice is issued in this case.

Fixes #50300.
Props pentatonicfunk, dlh, TimothyBlynJacobs.

Built from https://develop.svn.wordpress.org/trunk@48306


git-svn-id: http://core.svn.wordpress.org/trunk@48075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-05 00:15:05 +00:00
Sergey Biryukov
0ba0b61ed8 Login and Registration: Set a more appropriate page title for the "check your email" step of new user registration or password reset.
Follow-up to [48304].

See #40605, #41514.
Built from https://develop.svn.wordpress.org/trunk@48305


git-svn-id: http://core.svn.wordpress.org/trunk@48074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 22:03:02 +00:00
Sergey Biryukov
722df60bcd Login and Registration: Hide the login form on the "check your email" step of new user registration or password reset.
This aims to reduce some confusion and make it clearer that the email should be checked before attempting to log in right away.

Props rianrietveld, pratik028, bdbch, johnbillion, hankthetank, yashrs, williampatton, audrasjb, bmartinent, florianatwhodunit, henry.wright, birgire, SergeyBiryukov.
Fixes #40605, #41514.
Built from https://develop.svn.wordpress.org/trunk@48304


git-svn-id: http://core.svn.wordpress.org/trunk@48073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 21:58:03 +00:00
Sergey Biryukov
324cd48507 Login and Registration: Remove newpass value handling in wp-login.php.
This value is never set as of [15710].

See #40605.
Built from https://develop.svn.wordpress.org/trunk@48303


git-svn-id: http://core.svn.wordpress.org/trunk@48072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 21:15:02 +00:00
Sergey Biryukov
6adad022e2 Docs: Correct spelling of "backward compatibility" per the Core Contributor Handbook glossary.
Follow-up to [45232].

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48302


git-svn-id: http://core.svn.wordpress.org/trunk@48071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 20:42:06 +00:00
Sergey Biryukov
db0e0ca245 Coding Standards: Wrap some long lines in wp-admin/js/site-health.js per the JS coding standards for better readability.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@48301


git-svn-id: http://core.svn.wordpress.org/trunk@48070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:56:07 +00:00
TimothyBlynJacobs
5ffac7cab7 REST API: Only validate the format keyword if the type is a string.
This allows for using multi-type support with a string that has a format. For backwards compatibility support, the format validation will still apply if the type is not specified, or it is invalid.

Two new doing it wrong notices are issued when omitting a type, or using an invalid type.

Props ryotsun.
Fixes #50189.

Built from https://develop.svn.wordpress.org/trunk@48300


git-svn-id: http://core.svn.wordpress.org/trunk@48069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:53:03 +00:00
Sergey Biryukov
e3e45b6428 Customize: Correct the check for rendered widgets in WP_Customize_Widgets::is_widget_rendered().
Make the structure of `::$rendered_sidebars` and `::$rendered_widgets` properties consistent.

This resolves an issue with every widget being marked as inactive by default on the Widgets panel.

Props dlh, afercia, SergeyBiryukov.
Fixes #50508.
Built from https://develop.svn.wordpress.org/trunk@48299


git-svn-id: http://core.svn.wordpress.org/trunk@48068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:35:01 +00:00
Sergey Biryukov
d90213bf18 Docs: Replace @returns tag in wp-admin/js/post.js with @return.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.

Follow-up to [46800], [48232].

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48298


git-svn-id: http://core.svn.wordpress.org/trunk@48067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:10:10 +00:00
Sergey Biryukov
c65f40956e Coding Standards: Rename functions in wp-admin/js/site-health.js per the JS coding standards.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@48297


git-svn-id: http://core.svn.wordpress.org/trunk@48066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 19:09:07 +00:00
Sergey Biryukov
5fb7c090de Media: Add heic extension to wp_get_ext_types(), for consistency with wp_get_mime_types().
Follow-up to [48288].

Props imath.
Fixes #50557. See #42775.
Built from https://develop.svn.wordpress.org/trunk@48296


git-svn-id: http://core.svn.wordpress.org/trunk@48065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 17:09:01 +00:00
TimothyBlynJacobs
633c453fcc Script Loader: Add id attributes to script assets.
This commit adds a unique ID attribute to script loader generated <script> tags as well as related <script> tags for inline JavaScript, translations, or parameters.

This is a first step in adding support for lazy loading scripts and styles, but for now is only used to assist in debugging generated output.

Props dd32, spacedmonkey.
See #48654.

Built from https://develop.svn.wordpress.org/trunk@48295


git-svn-id: http://core.svn.wordpress.org/trunk@48064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 16:54:02 +00:00
Dominik Schilling
df320b33c2 Themes: Introduce get_the_archive_title_prefix filter for changing the prefix used for archive titles.
In `get_the_archive_title()` split the internal `$title` variable into `$title` and `$prefix`. By using the new `get_the_archive_title_prefix` filter the prefix can now wrapped with custom elements or removed completely by using

{{{
add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );
}}}

Also, wrap the title part with a `span` element and pass the original title and prefix to the existing `get_the_archive_title` filter, allowing further customization to the archive titles.

Props Kaira, milindmore22, shireling, grapplerulrich, audrasjb, desrosj, Confridin, ramiy, ocean90.
Fixes #31237.
Fixes #38545.
Built from https://develop.svn.wordpress.org/trunk@48294


git-svn-id: http://core.svn.wordpress.org/trunk@48063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 14:45:01 +00:00
Andrea Fercia
2e992505ac Accessibility: Improve the focus style for Windows High Contrast mode in various parts of the admin interface.
Continues the introduction in core of new focus styles dedicated to Windows High Contrast mode. The new styles use a transparent CSS outline.
This change covers some parts of the interface for the meta boxes, Widgets, and the Customizer.

Props joedolson, kjellr, antpb, mikeschroder, Hareesh Pillai.
See #41286, #45910.
Fixes #47117.

Built from https://develop.svn.wordpress.org/trunk@48293


git-svn-id: http://core.svn.wordpress.org/trunk@48062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 10:44:03 +00:00
Sergey Biryukov
43cbe21a3e Administration: Use HTTPS for XHTML Friends Network URL.
Props raajtram, jrf, passoniate, bookdude13, sabernhardt, audrasjb.
Fixes #48002.
Built from https://develop.svn.wordpress.org/trunk@48292


git-svn-id: http://core.svn.wordpress.org/trunk@48061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 09:33:01 +00:00
TimothyBlynJacobs
5af864369c REST API: Introduce endpoint for editing images.
To facilitate inline image editing in Gutenberg, a new endpoint at wp/v2/media/<id>/edit has been introduced. This is functionally similar to the existing ajax image editor, however the REST API editor creates a new attachment record instead of updating an existing attachment.

Fixes #44405.
Props ajlende, ellatrix, spacedmonkey, azaozz.


Built from https://develop.svn.wordpress.org/trunk@48291


git-svn-id: http://core.svn.wordpress.org/trunk@48060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 04:15:05 +00:00
Sergey Biryukov
953868b3a3 Bundled Themes: Use HTTPS for XHTML Friends Network URL.
Props raajtram, jrf, passoniate, bookdude13, sabernhardt, audrasjb.
See #48002.
Built from https://develop.svn.wordpress.org/trunk@48290


git-svn-id: http://core.svn.wordpress.org/trunk@48059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 23:42:01 +00:00
Sergey Biryukov
07bce8970a General: Use HTTPS for the Web Address field example on Edit Link screen.
Props raajtram, jrf, passoniate, bookdude13, sabernhardt, audrasjb.
See #48002.
Built from https://develop.svn.wordpress.org/trunk@48289


git-svn-id: http://core.svn.wordpress.org/trunk@48058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 23:36:03 +00:00
Andrew Ozz
86317e3e85 Media: Show an error message when a .heic file is uploaded that this type of files cannot be displayed in a web browser and suggesting to convert to JPEG. The message is shown by using filters, plugins that want to handle uploading of .heic files can remove it.
Props mattheweppelsheimer, mikeschroder, jeffr0, andraganescu, desrosj, azaozz.
Fixes #42775.
Built from https://develop.svn.wordpress.org/trunk@48288


git-svn-id: http://core.svn.wordpress.org/trunk@48057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 23:15:03 +00:00
Sergey Biryukov
054610e276 Text Changes: Remove use of "normal" in user-facing output.
This clarifies some messages referring to Site Health checks and maintenance mode, and makes them more accurate.

Props dartiss.
Fixes #50549.
Built from https://develop.svn.wordpress.org/trunk@48287


git-svn-id: http://core.svn.wordpress.org/trunk@48056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 21:59:03 +00:00
Dominik Schilling
6a889c150d Build tools: After [48277], ignore CSS files in src/wp-admin/css/colors/modern when building WordPress to src.
See #50504.
Built from https://develop.svn.wordpress.org/trunk@48286


git-svn-id: http://core.svn.wordpress.org/trunk@48055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 19:18:02 +00:00
Dominik Schilling
718626a8ce I18N: Use wp.i18n for translatable strings in wp-includes/js/wp-auth-check.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 #50553.
Built from https://develop.svn.wordpress.org/trunk@48285


git-svn-id: http://core.svn.wordpress.org/trunk@48054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 19:05:03 +00:00
Sergey Biryukov
8e43a329d4 Privacy: Hide views that have a count of 0 on privacy request tables, for consistency with other list tables.
Props pbiron, garrett-eclipse, mapk, melchoyce, estelaris.
Fixes #47495.
Built from https://develop.svn.wordpress.org/trunk@48284


git-svn-id: http://core.svn.wordpress.org/trunk@48053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 16:28:04 +00:00
Andrea Fercia
83c7b67c32 Accessibility: Themes: Use a default empty alt attribute for the non-linked custom logo on the home page.
After [48039] it became clear that the non-linked custom logo on the home page needs an empty alt attribute, as in most of the cases the logo is decorative and doesn't need its purpose to be described.

This change outputs an empty alt attribute by default for the custom logo on the home page. If necessary, it is possible to use the new 'get_custom_logo_image_attributes' filter to manipulate the default attributes for the logo image and set an alt attribute.

Props FlorianBrinkmann, Soean, sabernhardt, audrasjb, SergeyBiryukov, samful, knutsp.
See #36640.
Fixes #37011.

Built from https://develop.svn.wordpress.org/trunk@48283


git-svn-id: http://core.svn.wordpress.org/trunk@48052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 12:58:07 +00:00
Pascal Birchler
69e876747d Sitemaps: Do not unnecessarily call WP_Query::get_posts() in posts provider.
The posts have already been fetched at this point, no need to do it again.

Props Chouby.
Fixes #50463.
Built from https://develop.svn.wordpress.org/trunk@48282


git-svn-id: http://core.svn.wordpress.org/trunk@48051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 12:03:01 +00:00
Andrea Fercia
b8e3d63fdd Accessibility: Plugins: Accessibility and CSS improvements for the Plugins pages.
- improves checkboxes alignment on the "Plugins" page table in the responsive view 
- improves spacing between form controls on the "Add Plugins" page in the responsive view 
- the layout of the "filter bar" on the "Add Plugins" page is now based on CSS Flexbox 
- removes italic type from a paragraph in the "Favorites" page

Props passoniate, garethgillman, maxpertici, audrasjb, sabernhardt, afercia.
See #47327.
Fixes #49231.

Built from https://develop.svn.wordpress.org/trunk@48281


git-svn-id: http://core.svn.wordpress.org/trunk@48050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-03 08:51:05 +00:00
Sergey Biryukov
f665e823a5 Tests: Further fix some issues with indeterminate sort ordering in Tests_List_Pages:
* Make sure `test_wp_list_pages_number()` sorts by ID, as there are several pages with the same title.
* Limit `test_wp_list_pages_sort_column()` to one level, as the child page fixtures don't have an author and cannot be reliably sorted by `post_author`.

Follow-up to [48157].

Props afercia.
See #50466.
Built from https://develop.svn.wordpress.org/trunk@48280


git-svn-id: http://core.svn.wordpress.org/trunk@48049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 18:23:04 +00:00
gziolo
707cb4a35b Editor: Move core blocks registration to init hook
After working on support for register_block_type_args filter in #49615, it became clear that we need to use init action for core blocks to make it possible to use this filter.

Fixes #50263.


Built from https://develop.svn.wordpress.org/trunk@48279


git-svn-id: http://core.svn.wordpress.org/trunk@48048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 17:22:03 +00:00
desrosj
f7d2a408d9 External Libraries: Update getID3 to version 1.9.20.
A full list of changes in this update can be found on GitHub: https://github.com/JamesHeinrich/getID3/compare/v1.9.19...v1.9.20.

Props hareesh-pillai, desrosj.
Previously [47601-47604].
Fixes #49945.
Built from https://develop.svn.wordpress.org/trunk@48278


git-svn-id: http://core.svn.wordpress.org/trunk@48047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 15:48:04 +00:00
youknowriad
bbe8f41de2 Color schemes: Add new modern color scheme option.
This PR adds a new color scheme option, which uses a high luminosity blue spot color, almost-black menu, and pure white for menu items. 
This helps increase contrast, and bring more consistency with some of the higher contrast colors used in the block editor.

Props joen, ibdz, shaunandrews.
Fixes #50504.

Built from https://develop.svn.wordpress.org/trunk@48277


git-svn-id: http://core.svn.wordpress.org/trunk@48046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 14:55:05 +00:00
Sergey Biryukov
25fb9a9d3a Script Loader: Restore correct versions for Masonry and imagesLoaded.
These libraries were previously updated in [48038], but some changes were accidentally reverted in [48267].

Props kebbet.
See #50526.
Built from https://develop.svn.wordpress.org/trunk@48276


git-svn-id: http://core.svn.wordpress.org/trunk@48045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 13:10:08 +00:00
Sergey Biryukov
ec571bdcf6 Docs: Spell "falsey" in a consistent way.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48275


git-svn-id: http://core.svn.wordpress.org/trunk@48044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 11:30:02 +00:00
Sergey Biryukov
07d2c8a4e9 I18N: Use wp.i18n for translatable strings in wp-admin/js/privacy-tools.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, afercia.
See #20491.
Fixes #50535.
Built from https://develop.svn.wordpress.org/trunk@48274


git-svn-id: http://core.svn.wordpress.org/trunk@48043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 11:11:06 +00:00
TimothyBlynJacobs
8d11801c86 REST API: Link to the REST route for the currently queried resource.
This allows for programatically determining the REST version of the current page. The links also aid human discovery of the REST API in general.

Props dshanske, tfrommen, TimothyBlynJacobs.
Fixes #49116.

Built from https://develop.svn.wordpress.org/trunk@48273


git-svn-id: http://core.svn.wordpress.org/trunk@48042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 05:57:01 +00:00
Felix Arntz
1d010a49c7 Media: Improve support for opting out of lazy-loading for template images.
With this changeset, in addition to the already present `wp_lazy_loading_enabled` filter, developers can now opt out of lazy-loading template images via `wp_get_attachment_image()` by passing a `loading` attribute with boolean value `false`. This can be used e.g. by theme developers on images which are very likely to be in the initial viewport.

This changeset also improves related test coverage.

Props adamsilverstein, azaozz, joemcgill, johnbillion.
See #50425, #44427.

Built from https://develop.svn.wordpress.org/trunk@48272


git-svn-id: http://core.svn.wordpress.org/trunk@48041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-02 02:03:03 +00:00
whyisjake
55b80358a5 Bundled Themes: Update latest version for Tested up to: in readme.txt file.
Fixes #50503.
Props mukesh27, hareesh-pillai.


Built from https://develop.svn.wordpress.org/trunk@48271


git-svn-id: http://core.svn.wordpress.org/trunk@48040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 22:06:05 +00:00
Dominik Schilling
2fab13ae3e I18N: Use wp.i18n for translatable strings in wp-admin/js/user-profile.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 #50527.
Built from https://develop.svn.wordpress.org/trunk@48270


git-svn-id: http://core.svn.wordpress.org/trunk@48039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 20:38:01 +00:00
desrosj
4329bd950b External Libraries: Update Moment.js to version 2.27.0.
A full list of changes in this update can be found on GitHub: https://github.com/moment/moment/compare/2.26.0...2.27.0

Props hareesh-pillai, desrosj.
Previously [48075].
Fixes #50408.
Built from https://develop.svn.wordpress.org/trunk@48269


git-svn-id: http://core.svn.wordpress.org/trunk@48038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 20:29:19 +00:00
Andrea Fercia
87756494cc Media: Enable JavaScript translations for the media-views script after [48232].
See #48463.

Built from https://develop.svn.wordpress.org/trunk@48268


git-svn-id: http://core.svn.wordpress.org/trunk@48037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 20:21:06 +00:00
Dominik Schilling
77b2440f9f I18N: Use wp.i18n for translatable strings in wp-admin/js/common.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 #50526.
Built from https://develop.svn.wordpress.org/trunk@48267


git-svn-id: http://core.svn.wordpress.org/trunk@48036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 19:50:02 +00:00
Dominik Schilling
d686fa266b I18N: Use wp.i18n for translatable strings in wp-includes/js/wp-pointer.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 #50525.
Built from https://develop.svn.wordpress.org/trunk@48266


git-svn-id: http://core.svn.wordpress.org/trunk@48035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 19:30:02 +00:00
Andrea Fercia
45d19872fc Accessibility: Media: Fix the Image Editor mismatching keyboard focus order and visual reading order.
Swaps the DOM order of the two main columns within the admin Image Editor.

When the sequence in which content is presented affects its meaning and the navigation sequences affect meaning or operation, visual order and DOM order must match. See WCAG 2.1 Success Criterion 1.3.2 Meaningful Sequence and Success Criterion 2.4.3 Focus Order.

Props sabernhardt, anevins, audrasjb, afercia.
Fixes #47136.

Built from https://develop.svn.wordpress.org/trunk@48265


git-svn-id: http://core.svn.wordpress.org/trunk@48034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 14:29:01 +00:00
Sergey Biryukov
30e0cf9fcd Docs: Bundled Themes: Correct DocBlock placement for custom header and background argument filters.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48264


git-svn-id: http://core.svn.wordpress.org/trunk@48033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 13:52:01 +00:00
gziolo
9a9352da00 Editor: Support filtering arguments in block type registration
Adds possibility to filter the settings of a block type during its registration.

Props aduth, azaozz.
Fixes #49615.


Built from https://develop.svn.wordpress.org/trunk@48263


git-svn-id: http://core.svn.wordpress.org/trunk@48032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 13:10:02 +00:00
gziolo
eafcf52d18 Editor: Register core blocks on the server
Exposes all core blocks (excluding embeds) on the server to be used with the REST API block types endpoint.

Props spacedmonkey, timothyblynjacobs.
Fixes #50263.


Built from https://develop.svn.wordpress.org/trunk@48262


git-svn-id: http://core.svn.wordpress.org/trunk@48031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 12:29:03 +00:00
gziolo
eeb4d75c57 Editor: More strict checks for globals in render_block
Props kraftbj.
Fixes #49927.


Built from https://develop.svn.wordpress.org/trunk@48243


git-svn-id: http://core.svn.wordpress.org/trunk@48012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 06:08:06 +00:00
TimothyBlynJacobs
083134f694 REST API: Introduce plugin management and block directory endpoints.
These endpoints facilitate the Block Directory Inserter feature in Gutenberg. Users can now install, activate, deactivate, and delete plugins over the REST API. The block directoryendpoint allows searching for available blocks from the WordPress.org block directory.

Props cklee, talldanwp, noisysocks, joen, soean, youknowriad, dufresnesteven, gziolo, dd32, tellyworth, ryelle, spacedmonkey, TimothyBlynJacobs.
Fixes #50321.


Built from https://develop.svn.wordpress.org/trunk@48242


git-svn-id: http://core.svn.wordpress.org/trunk@48011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-01 04:24:03 +00:00
Sergey Biryukov
7ac100615f Administration: Pass the result of set-screen-option filter to the new set_screen_option_{$option} filter to ensure backward compatibility.
Rename the `$keep` parameter of both filters to `$screen_option` for clarity, update the documentation to better reflect its purpose.

Props Chouby, sswells, SergeyBiryukov.
Fixes #50392.
Built from https://develop.svn.wordpress.org/trunk@48241


git-svn-id: http://core.svn.wordpress.org/trunk@48010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 21:53:03 +00:00
Sergey Biryukov
e61075ad2a Administration: Always show the filters on media and post list tables.
Previously, the filters were hidden for single posts or attachments, which could only be achieved by editing the URL manually.

The `is_singular()` check was added long before the list tables were introduced, and appears to no longer serve any purpose in the current code.

As a side effect, this resolves an issue where a non-existing attachment ID in the URL would block further search in Media Library.

Props afercia, tomdude, audrasjb, bencroskery, desrosj, SergeyBiryukov.
Fixes #38221.
Built from https://develop.svn.wordpress.org/trunk@48240


git-svn-id: http://core.svn.wordpress.org/trunk@48009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 20:36:05 +00:00
Felix Arntz
70c8bd2333 Media: Only add loading attribute to img tags using double quotes.
Props azaozz.
Fixes #50367.

Built from https://develop.svn.wordpress.org/trunk@48239


git-svn-id: http://core.svn.wordpress.org/trunk@48008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 20:34:06 +00:00
Sergey Biryukov
6cb2f5491b Code Modernization: Introduce the spread operator in WP_HTTP_IXR_Client.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

This makes the signature of `WP_HTTP_IXR_Client::query()` compatible with the parent class method.

Follow-up to [48204].

Props ayeshrajans.
See #48267, #47678.
Built from https://develop.svn.wordpress.org/trunk@48238


git-svn-id: http://core.svn.wordpress.org/trunk@48007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 19:50:04 +00:00
Felix Arntz
e92ab44880 Media: Introduce wp_img_tag_add_width_and_height_attr() to add dimension attributes to images.
Following up on [48170], this changeset moves the new logic to add missing `img` dimension attributes into a separate function that is run first within `wp_filter_content_tags()`. It also adds a utility function `wp_image_src_get_dimensions()` with logic reused from `wp_image_add_srcset_and_sizes()`, and it ensures that `width` and `height` attributes only get added if both of the attributes are missing on the original `img` tag.

This changeset furthermore improves test coverage and separates tests for the different aspects of `img` tag modification.

Props azaozz.
Fixes #50367. See #44427.

Built from https://develop.svn.wordpress.org/trunk@48237


git-svn-id: http://core.svn.wordpress.org/trunk@48006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 19:30:08 +00:00
Andrea Fercia
438d16c69d Fix Privacy tests after [48234].
See #50335.

Built from https://develop.svn.wordpress.org/trunk@48236


git-svn-id: http://core.svn.wordpress.org/trunk@48005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 14:22:03 +00:00
Sergey Biryukov
bf222a442b Comments: Make wp_update_comment() return false instead of 0 for an invalid comment or post ID.
This addresses an inconsistency where 0 could mean one of the three scenarios:

* Invalid comment ID.
* Invalid comment post ID.
* No DB rows updated. This is not an error and should not be treated as one.

With this change, `wp_update_comment()` always returns either `false` or a `WP_Error` object on failure, depending on the value of the `$wp_error` parameter.

Follow-up to [48154], [48215], [48216], [48218], [48230].

Props dd32, jnylen0, enrico.sorcinelli.
Fixes #39732. See #38700, #39735.
Built from https://develop.svn.wordpress.org/trunk@48235


git-svn-id: http://core.svn.wordpress.org/trunk@48004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 14:12:04 +00:00
Andrea Fercia
c4f6669d69 Accessibility: Privacy: Accessibility improvements for the Privacy Policy Guide page.
Improves accessibility of the "Copy this section" button and "Return to Top" link:
- uses `setTimeout()` and `clearTimeout()` to properly handle the "Copied!" text
- simplifies the button text by removing the redundant visually hidden text
- fixes the mismatching visual and DOM order of the Copy button and the "Return to Top" link 
- improves the "Return to Top" links by providing real page fragment identifiers, when possible
- hides the "Return to Top" up arrow from assistive technologies
- minor coding standards

Props afercia, garrett-eclipse.
See #48463, #50322.
Fixes #50335.

Built from https://develop.svn.wordpress.org/trunk@48234


git-svn-id: http://core.svn.wordpress.org/trunk@48003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 13:56:03 +00:00
Andrea Fercia
7a785704c0 Accessibility: Site Health: Improve the "Copy site info" button accessibility.
- avoids a focus loss when clicking the "Copy site info" button
- uses `setTimeout()` and `clearTimeout()` to properly handle the "Copied!" text
- minor JavaScript coding standards

Props audrasjb, Clorith, afercia.
See #48463, #50335.
Fixes #50322.

Built from https://develop.svn.wordpress.org/trunk@48233


git-svn-id: http://core.svn.wordpress.org/trunk@48002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 13:26:03 +00:00
Andrea Fercia
eebf187963 Accessibility: Media: Add a "Copy URL" button to the attachment File URL fields.
For a number of years, various screens in the WordPress admin provided users with a readonly input field to copy the attachment file URL. Manually copying from a readonly field is an annoying task at best even for mouser users. It's a usability and accessibility issue at the same time. 
These fields now have a new "Copy URL" button that is easy to use and accessible to everyone.

Props theolg, markdubois, vabrashev, sajjad67, xkon, nrqsnchz, melchoyce, audrasjb, afercia.
See #41612, #50322, #50335.
Fixes #48463.

Built from https://develop.svn.wordpress.org/trunk@48232


git-svn-id: http://core.svn.wordpress.org/trunk@48001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 13:16:04 +00:00
Sergey Biryukov
91a38c62ea Tests: Place remove_filter() calls for _wp_update_comment_data_filter() before the assertions, for consistency with other tests.
Follow-up to [48154], [48222].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48231


git-svn-id: http://core.svn.wordpress.org/trunk@48000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 12:29:03 +00:00
Sergey Biryukov
8ac810e460 Comments: Add a @since note to the wp_update_comment_data filter about returning a WP_Error value.
Remove the ability to short-circuit comment update by returning `false` from the filter for now.

This was inconsistent with the `pre_comment_approved` filter, and should not be necessary if a more descriptive reason can be given by always using `WP_Error`.

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48230


git-svn-id: http://core.svn.wordpress.org/trunk@47999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 12:03:04 +00:00
Sergey Biryukov
265239b2e5 Coding Standards: Add missing visibility keywords to Tests_Comment methods.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@48229


git-svn-id: http://core.svn.wordpress.org/trunk@47998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 11:40:06 +00:00
Sergey Biryukov
0a23967d0c Tests: Remove unnecessary i18n from _wp_update_comment_data_filter().
Follow-up to [48154], [48217].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48228


git-svn-id: http://core.svn.wordpress.org/trunk@47997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 11:36:02 +00:00
Sergey Biryukov
4532d5a30a Comments: Correct $wpdb->prepare() usage in _wp_batch_update_comment_type().
Follow-up to [47597], [48225].

See #50513, #49236.
Built from https://develop.svn.wordpress.org/trunk@48227


git-svn-id: http://core.svn.wordpress.org/trunk@47996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 11:30:02 +00:00
Sergey Biryukov
345549a412 Docs: Correct $wp_query global reference in render_block().
See #49927, #49572.
Built from https://develop.svn.wordpress.org/trunk@48226


git-svn-id: http://core.svn.wordpress.org/trunk@47995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 11:16:00 +00:00
Sergey Biryukov
18c5348b2f Comments: Introduce wp_update_comment_type_batch_size filter for the comment batch size in _wp_batch_update_comment_type().
Follow-up to [47597].

Props dchymko.
Fixes #50513. See #49236.
Built from https://develop.svn.wordpress.org/trunk@48225


git-svn-id: http://core.svn.wordpress.org/trunk@47994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 11:06:02 +00:00
gziolo
0249959306 Editor: Introduce block context
Backports a new block context feature from Gutenberg. The purpose of this feature is to be able to establish values in a block hierarchy which can be consumed by blocks anywhere lower in the same hierarchy. These values can be established either by the framework, or by other blocks which provide these values. See documentation: https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/block-api/block-context.md

Props aduth, epiqueras.
Fixes #49927.


Built from https://develop.svn.wordpress.org/trunk@48224


git-svn-id: http://core.svn.wordpress.org/trunk@47993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 11:04:04 +00:00
Sergey Biryukov
0a805dbee6 Docs: Add a @since note to edit_comment() about the new return value.
Follow-up to [48154].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48223


git-svn-id: http://core.svn.wordpress.org/trunk@47992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 01:04:03 +00:00
Sergey Biryukov
b9d52142c8 Tests: Remove unnecessary tearDown() method in Tests_Ajax_EditComment.
Restoring the hook-related globals to their state at `setUp()` is addressed by `WP_UnitTestCase_Base::_restore_hooks()`.

Follow-up to [48154].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48222


git-svn-id: http://core.svn.wordpress.org/trunk@47991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 01:00:04 +00:00
Sergey Biryukov
ca11e26edb Docs: Remove @return void from some tests, per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48221


git-svn-id: http://core.svn.wordpress.org/trunk@47990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 00:44:04 +00:00
Sergey Biryukov
89242ed8e5 Docs: Improve documentation for Ajax comment tests per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48220


git-svn-id: http://core.svn.wordpress.org/trunk@47989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 00:43:01 +00:00
Sergey Biryukov
7a235fc584 Docs: Correct documentation for the filter parameter of get_category() and get_tag().
Follow-up to [48197].

See #49572.
Built from https://develop.svn.wordpress.org/trunk@48219


git-svn-id: http://core.svn.wordpress.org/trunk@47988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-30 00:04:05 +00:00
Sergey Biryukov
f5942603c0 Comments: Make wp_update_comment() return a WP_Error object for a canceled update, if $wp_error parameter is true.
Remove redundant checks for `wp_update_comment()` results being `false`, as the function always returns a `WP_Error` object now if `$wp_error` is true.

Follow-up to [48154], [48215], [48216].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48218


git-svn-id: http://core.svn.wordpress.org/trunk@47987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 23:42:03 +00:00
Sergey Biryukov
c6824c4330 Tests: Remove unnecessary i18n from _wp_update_comment_data_filter().
Follow-up to [48154].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48217


git-svn-id: http://core.svn.wordpress.org/trunk@47986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 23:09:05 +00:00
Sergey Biryukov
e2936bd7e5 Comments: Make wp_update_comment() return a WP_Error object on database error, if $wp_error parameter is true.
Follow-up to [48154], [48215].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48216


git-svn-id: http://core.svn.wordpress.org/trunk@47985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 23:06:04 +00:00
Sergey Biryukov
d8a08ecada Comments: Minor adjustments to wp_update_comment():
* Revert the logic of `$wp_error` checks to avoid negation.
* Clarify the return value, restore the edits from [47017].
* Update `wp_update_comment_data` filter check to allow `false` to prevent the update.

Follow-up to [48154].

See #39732.
Built from https://develop.svn.wordpress.org/trunk@48215


git-svn-id: http://core.svn.wordpress.org/trunk@47984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 22:44:03 +00:00
Sergey Biryukov
347e831768 Docs: Improve documentation for the $prev_value parameter and return result of various metadata update functions.
Props stevenlinx.
Fixes #50502. See #49572.
Built from https://develop.svn.wordpress.org/trunk@48214


git-svn-id: http://core.svn.wordpress.org/trunk@47983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 21:22:09 +00:00
gziolo
7d19adab35 Chore: Update package-lock.json file
Improve the shape of package-lock.json file to make it stable. The main change is that both dependencies of WordPress packages that use npm aliases are listed as development dependencies: puppeteer and prettier. This patch includes also block.json files for dynamic blocks copied from WordPress packages.

Props ellatrix.
Fixes #50420.


Built from https://develop.svn.wordpress.org/trunk@48213


git-svn-id: http://core.svn.wordpress.org/trunk@47982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 11:50:29 +00:00
Sergey Biryukov
37dea23ce8 Docs: Document the return value of wp_get_attachment_metadata() using hash notation.
Props stevenlinx.
Fixes #50505.
Built from https://develop.svn.wordpress.org/trunk@48212


git-svn-id: http://core.svn.wordpress.org/trunk@47981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 11:20:08 +00:00
Sergey Biryukov
5a60d4b3b0 Customize: Do not allow changesets to be deleted when someone is editing them.
This makes the behavior consistent with that of locked posts, which can't be deleted via the list tables when another user is editing them.

Props dlh.
Fixes #50501.
Built from https://develop.svn.wordpress.org/trunk@48211


git-svn-id: http://core.svn.wordpress.org/trunk@47980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 10:33:08 +00:00
Sergey Biryukov
71244fc29e Customize: Ensure the default message in LockedNotification is set to a string instead of null.
This avoids a JS error when passing the message to `wp.a11y.speak()` when showing the "changeset is locked" overlay to prevent two users from editing the same changeset simultaneously.

Props dlh.
Fixes #50500.
Built from https://develop.svn.wordpress.org/trunk@48210


git-svn-id: http://core.svn.wordpress.org/trunk@47979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-29 09:49:05 +00:00