|
@@ -226,7 +226,7 @@ function dw_opengraph() {
|
|
|
<meta property="og:video:height" content="720" />
|
|
|
<meta property="og:video:type" content="video/mp4" />
|
|
|
<meta name="twitter:card" content="player">
|
|
|
- <meta name="twitter:player" content="https://davidawindham.com/wha/container.html" />
|
|
|
+ <meta name="twitter:player" content="<?php echo get_permalink();?>container/" />
|
|
|
<meta name="twitter:player:width" content="1280" />
|
|
|
<meta name="twitter:player:height" content="720" />
|
|
|
<meta name="twitter:player:stream" content="<?php echo $media_url; ?>" />
|
|
@@ -241,4 +241,18 @@ function dw_opengraph() {
|
|
|
add_action('wp_head', 'dw_opengraph', 5);
|
|
|
|
|
|
|
|
|
+function dw_read_container_endpoint(){
|
|
|
+ add_rewrite_endpoint( 'container', EP_PERMALINK);
|
|
|
+}
|
|
|
+add_action( 'init', 'dw_read_container_endpoint' );
|
|
|
+
|
|
|
+function dw_read_container_template( $template = '' ) {
|
|
|
+ global $wp_query;
|
|
|
+ if( ! array_key_exists( 'container', $wp_query->query_vars ) ) return $template;
|
|
|
+ $template = locate_template( 'single-container.php' );
|
|
|
+ return $template;
|
|
|
+}
|
|
|
+add_filter( 'single_template', 'dw_read_container_template' );
|
|
|
+
|
|
|
+
|
|
|
?>
|