AMP for WordPress - Version 2.0.8

Version Description

Download this release

Release Info

Developer westonruter
Plugin Icon 128x128 AMP for WordPress
Version 2.0.8
Comparing to
See all releases

Code changes from version 2.0.7 to 2.0.8

amp.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin URI: https://amp-wp.org
6
  * Author: AMP Project Contributors
7
  * Author URI: https://github.com/ampproject/amp-wp/graphs/contributors
8
- * Version: 2.0.7
9
  * License: GPLv2 or later
10
  * Requires at least: 4.9
11
  * Requires PHP: 5.6
@@ -15,7 +15,7 @@
15
 
16
  define( 'AMP__FILE__', __FILE__ );
17
  define( 'AMP__DIR__', dirname( __FILE__ ) );
18
- define( 'AMP__VERSION', '2.0.7' );
19
 
20
  /**
21
  * Errors encountered while loading the plugin.
5
  * Plugin URI: https://amp-wp.org
6
  * Author: AMP Project Contributors
7
  * Author URI: https://github.com/ampproject/amp-wp/graphs/contributors
8
+ * Version: 2.0.8
9
  * License: GPLv2 or later
10
  * Requires at least: 4.9
11
  * Requires PHP: 5.6
15
 
16
  define( 'AMP__FILE__', __FILE__ );
17
  define( 'AMP__DIR__', dirname( __FILE__ ) );
18
+ define( 'AMP__VERSION', '2.0.8' );
19
 
20
  /**
21
  * Errors encountered while loading the plugin.
assets/images/reader-themes/legacy.jpg CHANGED
Binary file
assets/images/reader-themes/twentyeleven.jpg CHANGED
Binary file
assets/images/reader-themes/twentyfifteen.jpg CHANGED
Binary file
assets/images/reader-themes/twentyfourteen.jpg CHANGED
Binary file
assets/images/reader-themes/twentynineteen.jpg CHANGED
Binary file
assets/images/reader-themes/twentyseventeen.jpg CHANGED
Binary file
assets/images/reader-themes/twentysixteen.jpg CHANGED
Binary file
assets/images/reader-themes/twentythirteen.jpg CHANGED
Binary file
assets/images/reader-themes/twentytwelve.jpg CHANGED
Binary file
assets/images/reader-themes/twentytwenty.jpg CHANGED
Binary file
assets/images/reader-themes/twentytwentyone.jpg ADDED
Binary file
includes/admin/class-amp-template-customizer.php CHANGED
@@ -117,6 +117,9 @@ class AMP_Template_Customizer {
117
  $self->set_refresh_setting_transport();
118
  $self->remove_cover_template_section();
119
  $self->remove_homepage_settings_section();
 
 
 
120
  return $self;
121
  }
122
 
@@ -217,6 +220,23 @@ class AMP_Template_Customizer {
217
  }
218
  }
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  /**
221
  * Init Customizer preview for legacy.
222
  *
117
  $self->set_refresh_setting_transport();
118
  $self->remove_cover_template_section();
119
  $self->remove_homepage_settings_section();
120
+ if ( get_template() === 'twentytwentyone' ) {
121
+ add_action( 'customize_controls_print_footer_scripts', [ $self, 'add_dark_mode_toggler_button_notice' ] );
122
+ }
123
  return $self;
124
  }
125
 
220
  }
221
  }
222
 
223
+ /**
224
+ * Add notice that the dark mode toggler button is not currently available on AMP pages.
225
+ */
226
+ public function add_dark_mode_toggler_button_notice() {
227
+ $message = __( 'While dark mode works on AMP pages, the toggle button is not currently available. It appears here only for preview purposes.', 'amp' );
228
+ ?>
229
+ <script>
230
+ wp.customize.control( 'respect_user_color_preference', function ( control ) {
231
+ control.notifications.add( new wp.customize.Notification( 'amp_dark_mode_toggler_availability_notice', {
232
+ message: <?php echo wp_json_encode( $message ); ?>,
233
+ type: 'info'
234
+ } ) );
235
+ } );
236
+ </script>
237
+ <?php
238
+ }
239
+
240
  /**
241
  * Init Customizer preview for legacy.
242
  *
includes/amp-post-template-functions.php CHANGED
@@ -127,6 +127,7 @@ function amp_post_template_add_styles( $amp_template ) {
127
  * Add analytics scripts.
128
  *
129
  * @internal
 
130
  *
131
  * @param array $data Data.
132
  * @return array Data.
127
  * Add analytics scripts.
128
  *
129
  * @internal
130
+ * @deprecated This is no longer necessary.
131
  *
132
  * @param array $data Data.
133
  * @return array Data.
includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -6286,6 +6286,7 @@ class AMP_Allowed_Tags_Generated {
6286
  2,
6287
  3,
6288
  7,
 
6289
  4,
6290
  ),
6291
  ),
6286
  2,
6287
  3,
6288
  7,
6289
+ 9,
6290
  4,
6291
  ),
6292
  ),
includes/sanitizers/class-amp-core-theme-sanitizer.php CHANGED
@@ -39,6 +39,7 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer {
39
  * @var array
40
  */
