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
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48295 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48294 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48293 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48291 602fd350-edb4-49c9-b593-d223f7449a82
This clarifies some messages referring to Site Health checks and maintenance mode, and makes them more accurate.
Props dartiss.
Fixes#50549.
git-svn-id: https://develop.svn.wordpress.org/trunk@48287 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#50553.
git-svn-id: https://develop.svn.wordpress.org/trunk@48285 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48283 602fd350-edb4-49c9-b593-d223f7449a82