Twenty Twelve: rename homepage template to front-page; including s/home/front-page/ in many places -- see notes in ticket. See #21909.
git-svn-id: http://core.svn.wordpress.org/trunk@21886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
263dffd5b8
commit
5f5984c491
|
@ -179,7 +179,7 @@ function twentytwelve_page_menu_args( $args ) {
|
|||
add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' );
|
||||
|
||||
/**
|
||||
* Registers our main widget area and the homepage widget areas.
|
||||
* Registers our main widget area and the front page widget areas.
|
||||
*
|
||||
* @since Twenty Twelve 1.0
|
||||
*/
|
||||
|
@ -187,7 +187,7 @@ function twentytwelve_widgets_init() {
|
|||
register_sidebar( array(
|
||||
'name' => __( 'Main Sidebar', 'twentytwelve' ),
|
||||
'id' => 'sidebar-1',
|
||||
'description' => __( 'Appears on posts and pages except the optional Homepage template, which has its own widgets', 'twentytwelve' ),
|
||||
'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -195,9 +195,9 @@ function twentytwelve_widgets_init() {
|
|||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => __( 'First Homepage Widget Area', 'twentytwelve' ),
|
||||
'name' => __( 'First Front Page Widget Area', 'twentytwelve' ),
|
||||
'id' => 'sidebar-2',
|
||||
'description' => __( 'Appears when using the optional homepage template with a page set as Static Front Page', 'twentytwelve' ),
|
||||
'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -205,9 +205,9 @@ function twentytwelve_widgets_init() {
|
|||
) );
|
||||
|
||||
register_sidebar( array(
|
||||
'name' => __( 'Second Homepage Widget Area', 'twentytwelve' ),
|
||||
'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ),
|
||||
'id' => 'sidebar-3',
|
||||
'description' => __( 'Appears when using the optional homepage template with a page set as Static Front Page', 'twentytwelve' ),
|
||||
'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ),
|
||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||
'after_widget' => '</aside>',
|
||||
'before_title' => '<h3 class="widget-title">',
|
||||
|
@ -221,7 +221,7 @@ add_action( 'widgets_init', 'twentytwelve_widgets_init' );
|
|||
*
|
||||
* @since Twenty Twelve 1.0
|
||||
*/
|
||||
function twentytwelve_homepage_sidebar_class() {
|
||||
function twentytwelve_frontpage_sidebar_class() {
|
||||
$classes = array( 'widget-area' );
|
||||
|
||||
if ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )
|
||||
|
@ -364,7 +364,7 @@ endif;
|
|||
* Extends the default WordPress body class to denote:
|
||||
* 1. Using a full-width layout, when no active widgets in the sidebar
|
||||
* or full-width template.
|
||||
* 2. A thumbnail in the Homepage page template.
|
||||
* 2. A thumbnail in the Front Page template.
|
||||
* 3. White or empty background color to change the layout and spacing.
|
||||
*
|
||||
* @since Twenty Twelve 1.0
|
||||
|
@ -378,8 +378,8 @@ function twentytwelve_body_class( $classes ) {
|
|||
if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) )
|
||||
$classes[] = 'full-width';
|
||||
|
||||
if ( is_page_template( 'page-templates/home.php' ) ) {
|
||||
$classes[] = 'template-home';
|
||||
if ( is_page_template( 'page-templates/front-page.php' ) ) {
|
||||
$classes[] = 'template-front-page';
|
||||
if ( has_post_thumbnail() )
|
||||
$classes[] = 'has-post-thumbnail';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Template Name: Homepage Template
|
||||
* Template Name: Front Page Template
|
||||
*
|
||||
* @todo Better documentation here.
|
||||
*
|
||||
|
@ -28,5 +28,5 @@ get_header(); ?>
|
|||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php get_sidebar( 'home' ); ?>
|
||||
<?php get_sidebar( 'front' ); ?>
|
||||
<?php get_footer(); ?>
|
|
@ -146,10 +146,10 @@ label ~ span.required {
|
|||
}
|
||||
|
||||
|
||||
/* =Home page template styling
|
||||
/* =Front page template styling
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
.template-home .widget-area .widget_text img {
|
||||
.template-front-page .widget-area .widget_text img {
|
||||
float: right;
|
||||
margin: 8px 0 8px 24px;
|
||||
margin: 0.571428571rem 0 0.571428571rem 1.714285714rem;
|
||||
|
@ -188,7 +188,7 @@ label ~ span.required {
|
|||
/* Minimum width of 600 pixels. */
|
||||
@media screen and (min-width: 600px) {
|
||||
.site-content,
|
||||
.template-home.has-post-thumbnail article {
|
||||
.template-front-page.has-post-thumbnail article {
|
||||
float: right;
|
||||
}
|
||||
.widget-area,
|
||||
|
@ -199,19 +199,19 @@ label ~ span.required {
|
|||
.site-header h2 {
|
||||
text-align: right;
|
||||
}
|
||||
.template-home .widget-area .widget_text img {
|
||||
.template-front-page .widget-area .widget_text img {
|
||||
float: right;
|
||||
margin: 8px 0 8px 24px;
|
||||
}
|
||||
.template-home .widget-area .widget,
|
||||
.template-home .widget-area.two .home-widgets {
|
||||
.template-front-page .widget-area .widget,
|
||||
.template-front-page .widget-area.two .front-widgets {
|
||||
float: right;
|
||||
}
|
||||
.template-home .widget-area .widget:nth-child(odd) {
|
||||
.template-front-page .widget-area .widget:nth-child(odd) {
|
||||
clear: left;
|
||||
}
|
||||
.template-home .widget-area .widget:nth-child(even),
|
||||
.template-home .widget-area.two .home-widgets + .home-widgets {
|
||||
.template-front-page .widget-area .widget:nth-child(even),
|
||||
.template-front-page .widget-area.two .front-widgets + .front-widgets {
|
||||
float: left;
|
||||
margin: 0 24px 0;
|
||||
margin: 0 1.714285714rem 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* The sidebar containing the homepage widget areas.
|
||||
* The sidebar containing the front page widget areas.
|
||||
*
|
||||
* If no active widgets in either sidebar, they will be hidden completely.
|
||||
*
|
||||
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* The homepage widget area is triggered if any of the areas
|
||||
* The front page widget area is triggered if any of the areas
|
||||
* have widgets. So let's check that first.
|
||||
*
|
||||
* If none of the sidebars have widgets, then let's bail early.
|
||||
|
@ -20,15 +20,15 @@ if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) )
|
|||
|
||||
// If we get this far, we have widgets. Let do this.
|
||||
?>
|
||||
<div id="secondary" <?php twentytwelve_homepage_sidebar_class(); ?> role="complementary">
|
||||
<div id="secondary" <?php twentytwelve_frontpage_sidebar_class(); ?> role="complementary">
|
||||
<?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
|
||||
<div class="first home-widgets">
|
||||
<div class="first front-widgets">
|
||||
<?php dynamic_sidebar( 'sidebar-2' ); ?>
|
||||
</div><!-- .first -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
|
||||
<div class="second home-widgets">
|
||||
<div class="second front-widgets">
|
||||
<?php dynamic_sidebar( 'sidebar-3' ); ?>
|
||||
</div><!-- .second -->
|
||||
<?php endif; ?>
|
|
@ -3,7 +3,7 @@ Theme Name: Twenty Twelve
|
|||
Theme URI: http://wordpress.org/extend/themes/twentytwelve
|
||||
Author: the WordPress team
|
||||
Author URI: http://wordpress.org/
|
||||
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.
|
||||
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.
|
||||
Version: 0.9
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
@ -1204,18 +1204,18 @@ label ~ span.required {
|
|||
}
|
||||
|
||||
|
||||
/* =Homepage template
|
||||
/* =Front page template
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
.entry-page-image {
|
||||
margin-bottom: 14px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.template-home .site-content article {
|
||||
.template-front-page .site-content article {
|
||||
border: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.template-home .widget-area {
|
||||
.template-front-page .widget-area {
|
||||
clear: both;
|
||||
float: none;
|
||||
width: auto;
|
||||
|
@ -1223,7 +1223,7 @@ label ~ span.required {
|
|||
padding-top: 1.714285714rem;
|
||||
border-top: 1px solid #ededed;
|
||||
}
|
||||
.template-home .widget-area .widget li {
|
||||
.template-front-page .widget-area .widget li {
|
||||
margin: 8px 0 0;
|
||||
margin: 0.571428571rem 0 0;
|
||||
font-size: 13px;
|
||||
|
@ -1232,13 +1232,13 @@ label ~ span.required {
|
|||
list-style-type: square;
|
||||
list-style-position: inside;
|
||||
}
|
||||
.template-home .widget-area .widget li a {
|
||||
.template-front-page .widget-area .widget li a {
|
||||
color: #777;
|
||||
}
|
||||
.template-home .widget-area .widget li a:hover {
|
||||
.template-front-page .widget-area .widget li a:hover {
|
||||
color: #21759b;
|
||||
}
|
||||
.template-home .widget-area .widget_text img {
|
||||
.template-front-page .widget-area .widget_text img {
|
||||
float: left;
|
||||
margin: 8px 24px 8px 0;
|
||||
margin: 0.571428571rem 1.714285714rem 0.571428571rem 0;
|
||||
|
@ -1331,7 +1331,7 @@ img#wpstats {
|
|||
float: left;
|
||||
width: 65.104166667%;
|
||||
}
|
||||
body.template-home .site-content,
|
||||
body.template-front-page .site-content,
|
||||
body.single-attachment .site-content,
|
||||
body.full-width .site-content {
|
||||
width: 100%;
|
||||
|
@ -1434,11 +1434,11 @@ img#wpstats {
|
|||
#respond form textarea.blog-textarea {
|
||||
width: 79.666666667%;
|
||||
}
|
||||
.template-home .site-content,
|
||||
.template-home article {
|
||||
.template-front-page .site-content,
|
||||
.template-front-page article {
|
||||
overflow: hidden;
|
||||
}
|
||||
.template-home.has-post-thumbnail article {
|
||||
.template-front-page.has-post-thumbnail article {
|
||||
float: left;
|
||||
width: 47.916666667%;
|
||||
}
|
||||
|
@ -1447,25 +1447,25 @@ img#wpstats {
|
|||
margin-bottom: 0;
|
||||
width: 47.916666667%;
|
||||
}
|
||||
.template-home .widget-area .widget,
|
||||
.template-home .widget-area.two .home-widgets {
|
||||
.template-front-page .widget-area .widget,
|
||||
.template-front-page .widget-area.two .front-widgets {
|
||||
float: left;
|
||||
width: 51.875%;
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 1.714285714rem;
|
||||
}
|
||||
.template-home .widget-area .widget:nth-child(odd) {
|
||||
.template-front-page .widget-area .widget:nth-child(odd) {
|
||||
clear: right;
|
||||
}
|
||||
.template-home .widget-area .widget:nth-child(even),
|
||||
.template-home .widget-area.two .home-widgets + .home-widgets {
|
||||
.template-front-page .widget-area .widget:nth-child(even),
|
||||
.template-front-page .widget-area.two .front-widgets + .front-widgets {
|
||||
float: right;
|
||||
width: 39.0625%;
|
||||
margin: 0 0 24px;
|
||||
margin: 0 0 1.714285714rem;
|
||||
}
|
||||
.template-home .widget-area.two .widget,
|
||||
.template-home .widget-area.two .widget:nth-child(even) {
|
||||
.template-front-page .widget-area.two .widget,
|
||||
.template-front-page .widget-area.two .widget:nth-child(even) {
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue