Commit Graph

770 Commits

Author SHA1 Message Date
Sergey Biryukov
19ca7cb022 Twenty Seventeen: Remove duplicate global $post declaration in twentyseventeen_front_page_section().
Props ixkaito.
Fixes #39590.

git-svn-id: https://develop.svn.wordpress.org/trunk@39909 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 12:49:25 +00:00
Sergey Biryukov
2fa90d1077 Twenty Seventeen: Correct @param entries for twentyseventeen_custom_colors_css filter.
Props Soean.
Fixes #39575.

git-svn-id: https://develop.svn.wordpress.org/trunk@39901 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 15:02:08 +00:00
Sergey Biryukov
040362a5e0 Twenty Seventeen: Remove extra asterisk from a translator comment so the comment could be parsed correctly.
Props swissspidy.
See #39116.

git-svn-id: https://develop.svn.wordpress.org/trunk@39894 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 21:36:13 +00:00
Sergey Biryukov
42ffa7185e Twenty Seventeen: Expand a changelog entry added in [39742] with the new item name.
See #39489, [39575].

git-svn-id: https://develop.svn.wordpress.org/trunk@39752 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-07 13:11:40 +00:00
karmatosed
72d02115f7 Twenty Seventeen: add more details about filter and requires version
The required version should be 4.7 and also adds more information to changelog.

Props @ocean90 @Presskopp



git-svn-id: https://develop.svn.wordpress.org/trunk@39744 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 17:03:29 +00:00
Tammie Lister
34e43a80d6 Twenty Seventeen: version bump and update changelog
Adds in changelog since last version and all the changes listed in readme.txt.
Bumps version numbers in style.css and readme.txt.

Props @ocean90



git-svn-id: https://develop.svn.wordpress.org/trunk@39742 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 16:34:44 +00:00
Sergey Biryukov
ddbf104453 Twenty Seventeen: Correct @param entries for twentyseventeen_content_width, twentyseventeen_custom_colors_saturation and twentyseventeen_social_links_icons filters.
Props Jaydeep Rami, BharatKambariya.
Fixes #39488.

git-svn-id: https://develop.svn.wordpress.org/trunk@39733 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 13:34:13 +00:00
Sergey Biryukov
c7389223cd Twenty Seventeen: Correct @param entry for twentyseventeen_front_page_sections filter.
Props ketuchetan, priyankabehera155.
Fixes #39488.

git-svn-id: https://develop.svn.wordpress.org/trunk@39732 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-06 11:24:42 +00:00
Dominik Schilling (ocean90)
6cbe5b7a02 Twenty Seventeen: Introduce a theme-specific filter twentyseventeen_starter_content for customizing the starter content array.
Add some documentation to the default starter content.

Props sanket.parmar, celloexpressions.
Fixes #39109.

git-svn-id: https://develop.svn.wordpress.org/trunk@39720 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-05 19:28:27 +00:00
David A. Kennedy
213d196d66 Twenty Seventeen: Fix incorrect $content_width value in theme
This addresses a major bug. Incorrectly setting the `$content_width` causes media embeds to end up with the wrong aspect ratio, among other issues. This fix uses `template_redirect`,  to ensure conditional theme tags can be used. It also defines a default value at `after_theme_setup` so that plugins have something to work with at `init`.

Props sstoqnov, laurelfulford, obenland.

Fixes #39272.


git-svn-id: https://develop.svn.wordpress.org/trunk@39635 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-22 23:23:23 +00:00
David A. Kennedy
6c714ab73c Twenty Seventeen: Hardens the logic for calling featured image in header.php
This change uses `get_queried_object_id()` here since the `$post` global may not be set before a call to `the_post()`.

Props westonruter.

Fixes #39302.


git-svn-id: https://develop.svn.wordpress.org/trunk@39624 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-20 22:59:28 +00:00
David A. Kennedy
87ed10d7ec Twenty Seventeen: Ensure functions in customize-controls.js don't count on Customizer sections always being present
Before, the code assumed the `theme_options` section is always present, but it can be removed by plugins. This way, if it is, no JavaScript errors occur.

Props westonruter.

Fixes #39335.


git-svn-id: https://develop.svn.wordpress.org/trunk@39623 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-20 22:16:35 +00:00
David A. Kennedy
665d60d680 Twenty Seventeen: Improves code readability and code standards in files
Adds better DocBlock comments and fixes some spacing issues based on PHP_CodeSniffer WordPress coding standards.

Props sstoqnov.

Fixes #39152.


