Make WordPress Core

Changeset 21642


Ignore:
Timestamp:
08/28/2012 05:12:10 PM (14 years ago)
Author:
lancewillett
Message:

Twenty Twelve: rename custom page templates and place in sub-directory. Closes #21715.

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

Legend:

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

    r21639 r21642  
    363363        $background_color = get_background_color();
    364364
    365         if ( ! is_active_sidebar( 1 ) || is_page_template( 'full-width-page.php' ) )
     365        if ( ! is_active_sidebar( 1 ) || is_page_template( 'page-templates/full-width.php' ) )
    366366                $classes[] = 'full-width';
    367367
    368         if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() )
    369                 $classes[] = 'has-post-thumbnail';
     368        if ( is_page_template( 'page-templates/home.php' ) ) {
     369                $classes[] = 'template-home';
     370                if ( has_post_thumbnail() )
     371                        $classes[] = 'has-post-thumbnail';
     372        }
    370373
    371374        if ( empty( $background_color ) )
     
    385388 */
    386389function twentytwelve_content_width() {
    387         if ( is_page_template( 'full-width-page.php' ) || is_attachment() || ! is_active_sidebar( 1 ) ) {
     390        if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 1 ) ) {
    388391                global $content_width;
    389392                $content_width = 960;
  • trunk/wp-content/themes/twentytwelve/page-templates/full-width.php

    r21641 r21642  
    11<?php
    22/**
    3  * Template Name: Full-width page, no sidebar
     3 * Template Name: Full-width Page Template, No Sidebar
     4 *
     5 * @todo Better documentation here.
    46 *
    57 * @package WordPress
  • trunk/wp-content/themes/twentytwelve/page-templates/home.php

    r21641 r21642  
    11<?php
    22/**
    3  * Template Name: Homepage
     3 * Template Name: Homepage Template
     4 *
     5 * @todo Better documentation here.
    46 *
    57 * @package WordPress
  • trunk/wp-content/themes/twentytwelve/rtl.css

    r21617 r21642  
    140140-------------------------------------------------------------- */
    141141
    142 .page-template-homepage-php .widget-area .widget_text img {
     142.template-home .widget-area .widget_text img {
    143143        float: right;
    144144        margin: 8px 0 8px 24px;
     
    179179@media screen and (min-width: 600px) {
    180180        .site-content,
    181         .page-template-homepage-php.has-post-thumbnail article {
     181        .template-home.has-post-thumbnail article {
    182182                float: right;
    183183        }
     
    194194                text-align: right;
    195195        }
    196         .page-template-homepage-php .widget-area .widget_text img {
     196        .template-home .widget-area .widget_text img {
    197197                float: right;
    198198                margin: 8px 0 8px 24px;
    199199        }
    200         .page-template-homepage-php .widget-area .widget,
    201         .page-template-homepage-php .widget-area.two .home-widgets {
     200        .template-home .widget-area .widget,
     201        .template-home .widget-area.two .home-widgets {
    202202                float: right;
    203203        }
    204         .page-template-homepage-php .widget-area .widget:nth-child(odd) {
     204        .template-home .widget-area .widget:nth-child(odd) {
    205205                clear: left;
    206206        }
    207         .page-template-homepage-php .widget-area .widget:nth-child(even),
    208         .page-template-homepage-php .widget-area.two .home-widgets + .home-widgets {
     207        .template-home .widget-area .widget:nth-child(even),
     208        .template-home .widget-area.two .home-widgets + .home-widgets {
    209209                float: left;
    210210                margin: 0 24px 0;
  • trunk/wp-content/themes/twentytwelve/style.css

    r21639 r21642  
    12001200        margin-bottom: 1rem;
    12011201}
    1202 .page-template-homepage-php .site-content article {
     1202.template-home .site-content article {
    12031203        border: 0;
    12041204        margin-bottom: 0;
    12051205}
    1206 .page-template-homepage-php .widget-area {
     1206.template-home .widget-area {
    12071207        clear: both;
    12081208        float: none;
     
    12121212        border-top: 1px solid #ededed;
    12131213}
    1214 .page-template-homepage-php .widget-area .widget li {
     1214.template-home .widget-area .widget li {
    12151215        margin: 8px 0 0;
    12161216        margin: 0.571428571rem 0 0;
     
    12211221        list-style-position: inside;
    12221222}
    1223 .page-template-homepage-php .widget-area .widget li a {
     1223.template-home .widget-area .widget li a {
    12241224        color: #777;
    12251225}
    1226 .page-template-homepage-php .widget-area .widget li a:hover {
     1226.template-home .widget-area .widget li a:hover {
    12271227        color: #21759b;
    12281228}
    1229 .page-template-homepage-php .widget-area .widget_text img {
     1229.template-home .widget-area .widget_text img {
    12301230        float: left;
    12311231        margin: 8px 24px 8px 0;
     
    13251325                width: 65.104166667%;
    13261326        }
    1327         body.page-template-full-width-page-php .site-content,
    1328         body.page-template-homepage-php .site-content,
     1327        body.template-home .site-content,
    13291328        body.single-attachment .site-content,
    13301329        body.full-width .site-content {
     
    14291428                width: 79.666666667%;
    14301429        }
    1431         .page-template-homepage-php .site-content,
    1432         .page-template-homepage-php article {
     1430        .template-home .site-content,
     1431        .template-home article {
    14331432                overflow: hidden;
    14341433        }
    1435         .page-template-homepage-php.has-post-thumbnail article {
     1434        .template-home.has-post-thumbnail article {
    14361435                float: left;
    14371436                width: 47.916666667%;
     
    14421441                width: 47.916666667%;
    14431442        }
    1444         .page-template-homepage-php .widget-area .widget,
    1445         .page-template-homepage-php .widget-area.two .home-widgets {
     1443        .template-home .widget-area .widget,
     1444        .template-home .widget-area.two .home-widgets {
    14461445                float: left;
    14471446                width: 51.875%;
     
    14491448                margin-bottom: 1.714285714rem;
    14501449        }
    1451         .page-template-homepage-php .widget-area .widget:nth-child(odd) {
     1450        .template-home .widget-area .widget:nth-child(odd) {
    14521451                clear: right;
    14531452        }
    1454         .page-template-homepage-php .widget-area .widget:nth-child(even),
    1455         .page-template-homepage-php .widget-area.two .home-widgets + .home-widgets {
     1453        .template-home .widget-area .widget:nth-child(even),
     1454        .template-home .widget-area.two .home-widgets + .home-widgets {
    14561455                float: right;
    14571456                width: 39.0625%;
     
    14591458                margin: 0 0 1.714285714rem;
    14601459        }
    1461         .page-template-homepage-php .widget-area.two .widget,
    1462         .page-template-homepage-php .widget-area.two .widget:nth-child(even) {
     1460        .template-home .widget-area.two .widget,
     1461        .template-home .widget-area.two .widget:nth-child(even) {
    14631462                float: none;
    14641463                width: auto;
Note: See TracChangeset for help on using the changeset viewer.