|
@@ 172-178 (lines=7) @@
|
| 169 |
|
$url = esc_url( 'https://player.vimeo.com/video/' . $attr['id'] ); |
| 170 |
|
|
| 171 |
|
// Handle autoplay and loop arguments. |
| 172 |
|
if ( |
| 173 |
|
isset( $args['autoplay'] ) && '1' === $args['autoplay'] // Parsed from the embedded URL. |
| 174 |
|
|| $attr['autoplay'] // Parsed from shortcode arguments. |
| 175 |
|
|| in_array( 'autoplay', $atts, true ) // Catch the argument passed without a value. |
| 176 |
|
) { |
| 177 |
|
$url = add_query_arg( 'autoplay', 1, $url ); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
if ( |
| 181 |
|
isset( $args['loop'] ) && '1' === $args['loop'] // Parsed from the embedded URL. |
|
@@ 180-186 (lines=7) @@
|
| 177 |
|
$url = add_query_arg( 'autoplay', 1, $url ); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
if ( |
| 181 |
|
isset( $args['loop'] ) && '1' === $args['loop'] // Parsed from the embedded URL. |
| 182 |
|
|| $attr['loop'] // Parsed from shortcode arguments. |
| 183 |
|
|| in_array( 'loop', $atts, true ) // Catch the argument passed without a value. |
| 184 |
|
) { |
| 185 |
|
$url = add_query_arg( 'loop', 1, $url ); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
if ( |
| 189 |
|
class_exists( 'Jetpack_AMP_Support' ) |