Ticket #21942: 21942.diff
| File 21942.diff, 4.0 KB (added by , 14 years ago) |
|---|
-
wp-content/themes/twentytwelve/style.css
1474 1474 width: 47.916666667%; 1475 1475 } 1476 1476 .template-front-page .widget-area .widget, 1477 .template-front-page .widget-area.two.front-widgets {1477 .template-front-page.two-sidebars .widget-area .front-widgets { 1478 1478 float: left; 1479 1479 width: 51.875%; 1480 1480 margin-bottom: 24px; … … 1484 1484 clear: right; 1485 1485 } 1486 1486 .template-front-page .widget-area .widget:nth-child(even), 1487 .template-front-page .widget-area.two.front-widgets + .front-widgets {1487 .template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { 1488 1488 float: right; 1489 1489 width: 39.0625%; 1490 1490 margin: 0 0 24px; 1491 1491 margin: 0 0 1.714285714rem; 1492 1492 } 1493 .template-front-page .widget-area.two.widget,1494 .template-front-page .widget-area.two.widget:nth-child(even) {1493 .template-front-page.two-sidebars .widget, 1494 .template-front-page.two-sidebars .widget:nth-child(even) { 1495 1495 float: none; 1496 1496 width: auto; 1497 1497 } -
wp-content/themes/twentytwelve/sidebar-front.php
20 20 21 21 // If we get this far, we have widgets. Let do this. 22 22 ?> 23 <div id="secondary" <?php twentytwelve_frontpage_sidebar_class(); ?>role="complementary">23 <div id="secondary" class="widget-area" role="complementary"> 24 24 <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?> 25 25 <div class="first front-widgets"> 26 26 <?php dynamic_sidebar( 'sidebar-2' ); ?> -
wp-content/themes/twentytwelve/rtl.css
199 199 margin: 8px 0 8px 24px; 200 200 } 201 201 .template-front-page .widget-area .widget, 202 .template-front-page .widget-area.two.front-widgets {202 .template-front-page.two-sidebars .widget-area .front-widgets { 203 203 float: right; 204 204 } 205 205 .template-front-page .widget-area .widget:nth-child(odd) { 206 206 clear: left; 207 207 } 208 208 .template-front-page .widget-area .widget:nth-child(even), 209 .template-front-page .widget-area.two.front-widgets + .front-widgets {209 .template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { 210 210 float: left; 211 211 margin: 0 24px 0; 212 212 margin: 0 1.714285714rem 0; -
wp-content/themes/twentytwelve/functions.php
216 216 } 217 217 add_action( 'widgets_init', 'twentytwelve_widgets_init' ); 218 218 219 /**220 * Counts the number of footer sidebars to enable dynamic classes for the footer.221 *222 * @since Twenty Twelve 1.0223 */224 function twentytwelve_frontpage_sidebar_class() {225 $classes = array( 'widget-area' );226 227 if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )228 $classes[] = 'two';229 230 echo 'class="' . implode( ' ', $classes ) . '"';231 }232 233 219 if ( ! function_exists( 'twentytwelve_content_nav' ) ) : 234 220 /** 235 221 * Displays navigation to next/previous pages when applicable. … … 366 352 * or full-width template. 367 353 * 2. A thumbnail in the Front Page template. 368 354 * 3. White or empty background color to change the layout and spacing. 355 * 4. Number of sidebars for front page template footer widget areas. 369 356 * 370 357 * @since Twenty Twelve 1.0 371 358 * … … 378 365 if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) ) 379 366 $classes[] = 'full-width'; 380 367 368 if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) ) 369 $classes[] = 'two-sidebars'; 370 381 371 if ( is_page_template( 'page-templates/front-page.php' ) ) { 382 372 $classes[] = 'template-front-page'; 383 373 if ( has_post_thumbnail() )