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
The <tfoot> element was allowed to precede the <tbody> element in HTML 5. However, that was changed in HTML 5.1 and <tfoot> must now follow <tbody>.
This removes the tfooot and instead uses a nav element for navigation between months.
Fixes: #39763
Props: isabel_brison, Harry Milatz, audrasjb, abhijitrakas, SergeyBiryukov
Built from https://develop.svn.wordpress.org/trunk@47223
git-svn-id: http://core.svn.wordpress.org/trunk@47023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
For accessibility, the visual appearance and source order should match. Moving the toolbar to load in the new hook `wp_body_open` (5.2) fixes a long-standing source order problem.
Props jankimoradiya, afercia, SergeyBiryukov, audrasjb, ocean90, xkon, dinhtungdu.
Fixes#47053.
Built from https://develop.svn.wordpress.org/trunk@47221
git-svn-id: http://core.svn.wordpress.org/trunk@47021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.
This commit also includes:
* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
* `wp-admin/admin-header.php`
* `wp-admin/admin-footer.php`
* `wp-includes/version.php`
Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes#48082.
Built from https://develop.svn.wordpress.org/trunk@47198
git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd