Ticket #39272: 39272.2.patch
File 39272.2.patch, 1.2 KB (added by , 8 years ago) |
---|
-
src/wp-content/themes/twentyseventeen/functions.php
199 199 */ 200 200 function twentyseventeen_content_width() { 201 201 202 $content_width = 700; 202 $content_width = 525; 203 204 // Get layout 205 $page_layout = get_theme_mod( 'page_layout' ); 206 207 //Check if layout is one column 208 if ( 'one-column' === $page_layout ) { 203 209 204 if ( twentyseventeen_is_frontpage() ) { 205 $content_width = 1120; 210 if ( twentyseventeen_is_frontpage() ) { 211 $content_width = 644; 212 } elseif ( is_page() ) { 213 $content_width = 740; 214 } 206 215 } 207 216 217 //Check if is single post and there is no sidebar 218 if ( is_single() && ! is_active_sidebar( 'sidebar-1' ) ) { 219 $content_width = 740; 220 } 221 208 222 /** 209 223 * Filter Twenty Seventeen content width of the theme. 210 224 * … … 214 228 */ 215 229 $GLOBALS['content_width'] = apply_filters( 'twentyseventeen_content_width', $content_width ); 216 230 } 217 add_action( ' after_setup_theme', 'twentyseventeen_content_width', 0 );231 add_action( 'wp', 'twentyseventeen_content_width', 0 ); 218 232 219 233 /** 220 234 * Register custom fonts.