Use default argument for get_option(). props dcowgill, westi. fixes #17686.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-06-05 19:53:31 +00:00
parent 8811f6bb78
commit ec46700dd4

View File

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