Skip to content

Commit

Permalink
Use thematic_get_wp_opt() in thematic_default_theme_layout()
Browse files Browse the repository at this point in the history
Previous use of thematic_get_theme_opt() caused an infinite
loop since thematic_get_theme_opt() now fallbacks to
thematic_default_opt() which calls thematic_default_theme_layout().

Using thematic_get_wp_opt() ensures we actually check if database
option exists or not.

See #110
  • Loading branch information
middlesister committed Jul 26, 2014
1 parent 5a43b80 commit 8a87bfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion library/extensions/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ function thematic_available_layout_slugs() {
*/
function thematic_default_theme_layout() {

$options = thematic_get_wp_opt( 'thematic_theme_opt' );

// use a default layout of right-sidebar if no theme option has been set
$thematic_default_layout = thematic_get_theme_opt( 'layout' ) ? thematic_get_theme_opt( 'layout' ) : 'right-sidebar';
$thematic_default_layout = isset( $options['layout'] ) ? $options['layout'] : 'right-sidebar';

/**
* Filter for the default layout
Expand Down

0 comments on commit 8a87bfe

Please sign in to comment.