The `sizes` attribute was calculated incorrectly, resulting in the browser downloading the wrong resource. This filters the attribute to correct that.
Before the filter, the `img` contained:
`sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px"`
And after:
`sizes="100vw"`
Props joemcgill, transl8or.
Fixes#38847.
git-svn-id: https://develop.svn.wordpress.org/trunk@39291 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow-up to [39248] that applies a bit more compression to
the default header image in Twenty Seventeen.
Props Presskopp, lukecavanagh.
Fixes#38793.
git-svn-id: https://develop.svn.wordpress.org/trunk@39279 602fd350-edb4-49c9-b593-d223f7449a82
Following [39272], this uses the `header_video_settings` filter to modify
the default video header control markup and adds theme specific styles
for the play/pause button.
Props melchoyce, laurelfulford, joemcgill, davidakennedy, bradyvercher.
Fixes#38697.
git-svn-id: https://develop.svn.wordpress.org/trunk@39273 602fd350-edb4-49c9-b593-d223f7449a82
Some widgets that require more configuration are not included, such as RSS and Custom Menu. Tag Cloud is also not included because fresh sites do not have any tags to display.
Also adds a search widget to a Twenty Seventeen footer widget area.
see #38615.
git-svn-id: https://develop.svn.wordpress.org/trunk@39261 602fd350-edb4-49c9-b593-d223f7449a82
The credits widget from the original commit was a nice test to see the date changing, but isn't really very inspirational. Also, implement it in Twenty Seventeen.
see #38615.
git-svn-id: https://develop.svn.wordpress.org/trunk@39255 602fd350-edb4-49c9-b593-d223f7449a82
This replaces the default `header.jpg` with a compressed version.
The original was 209KB and the new version is 143KB with almost no
distinguishable visual loss.
Props Presskopp.
Fixes#38793.
git-svn-id: https://develop.svn.wordpress.org/trunk@39248 602fd350-edb4-49c9-b593-d223f7449a82
After further review from the accessibility team, it was determined that the menu items with sub-menus don't need the aria-haspopup attribute.
Props davidakennedy, celloexpressions, voldemortensen, afercia
See #38397
git-svn-id: https://develop.svn.wordpress.org/trunk@39232 602fd350-edb4-49c9-b593-d223f7449a82
* Use `postMessage` transport for header image settings by default when video headers are supported, and thus `the_custom_header_markup()` will necessarily be used (and thus a selective refresh partial will be available).
* Ensure that `the_custom_header_markup()` always outputs a container element in the customizer preview even if the header is empty.
* Ensure that edit shortcut appearing for custom header does not get positioned off-screen.
Props bradyvercher, westonruter.
See #38639.
Fixes#38737.
git-svn-id: https://develop.svn.wordpress.org/trunk@39227 602fd350-edb4-49c9-b593-d223f7449a82
Support was added to test implementation but never completed. This removes the test implementation.
Props davidakennedy
Fixes#38783
git-svn-id: https://develop.svn.wordpress.org/trunk@39226 602fd350-edb4-49c9-b593-d223f7449a82
When a page is scrolled, the top nav menu become fixed. Depending on the page content this caused issue where focused links or buttons may be hidden behind the nav menu.
Props afercia, davidakennedy, Fencer04
Fixes#38476
git-svn-id: https://develop.svn.wordpress.org/trunk@39225 602fd350-edb4-49c9-b593-d223f7449a82
Removes default header text color and updates and updates selectors.
Props laurelfulford, davidakennedy, Idealien
Fixes#38391
git-svn-id: https://develop.svn.wordpress.org/trunk@39224 602fd350-edb4-49c9-b593-d223f7449a82
* Toggles `has-header-image` body class in Customizer preview whenever images or videos are added or removed.
* Hides the `.custom-header-image`div in CSS when an image or video haven't been set so preview changes are smoother.
* Also fixes the main issues in #38391 – making the preview match.
Props bradyvercher.
Fixes#38627.
See #38391.
git-svn-id: https://develop.svn.wordpress.org/trunk@39220 602fd350-edb4-49c9-b593-d223f7449a82
IE9 doesn't understands `vh ` (vertical height) when inside of an `iframe`. Normally IE9 will understand `vh` as the vertical height relative to the viewport, but in an `iframe`, IE9 thinks the vertical height is relative to the size of the whole page. So this fixes that when the site is viewed in the Customizer preview – an `iframe`.
Props laurelfulford.
Fixes#38722.
git-svn-id: https://develop.svn.wordpress.org/trunk@39215 602fd350-edb4-49c9-b593-d223f7449a82
This resets the property to normal where needed and, to be safe, uses `!important`. It avoids screen readers reading out words ignoring spaces between words in some cases.
Props afercia.
Fixes#38764.
git-svn-id: https://develop.svn.wordpress.org/trunk@39207 602fd350-edb4-49c9-b593-d223f7449a82
This resolves the weird behaviour on Safari 10 has some weird behaviour.
Props rianrietveld, swisspidy, afercia, sami.keijonen, arush, davidakennedy
Fixes#38387
git-svn-id: https://develop.svn.wordpress.org/trunk@39206 602fd350-edb4-49c9-b593-d223f7449a82
When a page is scrolled, the top nav menu became fixed. This resolves that.
Props afercia, Fencer04, davidakennedy
Fixes#38476
git-svn-id: https://develop.svn.wordpress.org/trunk@39183 602fd350-edb4-49c9-b593-d223f7449a82
The CSS property `background-attachment: fixed` is disabled in some mobile browsers for performance reasons. So here, the fix increases the breakpoint where the `background-attachment: fixed` is applied to the front page images. Doing this removes the fixed backgrounds and the issue from all smaller screens, but the downside is that it also removes the fixed backgrounds from smaller laptops. It's also possible future devices could fall into this breakpoint, but this seems to be the most practical solution.
Props laurelfulford.
Fixes#38395.
git-svn-id: https://develop.svn.wordpress.org/trunk@39176 602fd350-edb4-49c9-b593-d223f7449a82
* Removes `aria-hidden` argument. Lets `aria-hidden="true"` be there by default and sets it empty when there is `title` and `desc`.
* Adds unique IDs for title and desc for accessible implementation options.
* Removes absolute path in the Customizer. It didn't work in Internet Explorer, and the original bug is fixed in #30028.
* Add whitespace around `<use>`, from #38387.
Props sami.keijonen, swissspidy, laurelfulford.
Fixes#38659.
See #38387.
git-svn-id: https://develop.svn.wordpress.org/trunk@39164 602fd350-edb4-49c9-b593-d223f7449a82
The combination of font-size and weight for post navigation made lower case "i"s illegible in some cases. Using `15px` seemed to be the best choice all around. Also adjusts the spacing around the arrows a bit, since they touch the text on small screen sizes.
Props laurelfulford.
Fixes#38670.
git-svn-id: https://develop.svn.wordpress.org/trunk@39152 602fd350-edb4-49c9-b593-d223f7449a82
TwentySeventeen attempts to highlight media found in post content by using `get_media_embedded_in_content()` to extract videos from the content and display their HTML differently. However, the HTML being generated by the playlist shortcode relies on JavaScript to update the video element with the markup needed to display the playlist properly. The `get_media_embedded_in_content()` function wasn't designed to handle this use case.
The patch looks for the presence of `wp-playlist-script` in the content and shows the standard content rather than trying to pluck the media elements from the content using `get_media_embedded_in_content()`.
Props joemcgill.
Fixes#38390.
git-svn-id: https://develop.svn.wordpress.org/trunk@39146 602fd350-edb4-49c9-b593-d223f7449a82
This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.
Props afercia, sami.keijonen.
See #38604.
git-svn-id: https://develop.svn.wordpress.org/trunk@39135 602fd350-edb4-49c9-b593-d223f7449a82
In -r39124, some additional issues were introduced:
* The 'overflow: hidden' on the `.site-header;` was added to prevent a side-scrolling issue, but it ended up cutting off the menu. It looks like the cause of the side-scroll was related to how the scroll down icon was rotated, so it's addressed by rotating the icon and not the `<a>`.
* Also, `min-height` doesn't play well with `display: table;` in Firefox. So it's addressed with just `height`.
Props laurelfulford, sami.keijonen.
See #38543.
git-svn-id: https://develop.svn.wordpress.org/trunk@39129 602fd350-edb4-49c9-b593-d223f7449a82
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.
This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.
Props adamsilverstein, joemcgill.
Fixes#38550.
git-svn-id: https://develop.svn.wordpress.org/trunk@39102 602fd350-edb4-49c9-b593-d223f7449a82
Front page sesctions # Content were labelled in Customizer Theme Options but the preview called it Panel # placeholder. This unifies that.
Props Clorith, ahortin, celloexpressions, davidakennedy
Fixes#38567
git-svn-id: https://develop.svn.wordpress.org/trunk@39094 602fd350-edb4-49c9-b593-d223f7449a82
The sticky icon was appearing in posts it shouldn't have, not just when stuck. This fixes that.
Props laurelfulford, mageshp, davidakennedy
Fixes#38534
git-svn-id: https://develop.svn.wordpress.org/trunk@39080 602fd350-edb4-49c9-b593-d223f7449a82
* Makes sure the page layout setting also applies to pages, and is not completely hidden from them when a sidebar widget is present. Pages do not have a sidebar, so that was incorrect.
* Updates description in Customizer for brevity and accuracy.
* Applies setting to archive pages as well.
* Updates CSS to reflect changes.
Props celloexpressions, laurelfulford.
Fixes#38538.
git-svn-id: https://develop.svn.wordpress.org/trunk@39078 602fd350-edb4-49c9-b593-d223f7449a82
* Relies on header skip link instead of l10n variables in JavaScript.
* Fixes issue where scroll down arrow appeared next to the navigation on the front page with no header image or video. It now only appears with a big header.
Props enodekciw, laurelfulford.
Fixes#38502.
git-svn-id: https://develop.svn.wordpress.org/trunk@39073 602fd350-edb4-49c9-b593-d223f7449a82
* Also, changes the top menu label so it has better context when read alone by assistive technology.
Props anilbasnet.
Fixes#38542.
git-svn-id: https://develop.svn.wordpress.org/trunk@39001 602fd350-edb4-49c9-b593-d223f7449a82
* Since this is a filter the original value is returned if `is_admin()` is true.
* Removes portion of the doc block since function is not pluggable.
Props mangeshp.
Fixes#38510.
git-svn-id: https://develop.svn.wordpress.org/trunk@39000 602fd350-edb4-49c9-b593-d223f7449a82
Uses `absint()` to escape when getting value. Removes `esc_attr` from each instance of the variable.
Props fencer04.
Fixes#38449.
git-svn-id: https://develop.svn.wordpress.org/trunk@38999 602fd350-edb4-49c9-b593-d223f7449a82
This prevents the issue of hidden article tags on home page.
Props ElectricFeet, iv.dimova. morettigeorgiev, davidakennedy
Fixes#38404
M twentyseventeen/inc/template-tags.php
M twentyseventeen/style.css
git-svn-id: https://develop.svn.wordpress.org/trunk@38998 602fd350-edb4-49c9-b593-d223f7449a82
* Hides page numbers visually at smaller screen sizes.
* Reduced padding around `.wrap` class on smaller screens.
* Fixed issue with the page numbers not displaying the underline on `:hover`. This has been updated in the custom colors files, too.
Props laurelfulford, caspie.
Fixes#38394.
git-svn-id: https://develop.svn.wordpress.org/trunk@38996 602fd350-edb4-49c9-b593-d223f7449a82
A theme can opt-in for tailored starter content to apply to the customizer when previewing the theme on a fresh install, when `fresh_site` is at its initial `1` value. Starter content is staged in the customizer and does not go live unless the changes are published. Initial starter content is added to Twenty Seventeen.
* The `fresh_site` flag is cleared when a published post or page is saved, when widgets are modified, or when the customizer state is saved.
* Starter content is registered via `starter-content` theme support, where the argument is an array containing `widgets`, `posts`, `nav_menus`, `options`, and `theme_mods`. Posts/pages in starter content are created with the `auto-draft` status, re-using the page/post stubs feature added to nav menus and the static front page controls.
* A `get_theme_starter_content` filter allows for plugins to extend a theme's starter content.
* Starter content in themes can/should re-use existing starter content items in core by using named placeholders.
* Import theme starter content into customized state when fresh site.
* Prevent original_title differences from causing refreshes if title is present.
* Ensure nav menu item url is set according to object when previewing.
* Make sure initial saved state is false if there are dirty settings without an existing changeset.
* Ensure dirty settings are cleaned upon changeset publishing.
Props helen, westonruter, ocean90.
Fixes#38114, #38533.
git-svn-id: https://develop.svn.wordpress.org/trunk@38991 602fd350-edb4-49c9-b593-d223f7449a82
Also, fixes the visibility of the borders for panels after the header videos commit.
Props celloexpressions.
Fixes#38408.
See #38172.
git-svn-id: https://develop.svn.wordpress.org/trunk@38988 602fd350-edb4-49c9-b593-d223f7449a82