This is part of a larger project in cleaning up core's admin CSS. This collapses all colors used in the CSS to one of 12 blues, greens, reds, and yellows, 13 grays, pure black, and pure white. The colors are perceptually uniform from light to dark, half of each range has a 4.5 or higher contrast against white, the other half has a 4.5 or higher contrast against black.
Standardizing on this set of colors will help contributors make consistent, accessible design decisions. The full color palette can be seen here: https://codepen.io/ryelle/full/WNGVEjw
Props notlaura, danfarrow, kburgoine, drw158, audrasjb, Joen, hedgefield, ibdz, melchoyce.
See #49999.
Built from https://develop.svn.wordpress.org/trunk@50025
git-svn-id: http://core.svn.wordpress.org/trunk@49726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset introduces a filter-based Robots API, providing central control over the `robots` meta tag.
* Introduces `wp_robots()` function which should be called anywhere a `robots` meta tag should be included.
* Introduces `wp_robots` filter which allows adding or modifying directives for the `robots` meta tag. The `wp_robots()` function is entirely filter-based, i.e. if no filter is added to `wp_robots`, no directives will be present, and therefore the entire `robots` meta tag will be omitted.
* Introduces the following `wp_robots` filter functions which replace similar existing functions that were manually rendering a `robots` meta tag:
* `wp_robots_noindex()` replaces `noindex()`, which has been deprecated.
* `wp_robots_no_robots()` replaces `wp_no_robots()`, which has been deprecated.
* `wp_robots_sensitive_page()` replaces `wp_sensitive_page_meta()`, which has been deprecated. Its rendering of the `referrer` meta tag has been moved to another new function `wp_strict_cross_origin_referrer()`.
Migration to the new functions is straightforward. For example, a call to `add_action( 'wp_head', 'wp_no_robots' )` should be replaced with `add_filter( 'wp_robots', 'wp_robots_no_robots' )`.
Plugins and themes that render their own `robots` meta tags are encouraged to switch to rely on the `wp_robots` filter in order to use the central management layer now provided by WordPress core.
Props adamsilverstein, flixos90, timothyblynjacobs, westonruter.
See #51511.
Built from https://develop.svn.wordpress.org/trunk@49992
git-svn-id: http://core.svn.wordpress.org/trunk@49693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Per accessibility best practices, it is recommended that all HTML `<img>` elements have an `alt` attribute. Any decorative images should have an empty `alt` attribute (`alt=""`).
Props laxman-prajapati, sabernhardt, audrasjb.
Fixes#51846.
Built from https://develop.svn.wordpress.org/trunk@49949
git-svn-id: http://core.svn.wordpress.org/trunk@49648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.
This replaces all uses of the following:
* `join()` with `implode()`
* `sizeof()` with `count()`
* `is_writeable()` with `is_writable()`
* `doubleval()` with a `(float)` cast
In part, this is a follow-up to #47746.
Props jrf.
See #50767.
Built from https://develop.svn.wordpress.org/trunk@49193
git-svn-id: http://core.svn.wordpress.org/trunk@48955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Technically, the `$format` argument should always be a string, but passing `false` used to work before [47808], so this restores backward compatibility.
The list of affected functions:
* `get_the_date()`
* `get_the_time()`
* `get_comment_date()`
* `get_comment_time()`
Props wittich, Rarst, akabarikalpesh, SergeyBiryukov.
Fixes#51184.
Built from https://develop.svn.wordpress.org/trunk@48912
git-svn-id: http://core.svn.wordpress.org/trunk@48674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
To accommodate for the change, the `custom-logo` theme feature now accepts the `unlink-homepage-logo` parameter.
If and when the logo is linked on the home page, the link has the `aria-current` attribute for better accessibility.
Follow-up to [48039], [48283].
Props sabernhardt, audrasjb, johnstonphilip, demetris.
Fixes#37011.
Built from https://develop.svn.wordpress.org/trunk@48749
git-svn-id: http://core.svn.wordpress.org/trunk@48511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@48294
git-svn-id: http://core.svn.wordpress.org/trunk@48063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@48283
git-svn-id: http://core.svn.wordpress.org/trunk@48052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This PR adds a new color scheme option, which uses a high luminosity blue spot color, almost-black menu, and pure white for menu items.
This helps increase contrast, and bring more consistency with some of the higher contrast colors used in the block editor.
Props joen, ibdz, shaunandrews.
Fixes#50504.
Built from https://develop.svn.wordpress.org/trunk@48277
git-svn-id: http://core.svn.wordpress.org/trunk@48046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`
These functions now return false if the template file could not be found, to allow for easier debugging.
Props tferry, sphakka, johnbillion, pento, davidbinda, desrosj, birgire, garrett-eclipse, williampatton, davidbaumwald, SergeyBiryukov.
Fixes#40969.
Built from https://develop.svn.wordpress.org/trunk@48209
git-svn-id: http://core.svn.wordpress.org/trunk@47978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `.wp-calendar-table` for the `<table>` element.
* `.wp-calendar-nav` for the navigation wrapper.
* `.wp-calendar-nav-prev` for the previous month link.
* `.wp-calendar-nav-next` for the next month link.
Replace `#prev` and `#next` HTML IDs with `.wp-calendar-nav-prev` and `.wp-calendar-nav-next` classes.
Props sabernhardt, BackuPs, audrasjb, jorbin.
Fixes#39763.
Built from https://develop.svn.wordpress.org/trunk@47374
git-svn-id: http://core.svn.wordpress.org/trunk@47161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Being a good idea in theory, in practice it does not always work reliably, may not recognize newer CSS properties, and sometimes displays phantom errors with no particular error message.
A plugin can re-enable CSS linting via the `wp_code_editor_settings` filter.
Props skypressatx, ThemeZee, johnbillion, ianbelanger, ZanderZ, starvoters1, raoulunger, prashantvatsh, SergeyBiryukov.
Fixes#44471.
Built from https://develop.svn.wordpress.org/trunk@47305
git-svn-id: http://core.svn.wordpress.org/trunk@47105 1a063a9b-81f0-0310-95a4-ce76da25c4cd