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: http://svn.automattic.com/wordpress/trunk@18141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
17f43bea82
commit
e5090f3113
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue