浏览代码

Affinity: Add theme support for responsive embeds.

Laurel Fulford 6 年之前
父节点
当前提交
5f31ae3de8
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      affinity/functions.php

+ 8 - 3
affinity/functions.php

@@ -45,6 +45,11 @@ function affinity_setup() {
 	 */
 	add_theme_support( 'align-wide' );
 
+	/*
+	 * Add support for responsive embeds.
+	 */
+	add_theme_support( 'responsive-embeds' );
+
 	/**
 	 * Add support for core custom logo
 	 * - also see fallback in inc/jetpack.php
@@ -119,7 +124,7 @@ function affinity_content_width() {
 	// Largest width at mobile breakpoint 46em is 820px
 	// Actual width at largest possible screen size is 540px
 
-	$GLOBALS['content_width'] = apply_filters( 'affinity_content_width', 820 ); 
+	$GLOBALS['content_width'] = apply_filters( 'affinity_content_width', 820 );
 }
 add_action( 'after_setup_theme', 'affinity_content_width', 0 );
 
@@ -266,8 +271,8 @@ function affinity_scripts() {
 }
 add_action( 'wp_enqueue_scripts', 'affinity_scripts' );
 
-/** 
- * Gutenberg Editor Styles 
+/**
+ * Gutenberg Editor Styles
  */
 function affinity_editor_styles() {
 	wp_enqueue_style( 'affinity-blocks-editor-style', get_template_directory_uri() . '/editor-blocks.css');