41
  protected static $supported_themes = [
 
42
  'twentytwenty',
43
  'twentynineteen',
44
  'twentyseventeen',
@@ -79,6 +80,41 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer {
79
  */
80
  protected static function get_theme_features_config( $theme_slug ) {
81
  switch ( $theme_slug ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  // Twenty Twenty.
83
  case 'twentytwenty':
84
  $config = [
@@ -620,11 +656,41 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer {
620
  * @param array $actions Actions, with action name as key and value being callback.
621
  */
622
  public static function remove_actions( $actions = [] ) {
 
 
623
  foreach ( $actions as $action => $callbacks ) {
624
  foreach ( $callbacks as $callback ) {
625
  $priority = has_action( $action, $callback );
626
  if ( false !== $priority ) {
627
  remove_action( $action, $callback, $priority );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
628
  }
629
  }
630
  }
@@ -1894,7 +1960,7 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer {
1894
  // Adapt the aria-expanded attribute according to the central state.
1895
  $toggle->setAttribute( 'data-amp-bind-aria-expanded', "{$state_string} ? 'true' : 'false'" );
1896
 
1897
- // If the toggle target is 'next' ir a sub-menu, only give the clicked toggle the active class.
1898
  if ( 'next' === $toggle_target || AMP_DOM_Utils::has_class( $target_node, 'sub-menu' ) ) {
1899
  AMP_DOM_Utils::add_amp_action( $toggle, 'tap', "{$toggle_id}.toggleClass(class='active')" );
1900
  } else {
@@ -1932,6 +1998,262 @@ class AMP_Core_Theme_Sanitizer extends AMP_Base_Sanitizer {
1932
  }
1933
  }
1934
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1935
  /**
1936
  * Get the closest sub-menu within a menu item.
1937
  *
39
  * @var array
40
  */
41
  protected static $supported_themes = [
42
+ 'twentytwentyone',
43
  'twentytwenty',
44
  'twentynineteen',
45
  'twentyseventeen',
80
  */
81
  protected static function get_theme_features_config( $theme_slug ) {
82
  switch ( $theme_slug ) {
83
+ case 'twentytwentyone':
84
+ $config = [
85
+ 'dequeue_scripts' => [
86
+ 'twenty-twenty-one-responsive-embeds-script',
87
+ 'twenty-twenty-one-primary-navigation-script',
88
+ ],
89
+ 'remove_actions' => [
90
+ 'wp_print_footer_scripts' => [
91
+ 'twenty_twenty_one_skip_link_focus_fix', // Unnecessary since part of the AMP runtime.
92
+ ],
93
+ 'wp_footer' => [
94
+ 'twentytwentyone_add_ie_class',
95
+ 'twenty_twenty_one_supports_js', // AMP is essentially no-js, with any interactivity added explicitly via amp-bind.
96
+ ],
97
+ ],
98
+ 'amend_twentytwentyone_styles' => [],
99
+ 'amend_twentytwentyone_sub_menu_toggles' => [],
100
+ 'add_twentytwentyone_mobile_modal' => [],
101
+ 'add_twentytwentyone_sub_menu_fix' => [],
102
+ ];
103
+
104
+ // Dark mode button toggle is only supported in the Customizer for now.
105
+ // A notice is added to the Customizer control in AMP_Template_Customizer::add_dark_mode_toggler_button_notice() via AMP_Template_Customizer::init().
106
+ if ( is_customize_preview() ) {
107
+ // Make dark mode toggle AMP compatible.
108
+ $config['add_twentytwentyone_dark_mode_toggle'] = [];
109
+ } else {
110
+ // Amend the dark mode stylesheet to only apply its rules when the user's system supports dark mode.
111
+ $config['amend_twentytwentyone_dark_mode_styles'] = [];
112
+ // Prevent the dark mode toggle and its accompanying script from being inlined.
113
+ $config['remove_actions']['wp_footer'][] = [ 'Twenty_Twenty_One_Dark_Mode', 'the_switch', 10 ];
114
+ }
115
+
116
+ return $config;
117
+
118
  // Twenty Twenty.
119
  case 'twentytwenty':
120
  $config = [
656
  * @param array $actions Actions, with action name as key and value being callback.
657
  */
658
  public static function remove_actions( $actions = [] ) {
659
+ global $wp_filter;
660
+
661
  foreach ( $actions as $action => $callbacks ) {
662
  foreach ( $callbacks as $callback ) {
663
  $priority = has_action( $action, $callback );
664
  if ( false !== $priority ) {
665
  remove_action( $action, $callback, $priority );
666
+ continue;
667
+ }
668
+
669
+ if ( ! is_array( $callback ) || 3 !== count( $callback ) ) {
670
+ continue;
671
+ }
672
+
673
+ list( $class, $method, $priority ) = $callback;
674
+
675
+ if ( isset( $wp_filter[ $action ]->callbacks[ $priority ] ) ) {
676
+ foreach ( $wp_filter[ $action ]->callbacks[ $priority ] as $added_callback ) {
677
+ if (
678
+ is_array( $added_callback['function'] )
679
+ &&
680
+ isset( $added_callback['function'][0], $added_callback['function'][1] )
681
+ &&
682
+ is_object( $added_callback['function'][0] )
683
+ &&
684
+ is_string( $added_callback['function'][1] )
685
+ &&
686
+ $method === $added_callback['function'][1]
687
+ &&
688
+ get_class( $added_callback['function'][0] ) === $class
689
+ ) {
690
+ remove_action( $action, $added_callback['function'] );
691
+ return;
692
+ }
693
+ }
694
  }
695
  }
696
  }
1960
  // Adapt the aria-expanded attribute according to the central state.
1961
  $toggle->setAttribute( 'data-amp-bind-aria-expanded', "{$state_string} ? 'true' : 'false'" );
1962
 
1963
+ // If the toggle target is 'next' or a sub-menu, only give the clicked toggle the active class.
1964
  if ( 'next' === $toggle_target || AMP_DOM_Utils::has_class( $target_node, 'sub-menu' ) ) {
1965
  AMP_DOM_Utils::add_amp_action( $toggle, 'tap', "{$toggle_id}.toggleClass(class='active')" );
1966
  } else {
1998
  }
1999
  }
2000
 
2001
+ /**
2002
+ * Amend the Twenty Twenty-One dark mode stylesheet to only apply the relevant rules when the user has requested
2003
+ * the system use a dark color theme.
2004
+ *
2005
+ * Note: Dark mode will only be available when the user's system supports it. The dark mode toggle is not available
2006
+ * on the frontend as yet since there is no feasible AMP-compatible way to store and unserialize user's preferences.
2007
+ */
2008
+ public static function amend_twentytwentyone_dark_mode_styles() {
2009
+ add_action(
2010
+ 'wp_enqueue_scripts',
2011
+ static function() {
2012
+ // Bail if the dark mode stylesheet is not enqueued.
2013
+ if ( ! wp_style_is( 'tt1-dark-mode' ) ) {
2014
+ return;
2015
+ }
2016
+
2017
+ wp_dequeue_style( 'tt1-dark-mode' );
2018
+
2019
+ $dark_mode_css_file = get_theme_file_path(
2020
+ sprintf( 'assets/css/style-dark-mode%s.css', is_rtl() ? '-rtl' : '' )
2021
+ );
2022
+
2023
+ if ( ! file_exists( $dark_mode_css_file ) ) {
2024
+ return;
2025
+ }
2026
+
2027
+ $styles = file_get_contents( $dark_mode_css_file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
2028
+
2029
+ // Restrict rules to only when the user has requested the system use a dark color theme.
2030
+ $new_styles = str_replace( '@media only screen', '@media only screen and (prefers-color-scheme: dark)', $styles );
2031
+ // Allow for rules to override the light theme related rules.
2032
+ $new_styles = str_replace( '.is-dark-theme.is-dark-theme', ':root', $new_styles );
2033
+ $new_styles = str_replace( '.respect-color-scheme-preference.is-dark-theme body', '.respect-color-scheme-preference body', $new_styles );
2034
+
2035
+ wp_add_inline_style( 'twenty-twenty-one-style', $new_styles );
2036
+ },
2037
+ 11
2038
+ );
2039
+ }
2040
+
2041
+ /**
2042
+ * Amend the Twenty Twenty-One stylesheet to make it compatible with the changes made to the document during
2043
+ * sanitization.
2044
+ */
2045
+ public static function amend_twentytwentyone_styles() {
2046
+ add_action(
2047
+ 'wp_enqueue_scripts',
2048
+ static function() {
2049
+ $style_handle = 'twenty-twenty-one-style';
2050
+
2051
+ // Bail if the stylesheet is not enqueued.
2052
+ if ( ! wp_style_is( $style_handle ) ) {
2053
+ return;
2054
+ }
2055
+
2056
+ $css_file = get_theme_file_path(
2057
+ sprintf( 'style%s.css', is_rtl() ? '-rtl' : '' )
2058
+ );
2059
+
2060
+ if ( ! file_exists( $css_file ) ) {
2061
+ return;
2062
+ }
2063
+
2064
+ /** @var _WP_Dependency $dependency */
2065
+ $dependency = wp_styles()->registered[ $style_handle ];
2066
+
2067
+ // Set the registered handle as an alias for other stylesheets to depend on.
2068
+ $dependency->src = false;
2069
+
2070
+ $styles = file_get_contents( $css_file ); //phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
2071
+
2072
+ // Make the rules for the mobile menu less specific so that it can also be applied to the
2073
+ // amp-lightbox mobile menu also.
2074
+ $new_styles = str_replace( '.primary-navigation > .primary-menu-container', '.primary-navigation .primary-menu-container', $styles );
2075
+ $new_styles = str_replace( '.primary-navigation > div > .menu-wrapper', '.primary-navigation div > .menu-wrapper', $new_styles );
2076
+
2077
+ // Append any extra rules that may be needed.
2078
+ $new_styles .= '
2079
+ .primary-navigation-open .menu-button-container {
2080
+ /* Needs to be shown above amp-lightbox, which has a z-index of 1000. */
2081
+ z-index: 1001;
2082
+ }
2083
+
2084
+ @media only screen and (max-width: 481px) {
2085
+ /* Hide the desktop menu so that it does not interfere when the amo-lightbox mobile menu is open. */
2086
+ .primary-navigation > .primary-menu-container {
2087
+ display: none;
2088
+ }
2089
+
2090
+ /* Accommodate for the admin bar height */
2091
+ .admin-bar amp-lightbox .primary-menu-container {
2092
+ margin-top: var(--global--admin-bar--height);
2093
+ }
2094
+ }
2095
+
2096
+ /* Show the sub-menu on hover of menu item */
2097
+ .primary-navigation > div > .menu-wrapper > .menu-item-has-children:hover > .sub-menu {
2098
+ display: block;
2099
+ }
2100
+
2101
+ /* Hide the plus icon on hover of menu item */
2102
+ .primary-navigation > div > .menu-wrapper > .menu-item-has-children:hover > .sub-menu-toggle > .icon-plus {
2103
+ display: none;
2104
+ }
2105
+
2106
+ /* Show the minus icon on hover of menu item */
2107
+ .primary-navigation > div > .menu-wrapper > .menu-item-has-children:hover > .sub-menu-toggle > .icon-minus {
2108
+ display: flex;
2109
+ }
2110
+ ';
2111
+
2112
+ // Ideally wp_add_inline_style() would accept a $position argument like wp_add_inline_script() does, in
2113
+ // which case the following could be replaced with wp_add_inline_style( $style_handle, $new_styles, 'before' ).
2114
+ // But this is not supported, so we have to resort to manipulating the underlying after array.
2115
+ if ( ! isset( $dependency->extra['after'] ) ) {
2116
+ $dependency->extra['after'] = [];
2117
+ }
2118
+ array_unshift( $dependency->extra['after'], $new_styles );
2119
+ },
2120
+ 11
2121
+ );
2122
+ }
2123
+
2124
+ /**
2125
+ * Make the dark mode toggle in the Twenty Twenty-One theme AMP compatible.
2126
+ *
2127
+ * Note: This is only shown within the Customizer preview for now, as there is no feasible way of persisting and
2128
+ * unserializing the user's preference when they switch to dark (or light) mode.
2129
+ */
2130
+ public function add_twentytwentyone_dark_mode_toggle() {
2131
+ $button = $this->dom->getElementById( 'dark-mode-toggler' );
2132
+
2133
+ if ( ! $button ) {
2134
+ return;
2135
+ }
2136
+
2137
+ $style = $this->dom->createElement( 'style' );
2138
+ $style->textContent = '.no-js #dark-mode-toggler { display: block; }';
2139
+ $this->dom->head->appendChild( $style );
2140
+
2141
+ $toggle_class = 'is-dark-theme';
2142
+ $state_id = str_replace( '-', '_', $toggle_class );
2143
+
2144
+ $body_id = $this->dom->getElementId( $this->dom->body );
2145
+ $document_id = $this->dom->getElementId( $this->dom->documentElement );
2146
+
2147
+ AMP_DOM_Utils::add_amp_action( $button, 'tap', "AMP.setState({{$state_id}: !{$state_id}})" );
2148
+ AMP_DOM_Utils::add_amp_action( $button, 'tap', "{$body_id}.toggleClass(class='{$toggle_class}')" );
2149
+ AMP_DOM_Utils::add_amp_action( $button, 'tap', "{$document_id}.toggleClass(class='{$toggle_class}')" );
2150
+
2151
+ $button->setAttribute( 'data-amp-bind-aria-pressed', "{$state_id} ? 'true' : 'false'" );
2152
+ }
2153
+
2154
+ /**
2155
+ * Make the mobile menu for the Twenty Twenty-One theme AMP compatible.
2156
+ */
2157
+ public function add_twentytwentyone_mobile_modal() {
2158
+ $menu_query = $this->dom->xpath->query( "//div[ @class and contains( concat( ' ', normalize-space( @class ), ' ' ), ' primary-menu-container ' ) ]" );
2159
+ $menu_toggle = $this->dom->getElementById( 'primary-mobile-menu' );
2160
+
2161
+ if ( 1 !== $menu_query->length || ! $menu_toggle ) {
2162
+ return;
2163
+ }
2164
+
2165
+ /** @var DOMElement $primary_menu */
2166
+ $primary_menu = $menu_query->item( 0 );
2167
+ $primary_menu_copy = $primary_menu->cloneNode( true );
2168
+ foreach ( $this->dom->xpath->query( './/*[ @id ]', $primary_menu_copy ) as $element ) {
2169
+ /** @var DOMElement $element */
2170
+ $element->setAttribute( 'id', $element->getAttribute( 'id' ) . '-mobile' );
2171
+ }
2172
+
2173
+ $body_id = $this->dom->getElementId( $this->dom->body, 'body' );
2174
+
2175
+ // Create an <amp-lightbox> element that will contain the modal.
2176
+ $amp_lightbox = $this->dom->createElement( 'amp-lightbox' );
2177
+ $amp_lightbox->setAttribute( 'layout', 'nodisplay' );
2178
+ $amp_lightbox->setAttribute( 'animate-in', 'fade-in' );
2179
+ $amp_lightbox->setAttribute( 'scrollable', true );
2180
+ $amp_lightbox_id = $this->dom->getElementId( $amp_lightbox );
2181
+
2182
+ $state_string = str_replace( '-', '_', $amp_lightbox_id );
2183
+
2184
+ AMP_DOM_Utils::add_amp_action( $menu_toggle, 'tap', "{$amp_lightbox_id}.open" );
2185
+ AMP_DOM_Utils::add_amp_action( $menu_toggle, 'tap', "{$body_id}.toggleClass(class=primary-navigation-open,force=true)" );
2186
+
2187
+ AMP_DOM_Utils::add_amp_action( $amp_lightbox, 'lightboxOpen', "AMP.setState({{$state_string}:true})" );
2188
+ AMP_DOM_Utils::add_amp_action( $amp_lightbox, 'lightboxClose', "AMP.setState({{$state_string}:false})" );
2189
+ AMP_DOM_Utils::add_amp_action( $amp_lightbox, 'lightboxClose', "{$body_id}.toggleClass(class=primary-navigation-open,force=false)" );
2190
+
2191
+ $menu_toggle->setAttribute( 'data-amp-bind-aria-expanded', "{$state_string} ? 'true' : 'false'" );
2192
+
2193
+ $amp_lightbox->appendChild( $primary_menu_copy );
2194
+ $primary_menu->parentNode->insertBefore( $amp_lightbox, $primary_menu );
2195
+ }
2196
+
2197
+ /**
2198
+ * Make the sub-menu functionality for the Twenty Twenty-One theme AMP compatible.
2199
+ *
2200
+ * Note: Hover functionality is accomplished through CSS.
2201
+ *
2202
+ * @see amend_twentytwentyone_styles()
2203
+ */
2204
+ public function add_twentytwentyone_sub_menu_fix() {
2205
+ // The XPath query has to be specific enough to not interfere with the mobile menu.
2206
+ $menu_toggles = $this->dom->xpath->query( '//nav/div/ul//button[ @class and contains( concat( " ", normalize-space( @class ), " " ), " sub-menu-toggle " ) ]' );
2207
+
2208
+ if ( 0 === $menu_toggles->length ) {
2209
+ return;
2210
+ }
2211
+
2212
+ $menu_toggle_ids = substr_replace( range( 1, $menu_toggles->length ), 'toggle_', 0, 0 );
2213
+
2214
+ // Sub-menus to be closed when the user clicks on the body.
2215
+ $toggles_to_disable_for_body = [];
2216
+
2217
+ foreach ( $menu_toggle_ids as $key => $menu_toggle_id ) {
2218
+ /** @var DOMElement $menu_toggle */
2219
+ $menu_toggle = $menu_toggles->item( $key );
2220
+
2221
+ $menu_toggle->setAttribute( 'data-amp-bind-aria-expanded', "{$menu_toggle_id} ? 'true' : 'false'" );
2222
+
2223
+ // Sub-menus to be closed when this one is to be opened.
2224
+ $toggles_to_disable = '';
2225
+ $toggles_to_disable_for_body[] = "{$menu_toggle_id}:false";
2226
+
2227
+ foreach ( $menu_toggle_ids as $other_menu_toggle_id ) {
2228
+ if ( $menu_toggle_id === $other_menu_toggle_id ) {
2229
+ continue;
2230
+ }
2231
+
2232
+ $toggles_to_disable .= ",{$other_menu_toggle_id}:false";
2233
+ }
2234
+
2235
+ AMP_DOM_Utils::add_amp_action( $menu_toggle, 'tap', "AMP.setState({{$menu_toggle_id}:!{$menu_toggle_id}{$toggles_to_disable}})" );
2236
+ }
2237
+
2238
+ $state_vars = implode( ',', $toggles_to_disable_for_body );
2239
+ AMP_DOM_Utils::add_amp_action( $this->dom->body, 'tap', "AMP.setState({{$state_vars}})" );
2240
+ $this->dom->body->setAttribute( 'role', 'document' );
2241
+ $this->dom->body->setAttribute( 'tabindex', '-1' );
2242
+ }
2243
+
2244
+ /**
2245
+ * Sanitize the sub-menus in the Twenty Twenty-One theme.
2246
+ */
2247
+ public function amend_twentytwentyone_sub_menu_toggles() {
2248
+ $menu_toggles = $this->dom->xpath->query( '//button[ @onclick = "twentytwentyoneExpandSubMenu(this)" ]' );
2249
+
2250
+ // Remove the `onclick` attribute for sub-menu toggles in the primary and secondary menus.
2251
+ foreach ( $menu_toggles as $menu_toggle ) {
2252
+ /** @var DOMElement $menu_toggle */
2253
+ $menu_toggle->removeAttribute( 'onclick' );
2254
+ }
2255
+ }
2256
+
2257
  /**
2258
  * Get the closest sub-menu within a menu item.
2259
  *
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: google, xwp, automattic, westonruter, albertomedina, schlessera, s
3
  Tags: amp, mobile, optimization, accelerated mobile pages, framework, components, blocks, performance, ux, seo, official
4
  Requires at least: 4.9
5
  Tested up to: 5.6
6
- Stable tag: 2.0.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
3
  Tags: amp, mobile, optimization, accelerated mobile pages, framework, components, blocks, performance, ux, seo, official
4
  Requires at least: 4.9
5
  Tested up to: 5.6
6
+ Stable tag: 2.0.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Requires PHP: 5.6
src/Admin/ReaderThemes.php CHANGED
@@ -223,7 +223,7 @@ final class ReaderThemes {
223
  'query_themes',
224
  [
225
  'author' => 'wordpressdotorg',
226
- 'per_page' => 24, // There are only 12 as of 05/2020.
227
  ]
228
  );
229
 
223
  'query_themes',
224
  [
225
  'author' => 'wordpressdotorg',
226
+ 'per_page' => 24, // There are only 13 as of 12/2020.
227
  ]
228
  );
229
 
src/MobileRedirection.php CHANGED
@@ -416,6 +416,17 @@ final class MobileRedirection implements Service, Registerable {
416
  return;
417
  }
418
  $source = file_get_contents( AMP__DIR__ . '/assets/css/amp-mobile-version-switcher' . ( is_rtl() ? '-rtl' : '' ) . '.css' ); // phpcs:ignore WordPress.WP.AlternativeFunctions
 
 
 
 
 
 
 
 
 
 
 
419
  printf( '<style>%s</style>', $source ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
420
  }
421
 
416
  return;
417
  }
418
  $source = file_get_contents( AMP__DIR__ . '/assets/css/amp-mobile-version-switcher' . ( is_rtl() ? '-rtl' : '' ) . '.css' ); // phpcs:ignore WordPress.WP.AlternativeFunctions
419
+
420
+ if ( 'twentytwentyone' === get_template() ) {
421
+ // When on a non-AMP page and the mobile menu is open, the mobile version link is incorrectly shown at the
422
+ // top of the page. In that case, the mobile version link is hidden.
423
+ $source .= '
424
+ body.lock-scrolling > #amp-mobile-version-switcher {
425
+ display: none;
426
+ }
427
+ ';
428
+ }
429
+
430
  printf( '<style>%s</style>', $source ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
431
  }
432
 
vendor/ampproject/optimizer/resources/local_fallback/rtv/metadata CHANGED
@@ -1 +1 @@
1
- {"ampRuntimeVersion":"012008150009001","ampCssUrl":"https://cdn.ampproject.org/rtv/012008150009001/v0.css","canaryPercentage":"0.005","diversions":["002008150009001","022008150009001","032008150009001","042008270456000","052008150009001"],"ltsRuntimeVersion":"012007242032002","ltsCssUrl":"https://cdn.ampproject.org/rtv/012007242032002/v0.css"}
1
+ {"ampRuntimeVersion":"012011200012001","ampCssUrl":"https://cdn.ampproject.org/rtv/012011200012001/v0.css","canaryPercentage":"0.005","diversions":["002011252111001","022011200012001","032011252111001","042012012234000","052011200012001","102011252111001"],"ltsRuntimeVersion":"012010132225003","ltsCssUrl":"https://cdn.ampproject.org/rtv/012010132225003/v0.css"}
vendor/ampproject/optimizer/resources/local_fallback/v0.css CHANGED
@@ -1,3 +1,3 @@
1
  html{overflow-x:hidden!important}html.i-amphtml-fie{height:100%!important;width:100%!important}html:not([amp4ads]),html:not([amp4ads]) body{height:auto!important}html:not([amp4ads]) body{margin:0!important}body{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}html.i-amphtml-singledoc.i-amphtml-embedded{-ms-touch-action:pan-y;touch-action:pan-y}html.i-amphtml-fie>body,html.i-amphtml-singledoc>body{overflow:visible!important}html.i-amphtml-fie:not(.i-amphtml-inabox)>body,html.i-amphtml-singledoc:not(.i-amphtml-inabox)>body{position:relative!important}html.i-amphtml-webview>body{overflow-x:hidden!important;overflow-y:visible!important;min-height:100vh!important}html.i-amphtml-ios-embed-legacy>body{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important}html.i-amphtml-ios-embed{overflow-y:auto!important;position:static}#i-amphtml-wrapper{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;margin:0!important;display:block!important}html.i-amphtml-ios-embed.i-amphtml-ios-overscroll,html.i-amphtml-ios-embed.i-amphtml-ios-overscroll>#i-amphtml-wrapper{-webkit-overflow-scrolling:touch!important}#i-amphtml-wrapper>body{position:relative!important;border-top:1px solid transparent!important}#i-amphtml-wrapper+body{visibility:visible}#i-amphtml-wrapper+body .i-amphtml-lightbox-element,#i-amphtml-wrapper+body[i-amphtml-lightbox]{visibility:hidden}#i-amphtml-wrapper+body[i-amphtml-lightbox] .i-amphtml-lightbox-element{visibility:visible}#i-amphtml-wrapper.i-amphtml-scroll-disabled,.i-amphtml-scroll-disabled{overflow-x:hidden!important;overflow-y:hidden!important}amp-instagram{padding:54px 0px 0px!important;background-color:#fff}amp-iframe iframe{box-sizing:border-box!important}[amp-access][amp-access-hide]{display:none}[subscriptions-dialog],body:not(.i-amphtml-subs-ready) [subscriptions-action],body:not(.i-amphtml-subs-ready) [subscriptions-section]{display:none!important}amp-experiment,amp-live-list>[update]{display:none}.i-amphtml-jank-meter{position:fixed;background-color:rgba(232,72,95,0.5);bottom:0;right:0;color:#fff;font-size:16px;z-index:1000;padding:5px}amp-list[resizable-children]>.i-amphtml-loading-container.amp-hidden{display:none!important}amp-list [fetch-error],amp-list[load-more] [load-more-button],amp-list[load-more] [load-more-end],amp-list[load-more] [load-more-failed],amp-list[load-more] [load-more-loading]{display:none}amp-list[diffable] div[role=list]{display:block}amp-story-page,amp-story[standalone]{min-height:1px!important;display:block!important;height:100%!important;margin:0!important;padding:0!important;overflow:hidden!important;width:100%!important}amp-story[standalone]{background-color:#202125!important;position:relative!important}amp-story-page{background-color:#757575}amp-story .amp-active>div,amp-story .i-amphtml-loader-background{display:none!important}amp-story-page:not(:first-of-type):not([distance]):not([active]){transform:translateY(1000vh)!important}amp-autocomplete{position:relative!important;display:inline-block!important}amp-autocomplete>input,amp-autocomplete>textarea{padding:0.5rem;border:1px solid rgba(0,0,0,0.33)}.i-amphtml-autocomplete-results,amp-autocomplete>input,amp-autocomplete>textarea{font-size:1rem;line-height:1.5rem}[amp-fx^=fly-in]{visibility:hidden}amp-script[nodom]{position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden}
2
- /*# sourceURL=/css/ampdoc.css*/[hidden]{display:none!important}.i-amphtml-element{display:inline-block}.i-amphtml-blurry-placeholder{transition:opacity 0.3s cubic-bezier(0.0,0.0,0.2,1)!important;pointer-events:none}[layout=nodisplay]:not(.i-amphtml-element){display:none!important}.i-amphtml-layout-fixed,[layout=fixed][width][height]:not(.i-amphtml-layout-fixed){display:inline-block;position:relative}.i-amphtml-layout-responsive,[layout=responsive][width][height]:not(.i-amphtml-layout-responsive),[width][height][heights]:not([layout]):not(.i-amphtml-layout-responsive),[width][height][sizes]:not([layout]):not(.i-amphtml-layout-responsive){display:block;position:relative}.i-amphtml-layout-intrinsic,[layout=intrinsic][width][height]:not(.i-amphtml-layout-intrinsic){display:inline-block;position:relative;max-width:100%}.i-amphtml-layout-intrinsic .i-amphtml-sizer{max-width:100%}.i-amphtml-intrinsic-sizer{max-width:100%;display:block!important}.i-amphtml-layout-container,.i-amphtml-layout-fixed-height,[layout=container],[layout=fixed-height][height]:not(.i-amphtml-layout-fixed-height){display:block;position:relative}.i-amphtml-layout-fill,[layout=fill]:not(.i-amphtml-layout-fill){display:block;overflow:hidden!important;position:absolute;top:0;left:0;bottom:0;right:0}.i-amphtml-layout-flex-item,[layout=flex-item]:not(.i-amphtml-layout-flex-item){display:block;position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.i-amphtml-layout-fluid{position:relative}.i-amphtml-layout-size-defined{overflow:hidden!important}.i-amphtml-layout-awaiting-size{position:absolute!important;top:auto!important;bottom:auto!important}i-amphtml-sizer{display:block!important}.i-amphtml-blurry-placeholder,.i-amphtml-fill-content{display:block;height:0;max-height:100%;max-width:100%;min-height:100%;min-width:100%;width:0;margin:auto}.i-amphtml-layout-size-defined .i-amphtml-fill-content{position:absolute;top:0;left:0;bottom:0;right:0}.i-amphtml-replaced-content,.i-amphtml-screen-reader{padding:0!important;border:none!important}.i-amphtml-screen-reader{position:fixed!important;top:0px!important;left:0px!important;width:4px!important;height:4px!important;opacity:0!important;overflow:hidden!important;margin:0!important;display:block!important;visibility:visible!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:8px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:12px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:16px!important}.i-amphtml-unresolved{position:relative;overflow:hidden!important}.i-amphtml-select-disabled{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.i-amphtml-notbuilt,[layout]:not(.i-amphtml-element),[width][height][heights]:not([layout]):not(.i-amphtml-element),[width][height][sizes]:not([layout]):not(.i-amphtml-element){position:relative;overflow:hidden!important;color:transparent!important}.i-amphtml-notbuilt:not(.i-amphtml-layout-container)>*,[layout]:not([layout=container]):not(.i-amphtml-element)>*,[width][height][heights]:not([layout]):not(.i-amphtml-element)>*,[width][height][sizes]:not([layout]):not(.i-amphtml-element)>*{display:none}.i-amphtml-notbuilt:not(.i-amphtml-layout-container),[layout]:not([layout=container]):not(.i-amphtml-element),[width][height][heights]:not([layout]):not(.i-amphtml-element),[width][height][sizes]:not([layout]):not(.i-amphtml-element){color:transparent!important;line-height:0!important}.i-amphtml-ghost{visibility:hidden!important}.i-amphtml-element>[placeholder],[layout]:not(.i-amphtml-element)>[placeholder],[width][height][heights]:not([layout]):not(.i-amphtml-element)>[placeholder],[width][height][sizes]:not([layout]):not(.i-amphtml-element)>[placeholder]{display:block}.i-amphtml-element>[placeholder].amp-hidden,.i-amphtml-element>[placeholder].hidden{visibility:hidden}.i-amphtml-element:not(.amp-notsupported)>[fallback],.i-amphtml-layout-container>[placeholder].amp-hidden,.i-amphtml-layout-container>[placeholder].hidden{display:none}.i-amphtml-layout-size-defined>[fallback],.i-amphtml-layout-size-defined>[placeholder]{position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;z-index:1}.i-amphtml-notbuilt>[placeholder]{display:block!important}.i-amphtml-hidden-by-media-query{display:none!important}.i-amphtml-element-error{background:red!important;color:#fff!important;position:relative!important}.i-amphtml-element-error:before{content:attr(error-message)}i-amp-scroll-container,i-amphtml-scroll-container{position:absolute;top:0;left:0;right:0;bottom:0;display:block}i-amp-scroll-container.amp-active,i-amphtml-scroll-container.amp-active{overflow:auto;-webkit-overflow-scrolling:touch}.i-amphtml-loading-container{display:block!important;pointer-events:none;z-index:1}.i-amphtml-notbuilt>.i-amphtml-loading-container{display:block!important}.i-amphtml-loading-container.amp-hidden{visibility:hidden}.i-amphtml-element>[overflow]{cursor:pointer;position:relative;z-index:2;visibility:hidden;display:initial;line-height:normal}.i-amphtml-element>[overflow].amp-visible{visibility:visible}template{display:none!important}.amp-border-box,.amp-border-box *,.amp-border-box :after,.amp-border-box :before{box-sizing:border-box}amp-pixel{display:none!important}amp-analytics,amp-auto-ads,amp-story-auto-ads{position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden}html.i-amphtml-fie>amp-analytics{position:initial!important}[visible-when-invalid]:not(.visible),form [submit-error],form [submit-success],form [submitting]{display:none}amp-accordion{display:block!important}amp-accordion>section{float:none!important}amp-accordion>section>*{float:none!important;display:block!important;overflow:hidden!important;position:relative!important}amp-accordion,amp-accordion>section{margin:0}amp-accordion>section>:last-child{display:none!important}amp-accordion>section[expanded]>:last-child{display:block!important}
3
  /*# sourceURL=/css/ampshared.css*/
1
  html{overflow-x:hidden!important}html.i-amphtml-fie{height:100%!important;width:100%!important}html:not([amp4ads]),html:not([amp4ads]) body{height:auto!important}html:not([amp4ads]) body{margin:0!important}body{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}html.i-amphtml-singledoc.i-amphtml-embedded{-ms-touch-action:pan-y;touch-action:pan-y}html.i-amphtml-fie>body,html.i-amphtml-singledoc>body{overflow:visible!important}html.i-amphtml-fie:not(.i-amphtml-inabox)>body,html.i-amphtml-singledoc:not(.i-amphtml-inabox)>body{position:relative!important}html.i-amphtml-webview>body{overflow-x:hidden!important;overflow-y:visible!important;min-height:100vh!important}html.i-amphtml-ios-embed-legacy>body{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important}html.i-amphtml-ios-embed{overflow-y:auto!important;position:static}#i-amphtml-wrapper{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;margin:0!important;display:block!important}html.i-amphtml-ios-embed.i-amphtml-ios-overscroll,html.i-amphtml-ios-embed.i-amphtml-ios-overscroll>#i-amphtml-wrapper{-webkit-overflow-scrolling:touch!important}#i-amphtml-wrapper>body{position:relative!important;border-top:1px solid transparent!important}#i-amphtml-wrapper+body{visibility:visible}#i-amphtml-wrapper+body .i-amphtml-lightbox-element,#i-amphtml-wrapper+body[i-amphtml-lightbox]{visibility:hidden}#i-amphtml-wrapper+body[i-amphtml-lightbox] .i-amphtml-lightbox-element{visibility:visible}#i-amphtml-wrapper.i-amphtml-scroll-disabled,.i-amphtml-scroll-disabled{overflow-x:hidden!important;overflow-y:hidden!important}amp-instagram{padding:54px 0px 0px!important;background-color:#fff}amp-iframe iframe{box-sizing:border-box!important}[amp-access][amp-access-hide]{display:none}[subscriptions-dialog],body:not(.i-amphtml-subs-ready) [subscriptions-action],body:not(.i-amphtml-subs-ready) [subscriptions-section]{display:none!important}amp-experiment,amp-live-list>[update]{display:none}.i-amphtml-jank-meter{position:fixed;background-color:rgba(232,72,95,0.5);bottom:0;right:0;color:#fff;font-size:16px;z-index:1000;padding:5px}amp-list[resizable-children]>.i-amphtml-loading-container.amp-hidden{display:none!important}amp-list [fetch-error],amp-list[load-more] [load-more-button],amp-list[load-more] [load-more-end],amp-list[load-more] [load-more-failed],amp-list[load-more] [load-more-loading]{display:none}amp-list[diffable] div[role=list]{display:block}amp-story-page,amp-story[standalone]{min-height:1px!important;display:block!important;height:100%!important;margin:0!important;padding:0!important;overflow:hidden!important;width:100%!important}amp-story[standalone]{background-color:#202125!important;position:relative!important}amp-story-page{background-color:#757575}amp-story .amp-active>div,amp-story .i-amphtml-loader-background{display:none!important}amp-story-page:not(:first-of-type):not([distance]):not([active]){transform:translateY(1000vh)!important}amp-autocomplete{position:relative!important;display:inline-block!important}amp-autocomplete>input,amp-autocomplete>textarea{padding:0.5rem;border:1px solid rgba(0,0,0,0.33)}.i-amphtml-autocomplete-results,amp-autocomplete>input,amp-autocomplete>textarea{font-size:1rem;line-height:1.5rem}[amp-fx^=fly-in]{visibility:hidden}amp-script[nodom]{position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden}
2
+ /*# sourceURL=/css/ampdoc.css*/[hidden]{display:none!important}.i-amphtml-element{display:inline-block}.i-amphtml-blurry-placeholder{transition:opacity 0.3s cubic-bezier(0.0,0.0,0.2,1)!important;pointer-events:none}[layout=nodisplay]:not(.i-amphtml-element){display:none!important}.i-amphtml-layout-fixed,[layout=fixed][width][height]:not(.i-amphtml-layout-fixed){display:inline-block;position:relative}.i-amphtml-layout-responsive,[layout=responsive][width][height]:not(.i-amphtml-layout-responsive),[width][height][heights]:not([layout]):not(.i-amphtml-layout-responsive),[width][height][sizes]:not([layout]):not(.i-amphtml-layout-responsive){display:block;position:relative}.i-amphtml-layout-intrinsic,[layout=intrinsic][width][height]:not(.i-amphtml-layout-intrinsic){display:inline-block;position:relative;max-width:100%}.i-amphtml-layout-intrinsic .i-amphtml-sizer{max-width:100%}.i-amphtml-intrinsic-sizer{max-width:100%;display:block!important}.i-amphtml-layout-container,.i-amphtml-layout-fixed-height,[layout=container],[layout=fixed-height][height]:not(.i-amphtml-layout-fixed-height){display:block;position:relative}.i-amphtml-layout-fill,.i-amphtml-layout-fill.i-amphtml-notbuilt,[layout=fill]:not(.i-amphtml-layout-fill){display:block;overflow:hidden!important;position:absolute;top:0;left:0;bottom:0;right:0}.i-amphtml-layout-flex-item,[layout=flex-item]:not(.i-amphtml-layout-flex-item){display:block;position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.i-amphtml-layout-fluid{position:relative}.i-amphtml-layout-size-defined{overflow:hidden!important}.i-amphtml-layout-awaiting-size{position:absolute!important;top:auto!important;bottom:auto!important}i-amphtml-sizer{display:block!important}@supports (aspect-ratio:1/1){i-amphtml-sizer.i-amphtml-disable-for-ar{display:none!important}}.i-amphtml-blurry-placeholder,.i-amphtml-fill-content{display:block;height:0;max-height:100%;max-width:100%;min-height:100%;min-width:100%;width:0;margin:auto}.i-amphtml-layout-size-defined .i-amphtml-fill-content{position:absolute;top:0;left:0;bottom:0;right:0}.i-amphtml-replaced-content,.i-amphtml-screen-reader{padding:0!important;border:none!important}.i-amphtml-screen-reader{position:fixed!important;top:0px!important;left:0px!important;width:4px!important;height:4px!important;opacity:0!important;overflow:hidden!important;margin:0!important;display:block!important;visibility:visible!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:8px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:12px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:16px!important}.i-amphtml-unresolved{position:relative;overflow:hidden!important}.i-amphtml-select-disabled{-webkit-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.i-amphtml-notbuilt,[layout]:not(.i-amphtml-element),[width][height][heights]:not([layout]):not(.i-amphtml-element),[width][height][sizes]:not([layout]):not(.i-amphtml-element){position:relative;overflow:hidden!important;color:transparent!important}.i-amphtml-notbuilt:not(.i-amphtml-layout-container)>*,[layout]:not([layout=container]):not(.i-amphtml-element)>*,[width][height][heights]:not([layout]):not(.i-amphtml-element)>*,[width][height][sizes]:not([layout]):not(.i-amphtml-element)>*{display:none}amp-img:not(.i-amphtml-element)[i-amphtml-ssr]>img.i-amphtml-fill-content{display:block}.i-amphtml-notbuilt:not(.i-amphtml-layout-container),[layout]:not([layout=container]):not(.i-amphtml-element),[width][height][heights]:not([layout]):not(.i-amphtml-element),[width][height][sizes]:not([layout]):not(.i-amphtml-element){color:transparent!important;line-height:0!important}.i-amphtml-ghost{visibility:hidden!important}.i-amphtml-element>[placeholder],[layout]:not(.i-amphtml-element)>[placeholder],[width][height][heights]:not([layout]):not(.i-amphtml-element)>[placeholder],[width][height][sizes]:not([layout]):not(.i-amphtml-element)>[placeholder]{display:block}.i-amphtml-element>[placeholder].amp-hidden,.i-amphtml-element>[placeholder].hidden{visibility:hidden}.i-amphtml-element:not(.amp-notsupported)>[fallback],.i-amphtml-layout-container>[placeholder].amp-hidden,.i-amphtml-layout-container>[placeholder].hidden{display:none}.i-amphtml-layout-size-defined>[fallback],.i-amphtml-layout-size-defined>[placeholder]{position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;z-index:1}.i-amphtml-notbuilt>[placeholder]{display:block!important}.i-amphtml-hidden-by-media-query{display:none!important}.i-amphtml-element-error{background:red!important;color:#fff!important;position:relative!important}.i-amphtml-element-error:before{content:attr(error-message)}i-amp-scroll-container,i-amphtml-scroll-container{position:absolute;top:0;left:0;right:0;bottom:0;display:block}i-amp-scroll-container.amp-active,i-amphtml-scroll-container.amp-active{overflow:auto;-webkit-overflow-scrolling:touch}.i-amphtml-loading-container{display:block!important;pointer-events:none;z-index:1}.i-amphtml-notbuilt>.i-amphtml-loading-container{display:block!important}.i-amphtml-loading-container.amp-hidden{visibility:hidden}.i-amphtml-element>[overflow]{cursor:pointer;position:relative;z-index:2;visibility:hidden;display:initial;line-height:normal}.i-amphtml-element>[overflow].amp-visible{visibility:visible}template{display:none!important}.amp-border-box,.amp-border-box *,.amp-border-box :after,.amp-border-box :before{box-sizing:border-box}amp-pixel{display:none!important}amp-analytics,amp-auto-ads,amp-story-auto-ads{position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden}html.i-amphtml-fie>amp-analytics{position:initial!important}[visible-when-invalid]:not(.visible),form [submit-error],form [submit-success],form [submitting]{display:none}amp-accordion{display:block!important}amp-accordion>section{float:none!important}amp-accordion>section>*{float:none!important;display:block!important;overflow:hidden!important;position:relative!important}amp-accordion,amp-accordion>section{margin:0}amp-accordion:not(.i-amphtml-built)>section>:last-child{display:none!important}amp-accordion:not(.i-amphtml-built)>section[expanded]>:last-child{display:block!important}
3
  /*# sourceURL=/css/ampshared.css*/
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitbe540b4715e7c35d69dbf02dbc51cdfb::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit5744ddd98fd0cf1987c37bad69f6fba4::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitbe540b4715e7c35d69dbf02dbc51cdfb
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitbe540b4715e7c35d69dbf02dbc51cdfb
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitbe540b4715e7c35d69dbf02dbc51cdfb', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInitbe540b4715e7c35d69dbf02dbc51cdfb', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInitbe540b4715e7c35d69dbf02dbc51cdfb::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInitbe540b4715e7c35d69dbf02dbc51cdfb
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInitbe540b4715e7c35d69dbf02dbc51cdfb::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequirebe540b4715e7c35d69dbf02dbc51cdfb($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequirebe540b4715e7c35d69dbf02dbc51cdfb($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit5744ddd98fd0cf1987c37bad69f6fba4
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit5744ddd98fd0cf1987c37bad69f6fba4', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit5744ddd98fd0cf1987c37bad69f6fba4', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit5744ddd98fd0cf1987c37bad69f6fba4::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit5744ddd98fd0cf1987c37bad69f6fba4::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire5744ddd98fd0cf1987c37bad69f6fba4($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire5744ddd98fd0cf1987c37bad69f6fba4($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitbe540b4715e7c35d69dbf02dbc51cdfb
8
  {
9
  public static $files = array (
10
  '6f5653f9af3eab04254ad2c7f20515c8' => __DIR__ . '/../..' . '/back-compat/back-compat.php',
@@ -338,9 +338,9 @@ class ComposerStaticInitbe540b4715e7c35d69dbf02dbc51cdfb
338
  public static function getInitializer(ClassLoader $loader)
339
  {
340
  return \Closure::bind(function () use ($loader) {
341
- $loader->prefixLengthsPsr4 = ComposerStaticInitbe540b4715e7c35d69dbf02dbc51cdfb::$prefixLengthsPsr4;
342
- $loader->prefixDirsPsr4 = ComposerStaticInitbe540b4715e7c35d69dbf02dbc51cdfb::$prefixDirsPsr4;
343
- $loader->classMap = ComposerStaticInitbe540b4715e7c35d69dbf02dbc51cdfb::$classMap;
344
 
345
  }, null, ClassLoader::class);
346
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit5744ddd98fd0cf1987c37bad69f6fba4
8
  {
9
  public static $files = array (
10
  '6f5653f9af3eab04254ad2c7f20515c8' => __DIR__ . '/../..' . '/back-compat/back-compat.php',
338
  public static function getInitializer(ClassLoader $loader)
339
  {
340
  return \Closure::bind(function () use ($loader) {
341
+ $loader->prefixLengthsPsr4 = ComposerStaticInit5744ddd98fd0cf1987c37bad69f6fba4::$prefixLengthsPsr4;
342
+ $loader->prefixDirsPsr4 = ComposerStaticInit5744ddd98fd0cf1987c37bad69f6fba4::$prefixDirsPsr4;
343
+ $loader->classMap = ComposerStaticInit5744ddd98fd0cf1987c37bad69f6fba4::$classMap;
344
 
345
  }, null, ClassLoader::class);
346
  }