* 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48424 602fd350-edb4-49c9-b593-d223f7449a82
* 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48423 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48422 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48419 602fd350-edb4-49c9-b593-d223f7449a82
Ensure that the uploaded zip is hidden from the media library, where a task will remove failed installs after two hours.
Fixes#50612.
Props psykro, desrosj, joyously, azaozz, noisysocks, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48417 602fd350-edb4-49c9-b593-d223f7449a82
Slashes and HTML encoding could cause some menus not to be updated.
Fixes#48011.
Props zaheerahmad, achyuthajoy, desrosj, pento, SergeyBiryukov, donmhico, audrasjb, birgire, mikeschroder.
git-svn-id: https://develop.svn.wordpress.org/trunk@48416 602fd350-edb4-49c9-b593-d223f7449a82
While the URLs are intended to be machine readable, they should always be LTR, while other data would be RTL in the sitemap.
Fixes#50449.
Props joyously, SergeyBiryukov, pbiron. apedog, ramiy.
git-svn-id: https://develop.svn.wordpress.org/trunk@48414 602fd350-edb4-49c9-b593-d223f7449a82
In addition, add the `wp_admin_viewport_meta()` function, paired to the `admin_viewport_meta` filter to control attributes of the meta tag.
Fixes#47369.
Props BettyJJ, mukesh27, SergeyBiryukov, ajayghaghretiya1, msaggiorato, talldanwp, davidbaumwald, donmhico, audrasjb.
git-svn-id: https://develop.svn.wordpress.org/trunk@48412 602fd350-edb4-49c9-b593-d223f7449a82
The `register_meta()` API now officially supports specifying a default metadata value. When `get_metadata()` is called for a meta key that does not yet exist for the object, this default value will be returned instead of an empty string.
A new function is introduced `get_metadata_raw` to retrieve the raw metadata value from the database, without applying the registered default.
Props spacedmonkey, flixos90, rmccue, kadamwhite, mnelson4, johnbillion, chrisvanpatten, TimothyBlynJacobs.
Fixes#43941.
git-svn-id: https://develop.svn.wordpress.org/trunk@48402 602fd350-edb4-49c9-b593-d223f7449a82
Because of changes to how PHP handles arrays used in `foreach()` loops in PHP >= 7.0, [48397] resulted in a failing test for PHP 5.6.
This calls `reset()` after using the `$results` array in the `foreach()` to ensure the array is treated the same and as expected.
Props azaozz, desrosj, SergeyBiryukov, xknown.
See #50448.
git-svn-id: https://develop.svn.wordpress.org/trunk@48401 602fd350-edb4-49c9-b593-d223f7449a82
This will prevent the options renamed for 5.5.0 from being converted twice. If a new update routine is added before 5.5 is released, the option values would be erased for anyone running `trunk` or nightlies without this change.
Props azaozz, desrosj, SergeyBiryukov, whyisjake.
Fixes#50413.
git-svn-id: https://develop.svn.wordpress.org/trunk@48400 602fd350-edb4-49c9-b593-d223f7449a82
This provides additional context to code running on this hook, including which plugin or theme update will be downloaded. It also brings consistency to this filter with others throughout the upgrade process.
Props obliviousharmony, desrosj.
Fixes#49686.
git-svn-id: https://develop.svn.wordpress.org/trunk@48399 602fd350-edb4-49c9-b593-d223f7449a82
At default, expands the excerpt view to become an extended view. Includes a new `table_view_mode` filter to allow further configuration.
Fixes#49715.
Props joedolson, audrasjb, afercia, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48398 602fd350-edb4-49c9-b593-d223f7449a82
This change adds a throttle mechanism to plugin and theme auto-update failure emails using similar logic to the email sent for a Core auto-update.
The first time a plugin or theme auto-update fails, the package and `new_version` will be tracked in the `auto_plugin_theme_update_emails` option. An email for this specific update attempt will not be resent.
However, if this update fails again and non-repeat failures or successful updates are also present, then the failure information will be included in that email (an email needs to be sent for the new events regardless).
Props johnbillion, arpitgshah, desrosj, audrasjb, pbiron, earnjam.
Fixes#50448.
git-svn-id: https://develop.svn.wordpress.org/trunk@48397 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50605.
git-svn-id: https://develop.svn.wordpress.org/trunk@48396 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50604.
git-svn-id: https://develop.svn.wordpress.org/trunk@48395 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50603.
git-svn-id: https://develop.svn.wordpress.org/trunk@48394 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50602.
git-svn-id: https://develop.svn.wordpress.org/trunk@48392 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the scripts and instead adds the translatable strings in the scripts directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50601.
git-svn-id: https://develop.svn.wordpress.org/trunk@48391 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [47598]:
- further improves the spacing after [47598] by better scoping the CSS to avoid layout glitches for custom widgets
- changes the RSS widget form to wrap the checkboxes in one single paragraph
Ideally, multiple related checkboxes and radio buttons should be grouped within a fieldset element with a legend. This will be addressed in a new Trac ticket.
Props mukesh27, SergeyBiryukov, sabernhardt.
Fixes#49228.
git-svn-id: https://develop.svn.wordpress.org/trunk@48389 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `$scripts->add_inline_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Fixes#50600.
git-svn-id: https://develop.svn.wordpress.org/trunk@48387 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50599.
git-svn-id: https://develop.svn.wordpress.org/trunk@48385 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50597.
git-svn-id: https://develop.svn.wordpress.org/trunk@48384 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50596.
git-svn-id: https://develop.svn.wordpress.org/trunk@48383 602fd350-edb4-49c9-b593-d223f7449a82
The script is not part of CI yet because the job takes 40mn to run
and it's not useful in all PRs/commits.
Fixes#50469.
git-svn-id: https://develop.svn.wordpress.org/trunk@48382 602fd350-edb4-49c9-b593-d223f7449a82
In [48273] the rest_get_route_for_post function was introduced. This simplifies determining the REST API route for any given post object and adds a filter for custom controllers.
Props ravatparmar.
Fixes#50529.
git-svn-id: https://develop.svn.wordpress.org/trunk@48381 602fd350-edb4-49c9-b593-d223f7449a82
Fix regression introduced in [48332] where the specificity
of the admin scheme link colors was higher than the remove link colors.
Props afercia.
Fixes#50536.
git-svn-id: https://develop.svn.wordpress.org/trunk@48376 602fd350-edb4-49c9-b593-d223f7449a82
- improves focus management by moving focus to the notices, if any, or to the first "tabbable" element
- this avoids a focus loss and helps Braille-only and screen magnification users to be aware of the messages
- adds an ARIA role `alert` to all the notices
- uses `wp.a11y.speak()` to announce messages to assistive technology
- this way, all visual users will see the messages while assistive technology users will get an audible message
- uses `wp.i18n` for translatable strings in `wp-admin/js/image-edit.js`
Props anevins, ryanshoover, antpb, SergeyBiryukov, afercia.
See #20491.
Fixes#47147.
git-svn-id: https://develop.svn.wordpress.org/trunk@48375 602fd350-edb4-49c9-b593-d223f7449a82