AMP Plugin 0.4 Available

AMP Plugin Project

The biggest updates in the new version are:

– A refreshed template
– The AMP Customizer

There are, of course, lots of bug fixes (e.g. support for inline styles, tel URLs) and better handling of validation errors as well. Thank you to everyone who reported issues and submitted code/fixes.

With the refreshed template, you can now control some of the colours of your AMP output directly from the AMP Customizer (From the Dashboard, goto Appearance > AMP). The Customizer can also be extended to support other options.

The update did require us to make some potentially breaking markup changes to the template. If you have not made any changes to the existing template or are using a completely custom template, you’re fine.

However, if you’ve tweaked a few things like styles or template parts (or are using other plugins like Yoast Glue, PageFrog, or AMP Toolbox), you should revert…

View original post 89 more words

AMP Plugin 0.4 Available

The biggest updates in the new version are:

– A refreshed template
– The AMP Customizer

There are, of course, lots of bug fixes (e.g. support for inline styles, tel URLs) and better handling of validation errors as well. Thank you to everyone who reported issues and submitted code/fixes.

With the refreshed template, you can now control some of the colours of your AMP output directly from the AMP Customizer (From the Dashboard, goto Appearance > AMP). The Customizer can also be extended to support other options.

The update did require us to make some potentially breaking markup changes to the template. If you have not made any changes to the existing template or are using a completely custom template, you’re fine.

However, if you’ve tweaked a few things like styles or template parts (or are using other plugins like Yoast Glue, PageFrog, or AMP Toolbox), you should revert back to the old template until you get a chance to test your changes with the new version. You can continue to use the old template using this helper function:


if ( function_exists( 'amp_backcompat_use_v03_templates' ) ) {
	amp_backcompat_use_v03_templates();
}

The old template will remain available within the plugin for the foreseeable future, but we highly recommend updating the new template as soon as possible.

(Oh, and we haven’t forgotten about Pages support. It’s still something we’re looking into; these changes just took priority.)

Download the latest version here.

Changelog: Version 0.4

  • New template: spiffy, shiny, and has the fresh theme smell (props allancole and the Automattic Theme Team).
  • AMP Customizer: Pick your colours and make the template your own (props DrewAPicture and 10up)
  • Fix: support for inline styles (props coreymckrill).
  • Fix: no more fatal errors when tags not supported by post type (props david-binda)
  • Fix: no more unnecessary <br> tags.
  • Fix: sanitize children of removed nodes (like empty <a> tags) (props Maxime2).
  • Fix: no more broken YouTube URLs with multiple ?s.
  • Fix: properly handle tel and sms schemes (h/t soundstrategies).
  • Fix: remove amp endpoint on deactivate.
  • New filter: amp_pre_get_permalink if you want a completely custom AMP permalink.

Changelog: Version 0.3.3

  • Handle many more validation errors (props bcampeau and alleyinteractive).
  • New filter: amp_post_template_dir (props mustafauysal).
  • New template: Nav bar is now it’s own template part (props jdevalk).
  • Better ratio for YouTube embeds.
  • Fix: better timezone handling (props rinatkhaziev).
  • Fix: better handling of non-int dimensions (like 100%).
  • Fix: better handling of empty dimensions.
  • Fix: autoplay is a bool-like value.
  • Fix: breakage when using the query_string hook (h/t mkuplens).
  • Fix: don’t break really large Twitter IDs.
  • Fix: don’t break Instagram shortcodes when using URLs with querystrings.
  • Readme improvements (props nickjohnford, sotayamashita)

Changelog: Version 0.3.2

  • Jetpack Stats support.
  • Better version of Merriweather and use system fonts for sans-serif (props mattmiklic).
  • Move font to stylesheet so it can be more easily overridden (props mattmiklic).
  • Fix: Template loading issues on Windows. (Thanks to everyone who reported this, especially w33zy for pointing out the validate_file issue.)
  • Fix: don’t run AMP on post comment feeds (props kraftbj).
  • Fix: un-break pagination when using a static home page with multiple pages.
  • Fix: force amp-iframe to use https to validate correctly (props mister-ben).
  • Fix: validation for target and video/audio attributes.
  • Fix: clipped images in galleries (thanks tobaco).

Changelog: Version 0.3.1

  • Allow custom query var (props vaurdan).
  • Fix AMP URLs for non-pretty permalinks (props rakuishi).
  • Fix for password-protected posts.
  • Fix dimension extraction for schema-less or relative image URLs.
  • Better fallback for images with no dimensions.
  • Validation fixes for a tags (props kraftbj).
  • Updated AMP boilerplate.
  • Allow on tags for elements (props Steven Evatt).
  • Prefixed class names.

Changelog: Version 0.3

  • Fetch dimensions for hotlinked images.
  • Add amp-facebook support.
  • Add some new actions and filters (e.g. amp_init).
  • Fix validation errors for Gallery shortcodes.
  • Fix issues with path validation on Windows.
  • Fix issues with really squeezed layout.
  • Breaking change: style.css no longer contains the ` tag. If you have a custom stylesheet, you need to update it to remove the tag.
  • Breaking change: single.php no longer includes the AMP boilerplate styles. They are instead added via the amp_post_template_head hook. If you have a custom template, please remove the boilerplate styles.