Make WordPress Core

Changeset 21886


Ignore:
Timestamp:
09/18/2012 05:28:36 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Twelve: rename homepage template to front-page; including s/home/front-page/ in many places -- see notes in ticket. See #21909.

Location:
trunk/wp-content/themes/twentytwelve
Files:
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/functions.php

    r21882 r21886  
    180180
    181181/**
    182  * Registers our main widget area and the homepage widget areas.
     182 * Registers our main widget area and the front page widget areas.
    183183 *
    184184 * @since Twenty Twelve 1.0
     
    188188        'name' => __( 'Main Sidebar', 'twentytwelve' ),
    189189        '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' ),
    191191        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    192192        'after_widget' => '</aside>',
     
    196196
    197197    register_sidebar( array(
    198         'name' => __( 'First Homepage Widget Area', 'twentytwelve' ),
     198        'name' => __( 'First Front Page Widget Area', 'twentytwelve' ),
    199199        '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' ),
    201201        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    202202        'after_widget' => '</aside>',
     
    206206
    207207    register_sidebar( array(
    208         'name' => __( 'Second Homepage Widget Area', 'twentytwelve' ),
     208        'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ),
    209209        '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' ),
    211211        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    212212        'after_widget' => '</aside>',
     
    222222 * @since Twenty Twelve 1.0
    223223 */
    224 function twentytwelve_homepage_sidebar_class() {
     224function twentytwelve_frontpage_sidebar_class() {
    225225    $classes = array( 'widget-area' );
    226226
     
    365365 * 1. Using a full-width layout, when no active widgets in the sidebar
    366366 *    or full-width template.
    367  * 2. A thumbnail in the Homepage page template.
     367 * 2. A thumbnail in the Front Page template.
    368368 * 3. White or empty background color to change the layout and spacing.
    369369 *
     
    379379        $classes[] = 'full-width';
    380380
    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';
    383383        if ( has_post_thumbnail() )
    384384            $classes[] = 'has-post-thumbnail';
  • trunk/wp-content/themes/twentytwelve/page-templates/front-page.php

    r21884 r21886  
    11<?php
    22/**
    3  * Template Name: Homepage Template
     3 * Template Name: Front Page Template
    44 *
    55 * @todo Better documentation here.
     
    2929    </div><!-- #primary -->
    3030
    31 <?php get_sidebar( 'home' ); ?>
     31<?php get_sidebar( 'front' ); ?>
    3232<?php get_footer(); ?>
  • trunk/wp-content/themes/twentytwelve/rtl.css

    r21726 r21886  
    147147
    148148
    149 /* =Home page template styling
    150 -------------------------------------------------------------- */
    151 
    152 .template-home .widget-area .widget_text img {
     149/* =Front page template styling
     150-------------------------------------------------------------- */
     151
     152.template-front-page .widget-area .widget_text img {
    153153    float: right;
    154154    margin: 8px 0 8px 24px;
     
    189189@media screen and (min-width: 600px) {
    190190    .site-content,
    191     .template-home.has-post-thumbnail article {
     191    .template-front-page.has-post-thumbnail article {
    192192        float: right;
    193193    }
     
    200200        text-align: right;
    201201    }
    202     .template-home .widget-area .widget_text img {
     202    .template-front-page .widget-area .widget_text img {
    203203        float: right;
    204204        margin: 8px 0 8px 24px;
    205205    }
    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 .front-widgets {
    208208        float: right;
    209209    }
    210     .template-home .widget-area .widget:nth-child(odd) {
     210    .template-front-page .widget-area .widget:nth-child(odd) {
    211211        clear: left;
    212212    }
    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 .front-widgets + .front-widgets {
    215215        float: left;
    216216        margin: 0 24px 0;
  • trunk/wp-content/themes/twentytwelve/sidebar-front.php

    r21884 r21886  
    11<?php
    22/**
    3  * The sidebar containing the homepage widget areas.
     3 * The sidebar containing the front page widget areas.
    44 *
    55 * If no active widgets in either sidebar, they will be hidden completely.
     
    1111
    1212/*
    13  * The homepage widget area is triggered if any of the areas
     13 * The front page widget area is triggered if any of the areas
    1414 * have widgets. So let's check that first.
    1515 *
     
    2121// If we get this far, we have widgets. Let do this.
    2222?>
    23 <div id="secondary" <?php twentytwelve_homepage_sidebar_class(); ?> role="complementary">
     23<div id="secondary" <?php twentytwelve_frontpage_sidebar_class(); ?> role="complementary">
    2424    <?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
    25     <div class="first home-widgets">
     25    <div class="first front-widgets">
    2626        <?php dynamic_sidebar( 'sidebar-2' ); ?>
    2727    </div><!-- .first -->
     
    2929
    3030    <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
    31     <div class="second home-widgets">
     31    <div class="second front-widgets">
    3232        <?php dynamic_sidebar( 'sidebar-3' ); ?>
    3333    </div><!-- .second -->
  • trunk/wp-content/themes/twentytwelve/style.css

    r21761 r21886  
    44Author: the WordPress team
    55Author 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.
     6Description: 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.
    77Version: 0.9
    88License: GNU General Public License v2 or later
     
    12051205
    12061206
    1207 /* =Homepage template
     1207/* =Front page template
    12081208-------------------------------------------------------------- */
    12091209
     
    12121212    margin-bottom: 1rem;
    12131213}
    1214 .template-home .site-content article {
     1214.template-front-page .site-content article {
    12151215    border: 0;
    12161216    margin-bottom: 0;
    12171217}
    1218 .template-home .widget-area {
     1218.template-front-page .widget-area {
    12191219    clear: both;
    12201220    float: none;
     
    12241224    border-top: 1px solid #ededed;
    12251225}
    1226 .template-home .widget-area .widget li {
     1226.template-front-page .widget-area .widget li {
    12271227    margin: 8px 0 0;
    12281228    margin: 0.571428571rem 0 0;
     
    12331233    list-style-position: inside;
    12341234}
    1235 .template-home .widget-area .widget li a {
     1235.template-front-page .widget-area .widget li a {
    12361236    color: #777;
    12371237}
    1238 .template-home .widget-area .widget li a:hover {
     1238.template-front-page .widget-area .widget li a:hover {
    12391239    color: #21759b;
    12401240}
    1241 .template-home .widget-area .widget_text img {
     1241.template-front-page .widget-area .widget_text img {
    12421242    float: left;
    12431243    margin: 8px 24px 8px 0;
     
    13321332        width: 65.104166667%;
    13331333    }
    1334     body.template-home .site-content,
     1334    body.template-front-page .site-content,
    13351335    body.single-attachment .site-content,
    13361336    body.full-width .site-content {
     
    14351435        width: 79.666666667%;
    14361436    }
    1437     .template-home .site-content,
    1438     .template-home article {
     1437    .template-front-page .site-content,
     1438    .template-front-page article {
    14391439        overflow: hidden;
    14401440    }
    1441     .template-home.has-post-thumbnail article {
     1441    .template-front-page.has-post-thumbnail article {
    14421442        float: left;
    14431443        width: 47.916666667%;
     
    14481448        width: 47.916666667%;
    14491449    }
    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 .front-widgets {
    14521452        float: left;
    14531453        width: 51.875%;
     
    14551455        margin-bottom: 1.714285714rem;
    14561456    }
    1457     .template-home .widget-area .widget:nth-child(odd) {
     1457    .template-front-page .widget-area .widget:nth-child(odd) {
    14581458        clear: right;
    14591459    }
    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 .front-widgets + .front-widgets {
    14621462        float: right;
    14631463        width: 39.0625%;
     
    14651465        margin: 0 0 1.714285714rem;
    14661466    }
    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) {
    14691469        float: none;
    14701470        width: auto;
Note: See TracChangeset for help on using the changeset viewer.