git-svn-id: https://develop.svn.wordpress.org/trunk@39618 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-16 22:07:41 +00:00
Weston Ruter
1681d96a6d Customize: Deprecate page_home nav menu item starter content in favor of home_link; replace usage in Twenty Seventeen.
Props celloexpressions, westonruter.
Amends [38991].
See #38615, #38114.
Fixes #39104.


git-svn-id: https://develop.svn.wordpress.org/trunk@39561 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-10 23:38:04 +00:00
David A. Kennedy
89038700dd Default Themes: Update version numbers and readme files for 4.7 release
Bump version numbers and update readme files for themes with changes. Also updates description for Twenty Seventeen and removes version number for HTML5 shiv for easier updates in the future.

Props davidakennedy.

Fixes #38858.


git-svn-id: https://develop.svn.wordpress.org/trunk@39496 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 23:26:11 +00:00
David A. Kennedy
977d0a1d66 Twenty Seventeen: Fix CSS specificity problem with CSS feature query for object-fit
Previously, the theme's CSS feature query for `object-fit` overrode styles it shouldn't have on interior pages.

This moves the feature query farther down in the stylesheet so it takes precedence in the cascade in supported browsers, and applies the appropriate selector for the interior pages. In browsers that don't support feature queries or `object-fit`, the fallback styles are still applied. The problem was that the rules had the same specificity, so this way, the cascade takes over properly. The transforms and position changes for fallbacks are still needed in browsers that don't support `object-fit` and feature queries.

Props peterwilsoncc, davidakennedy.

Fixes #39073.


git-svn-id: https://develop.svn.wordpress.org/trunk@39495 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 23:11:17 +00:00
David A. Kennedy
d69f3f4db7 Twenty Seventeen: Improve display of video header and header image in modern browsers
The theme uses a hack to help the video header and header image fill the available space. This centers around `max-width: 1000%;`. It causes visual issues (zooming of the header video or image) for all users though.

This fixes that with CSS Features Queries. The hack remains for browsers that don't support Feature Queries  and `object-fit`. Browsers that do support both get a better experience with a more reliable styling of the video and image header container.

Props laurelfulford, peterwilsoncc.

Fixes #39035.


git-svn-id: https://develop.svn.wordpress.org/trunk@39483 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 19:15:02 +00:00
David A. Kennedy
53582841f9 Twenty Seventeen: Add specific font stack for Thai language
Improves legability and design for users viewing the theme with Thai language.

Props imnok, netweb, melchoyce.

Fixes #38937.


git-svn-id: https://develop.svn.wordpress.org/trunk@39482 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-04 19:05:23 +00:00
Helen Hou-Sandi
af97f9d16b Twenty Seventeen: Improve ARIA for the nav menu.
The `onResizeARIA()` function was not very useful and buggy.

props afercia.
fixes #39029, #39026.


git-svn-id: https://develop.svn.wordpress.org/trunk@39451 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-03 03:40:13 +00:00
David A. Kennedy
289ced158b Twenty Seventeen: Ensure header text color updates in Customizer preview when cleared
Checks if the text color has been cleared and removes the `style` block if it has been. Uses color styles in theme stylesheet.

Props sstoqnov, davidakennedy.

Fixes #38993.


git-svn-id: https://develop.svn.wordpress.org/trunk@39447 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 23:00:13 +00:00
David A. Kennedy
df0a35d0d9 Twenty Seventeen: Fix broken menu toggle in Customizer after menu items are added
This simplifies the line `$( siteNavigation.closest( '.main-navigation' ), this ).toggleClass( 'toggled-on' );` to `$( siteNavContain ).toggleClass( 'toggled-on' );`, since `this` is the clicked button, so the extra context isn't needed.

Props afercia, laurelfulford.

Fixes #38992.


git-svn-id: https://develop.svn.wordpress.org/trunk@39419 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:24:12 +00:00
David A. Kennedy
4eb6d688a5 Twenty Seventeen: Fix style issues with gallery image links
* Ensures dark color scheme has proper box shadow and hover/focus styles.
* Make sure links are correct width.

Props afercia, laurelfulford.

Fixes #38969.


git-svn-id: https://develop.svn.wordpress.org/trunk@39418 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:09:46 +00:00
David A. Kennedy
4cf49676ab Twenty Seventeen: Hide front section panels on page load of Customizer.
Props sstoqnov.

Fixes #38951.


git-svn-id: https://develop.svn.wordpress.org/trunk@39417 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:56:30 +00:00
Joe McGill
25a6c0cc02 Twenty Seventeen: Add .has-header-video styles for custom color schemes.
Following [39413], this adds `.has-header-video` style definitions in
`/inc/custom-header.php` to support custom color schemes.

