浏览代码

Karuna: Set a higher content width when any of the footer widget areas are active to account for galleries in the full-width footer. Remove defunct Jetpack filter function for tiled galleries. See #40

Caroline Moore 7 年之前
父节点
当前提交
8f4530b9de
共有 2 个文件被更改,包括 1 次插入13 次删除
  1. 1 1
      karuna/functions.php
  2. 0 12
      karuna/inc/jetpack.php

+ 1 - 1
karuna/functions.php

@@ -115,7 +115,7 @@ if ( ! function_exists( 'karuna_adjusted_content_width' ) ) :
 function karuna_adjusted_content_width() {
 	global $content_width;
 
-	if ( is_page_template( 'templates/full-width-page.php' ) || is_page_template( 'front-page.php' ) ) {
+	if ( is_page_template( 'templates/full-width-page.php' ) || is_page_template( 'front-page.php' ) || is_active_sidebar( 'sidebar-5' ) || is_active_sidebar( 'sidebar-4' ) ) {
 		$content_width = 1040; //pixels
 	}
 }

+ 0 - 12
karuna/inc/jetpack.php

@@ -88,18 +88,6 @@ function karuna_social_menu() {
 	}
 }
 
-/*
- * Adjust content width for Tiled Galleries when using the Header or Full-Width widget areas
- */
-function karuna_jetpack_gallery_widget_width( $width ) {
-	if ( is_active_sidebar( 'sidebar-5' ) || is_active_sidebar( 'sidebar-4' ) ) {
-		$width = 1040;
-	}
-
-	return $width;
-}
-add_filter( 'gallery_widget_content_width', 'karuna_jetpack_gallery_widget_width' );
-
 /**
  * Return early if Author Bio is not available.
  */