Ticket #21909: 21909.diff
File 21909.diff, 11.6 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentytwelve/style.css
3 3 Theme URI: http://wordpress.org/extend/themes/twentytwelve 4 4 Author: the WordPress team 5 5 Author URI: http://wordpress.org/ 6 Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a homepage template with a its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background.6 Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front-page template with a its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background. 7 7 Version: 0.9 8 8 License: GNU General Public License v2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 1204 1204 } 1205 1205 1206 1206 1207 /* = Homepage template1207 /* =Front page template 1208 1208 -------------------------------------------------------------- */ 1209 1209 1210 1210 .entry-page-image { 1211 1211 margin-bottom: 14px; 1212 1212 margin-bottom: 1rem; 1213 1213 } 1214 .template- home .site-content article {1214 .template-front-page .site-content article { 1215 1215 border: 0; 1216 1216 margin-bottom: 0; 1217 1217 } 1218 .template- home .widget-area {1218 .template-front-page .widget-area { 1219 1219 clear: both; 1220 1220 float: none; 1221 1221 width: auto; … … 1223 1223 padding-top: 1.714285714rem; 1224 1224 border-top: 1px solid #ededed; 1225 1225 } 1226 .template- home .widget-area .widget li {1226 .template-front-page .widget-area .widget li { 1227 1227 margin: 8px 0 0; 1228 1228 margin: 0.571428571rem 0 0; 1229 1229 font-size: 13px; … … 1232 1232 list-style-type: square; 1233 1233 list-style-position: inside; 1234 1234 } 1235 .template- home .widget-area .widget li a {1235 .template-front-page .widget-area .widget li a { 1236 1236 color: #777; 1237 1237 } 1238 .template- home .widget-area .widget li a:hover {1238 .template-front-page .widget-area .widget li a:hover { 1239 1239 color: #21759b; 1240 1240 } 1241 .template- home .widget-area .widget_text img {1241 .template-front-page .widget-area .widget_text img { 1242 1242 float: left; 1243 1243 margin: 8px 24px 8px 0; 1244 1244 margin: 0.571428571rem 1.714285714rem 0.571428571rem 0; … … 1331 1331 float: left; 1332 1332 width: 65.104166667%; 1333 1333 } 1334 body.template- home .site-content,1334 body.template-front-page .site-content, 1335 1335 body.single-attachment .site-content, 1336 1336 body.full-width .site-content { 1337 1337 width: 100%; … … 1434 1434 #respond form textarea.blog-textarea { 1435 1435 width: 79.666666667%; 1436 1436 } 1437 .template- home .site-content,1438 .template- home article {1437 .template-front-page .site-content, 1438 .template-front-page article { 1439 1439 overflow: hidden; 1440 1440 } 1441 .template- home.has-post-thumbnail article {1441 .template-front-page.has-post-thumbnail article { 1442 1442 float: left; 1443 1443 width: 47.916666667%; 1444 1444 } … … 1447 1447 margin-bottom: 0; 1448 1448 width: 47.916666667%; 1449 1449 } 1450 .template- home .widget-area .widget,1451 .template- home .widget-area.two .home-widgets {1450 .template-front-page .widget-area .widget, 1451 .template-front-page .widget-area.two .home-widgets { 1452 1452 float: left; 1453 1453 width: 51.875%; 1454 1454 margin-bottom: 24px; 1455 1455 margin-bottom: 1.714285714rem; 1456 1456 } 1457 .template- home .widget-area .widget:nth-child(odd) {1457 .template-front-page .widget-area .widget:nth-child(odd) { 1458 1458 clear: right; 1459 1459 } 1460 .template- home .widget-area .widget:nth-child(even),1461 .template- home .widget-area.two .home-widgets + .home-widgets {1460 .template-front-page .widget-area .widget:nth-child(even), 1461 .template-front-page .widget-area.two .home-widgets + .home-widgets { 1462 1462 float: right; 1463 1463 width: 39.0625%; 1464 1464 margin: 0 0 24px; 1465 1465 margin: 0 0 1.714285714rem; 1466 1466 } 1467 .template- home .widget-area.two .widget,1468 .template- home .widget-area.two .widget:nth-child(even) {1467 .template-front-page .widget-area.two .widget, 1468 .template-front-page .widget-area.two .widget:nth-child(even) { 1469 1469 float: none; 1470 1470 width: auto; 1471 1471 } -
wp-content/themes/twentytwelve/sidebar-home.php
1 1 <?php 2 2 /** 3 * The sidebar containing the homepage widget areas.3 * The sidebar containing the front page widget areas. 4 4 * 5 5 * If no active widgets in either sidebar, they will be hidden completely. 6 6 * … … 10 10 */ 11 11 12 12 /* 13 * The homepage widget area is triggered if any of the areas13 * The front page widget area is triggered if any of the areas 14 14 * have widgets. So let's check that first. 15 15 * 16 16 * If none of the sidebars have widgets, then let's bail early. … … 20 20 21 21 // If we get this far, we have widgets. Let do this. 22 22 ?> 23 <div id="secondary" <?php twentytwelve_ homepage_sidebar_class(); ?> role="complementary">23 <div id="secondary" <?php twentytwelve_frontpage_sidebar_class(); ?> role="complementary"> 24 24 <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?> 25 25 <div class="first home-widgets"> 26 26 <?php dynamic_sidebar( 'sidebar-2' ); ?> -
wp-content/themes/twentytwelve/rtl.css
146 146 } 147 147 148 148 149 /* = Homepage template styling149 /* =Front page template styling 150 150 -------------------------------------------------------------- */ 151 151 152 .template- home .widget-area .widget_text img {152 .template-front-page .widget-area .widget_text img { 153 153 float: right; 154 154 margin: 8px 0 8px 24px; 155 155 margin: 0.571428571rem 0 0.571428571rem 1.714285714rem; … … 188 188 /* Minimum width of 600 pixels. */ 189 189 @media screen and (min-width: 600px) { 190 190 .site-content, 191 .template- home.has-post-thumbnail article {191 .template-front-page.has-post-thumbnail article { 192 192 float: right; 193 193 } 194 194 .widget-area, … … 199 199 .site-header h2 { 200 200 text-align: right; 201 201 } 202 .template- home .widget-area .widget_text img {202 .template-front-page .widget-area .widget_text img { 203 203 float: right; 204 204 margin: 8px 0 8px 24px; 205 205 } 206 .template- home .widget-area .widget,207 .template- home .widget-area.two .home-widgets {206 .template-front-page .widget-area .widget, 207 .template-front-page .widget-area.two .home-widgets { 208 208 float: right; 209 209 } 210 .template- home .widget-area .widget:nth-child(odd) {210 .template-front-page .widget-area .widget:nth-child(odd) { 211 211 clear: left; 212 212 } 213 .template- home .widget-area .widget:nth-child(even),214 .template- home .widget-area.two .home-widgets + .home-widgets {213 .template-front-page .widget-area .widget:nth-child(even), 214 .template-front-page .widget-area.two .home-widgets + .home-widgets { 215 215 float: left; 216 216 margin: 0 24px 0; 217 217 margin: 0 1.714285714rem 0; -
wp-content/themes/twentytwelve/functions.php
179 179 add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' ); 180 180 181 181 /** 182 * Registers our main widget area and the homepage widget areas.182 * Registers our main widget area and the front page widget areas. 183 183 * 184 184 * @since Twenty Twelve 1.0 185 185 */ … … 187 187 register_sidebar( array( 188 188 'name' => __( 'Main Sidebar', 'twentytwelve' ), 189 189 'id' => 'sidebar-1', 190 'description' => __( 'Appears on posts and pages except the optional Homepage template, which has its own widgets', 'twentytwelve' ),190 'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ), 191 191 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 192 192 'after_widget' => '</aside>', 193 193 'before_title' => '<h3 class="widget-title">', … … 195 195 ) ); 196 196 197 197 register_sidebar( array( 198 'name' => __( 'First Homepage Widget Area', 'twentytwelve' ),198 'name' => __( 'First Front Page Widget Area', 'twentytwelve' ), 199 199 'id' => 'sidebar-2', 200 'description' => __( 'Appears when using the optional homepage template with a page set as Static Front Page', 'twentytwelve' ),200 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), 201 201 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 202 202 'after_widget' => '</aside>', 203 203 'before_title' => '<h3 class="widget-title">', … … 205 205 ) ); 206 206 207 207 register_sidebar( array( 208 'name' => __( 'Second Homepage Widget Area', 'twentytwelve' ),208 'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ), 209 209 'id' => 'sidebar-3', 210 'description' => __( 'Appears when using the optional homepage template with a page set as Static Front Page', 'twentytwelve' ),210 'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ), 211 211 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 212 212 'after_widget' => '</aside>', 213 213 'before_title' => '<h3 class="widget-title">', … … 221 221 * 222 222 * @since Twenty Twelve 1.0 223 223 */ 224 function twentytwelve_ homepage_sidebar_class() {224 function twentytwelve_frontpage_sidebar_class() { 225 225 $classes = array( 'widget-area' ); 226 226 227 227 if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) ) … … 364 364 * Extends the default WordPress body class to denote: 365 365 * 1. Using a full-width layout, when no active widgets in the sidebar 366 366 * or full-width template. 367 * 2. A thumbnail in the Homepage page template.367 * 2. A thumbnail in the Front Page template. 368 368 * 3. White or empty background color to change the layout and spacing. 369 369 * 370 370 * @since Twenty Twelve 1.0 … … 378 378 if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) ) 379 379 $classes[] = 'full-width'; 380 380 381 if ( is_page_template( 'page-templates/ home.php' ) ) {382 $classes[] = 'template- home';381 if ( is_page_template( 'page-templates/front-page.php' ) ) { 382 $classes[] = 'template-front-page'; 383 383 if ( has_post_thumbnail() ) 384 384 $classes[] = 'has-post-thumbnail'; 385 385 } -
wp-content/themes/twentytwelve/page-templates/front-page.php
1 1 <?php 2 2 /** 3 * Template Name: Homepage Template3 * Template Name: Front Page Template 4 4 * 5 5 * @todo Better documentation here. 6 6 * -
wp-content/themes/twentytwelve/page-templates/home.php
1 <?php2 /**3 * Template Name: Homepage Template4 *5 * @todo Better documentation here.6 *7 * @package WordPress8 * @subpackage Twenty_Twelve9 * @since Twenty Twelve 1.010 */11 12 get_header(); ?>13 14 <div id="primary" class="site-content">15 <div id="content" role="main">16 17 <?php while ( have_posts() ) : the_post(); ?>18 <?php if ( has_post_thumbnail() ) : ?>19 <div class="entry-page-image">20 <?php the_post_thumbnail(); ?>21 </div><!-- .entry-page-image -->22 <?php endif; ?>23 24 <?php get_template_part( 'content', 'page' ); ?>25 26 <?php endwhile; // end of the loop. ?>27 28 </div><!-- #content -->29 </div><!-- #primary -->30 31 <?php get_sidebar( 'home' ); ?>32 <?php get_footer(); ?>33 No newline at end of file