Props laurelfulford.
Fixes 38995.

git-svn-id: https://develop.svn.wordpress.org/trunk@39415 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:43:25 +00:00
Joe McGill
2a3c20626a Twenty Seventeen: Better handling of custom headers when no image is set.
This ensures that a standard header is shown on the front page whenever
a header video is set without a header image if the video doesn't load,
e.g., on mobile sizes or if the JS doesn't fire.

This adds a new class, `.has-header-video` that is added whenever the
`wp-custom-header-video-loaded` event is fired, which is then used to style
the custom headers along with `.has-header-image` whenever a header image
is available. This also changes the class name on the custom header media
wrapping `div` from `.custom-header-image` to `.custom-header-media`.

Props laurelfulford, joemcgill.
Fixes #38995.

git-svn-id: https://develop.svn.wordpress.org/trunk@39413 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 05:11:56 +00:00
David A. Kennedy
b59e6d3d2e Twenty Seventeen: Make spacing on pages without comments consistent
Previously, the top of the page had more space than the bottom, not matching the original design.

Props laurelfulford, melchoyce.

Fixes #38972.


git-svn-id: https://develop.svn.wordpress.org/trunk@39404 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 02:47:09 +00:00
David A. Kennedy
d4d90b0425 Twenty Seventeen: Make sure header text color is applied when color schemes are active.
Props laurelfulford, ocean90.

Fixes #38980.


git-svn-id: https://develop.svn.wordpress.org/trunk@39397 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-01 00:03:27 +00:00
David A. Kennedy
a27570c98a Twenty Seventeen: Make fixed navigation apply at correct height on front page, without header video or image
Props laurelfulford, littlebigthing.

Fixes #38927.


git-svn-id: https://develop.svn.wordpress.org/trunk@39392 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:29:23 +00:00
David A. Kennedy
8ff0f85857 Twenty Seventeen: Provide a background color fallback for non-webkit browsers on input styles
This allows the styles to work correctly when modified by high contrast computer setups.

Props presskopp.

Fixes #38939.


git-svn-id: https://develop.svn.wordpress.org/trunk@39388 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 23:02:38 +00:00
David A. Kennedy
856cd3af71 Twenty Seventeen: Allow child themes to easily extend custom color patterns
By adding a filter, child themes can add additional selectors onto the custom color scheme CSS. Like so:

{{{
// Add child theme selectors for color schemes.
function dynamic_seventeen_custom_colors_css( $css, $hue, $saturation ) {
	$css .= '
	.colors-custom .content-menu > article:not(.has-post-thumbnail),
	.colors-custom .content-menu > section:not(.has-post-thumbnail) {
		border-top-color: hsl( ' . $hue . ', ' . $saturation . ', 87% ); /* base: #ddd; */
	}';
	return $css;
}
add_filter( 'twentyseventeen_custom_colors_css', 'dynamic_seventeen_custom_colors_css', 10, 3 );
}}}

Props celloexpressions.

Fixes #38949.


git-svn-id: https://develop.svn.wordpress.org/trunk@39386 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 22:50:40 +00:00
David A. Kennedy
dc01ad1cf5 Twenty Seventeen: Make screen reader text on scroll arrow more meaningful
This way screen reader users will know what to expect when they use this link.

Props rianrietveld.

Fixes #38970.


git-svn-id: https://develop.svn.wordpress.org/trunk@39384 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 22:15:21 +00:00
Joe McGill
a35a3cf952 Twenty Seventeen: Keep header videos from extending past footer.
This adds 1px of bottom padding to header videos to keep them from
extending past the footer at the bottom of the page.

Fixes #38950.

git-svn-id: https://develop.svn.wordpress.org/trunk@39380 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 20:52:36 +00:00
Helen Hou-Sandi
60cc79e40b Twenty Seventeen: Add textdomain for starter content attachment titles.
fixes #38981.


git-svn-id: https://develop.svn.wordpress.org/trunk@39373 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-30 05:47:29 +00:00
Helen Hou-Sandi
f3a59f8632 Theme starter content: Add support for featured images and page templates.
Featured image support means that attachments can now be imported. Media can be sideloaded from within theme or plugin directories. Like other posts, attachments are auto-drafts until customizer changes are published, and are not duplicated when they already exist in the customized state. Attachment IDs can be used for any number of purposes, much like post IDs. Twenty Seventeen now includes 3 images used as featured images to best showcase the multi-section homepage setup.

