Ixion: 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

This commit is contained in:
Caroline Moore 2018-03-15 13:07:36 -04:00
parent f2e98f133b
commit 632bc027fd
2 changed files with 13 additions and 10 deletions

View file

@ -94,6 +94,19 @@ function ixion_content_width() {
}
add_action( 'after_setup_theme', 'ixion_content_width', 0 );
/**
* Set larger content width in some situations.
*/
function ixion_adjust_content_width() {
/* Allow for full-width gallery display in the footer */
if ( is_active_sidebar( 'sidebar-2' ) || is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) || is_active_sidebar( 'sidebar-5' ) ) {
$GLOBALS['content_width'] = 1080;
}
}
add_action( 'template_redirect', 'ixion_adjust_content_width' );
/**
* Return early if Custom Logos are not available.
*

View file

@ -117,13 +117,3 @@ function ixion_has_multiple_featured_posts() {
function ixion_get_featured_posts() {
return apply_filters( 'ixion_get_featured_posts', false );
}
/**
* Filter content width for galleries in widgets
* to accomodate full-width footer widget areas
*/
function ixion_custom_gallery_content_width() {
return 1080;
}
add_filter( 'gallery_widget_content_width', 'ixion_custom_gallery_content_width' );