Permalink
Browse files

Allow the theme to set a default layout.

git-svn-id: http://svn.locallylost.com/themes/hybrid-core/trunk@943 dba0f204-706d-4bc1-bc29-8b92e0485636
  • Loading branch information...
1 parent 5fcfb4f commit 9a737cc721f2b98e1c0b33eb17f5fbc157934dff greenshady committed Dec 9, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 extensions/theme-layouts.php
@@ -121,6 +121,10 @@ function theme_layouts_get_layout() {
if ( empty( $layout ) || !in_array( $layout, $post_layouts[0] ) )
$layout = 'default';
+ /* If the theme set a default layout, use it if the layout should be set to default. */
+ if ( 'default' == $layout && !empty( $post_layouts[1] ) && isset( $post_layouts[1]['default'] ) )
+ $layout = $post_layouts[1]['default'];
+
/* @deprecated 0.2.0. Use the 'get_theme_layout' hook. */
$layout = apply_filters( 'get_post_layout', "layout-{$layout}" );

0 comments on commit 9a737cc

Please sign in to comment.