As featured image IDs are stored in post meta, it also made sense to add support for page templates. Twenty Seventeen does not include any such templates, but the functionality can be quite important for displaying themes to their best effect.

props westonruter, helen, flixos90.
fixes #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39346 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-23 09:52:27 +00:00
David A. Kennedy
d6d843dccd Twenty Seventeen: Ensure edit button label displays properly in other languages
This bug occurred in any language where text wraps character-by-character, since those languages don't delimit words with spaces. In Japanese, Chinese and Korean, etc., it was possible for the label to be displayed vertically.

Props tg29359, afercia, odysseygate.

Fixes #38876.


git-svn-id: https://develop.svn.wordpress.org/trunk@39341 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-23 00:43:22 +00:00
Joe McGill
59db3d7e76 Twenty Seventeen: CSS coding standards fixes.
This makes a few adjustments to CSS to bring them inline with WordPress
CSS coding standards including:

* Font weights should be defined using numeric values
* Do not pad parentheses with spaces

This also fixes a couple of typos to inline comments.

Props netweb for initial patch.
Fixes #38901.

git-svn-id: https://develop.svn.wordpress.org/trunk@39340 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-22 20:46:04 +00:00
Helen Hou-Sandi
bf4dd6a8cb Twenty Seventeen: Ensure galleries display correctly in IE11.
It appears IE11 needs an explicit width for an `inline-block` parent element.

props derrickkoo, afercia.
fixes #38872.


git-svn-id: https://develop.svn.wordpress.org/trunk@39339 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-22 15:50:25 +00:00
Helen Hou-Sandi
e1215e1268 Twenty Seventeen: Avoid an undefined index notice after [39291].
props westonruter.
see #38847.


git-svn-id: https://develop.svn.wordpress.org/trunk@39317 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-19 04:54:14 +00:00
David A. Kennedy
364d79e205 Twenty Seventeen: Make all Codex links in DocBlocks use HTTPS
Props johnpgreen.

Fixes #38854.


git-svn-id: https://develop.svn.wordpress.org/trunk@39300 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 20:48:47 +00:00
David A. Kennedy
05b394ccaa Twenty Seventeen: Adds background-attachment: fixed; to devices that should support it
iOS  disables this feature under the hood, but it also distorts the images – unlike other mobile devices that don't support it. So this adds a  check for both `background-attachment: fixed` support or whether it’s an iOS device - passing it adds the class `background-fixed` which is used to add the proper styles.

It also lowers the media query so the parallax-like style is present on a wider range of screens since this bug can be better targeted and avoided. In this way, screens that aren't the offending devices aren't punished merely based on screen size.

Props joemcgill, laurelfulford, helen.

Fixes #38395.


git-svn-id: https://develop.svn.wordpress.org/trunk@39297 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 20:10:18 +00:00
Helen Hou-Sandi
b34803f431 Twenty Seventeen: Rename the starter content menus to match the menu area names.
Saves strings and is more descriptive.

props davidakennedy.
see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39294 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 19:04:25 +00:00
David A. Kennedy
ebe736af3f Twenty Seventeen: Ensure the use of proper image size for custom header image
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
2016-11-18 18:42:16 +00:00
Helen Hou-Sandi
faf751b039 Twenty Seventeen: Remove some extraneous function calls.
fixes #38848.


git-svn-id: https://develop.svn.wordpress.org/trunk@39286 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 06:35:15 +00:00
Weston Ruter
c1b2e9dd41 Customize: Remove obsolete edit shortcut style rules from Twenty Seventeen.
Props celloexpressions.
Fixes #38776.


git-svn-id: https://develop.svn.wordpress.org/trunk@39285 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-18 05:22:00 +00:00
Joe McGill
1c547f56c1 Twenty Seventeen: Additional default header image optimizations.
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
2016-11-17 17:12:49 +00:00
Joe McGill
1e05bf877e Twenty Seventeen: Add styles for custom header video controls.
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
2016-11-16 23:37:42 +00:00
Helen Hou-Sandi
5d43d3a353 Theme starter content: Add reference IDs for most default widgets.
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
2016-11-16 00:39:47 +00:00
Helen Hou-Sandi
e29ff6f4ca Theme starter content: Refine the content for pages.
see #38615.


git-svn-id: https://develop.svn.wordpress.org/trunk@39260 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-16 00:28:27 +00:00
Helen Hou-Sandi
345341f8d9 Theme starter content: Revamp the credits widget into an about widget.
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
2016-11-15 21:07:36 +00:00
Joe McGill
e9c20890da Twenty Seventeen: Compress the default header image.
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
2016-11-15 18:00:22 +00:00