From 792b454c6df6b82991b642efa167afaa218926e2 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Tue, 28 Aug 2012 17:12:10 +0000 Subject: [PATCH] Twenty Twelve: rename custom page templates and place in sub-directory. Closes #21715. git-svn-id: http://core.svn.wordpress.org/trunk@21642 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- functions.php | 11 +++--- .../full-width.php | 4 ++- homepage.php => page-templates/home.php | 4 ++- rtl.css | 16 ++++----- style.css | 35 +++++++++---------- 5 files changed, 38 insertions(+), 32 deletions(-) rename full-width-page.php => page-templates/full-width.php (78%) rename homepage.php => page-templates/home.php (85%) diff --git a/functions.php b/functions.php index cd17f5e17..66d677afb 100644 --- a/functions.php +++ b/functions.php @@ -362,11 +362,14 @@ endif; function twentytwelve_body_class( $classes ) { $background_color = get_background_color(); - if ( ! is_active_sidebar( 1 ) || is_page_template( 'full-width-page.php' ) ) + if ( ! is_active_sidebar( 1 ) || is_page_template( 'page-templates/full-width.php' ) ) $classes[] = 'full-width'; - if ( is_page_template( 'homepage.php' ) && has_post_thumbnail() ) - $classes[] = 'has-post-thumbnail'; + if ( is_page_template( 'page-templates/home.php' ) ) { + $classes[] = 'template-home'; + if ( has_post_thumbnail() ) + $classes[] = 'has-post-thumbnail'; + } if ( empty( $background_color ) ) $classes[] = 'custom-background-empty'; @@ -384,7 +387,7 @@ add_filter( 'body_class', 'twentytwelve_body_class' ); * @since Twenty Twelve 1.0 */ function twentytwelve_content_width() { - if ( is_page_template( 'full-width-page.php' ) || is_attachment() || ! is_active_sidebar( 1 ) ) { + if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 1 ) ) { global $content_width; $content_width = 960; } diff --git a/full-width-page.php b/page-templates/full-width.php similarity index 78% rename from full-width-page.php rename to page-templates/full-width.php index ebf71e1f2..e5c7dd4c3 100644 --- a/full-width-page.php +++ b/page-templates/full-width.php @@ -1,6 +1,8 @@