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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48346 602fd350-edb4-49c9-b593-d223f7449a82
The admin schemes that don't meet the contrast guidelines are excluded from this change.
Props mapk, michaelarestad, mcsf, ocean90.
Closes#50537.
git-svn-id: https://develop.svn.wordpress.org/trunk@48342 602fd350-edb4-49c9-b593-d223f7449a82
- 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48340 602fd350-edb4-49c9-b593-d223f7449a82
Now that more than 3 months have passed since 2020-03-23, this was causing test failures.
Follow-up to [48242].
See #50321.
git-svn-id: https://develop.svn.wordpress.org/trunk@48333 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48332 602fd350-edb4-49c9-b593-d223f7449a82
- 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48329 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48328 602fd350-edb4-49c9-b593-d223f7449a82
It's a single-use URL parameter that does not need to be passed to canonical URLs in the admin.
Props opurockey.
Fixes#50464.
git-svn-id: https://develop.svn.wordpress.org/trunk@48319 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48317 602fd350-edb4-49c9-b593-d223f7449a82
In addition to more consistent display, this gives it a visible border on the About page.
Props desrosj, nikhilbhansi, afercia, SergeyBiryukov.
Fixes#50372.
git-svn-id: https://develop.svn.wordpress.org/trunk@48316 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48315 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48314 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48311 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48310 602fd350-edb4-49c9-b593-d223f7449a82
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.
Follow-up to [46800], [48232].
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48309 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48308 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48306 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48304 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48300 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48299 602fd350-edb4-49c9-b593-d223f7449a82
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.
Follow-up to [46800], [48232].
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48298 602fd350-edb4-49c9-b593-d223f7449a82