* 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
Themes which are not yet updated can still have the old tags. This makes sure that these tags are still translated.
See #33407.
git-svn-id: https://develop.svn.wordpress.org/trunk@37946 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
Fixes mistake in the current behavior, where the sanitization callback ran before the validation callback. Now the validation callback will run before the sanitization.
Props schlessera, rachelbaker.
See #37247.
Fixes#37192.
git-svn-id: https://develop.svn.wordpress.org/trunk@37943 602fd350-edb4-49c9-b593-d223f7449a82
Reverses order where sanitization was being applied before validation originally in accordance with REST API logic.
Props westonruter, schlessera.
See #34893.
See #37192.
Fixes#37247.
git-svn-id: https://develop.svn.wordpress.org/trunk@37942 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
The initial implementation used a `single` argument, which has now been added to the whitelist.
props Faison.
see #35658.
git-svn-id: https://develop.svn.wordpress.org/trunk@37934 602fd350-edb4-49c9-b593-d223f7449a82
* `min-height`, `max-height`, `min-width`, and `max-width` were added in 4.4, see [33739].
* `list-style-type` was added in 4.6, see [37898].
See #35877. See #32246.
git-svn-id: https://develop.svn.wordpress.org/trunk@37931 602fd350-edb4-49c9-b593-d223f7449a82
Before [37628], there were 3 separate conditions for ordering by domain and/or path in `get_site_by_path()` that each resulted in it's own query. Now that `get_sites()` is used and supports `WP_Site_Query`, this can be simplified.
Props spacedmonkey.
Fixes#37215.
git-svn-id: https://develop.svn.wordpress.org/trunk@37930 602fd350-edb4-49c9-b593-d223f7449a82
After [37923], `get_blog_details()` contained a now unnecessary attempt at back-compat for objects stored in cache.
See #36717.
git-svn-id: https://develop.svn.wordpress.org/trunk@37929 602fd350-edb4-49c9-b593-d223f7449a82
`register_meta()` has been altered to accept an array of arguments as the third parameter in order to support its usage beyond XML-RPC, notably in the REST API and other projects that may build on top of meta, such as a potential Fields API. Arguments are whitelisted to reserve the right for core to add more later.
New functions added to complement this expansion are:
* `registered_meta_key_exists()`
* `unregister_meta_key()`
* `get_registered_meta_keys()`
* `get_registered_metadata()`
* A "private" function for the aforementioned whitelisting.
There still need to be lots of tests written for previous and new behaviors, and many things are subject to change. Maybe things will explode. #yolo
props jeremyfelt, ericlewis, sc0ttkclark, helen, rmccue, ocean90, voldemortensen.
see #35658.
git-svn-id: https://develop.svn.wordpress.org/trunk@37924 602fd350-edb4-49c9-b593-d223f7449a82
Partial revert of [37657]. Moving existing properties in `WP_Site` from public to private broke backwards compatibility in a pretty severe way. We made an initial attempt to work around this, but due to the variety of possible issues, moving forward does not seem wise.
Fixes#36717.
git-svn-id: https://develop.svn.wordpress.org/trunk@37923 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
See [37657] for where access was changed from public to private.
See [37870] for where the type was changed from `string` to `int`.
See #36717.
git-svn-id: https://develop.svn.wordpress.org/trunk@37919 602fd350-edb4-49c9-b593-d223f7449a82
In the past, `get_blog_details()` has been used to retrieve the `home`, `siteurl`, `blogname`, and `post_count` options for a site. By lazy loading properties in a `WP_Site` object, we can avoid having to use `get_blog_details()` and instead provide the properties as needed.
This introduces the global `site-details` cache group in which standard objects representing the site are stored. This will one day be a replacement for the `blog-details` cache group that is currently used in `get_blog_details()`.
This relies on the `ms_loaded` action introduced in [37916] as properties are not available via `get_option()` until multisite has been fully loaded.
Props flixos90.
Fixes#36935.
git-svn-id: https://develop.svn.wordpress.org/trunk@37918 602fd350-edb4-49c9-b593-d223f7449a82
This allows code in `sunrise.php` and in core to know when multisite bootstrap is complete and when the `$current_site` and `$current_blog` globals are populated.
Fixes#37235.
Props flixos90.
git-svn-id: https://develop.svn.wordpress.org/trunk@37916 602fd350-edb4-49c9-b593-d223f7449a82
This adds three new functions for getting/displaying attachment captions:
* `wp_get_attachment_caption` - Retrieves a caption for a specific attachment.
* `get_the_post_thumbnail_caption()` - Returns the post thumbnail caption.
* `the_post_thumbnail_caption()` - Displays the post thumbnail caption.
These are helpful for displaying a caption associated with an image directly
in a template, rather than using the caption shortcode.
This also introduces two new filters:
* `wp_get_attachment_caption` - Filters the value of `wp_get_attachment_caption()`.
* `the_post_thumbnail_caption` - Filters the display of the post thumbnail caption.
`the_post_thumbnail_caption()` is automatically filtered by `wptexturize()`,
`convert_smilies()`, and `convert_chars()` in `wp-includes/default-filters.php`.
Props flixos90, joemcgill.
Fixes#12235.
git-svn-id: https://develop.svn.wordpress.org/trunk@37915 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