Fixes bug introduced in [23639] where autosaves are not restored if revisions are disabled.
Props adamsilverstein.
Fixes#36262.
git-svn-id: https://develop.svn.wordpress.org/trunk@38009 602fd350-edb4-49c9-b593-d223f7449a82
Previously, if a user was added with the checkbox for no confirmation selected and an error was then encountered in `wpmu_activate_signup()`, a fatal error would trigger because `$new_user` was a `WP_Error` object rather than a user.
Fixes#37223.
git-svn-id: https://develop.svn.wordpress.org/trunk@38007 602fd350-edb4-49c9-b593-d223f7449a82
This prevents a PHP fatal error on the Nav Menus screen where `$args` is an object.
Props elrae.
Fixes#35021.
git-svn-id: https://develop.svn.wordpress.org/trunk@38004 602fd350-edb4-49c9-b593-d223f7449a82
In Firefox on Windows the menus and widgets panel weren't fully visible due to a miscalculation of the width of a panel, caused by a visible scrollbar.
Props wpfo.
Fixes#34622.
git-svn-id: https://develop.svn.wordpress.org/trunk@37984 602fd350-edb4-49c9-b593-d223f7449a82
`wp_plugin_update_rows()` and `wp_theme_update_rows()` are using the site transients `update_plugins` and `update_themes` which are set by `wp_update_plugins()` and `wp_update_themes()`. Both functions are hooked into `load-plugins.php` and `load-themes.php`. Therefore the update rows need to be registered after the transients were populated.
See #13071.
git-svn-id: https://develop.svn.wordpress.org/trunk@37978 602fd350-edb4-49c9-b593-d223f7449a82
This prevents conflicts with third-party messages (e.g. sent by browser extensions). The updates script expects a specific JSON-encoded message and now bails early if it's not valid JSON.
Fixes#37125.
git-svn-id: https://develop.svn.wordpress.org/trunk@37976 602fd350-edb4-49c9-b593-d223f7449a82
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the Dashboard. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.
Fixes#37131. See #37126.
git-svn-id: https://develop.svn.wordpress.org/trunk@37974 602fd350-edb4-49c9-b593-d223f7449a82
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the WordPress Updates screen. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.
Props Nikschavan.
Fixes#37126.
git-svn-id: https://develop.svn.wordpress.org/trunk@37973 602fd350-edb4-49c9-b593-d223f7449a82
The HTML for the toggle gets appended to the widget name which is later used for the widget title and the screen reader text of the toggle button. Storing the original widget name in the arguments allows us to use the name without the HTML for the screen reader text and doesn't require further changes by plugin developers.
Props nicholas_io, swissspidy.
Fixes#35021.
git-svn-id: https://develop.svn.wordpress.org/trunk@37972 602fd350-edb4-49c9-b593-d223f7449a82
After [37714], an error was unnecessarily being displayed in the JavaScript console when updating translations on `wp-admin/update-core.php`. Let's not throw an error in these cases.
Props afercia.
Fixes#37127.
git-svn-id: https://develop.svn.wordpress.org/trunk@37971 602fd350-edb4-49c9-b593-d223f7449a82
For plugins a `'wp-plugin-updating'` event is triggered, for themes there's now the `'wp-theme-updating'` equivalent.
Props DavidAnderson.
Fixes#37216.
git-svn-id: https://develop.svn.wordpress.org/trunk@37970 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a typo inside `wp.updates.installImporterSuccess()` as it's about installing an importer, not an installer.
Fixes#37273.
git-svn-id: https://develop.svn.wordpress.org/trunk@37969 602fd350-edb4-49c9-b593-d223f7449a82
* Use the same check for a numeric value used on the crop fields on all the other fields: don't display "NaN", just empty the field.
* Remove the inline script that runs the initialization of the image editor and call it after the editor UI is fully ready.
Props afercia.
Fixes#36316.
git-svn-id: https://develop.svn.wordpress.org/trunk@37966 602fd350-edb4-49c9-b593-d223f7449a82
`register_uninstall_hook()` is designed to be given a function callback (or a static class variable), not an array/object instance. This got blocked in [16339] but the option itself was never cleaned up.
Props polevaultweb.
Fixes#31625.
git-svn-id: https://develop.svn.wordpress.org/trunk@37965 602fd350-edb4-49c9-b593-d223f7449a82
* Set the direction of previews to LTR.
* Remove the ID attribute from the favicon preview in the customizer panel. The preview in the media modal uses the same ID which prevented updating the correct favicon preview.
Fixes#37286.
git-svn-id: https://develop.svn.wordpress.org/trunk@37964 602fd350-edb4-49c9-b593-d223f7449a82
Prevents displaying "Original:" without a title when adding a menu item without a title.
Props grapplerulrich, swissspidy.
Fixes#36729.
git-svn-id: https://develop.svn.wordpress.org/trunk@37953 602fd350-edb4-49c9-b593-d223f7449a82
`Pragma` is supposed to be a request header, but we've been including it in responses since the beginning of time.
This is a relic dating all the way back to b2, probably originally added because Internet Explorer version 5 and earlier didn't understand the `Cache-Control` header in responses, but they did (incorrectly) obey the `Pragma` header.
Internet Explorer 6 and 7 will obey the `Pragma` response header only if no other cache-related response headers are present (in our case, they are always present), and all other browsers ignore the `Pragma` response header.
Props geekysoft.
Fixes#37250.
git-svn-id: https://develop.svn.wordpress.org/trunk@37944 602fd350-edb4-49c9-b593-d223f7449a82
Prevents JavaScript errors by checking zxcvbn is defined before calling.
Changes `wp.passwordStrength.meter()` to return `-1` if the strength of the password is unknown.
On the user profile screen, `generatePassword()` checks if the user has entered the password before setting the value of the password input box.
Props peterwilsoncc, adamsilverstein.
Fixes#34905.
git-svn-id: https://develop.svn.wordpress.org/trunk@37940 602fd350-edb4-49c9-b593-d223f7449a82
In [37888], the comment text was initially updated, however an opportunity to make the text less trivializing of actions that users will take was missed. To quote Helen Hou-Sandi: "It's important not to trivialize actions that are perfectly reasonable for a user to find tricky (where to go to log in is not exactly intuitive, even with the rewrites we have now)."
The text of the comment now reads:
> Hi, this is a comment.
> To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
> Commenter avatars come from <a href="https://gravatar.com">Gravatar</a>.
Some interesting reading on the topic of "Simple" and "Easy" and how they relate to software development can be found at http://andrewspittle.com/2012/01/31/avoiding-easy/ and written by andrewspittle.
Props helen.
Fixes#36702.
git-svn-id: https://develop.svn.wordpress.org/trunk@37921 602fd350-edb4-49c9-b593-d223f7449a82
Resource hints allow browsers to prefetch specific pages or render them in the background to perform DNS lookups or to begin the connection handshake (DNS, TCP, TLS) in the background.
By default, `wp_resource_hints()` prints hints for "s.w.org" (the WordPress.org CDN) and for all scripts and styles which are enqueued from external hosts.
Use the `wp_resource_hints` filter to add custom domains and URLs for `dns-prefetch`, `preconnect`, `prefetch` or `prerender`.
Props voldemortensen, swissspidy.
Fixes#34292.
git-svn-id: https://develop.svn.wordpress.org/trunk@37920 602fd350-edb4-49c9-b593-d223f7449a82
The new format looks like "Sorry, you are not allowed to <action>.". This provides a consistent experience for all error messages related to missing permissions. It also reduces the number of similar strings and allows translators to provide a consistent style in their language.
Props ramiy, Presskopp.
Fixes#34521.
git-svn-id: https://develop.svn.wordpress.org/trunk@37914 602fd350-edb4-49c9-b593-d223f7449a82
On small screens, especially with longer translations, the pagination links and
text could break in two lines. This fixes it moving down the text in a new line.
Fixes#33962.
git-svn-id: https://develop.svn.wordpress.org/trunk@37912 602fd350-edb4-49c9-b593-d223f7449a82
The string is used during the network installation process to inform the user about where to store additional configuration data. Since the wp-config.php file can be translated the string should be too.
Props julesaus.
Fixes#36945.
git-svn-id: https://develop.svn.wordpress.org/trunk@37902 602fd350-edb4-49c9-b593-d223f7449a82
Adds an Edit button beside the menu location to allow users to switch to the selected menu for further edits.
Props celloexpressions.
Fixes#36795.
git-svn-id: https://develop.svn.wordpress.org/trunk@37901 602fd350-edb4-49c9-b593-d223f7449a82
This allows a developer to filter the arguments used to query sites during the `prepare_items()` method.
Props flixos90.
Fixes#26580.
git-svn-id: https://develop.svn.wordpress.org/trunk@37899 602fd350-edb4-49c9-b593-d223f7449a82
This changes the global `$wp_post_types` to an array of `WP_Post_Type` objects. `WP_Post_Type` includes methods to handle post type supports, rewrite rules, meta boxes, hooks, and taxonomies.
Each post type argument becomes a property of `WP_Post_Type`.
Props swissspidy, flixos90.
Fixes#36217.
git-svn-id: https://develop.svn.wordpress.org/trunk@37890 602fd350-edb4-49c9-b593-d223f7449a82
The new comment:
> A WordPress Commenter <!wapuu@wordpress.example>:
>
> Hi, this is a comment.
> To moderate comments, just log in. There you will have the option to edit or delete them.
> Commenter avatars come from <a href="!https://gravatar.com">Gravatar</a>.
Also introduces a network setting to set the email address of the first comment author on a new site.
Props Ipstenu, rachelbaker, jorbin, jeremyfelt.
Fixes#36702, #14268.
git-svn-id: https://develop.svn.wordpress.org/trunk@37888 602fd350-edb4-49c9-b593-d223f7449a82
`the_post()` sets the `$in_the_loop` property to true which is unexpected in the admin if you're using filters which should only affect real loops.
Props ruud@joyo.
Fixes#27042.
git-svn-id: https://develop.svn.wordpress.org/trunk@37881 602fd350-edb4-49c9-b593-d223f7449a82