Sanity check in twentyeleven_get_theme_options() -- if the option doesn't exist, return the default options instead. We already instantiate the option on admin_init. fixes #17686.

git-svn-id: https://develop.svn.wordpress.org/trunk@18141 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2011-06-04 22:05:29 +00:00
parent 7840df6b57
commit 3e27653486

View File

@@ -177,7 +177,10 @@ function twentyeleven_get_default_theme_options() {
* @since Twenty Eleven 1.0
*/
function twentyeleven_get_theme_options() {
return get_option( 'twentyeleven_theme_options' );
$options = get_option( 'twentyeleven_theme_options' );
if ( false === $options )
return twentyeleven_get_default_theme_options();
return $options;
}
/**